From 8010c3189e5ffee127bb3b6a0cf9fcbb58f0d4b1 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sat, 23 Dec 2023 20:14:18 -0700 Subject: [PATCH 1/3] Fix swaybar lighting getter --- sway/swaybar_status.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sway/swaybar_status.sh b/sway/swaybar_status.sh index 9fab28f..bf874db 100755 --- a/sway/swaybar_status.sh +++ b/sway/swaybar_status.sh @@ -11,12 +11,18 @@ battery_charge() { } display_brightness() { + local x + if command -v ddcutil &>/dev/null; then - ddcutil getvcp 10 | awk ' - match($0, /[0-9]+,/) { printf "%s", substr($0, RSTART, RLENGTH - 1) }' - else - light -G | awk '{ split($0, a, "."); printf "%s", a[1] }' + x="$(ddcutil getvcp 10 2>/dev/null |\ + awk 'match($0, /[0-9]+,/) { printf "%s", substr($0, RSTART, RLENGTH - 1) }')" fi + + if [[ -z "$x" ]]; then + x="$(light -G | awk '{ split($0, a, "."); printf "%s", a[1] }')" + fi + + printf "%s" "$x" } get_volume() { From ada01a3cc01219837b673de536cbc1e0c32c18c6 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sat, 23 Dec 2023 20:14:18 -0700 Subject: [PATCH 2/3] Rg in file for vim --- vim/.vim/init_scripts/external_plugins.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vim/.vim/init_scripts/external_plugins.vim b/vim/.vim/init_scripts/external_plugins.vim index 51ed988..feac193 100644 --- a/vim/.vim/init_scripts/external_plugins.vim +++ b/vim/.vim/init_scripts/external_plugins.vim @@ -229,7 +229,7 @@ let RG_TEMPLATE = 'rg --hidden --no-ignore --follow ' let $FZF_DEFAULT_COMMAND = RG_TEMPLATE . '--files ' " Use ripgrep with fzf (from Jonhoo) -noremap s :Rg +noremap S :Rg command! -bang -nargs=* Rg \ call fzf#vim#grep( \ RG_TEMPLATE @@ -239,6 +239,8 @@ command! -bang -nargs=* Rg \ : fzf#vim#with_preview('right:50%:hidden', '?'), \ 0) +noremap s :BLines + " FZF colors match vim colorscheme let g:fzf_colors = \ { 'fg': ['fg', 'Normal'], From a371bc03929d9d6a183957795488147d70e5d4ef Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sat, 23 Dec 2023 20:14:18 -0700 Subject: [PATCH 3/3] Tmux binding for session switching --- tmux/tmux.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index a032600..4ef98ec 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -91,6 +91,9 @@ bind T clock-mode bind-key -n M-0 switch-client -n bind-key -n M-9 switch-client -p +unbind-key w +bind-key w choose-session + # Tmux Keybinds ===================================================== # Reload tmux quickly unbind R