From ae2b84b0612bd2102b3e9af4f7a67d9c0c5f7ca3 Mon Sep 17 00:00:00 2001 From: ElKowar <5300871+elkowar@users.noreply.github.com> Date: Wed, 20 Oct 2021 10:23:53 +0200 Subject: [PATCH] merge in some laptop changes --- nvim/.config/nvim/fnl/dots/plugins/lsp.fnl | 3 -- .../nvim/fnl/dots/plugins/telescope.fnl | 3 +- sway/.config/sway/config | 32 +++++++++++++++---- sway/.config/sway/import-gsettings | 15 +++++++++ 4 files changed, 42 insertions(+), 11 deletions(-) create mode 100755 sway/.config/sway/import-gsettings diff --git a/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl b/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl index a302ee2..6309fb6 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl @@ -109,9 +109,6 @@ :capabilities default-capabilities}})) ;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}})) - - - (let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server") sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server")] (init-lsp diff --git a/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl b/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl index ce6607d..c225994 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl @@ -5,7 +5,8 @@ (telescope.setup {:defaults {:mappings {:i {: actions.close}} - :file_ignore_patterns ["Cargo.lock" ".*.snap" "docs/theme/.*"]}}) + :file_ignore_patterns ["Cargo.lock" ".*.snap" "docs/theme/.*" "node%_modules/.*" "target/.*"]} + :extensions {:frecency {:persistent_filter false}}}) (telescope.load_extension "dap") (telescope.load_extension "packer") diff --git a/sway/.config/sway/config b/sway/.config/sway/config index eb0d81d..ef0900a 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -41,6 +41,22 @@ exec swayidle -w \ exec mako exec libinput-gestures-setup start +set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock +exec mkfifo $WOBSOCK && tail -f $WOBSOCK | wob + + + +exec_always import-gsettings + + +# brightness and volume popup +bindsym XF86AudioRaiseVolume exec pamixer -ui 2 && pamixer --get-volume > $WOBSOCK +bindsym XF86AudioLowerVolume exec pamixer -ud 2 && pamixer --get-volume > $WOBSOCK +bindsym XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK + +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' | tee /tmp/brightness > $WOBSOCK +bindsym XF86MonBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' | tee /tmp/brightness > $WOBSOCK +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK @@ -49,10 +65,11 @@ gaps inner 10 default_border pixel 1 +client.focused "#ebdbb2" "#282828" "#8ec07c" "#8ec07c" "#ebdbb2" +client.unfocused "#1d2021" "#1d2021" "#ebdbb2" "#00000000" +client.focused_inactive "#282828" "#282828" "#8ec07c" "#00000000" -client.focused "#ebdbb2" "#ebdbb2" "#1d2021" -client.unfocused "#1d2021" "#1d2021" "#1d2021" - +hide_edge_borders smart @@ -185,10 +202,11 @@ input "type:keyboard" { -bindsym --locked XF86MonBrightnessUp exec brightnessctl -e set 50+ -bindsym --locked XF86MonBrightnessDown exec brightnessctl -e set 50- -bindsym --locked XF86AudioRaiseVolume exec pamixer -i 5 -bindsym --locked XF86AudioLowerVolume exec pamixer -d 5 +#bindsym --locked XF86MonBrightnessUp exec brightnessctl -e set 50+ +#bindsym --locked XF86MonBrightnessDown exec brightnessctl -e set 50- + +#bindsym --locked XF86AudioRaiseVolume exec pamixer -i 5 +#bindsym --locked XF86AudioLowerVolume exec pamixer -d 5 bindsym $mod+Shift+S exec grimshot copy area bindsym $mod+Shift+b exec google-chrome-stable diff --git a/sway/.config/sway/import-gsettings b/sway/.config/sway/import-gsettings new file mode 100755 index 0000000..967620f --- /dev/null +++ b/sway/.config/sway/import-gsettings @@ -0,0 +1,15 @@ +#!/bin/sh + +# usage: import-gsettings +config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" +font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name"