From c3b2c9ad34cde4de822034be5041ae8e8f3698e4 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Tue, 12 Sep 2023 18:39:32 -0600 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 2e4d73806fbcaf26eeb82df3876a7f81686a4549 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Mon, 25 Sep 2023 11:40:40 -0600 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 b107d810437a5b644b0d515c1514641c38bb66f9 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Mon, 25 Sep 2023 15:28:02 -0600 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