From b078df4ab8ac0e3114b0fc7771880336444939d4 Mon Sep 17 00:00:00 2001 From: Joachim Nielandt Date: Fri, 15 Mar 2024 19:25:56 +0100 Subject: [PATCH] latest updates --- dot_config/doom/config.el | 12 ++++++++--- dot_config/dunst/dunstrc | 4 ++-- dot_config/sway/config | 38 ++++++++++++++++----------------- dot_config/sway/keybinding.conf | 17 +++++++++------ dot_config/sway/modes.conf | 2 +- dot_config/sway/variables.conf | 1 + dot_config/waybar/config | 2 +- dot_config/waybar/style.scss | 5 ++++- dot_ideavimrc | 4 ++++ dot_zshrc.tmpl | 7 ++++++ 10 files changed, 58 insertions(+), 34 deletions(-) diff --git a/dot_config/doom/config.el b/dot_config/doom/config.el index 3ff420c..62bcb30 100644 --- a/dot_config/doom/config.el +++ b/dot_config/doom/config.el @@ -113,7 +113,8 @@ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "") :unnarrowed t) - )) + ) + ) ; adapt indentation in org files for _all_ lines (headings and content) (setq org-adapt-indentation t) @@ -123,8 +124,7 @@ org-pretty-entities t org-hide-emphasis-markers t org-startup-with-inline-images t - org-image-actual-width '(300)) - ) + org-image-actual-width '(300))) ; enable org-download ; https://github.com/abo-abo/org-download @@ -161,6 +161,12 @@ (add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))) +; disable evil snipe mode (modifies the default 's' key) +(remove-hook 'doom-first-input-hook #'evil-snipe-mode) + ; enable vimrc mode (require 'vimrc-mode) (add-to-list 'auto-mode-alist '("\\.vim\\(rc\\)?\\'" . vimrc-mode)) + +; add binding for consult-find +(map! :leader :desc "Consult find" "n r c" #'consult-find) diff --git a/dot_config/dunst/dunstrc b/dot_config/dunst/dunstrc index ef0b431..ed5ad4f 100644 --- a/dot_config/dunst/dunstrc +++ b/dot_config/dunst/dunstrc @@ -297,7 +297,7 @@ # Otherwise the "#" and following would be interpreted as a comment. background = "#32302f" foreground = "#ebdbb2" - timeout = 10 + timeout = 20 # Icon for notifications with low urgency, uncomment to enable #icon = /path/to/icon @@ -305,7 +305,7 @@ background = "#32302f" foreground = "#ebdbb2" frame_color = "#b8bb26" - timeout = 10 + timeout = 60 # Icon for notifications with normal urgency, uncomment to enable #icon = /path/to/icon diff --git a/dot_config/sway/config b/dot_config/sway/config index 77de86e..e0e12e0 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -14,6 +14,9 @@ hide_edge_borders smart # default_border normal # border + title default_border pixel +# Don't autofocus with mouse pointer +focus_follows_mouse no + # Font font pango:Hasklig Medium 9 @@ -23,36 +26,30 @@ exec hash dbus-update-activation-environment 2>/dev/null && \ dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK # make idea work - should be fine now exec wmname LG3D -# sway fixes for screensharing -# https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist -#XDG_CURRENT_DESKTOP=sway -#MOZ_ENABLE_WAYLAND=1 -exec_always { - dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway - systemctl --user stop pipewire xdg-desktop-portal xdg-desktop-portal-wlr - exec systemctl --user start pipewire + +# wayland clipboard manager +exec { + wl-paste --watch cliphist store } # start kanshi for auto-output management exec_always { - pkill kanshi - kanshi + bash -c "pkill kanshi; kanshi" + + # sway fixes for screensharing + # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist + bash -c "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway; systemctl --user stop pipewire xdg-desktop-portal xdg-desktop-portal-wlr; exec systemctl --user start pipewire" } -# wayland clipboard manager -exec { - wl-paste --watch cliphist store -} ### Idle configuration # # Example configuration: # -# exec swayidle -w \ -# timeout 300 'swaylock -f -c 000000' \ -# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ -# before-sleep 'swaylock -f -c 000000' -# +exec swayidle -w \ + timeout 500 'swaylock -f -c 000000 --fade-in 5' \ + timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock -f -c 000000' # This will lock your screen after 300 seconds of inactivity, then turn off # your displays after another 300 seconds, and turn your screens back on when # resumed. It will also lock your screen before your computer goes to sleep. @@ -148,6 +145,7 @@ exec --no-startup-id gammastep # overrule mako and start mako exec --no-startup-id pkill dunst exec --no-startup-id mako +#exec --no-startup-id kanshi # start multi touch support exec --no-startup-id libinput-gestures-setup start # start greenclip, this somehow fails to start at launch (sometimes?) @@ -172,7 +170,7 @@ exec { # $mounting_daemon } exec_always { -# $kanshi +# $kanshi # $auto_xdg_keyboard # $poweralert # $watch_playerctl diff --git a/dot_config/sway/keybinding.conf b/dot_config/sway/keybinding.conf index 9f74a03..04014c1 100644 --- a/dot_config/sway/keybinding.conf +++ b/dot_config/sway/keybinding.conf @@ -17,6 +17,11 @@ bindsym $mod+C exec ~/.config/rofi/runcliphist.sh # Screenshot #bindsym --release Print exec grim -g "$(slurp)" "/home/joachim/pictures/screenshots/$(date +'%s_grim.png')" bindsym --release Print exec ~/scripts/grim.screenshot.sh +bindsym $mod+Print exec grimshot save output +bindsym $mod+Shift+Print exec grimshot save active +#bindsym $mod+Print exec grimshot save area +#bindsym Mod4+Mod1+p exec grimshot save output +#bindsym Mod4+Ctrl+p exec grimshot save windowscripts/grim.screenshot.sh # Custom 'help' screen # bindsym $mod+F1 exec $term -e chezmoi edit ~/.dotfiles/README.md @@ -124,15 +129,15 @@ bindsym $mod+Shift+space floating toggle # Swap focus between the tiling area and the floating area bindsym $mod+space focus mode_toggle # Move focus to the parent container -bindsym $mod+a focus parent +bindsym $mod+i focus parent # focus the child container -bindsym $mod+z focus child +bindsym $mod+u focus child # Dunst controls # TODO moved these over to mako -#bindsym $mod+Ctrl+space exec dunstctl close -#bindsym $mod+Ctrl+Shift+space exec dunstctl close-all -#bindsym $mod+Ctrl+$mod1+space exec dunstctl history-pop -bindsym $mod+Ctrl+space exec makoctl dismiss +bindsym $mod+Ctrl+space exec dunstctl close +bindsym $mod+Ctrl+Shift+space exec dunstctl close-all +#bindsym $mod+Ctrl+space exec dunstctl history-pop +#bindsym $mod+Ctrl+space exec makoctl dismiss ############# # SCRATCHPAD diff --git a/dot_config/sway/modes.conf b/dot_config/sway/modes.conf index 52822e5..040df91 100644 --- a/dot_config/sway/modes.conf +++ b/dot_config/sway/modes.conf @@ -50,7 +50,7 @@ set $mode_shutdown "\ set $purge_cliphist [ $purge_cliphist_logout == 'true' ] && rm -f $HOME/.cache/cliphist/db || exit 0 mode --pango_markup $mode_shutdown { # lock - $bindsym l mode "default", exec $locking + $bindsym l mode "default", exec swaylock -i ~/pictures/wallpapers/ethiopia.jpg --clock --indicator --fade-in 0.2 --grace 2 # logout $bindsym e exec $purge_cliphist; exec loginctl terminate-user $USER # suspend diff --git a/dot_config/sway/variables.conf b/dot_config/sway/variables.conf index 2cf73aa..bc2263c 100644 --- a/dot_config/sway/variables.conf +++ b/dot_config/sway/variables.conf @@ -18,6 +18,7 @@ set $resizestepsize 30px ### Variables # Logo key. Use Mod1 for Alt. set $mod Mod4 +set $mod1 Alt # Gruvbox Colors set $dark0_hard #1d2021 diff --git a/dot_config/waybar/config b/dot_config/waybar/config index d27d462..9a3bb10 100644 --- a/dot_config/waybar/config +++ b/dot_config/waybar/config @@ -24,7 +24,7 @@ // Choose the order of the modules "modules-left": ["sway/workspaces", "sway/mode", "custom/media"], "modules-center": ["clock"], - "modules-right": ["mpd", "idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "custom/gpu-temp", "backlight", "keyboard-state", "sway/language", "battery", "battery#bat2"], + "modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "battery#bat2"], // Modules configuration // "sway/workspaces": { // "disable-scroll": true, diff --git a/dot_config/waybar/style.scss b/dot_config/waybar/style.scss index 6ca7664..0508d48 100644 --- a/dot_config/waybar/style.scss +++ b/dot_config/waybar/style.scss @@ -67,7 +67,10 @@ window { &.focused { background-color: $bg2; - box-shadow: inset 0 -3px $fg0; + } + + &.visible { + box-shadow: inset 0 -3px $light-green; } &.urgent { diff --git a/dot_ideavimrc b/dot_ideavimrc index 79ec4f5..406ef28 100644 --- a/dot_ideavimrc +++ b/dot_ideavimrc @@ -40,3 +40,7 @@ set ideajoin set relativenumber " Set the current line number in gutter set number + +" fix the 'back'/'forward' issue in idea +nnoremap :action Back +nnoremap :action Forward diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 1cdd0eb..2f2746e 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -115,12 +115,15 @@ alias time='time -p ' # -p for POSIX output alias yk="cat ~/.zsh_history | tail -n 2 | head -n 1 | cut -d ';' -f 2- | xclip -selection clipboard" # add space after sudo to make it consider aliases, other 'sudo vi' would fail for not aliasing to vim alias sudo="sudo " +alias dpsa="docker ps -a" # PATH modifications export PATH=$HOME/.config/emacs/bin:$PATH export PATH=/home/joachim/.local/share/gem/ruby/3.0.0/bin:$PATH # add my own scripts to the path export PATH=$HOME/scripts:$PATH +# make sure ~/.local/bin is in here, so be used for npm for example (npm config set prefix '~/.local/') +export PATH=$HOME/.local/bin:$PATH # set firefox as default browser xdg-settings set default-web-browser firefox.desktop @@ -153,6 +156,10 @@ export MOZ_ENABLE_WAYLAND=1 # [[ ! -f ~/.p10k.console.zsh ]] || source ~/.p10k.console.zsh #fi +# make sure screenshots arrive in the right directory +# grimshot makes use of this, for one +export XDG_SCREENSHOTS_DIR=/home/joachim/pictures/screenshots + # got to source this fzf file manually? [[ ! -f ~/.fzf/fzf.zsh ]] || source ~/.fzf/fzf.zsh