From 7865c357effd94299bd31a82ef0c4c317cbbe156 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Thu, 4 Mar 2021 20:24:40 +0100 Subject: [PATCH] updates --- fish/config.fish | 15 ++-------- fish/fish_user_key_bindings.fish | 16 ++++++---- hjalmar-droneship/i3/config | 27 ++++++++--------- hjalmar-droneship/onedrive/config | 2 +- hjalmar-mothership/i3/config | 27 ++++++++--------- hjalmar-mothership/onedrive/config | 2 +- manjaro.md | 1 + mimeapps.list | 31 +++++++++---------- nvim/coc-settings.json | 11 ++++--- nvim/init.vim | 48 +++++++++++++++--------------- redshift/redshift.conf | 10 +++++++ root/.tmux.conf | 11 +++---- root/locker.sh | 15 ++++++++++ 13 files changed, 117 insertions(+), 99 deletions(-) create mode 100644 redshift/redshift.conf create mode 100644 root/locker.sh diff --git a/fish/config.fish b/fish/config.fish index 38482f3..159483d 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -3,13 +3,13 @@ set -x EDITOR /usr/bin/nvim set -x BROWSER /usr/bin/chromium set -x QT_QPA_PLATFORMTHEME "qt5ct" set -x GTK2_RC_FILES "$HOME/.gtkrc-2.0" -set -x PYTHONBREAKPOINT ipdb.set_trace -set -x JAVA_HOME "/usr/lib/jvm/java-14-openjdk/" +set -x JAVA_HOME "/usr/lib/jvm/default/" +set -x PYTHONBREAKPOINT pudb.set_trace # cuda stuff set -x CUDA_HOME /opt/cuda set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH:$CUDA_HOME/lib64 -set -x PATH $CUDA_HOME/bin:/home/hjalmarlucius/.local/bin/:$PATH +set -Ua fish_user_paths /home/hjalmarlucius/.local/bin/ # Base16 Shell if status --is-interactive @@ -17,14 +17,5 @@ if status --is-interactive source "$BASE16_SHELL/profile_helper.fish" end -# MKL AMD fix -set -x MKL_DEBUG_CPU_TYPE 5 - # fzf bindings set -U FZF_LEGACY_KEYBINDINGS 0 - -function fish_user_key_bindings - for mode in insert default visual - bind -M $mode \cf forward-char - end -end diff --git a/fish/fish_user_key_bindings.fish b/fish/fish_user_key_bindings.fish index ee6170a..2dfece6 100644 --- a/fish/fish_user_key_bindings.fish +++ b/fish/fish_user_key_bindings.fish @@ -1,10 +1,16 @@ function fish_user_key_bindings + for mode in insert default visual + bind -M $mode \cf forward-char + end bind --preset _ beginning-of-line - bind \eh __fzf_reverse_isearch - bind \eF __fzf_open - bind -M insert \ec '__fzf_cd --hidden' - bind -M insert \ep __fzf_find_file - bind -M insert \ef '__fzf_open --editor' + bind -M insert \ew __fzf_reverse_isearch + bind -M insert \eo '__fzf_cd --hidden' + bind -M insert \eF __fzf_find_file + bind -M insert \ef __fzf_open end fzf_key_bindings + +function ll --description 'List contents of directory using long format' + ls -lha $argv +end diff --git a/hjalmar-droneship/i3/config b/hjalmar-droneship/i3/config index 63dd735..f93aa8e 100644 --- a/hjalmar-droneship/i3/config +++ b/hjalmar-droneship/i3/config @@ -37,13 +37,13 @@ exec --no-startup-id nm-applet exec --no-startup-id nitrogen --restore; sleep 1; picom -b exec --no-startup-id xfce4-power-manager exec --no-startup-id pamac-tray -exec --no-startup-id xautolock -time 30 -locker blurlock +exec --no-startup-id xautolock -time 30 -locker ~/OneDrive/dotfiles/root/locker.sh exec_always --no-startup-id sbxkb exec_always --no-startup-id fix_xcursor # HB STARTUP ADDITIONS -exec --no-startup-id setxkbmap -layout no -model pc105 -variant nodeadkeys -option "caps:escape" -exec --no-startup-id redshift-gtk +exec --no-startup-id setxkbmap -layout no -model pc105 -variant nodeadkeys +exec --no-startup-id redshift-gtk -l 59.91:10.75 exec --no-startup-id dropbox start & exec --no-startup-id nvidia-settings -a GPUFanControlState=1 -a GPUTargetFanSpeed=60 exec --no-startup-id xrandr --output DP-2 --mode 3840x2160 --output DP-0 --mode 2560x1440 --right-of DP-2 --primary @@ -51,8 +51,8 @@ exec --no-startup-id xrandr --output DP-2 --mode 3840x2160 --output DP-0 --mode # div bindings bindsym $mod+Shift+q kill bindsym $mod+q split toggle -bindsym $mod+s split h; exec notify-send 'tile horizontally' -bindsym $mod+v split v; exec notify-send 'tile vertically' +bindsym $mod+v split h; exec notify-send 'tile horizontally' +bindsym $mod+s split v; exec notify-send 'tile vertically' bindsym $mod+f fullscreen toggle bindsym $mod+w layout stacking @@ -70,8 +70,8 @@ bindsym $mod+Ctrl+space sticky toggle bindsym $mod+Shift+c exec picom-trans -c -10 bindsym $mod+c exec picom-trans -c +10 -bindsym $mod+p scratchpad show -bindsym $mod+Shift+p move scratchpad +bindsym $mod+minus scratchpad show +bindsym $mod+Shift+minus move scratchpad bindsym $mod+h focus left bindsym $mod+j focus down @@ -105,9 +105,6 @@ bindsym $mod+Shift+F6 exec $term -e 'ncspot' bindsym $mod+F9 exec --no-startup-id picom -b bindsym $mod+Shift+F9 exec --no-startup-id pkill picom bindsym $mod+Shift+F10 --release exec "killall dunst; exec notify-send 'restart dunst'" -# bindsym $mod+Shift+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option" -# bindsym $mod+Shift+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'" -# bindsym $mod+Shift+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'" bindsym $mod+0 mode "$mode_system" bindsym $mod+z mode "resize" @@ -187,7 +184,7 @@ for_window [class="qt5ct"] floating enable sticky enable border normal # Set shut down, restart and locking features set $mode_system (l)ock, (e)xit, switch_(u)ser, (r)eboot, (s)hutdown mode "$mode_system" { - bindsym l exec --no-startup-id i3exit lock, mode "default" + bindsym l exec --no-startup-id ~/OneDrive/dotfiles/root/locker.sh, mode "default" bindsym u exec --no-startup-id i3exit switch_user, mode "default" bindsym e exec --no-startup-id i3exit logout, mode "default" bindsym r exec --no-startup-id i3exit reboot, mode "default" @@ -201,10 +198,10 @@ mode "$mode_system" { # Resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode - bindsym l resize shrink width 10 px or 10 ppt + bindsym h resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt bindsym j resize shrink height 10 px or 10 ppt - bindsym h resize grow width 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt # exit resize mode: Enter or Escape bindsym Return mode "default" @@ -259,8 +256,8 @@ bar { # Theme colors # class border backgr. text indic. child_border client.focused #556064 #f9ce5c #000000 #FDF6E3 - client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948 - client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948 + client.focused_inactive #CB4B16 #2F3D44 #1ABC9C #454948 + client.unfocused #556064 #2F3D44 #1ABC9C #454948 client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 client.placeholder #000000 #0c0c0c #ffffff #000000 diff --git a/hjalmar-droneship/onedrive/config b/hjalmar-droneship/onedrive/config index b313ab6..8c6ed4b 100644 --- a/hjalmar-droneship/onedrive/config +++ b/hjalmar-droneship/onedrive/config @@ -6,7 +6,7 @@ # For explanations of all config options below see docs/USAGE.md or the man page. # sync_dir="/mnt/OneDrive" -skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|Music|Library|Research*|*/__pycache__|*/.ipynb_checkpoints" +skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|Music|Library|Research*|*/__pycache__|*/.ipynb_checkpoints|*/.mypy_cache" skip_file="*.tmp|.~*|~*" # monitor_interval = "45" # skip_dir = "Videos" diff --git a/hjalmar-mothership/i3/config b/hjalmar-mothership/i3/config index 12d2f0d..ec34c9f 100644 --- a/hjalmar-mothership/i3/config +++ b/hjalmar-mothership/i3/config @@ -37,13 +37,13 @@ exec --no-startup-id nm-applet exec --no-startup-id nitrogen --restore; sleep 1; picom -b exec --no-startup-id xfce4-power-manager exec --no-startup-id pamac-tray -exec --no-startup-id xautolock -time 30 -locker blurlock +exec --no-startup-id xautolock -time 30 -locker ~/OneDrive/dotfiles/root/locker.sh exec_always --no-startup-id sbxkb exec_always --no-startup-id fix_xcursor # HB STARTUP ADDITIONS -exec --no-startup-id setxkbmap -layout no -model pc105 -variant nodeadkeys -option "caps:escape" -exec --no-startup-id redshift-gtk +exec --no-startup-id setxkbmap -layout no -model pc105 -variant nodeadkeys +exec --no-startup-id redshift-gtk -l 59.91:10.75 exec --no-startup-id dropbox start & exec --no-startup-id nvidia-settings -a GPUFanControlState=1 -a GPUTargetFanSpeed=60 exec --no-startup-id xrandr --output DP-4 --mode 5120x1440 --primary @@ -51,8 +51,8 @@ exec --no-startup-id xrandr --output DP-4 --mode 5120x1440 --primary # div bindings bindsym $mod+Shift+q kill bindsym $mod+q split toggle -bindsym $mod+s split h; exec notify-send 'tile horizontally' -bindsym $mod+v split v; exec notify-send 'tile vertically' +bindsym $mod+v split h; exec notify-send 'tile horizontally' +bindsym $mod+s split v; exec notify-send 'tile vertically' bindsym $mod+f fullscreen toggle bindsym $mod+w layout stacking @@ -70,8 +70,8 @@ bindsym $mod+Ctrl+space sticky toggle bindsym $mod+Shift+c exec picom-trans -c -10 bindsym $mod+c exec picom-trans -c +10 -bindsym $mod+p scratchpad show -bindsym $mod+Shift+p move scratchpad +bindsym $mod+minus scratchpad show +bindsym $mod+Shift+minus move scratchpad bindsym $mod+h focus left bindsym $mod+j focus down @@ -105,9 +105,6 @@ bindsym $mod+Shift+F6 exec $term -e 'ncspot' bindsym $mod+F9 exec --no-startup-id picom -b bindsym $mod+Shift+F9 exec --no-startup-id pkill picom bindsym $mod+Shift+F10 --release exec "killall dunst; exec notify-send 'restart dunst'" -# bindsym $mod+Shift+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option" -# bindsym $mod+Shift+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'" -# bindsym $mod+Shift+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'" bindsym $mod+0 mode "$mode_system" bindsym $mod+z mode "resize" @@ -182,7 +179,7 @@ for_window [class="qt5ct"] floating enable sticky enable border normal # Set shut down, restart and locking features set $mode_system (l)ock, (e)xit, switch_(u)ser, (r)eboot, (s)hutdown mode "$mode_system" { - bindsym l exec --no-startup-id i3exit lock, mode "default" + bindsym l exec --no-startup-id ~/OneDrive/dotfiles/root/locker.sh, mode "default" bindsym u exec --no-startup-id i3exit switch_user, mode "default" bindsym e exec --no-startup-id i3exit logout, mode "default" bindsym r exec --no-startup-id i3exit reboot, mode "default" @@ -196,10 +193,10 @@ mode "$mode_system" { # Resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode - bindsym l resize shrink width 10 px or 10 ppt + bindsym h resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt bindsym j resize shrink height 10 px or 10 ppt - bindsym h resize grow width 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt # exit resize mode: Enter or Escape bindsym Return mode "default" @@ -254,8 +251,8 @@ bar { # Theme colors # class border backgr. text indic. child_border client.focused #556064 #f9ce5c #000000 #FDF6E3 - client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948 - client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948 + client.focused_inactive #CB4B16 #2F3D44 #1ABC9C #454948 + client.unfocused #556064 #2F3D44 #1ABC9C #454948 client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 client.placeholder #000000 #0c0c0c #ffffff #000000 diff --git a/hjalmar-mothership/onedrive/config b/hjalmar-mothership/onedrive/config index 4a0505c..c023009 100644 --- a/hjalmar-mothership/onedrive/config +++ b/hjalmar-mothership/onedrive/config @@ -6,7 +6,7 @@ # For explanations of all config options below see docs/USAGE.md or the man page. # sync_dir="/mnt/OneDrive" -skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|*/__pycache__|*/.ipynb_checkpoints" +skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|*/__pycache__|*/.ipynb_checkpoints|*/.mypy_cache" skip_file="*.tmp|.~*|~*" # monitor_interval = "45" # skip_dir = "Videos" diff --git a/manjaro.md b/manjaro.md index 0427d9b..91a5daa 100644 --- a/manjaro.md +++ b/manjaro.md @@ -11,6 +11,7 @@ * omf install https://github.com/jethrokuan/fzf * div applications `yay -S thunar ranger drawio-desktop steam-manjaro` * div utils `yay -S trash-cli rofi redshift flameshot asus-fan-control` +* caps2esc `yay -S caps2esc` [install routine](https://askubuntu.com/questions/979359/how-do-i-install-caps2esc) - mode 1 # coding * essentials `yay -S neovim tmux` diff --git a/mimeapps.list b/mimeapps.list index ae83418..c26eae5 100644 --- a/mimeapps.list +++ b/mimeapps.list @@ -1,29 +1,30 @@ [Default Applications] - -[Added Associations] x-scheme-handler/msteams=teams.desktop; -x-scheme-handler/http=exo-web-browser.desktop; -x-scheme-handler/https=exo-web-browser.desktop; -x-scheme-handler/ftp=exo-web-browser.desktop; -x-scheme-handler/chrome=exo-web-browser.desktop; -x-scheme-handler/webcal=exo-web-browser.desktop -x-scheme-handler/mailto=exo-web-browser.desktop; -application/x-extension-htm=exo-web-browser.desktop; -application/x-extension-html=exo-web-browser.desktop; -application/x-extension-shtml=exo-web-browser.desktop; -application/x-extension-xhtml=exo-web-browser.desktop; -application/x-extension-xht=exo-web-browser.desktop; -application/xhtml+xml=exo-web-browser.desktop; -application/pdf=exo-web-browser.desktop;org.pwmt.zathura.desktop; +x-scheme-handler/http=chromium.desktop; +x-scheme-handler/https=chromium.desktop; +x-scheme-handler/ftp=chromium.desktop; +x-scheme-handler/chrome=chromium.desktop; +x-scheme-handler/webcal=chromium.desktop +x-scheme-handler/mailto=chromium.desktop; +x-scheme-handler/msteams=teams.desktop +application/x-extension-htm=chromium.desktop; +application/x-extension-html=chromium.desktop; +application/x-extension-shtml=chromium.desktop; +application/x-extension-xhtml=chromium.desktop; +application/x-extension-xht=chromium.desktop; +application/xhtml+xml=chromium.desktop; +application/pdf=chromium.desktop;org.pwmt.zathura.desktop; application/x-bittorrent=deluge.desktop; application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=freeoffice-planmaker.desktop; application/vnd.openxmlformats-officedocument.presentationml.presentation=freeoffice-presentations.desktop; +inode/directory=ranger.desktop image/jpeg=viewnior.desktop; image/png=viewnior.desktop; image/svg+xml=viewnior.desktop; message/rfc822=exo-web-browser.desktop; text/csv=freeoffice-planmaker.desktop; text/html=nvim.desktop; +text/x-log=nvim.desktop; text/plain=nvim.desktop; text/markdown=nvim.desktop;markdown_previewer.desktop; text/x-python=nvim.desktop; diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json index 9ea3ddc..f022cb4 100644 --- a/nvim/coc-settings.json +++ b/nvim/coc-settings.json @@ -1,13 +1,12 @@ { "signature.target": "echo", "suggest.autoTrigger": "always", - "python.jediEnabled": false, - "python.autoComplete.addBrackets": true, - "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, - "python.linting.pylintArgs": ["--disable=all", "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode"], - "python.linting.flake8Args": ["--ignore=E221,E226,E231,E241,E272,E501,E701,E704"], "python.linting.enabled": true, + "python.linting.flake8Enabled": true, + "python.linting.mypyEnabled": true, + "python.linting.pylintEnabled": false, + /* "python.linting.pylintArgs": ["--disable=all", "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode"], */ + /* "python.linting.flake8Args": ["--ignore=E221,E226,E231,E241,E272,E501,E701,E704"], */ "git.enableGutters": true, "yaml.format.enable": true, "yaml.format.singleQuote": true, diff --git a/nvim/init.vim b/nvim/init.vim index c2616d0..ef2ea1c 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -9,7 +9,7 @@ if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim endif let g:coc_global_extensions=[ - \ 'coc-python', + \ 'coc-pyright', \ 'coc-git', \ 'coc-tsserver', \ 'coc-diagnostic', @@ -79,7 +79,7 @@ highlight LineNr guibg=NONE ctermbg=NONE " seoul256 theme config (dark 233-239, light 252-256) let g:seoul256_background=233 -" colo seoul256 +colo seoul256 " colo base16-tomorrow-night " colo gruvbox-material @@ -208,13 +208,6 @@ nmap :noh nnoremap q: nnoremap Q -" ***************************** -" EDITING -nmap cr (coc-rename) -nmap cR (coc-refactor) -xmap cf (coc-format-selected) -nmap cf (coc-format-selected) - " ***************************** " TERMINAL nmap t :terminal @@ -262,20 +255,20 @@ nmap gr (coc-references) " ***************************** " WINDOWS / BUFFERS let g:tmux_navigator_no_mappings=1 -nmap :TmuxNavigateLeft -nmap :TmuxNavigateDown -nmap :TmuxNavigateUp -nmap :TmuxNavigateRight +nmap :TmuxNavigateLeft:call CleanEmptyBuffers() +nmap :TmuxNavigateDown:call CleanEmptyBuffers() +nmap :TmuxNavigateUp:call CleanEmptyBuffers() +nmap :TmuxNavigateRight:call CleanEmptyBuffers() " make splits and tabs nnoremap :vnew nnoremap :new nnoremap :tabe % nnoremap :tabnew " buffers and tabs -nmap :bprev:call CleanEmptyBuffers() -nmap :bnext:call CleanEmptyBuffers() -nmap :tabprev -nmap :tabnext +nmap :bprev:call CleanEmptyBuffers() +nmap :bnext:call CleanEmptyBuffers() +nmap :tabprev +nmap :tabnext " resize windows with hjkl nnoremap < nnoremap - @@ -310,7 +303,7 @@ map :CocCommand explorer " vim-fugitive " g? for fugitive help. :Gdiff, :Gblame, :Gstats '=' expand, '-' add/reset changes, :Gcommit % to commit current file with messag map :vertical Git:vertical resize 60 -map :UndotreeToggle +map :UndotreeToggle:UndotreeFocus " ***************************** " POPUPS @@ -327,12 +320,13 @@ command! -nargs=* -bang RG call RipgrepFzf(, 0) let g:fzf_preview_command='bat --color=always --plain {-1}' " Installed bat let g:fzf_preview_grep_cmd='rg --smart-case --line-number --no-heading --color=never' " shortcuts -map :Colors +nmap :Colors nmap :CocFzfList -nmap :CocFzfList symbols -nmap :CocFzfList symbols --kind Variable -nmap :CocFzfList symbols --kind Function -nmap :CocFzfList symbols --kind Class +nmap (coc-rename) +nmap (coc-refactor) +xmap (coc-format-selected) +nmap (coc-format-selected) +nmap :CocDiagnostics " F9 reserved for exec in terminal nmap :Commits nmap :BCommits @@ -343,7 +337,7 @@ nmap :GFiles? nmap :History nmap :Files nmap :GFiles -map :Filetypes +nmap :Filetypes " ***************************** " COC CONFIGS @@ -373,6 +367,12 @@ function! s:show_documentation() endif endfunction +" coc hint scrolling +nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" +nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" +inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" +inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" + " ***************************** " MARKDOWN " vim-markdown diff --git a/redshift/redshift.conf b/redshift/redshift.conf new file mode 100644 index 0000000..283b90e --- /dev/null +++ b/redshift/redshift.conf @@ -0,0 +1,10 @@ +[redshift] +temp-day=5700 +temp-night=3600 +gamma=0.8 +adjustment-method=randr +location-provider=manual + +[manual] +lat=59.9139 +lon=10.7522 diff --git a/root/.tmux.conf b/root/.tmux.conf index f577c57..7c3d7c0 100644 --- a/root/.tmux.conf +++ b/root/.tmux.conf @@ -15,8 +15,8 @@ set -g bell-action none setw -g mode-keys vi # mouse control (clickable windows, panes, resizable panes) -setw -g mouse on -set -g mouse on +setw -g mouse off +set -g mouse off # clipboard control set -g set-clipboard on @@ -62,7 +62,7 @@ bind ø command-prompt #bind \ show-messages # Copy mode -bind v copy-mode +bind c copy-mode # clipboard control bind p paste-buffer @@ -93,8 +93,8 @@ bind -r j resize-pane -D 2 \; display-message "Resize down" bind -n M-o resize-pane -Z # split panes using | and -, make sure they open in the same path -bind | split-window -h -c "#{pane_current_path}" -bind - split-window -v -c "#{pane_current_path}" +bind v split-window -h -c "#{pane_current_path}" +bind s split-window -v -c "#{pane_current_path}" bind § split-window -fh -c "#{pane_current_path}" bind _ split-window -fv -c "#{pane_current_path}" @@ -173,6 +173,7 @@ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'sainnhe/tmux-fzf' # note: fzf bound to 'F' #set -g @plugin 'odedlaz/tmux-onedark-theme' diff --git a/root/locker.sh b/root/locker.sh new file mode 100644 index 0000000..b3c3caa --- /dev/null +++ b/root/locker.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -eu + +RESOLUTION=$(xrandr -q|sed -n 's/.*current[ ]\([0-9]*\) x \([0-9]*\),.*/\1x\2/p') + +# lock the screen +import -silent -window root jpeg:- | convert - -scale 20% -blur 0x2.5 -resize 500% RGB:- | \ + i3lock --raw $RESOLUTION:rgb -i /dev/stdin -e $@ + +# sleep 1 adds a small delay to prevent possible race conditions with suspend +sleep 1 + +xset dpms force off + +exit 0