From 9cb9cd8f7ca04193475de3600afe2347d322b2fc 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] stuff/ --- nvim/.config/nvim/fnl/dots/plugins/lsp.fnl | 4 +-- .../nvim/fnl/dots/plugins/telescope.fnl | 2 +- sway/.config/sway/config | 32 +++++++++++++++---- sway/.config/sway/import-gsettings | 15 +++++++++ 4 files changed, 43 insertions(+), 10 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 efd6094..4fb5fae 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl @@ -105,8 +105,8 @@ (let [rust-tools (require "rust-tools")] (rust-tools.setup {:tools {:inlay_hints {:show_parameter_hints false} :autoSetHints false} - :server {:on_attach on_attach - :cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}})) + :server {:on_attach on_attach}})) + ;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}})) (let [sumneko_binary "/usr/bin/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 1c628eb..1678506 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl @@ -5,7 +5,7 @@ (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 "frecency") diff --git a/sway/.config/sway/config b/sway/.config/sway/config index dc7efd7..dc252fa 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -40,6 +40,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 @@ -48,10 +64,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 @@ -184,10 +201,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"