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() { diff --git a/tmux/tmux.conf b/tmux/tmux.conf index f137d49..013aedc 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 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'],