From b6b7736474cd9366e6446bfa7a38023286e6bd1b Mon Sep 17 00:00:00 2001 From: yage Date: Tue, 17 Jan 2023 12:18:58 -0700 Subject: [PATCH] various config options updated; tmux to M-S instead of C-M --- bin/pulseaudio | 5 ++-- bin/umbreon/homedock | 22 +++++++++-------- bin/umbreon/undock | 2 ++ colorschemes/kitty.main | 2 +- config/tmux.conf | 53 +++++++++++++++++++++-------------------- vim/rc.vim | 3 --- vim/vundle.vim | 7 ++++++ 7 files changed, 52 insertions(+), 42 deletions(-) diff --git a/bin/pulseaudio b/bin/pulseaudio index e102e3d..23698a3 100755 --- a/bin/pulseaudio +++ b/bin/pulseaudio @@ -19,7 +19,8 @@ DEVICE="$1" COMMAND="$2" case $DEVICE in - sink | source ) ;; + sink ) AMIXER_DEVICE=Master ;; + source ) AMIXER_DEVICE=Capture ;; * ) ERROR 1 "Unsupported device '$DEVICE'" ;; esac @@ -36,7 +37,7 @@ case $COMMAND in mute ) pactl set-$DEVICE-mute $DEFAULT_DEVICE toggle $DOTWRYN/bin/play-sound mute - notify-send "default $DEVICE" "$(amixer sget Master | grep -q '\[on\]' && echo unmuted || echo muted)" + notify-send "default $DEVICE" "$(amixer sget $AMIXER_DEVICE | grep -q '\[on\]' && echo unmuted || echo muted)" ;; * ) ERROR "Unsupported command '$COMMAND'" ;; esac diff --git a/bin/umbreon/homedock b/bin/umbreon/homedock index a4e9ef9..c6a54ac 100755 --- a/bin/umbreon/homedock +++ b/bin/umbreon/homedock @@ -1,16 +1,18 @@ #!/bin/zsh source ${0:a:h}/xorg.zsh -xrandr \ - --output DP-3-1 \ - --primary \ - --auto \ - --mode 1920x1080 \ - --rotate normal \ - --pos 0x0 \ - --output eDP-1 \ - --off \ - ; +MOBILE=1 + +ARGS=() +[[ $MOBILE -eq 1 ]] && { + ARGS+=(--output DP-3 --mode 1920x1080 --pos 0x0 --primary) + ARGS+=(--output eDP-1 --mode 1920x1200 --right-of DP-3) +} || { + ARGS+=(--output DP-3-1 --mode 1920x1080 --pos 0x0 --primary) + ARGS+=(--output eDP-1 --off) +} + +xrandr ${ARGS[@]} xset dpms 0 0 0 && xset s noblank && xset s off \ && notify-send 'DPMS' 'disabled screen blank' diff --git a/bin/umbreon/undock b/bin/umbreon/undock index bc38ce8..82c766b 100755 --- a/bin/umbreon/undock +++ b/bin/umbreon/undock @@ -10,6 +10,8 @@ xrandr \ --pos 0x0 \ --output DP-3-1 \ --off \ + --output DP-3 \ + --off \ ; xset +dpms && xset s blank && xset s on \ diff --git a/colorschemes/kitty.main b/colorschemes/kitty.main index f69017b..d42831d 120000 --- a/colorschemes/kitty.main +++ b/colorschemes/kitty.main @@ -1 +1 @@ -christmas.conf \ No newline at end of file +main.conf \ No newline at end of file diff --git a/config/tmux.conf b/config/tmux.conf index 864982f..e6d2871 100644 --- a/config/tmux.conf +++ b/config/tmux.conf @@ -28,23 +28,23 @@ set -g status-right "#(cat /sys/class/power_supply/BAT0/capacity)% | #[fg=magnet ##################################################################### # pane switch with vim-like controls -bind -n M-h select-pane -L -bind -n C-M-h send-keys C-b Left -bind -n M-j select-pane -D -bind -n C-M-j send-keys C-b Down -bind -n M-k select-pane -U -bind -n C-M-k send-keys C-b Up -bind -n M-l select-pane -R -bind -n C-M-l send-keys C-b Right +bind -n M-h select-pane -L +bind -n M-H send-keys C-b Left +bind -n M-j select-pane -D +bind -n M-J send-keys C-b Down +bind -n M-k select-pane -U +bind -n M-K send-keys C-b Up +bind -n M-l select-pane -R +bind -n M-L send-keys C-b Right -bind -n M-H resize-pane -L 2 -bind -n C-Left send-keys C-b C-Left -bind -n M-J resize-pane -D 2 -bind -n C-Down send-keys C-b C-Down -bind -n M-K resize-pane -U 2 -bind -n C-Up send-keys C-b C-Up -bind -n M-L resize-pane -R 2 -bind -n C-Right send-keys C-b C-Right +bind -n M-Left resize-pane -L 2 +bind -n M-S-Left send-keys C-b C-Left +bind -n M-Down resize-pane -D 2 +bind -n M-S-Down send-keys C-b C-Down +bind -n M-Up resize-pane -U 2 +bind -n M-S-Up send-keys C-b C-Up +bind -n M-Right resize-pane -R 2 +bind -n M-S-Right send-keys C-b C-Right # alt tab for window shift bind-key -n M-Tab next-window @@ -66,24 +66,25 @@ bind-key -n M-9 select-window -t 8 # new window and split pane quickly bind-key -n M-Enter new-window bind-key -n M-c send-keys C-b c -bind-key -n M-v split-window -v -bind-key -n C-M-v send-keys M-v -bind-key -n M-b split-window -h -bind-key -n C-M-b send-keys M-b -bind-key -n M-q killp -bind-key -n C-M-q send-keys M-q -bind-key -n M-z resize-pane -Z -bind-key -n C-M-z send-keys M-z + +bind-key -n M-v split-window -v +bind-key -n M-V send-keys M-v +bind-key -n M-b split-window -h +bind-key -n M-B send-keys M-b +bind-key -n M-q killp +bind-key -n M-Q send-keys M-q +bind-key -n M-z resize-pane -Z +bind-key -n M-Z send-keys M-z # nested session with meta-a bind-key -n M-a send-prefix # rena[M]e session bind-key -n M-m command-prompt -I "#S" "rename-session '%%'" -bind-key -n C-M-m send-keys M-m +bind-key -n M-M send-keys M-m # rename [w]indow -bind-key -n M-w command-prompt -I "#W" "rename-window '%%'" +bind-key -n M-w command-prompt -I "#W" "rename-window '%%'" bind-key -n C-M-w send-keys M-w # toggle readonly session diff --git a/vim/rc.vim b/vim/rc.vim index de6a568..e5ccdaa 100644 --- a/vim/rc.vim +++ b/vim/rc.vim @@ -20,9 +20,6 @@ nnoremap @q " \q for `q:` nnoremap q q: -" \f for fold -nnoremap f z - " \s previous selection command nnoremap s :'<,'> diff --git a/vim/vundle.vim b/vim/vundle.vim index e8e317d..287b9fa 100644 --- a/vim/vundle.vim +++ b/vim/vundle.vim @@ -63,6 +63,12 @@ let g:ale_linters = { \ 'python' : ['pylint'], \ 'go' : ['golint'] \} + +let g:ale_fixers = { +\ 'javascript': ['prettier'], +\ 'typescript': ['prettier'] +\} + let g:ale_lint_on_text_changed = 0 let g:ale_lint_on_insert_leave = 0 let g:ale_lint_on_save = 1 @@ -70,6 +76,7 @@ let g:ale_sign_column_always = 1 nmap ae (ale_next) nmap ar (ale_previous) +nmap f (ale_fix) " }}} " ---------------------------------------------------------------------