diff --git a/README.md b/README.md index 634bac0..2a50b12 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ and start it appropriately. + `wob` (progress bar) + `wofi` (launcher) + `slurp`, `grim`, `swappy` (screenshot) ++ `swaylock-effects` + [`wmrctl`](https://git.sr.ht/~brocellous/wlrctl) (window switcher) ### other (used in scripts) diff --git a/files/sway/.config/sway/config b/files/sway/.config/sway/config index 8149c20..2e06b56 100644 --- a/files/sway/.config/sway/config +++ b/files/sway/.config/sway/config @@ -59,15 +59,12 @@ bindswitch --reload --locked lid:on output $laptop disable bindswitch --reload --locked lid:off output $laptop enable # Idle configuration - # set lock and save to script, so other programs can also use it - set $lock 'loginctl lock-session && swaylock -f --image /tmp/lock.png --indicator-idle-visible -F' - exec_always echo $lock > ~/.local/bin/lock.sh - exec_always chmod +x ~/.local/bin/lock.sh + set $lock 'loginctl lock-session && bash ~/.dots/lock.sh' # Lock after 20 minutes, lock before suspend exec swayidle -w \ - timeout 1200 ~/.local/bin/lock.sh \ - before-sleep ~/.local/bin/lock.sh + timeout 1200 ~/.dots/lock.sh \ + before-sleep ~/.dots/lock.sh #timeout 1320 'systemctl suspend' \ # Input configuration @@ -112,7 +109,7 @@ bindswitch --reload --locked lid:off output $laptop enable # show shutdown menu bindsym $mod+Ctrl+Backspace exec \ - printf "/home/marc/.local/bin/lock.sh\nsystemctl suspend\nswaymsg reload\nshutdown now\nloginctl terminate-user marc" \ + printf "/home/marc/.dots/lock.sh\nsystemctl suspend\nswaymsg reload\nshutdown now\nloginctl terminate-user marc" \ | wofi -d -p "Power" -L 6 \ | xargs -d '\n' -r /bin/bash -c @@ -234,7 +231,7 @@ bindswitch --reload --locked lid:off output $laptop enable for_window [class="discord"] move container to workspace number $ws3 for_window [app_id="org.telegram.desktop"] move container to workspace number $ws3 for_window [class="Spotify"] move container to workspace number $ws4 - for_window [class="Joplin"] move container to workspace number $ws5 + for_window [app_id="pavucontrol"] move container to workspace number $ws4 for_window [app_id="evolution"] move container to workspace number $ws8 for_window [app_id="org.keepassxc.KeePassXC"] move container to workspace number $ws9 @@ -243,7 +240,7 @@ bindswitch --reload --locked lid:off output $laptop enable bindsym $mod+Ctrl+1 exec alacritty --command bash tmux_detect.sh bindsym $mod+Ctrl+2 exec firefox bindsym $mod+Ctrl+3 exec discord - bindsym $mod+Ctrl+4 exec spotify + bindsym $mod+Ctrl+4 exec "spotify; pavucontrol" bindsym $mod+Ctrl+8 exec evolution bindsym $mod+Ctrl+9 exec keepassxc diff --git a/files/tmux/.tmux.conf b/files/tmux/.tmux.conf index ee3b3ce..d121de3 100644 --- a/files/tmux/.tmux.conf +++ b/files/tmux/.tmux.conf @@ -45,6 +45,8 @@ bind-key -n 'M-Right' resize-pane -R bind-key -n 'M-Up' resize-pane -U bind-key -n 'M-Down' resize-pane -D +# alias +set -s command-alias[1] respawn='respawn-pane -k' # make escape bindings of programs work in tmux set -s escape-time 5 diff --git a/files/zsh/.zshrc b/files/zsh/.zshrc index c87c93e..32f286b 100644 --- a/files/zsh/.zshrc +++ b/files/zsh/.zshrc @@ -15,7 +15,7 @@ GIT="%{$fg[red]%}\$vcs_info_msg_0_" HOSTN="%{$fg[yellow]%}%m " BREAK='' -[ $(tput cols) -lt 150 ] && BREAK=$'\n' +[ $(tput cols) -lt 60 ] && BREAK=$'\n' export PROMPT="${HOSTN}${DIR}${GIT} ${BREAK}${ICON}%{$reset_color%} " zstyle ':vcs_info:git:*' formats ' (%b )' diff --git a/lock.sh b/lock.sh new file mode 100755 index 0000000..ef49253 --- /dev/null +++ b/lock.sh @@ -0,0 +1,29 @@ +# requires swaylock-effects + +FG="5c6a72" +RED="f85552" +BLUE="3a94c5" +YELLOW="dfa000" +GREEN="8da101" + +swaylock \ + -F \ + --image /tmp/lock.png \ + --indicator-idle-visible \ + --clock --timestr "%I:%M" --datestr "" \ + --font "SFMono Nerd Font" \ + --indicator-radius 80 \ + --fade-in 0.2 \ + --line-uses-inside \ + --line-uses-ring \ + --key-hl-color "606e01" \ + --bs-hl-color $RED \ + --ring-color $GREEN \ + --separator-color $GREEN \ + --ring-clear-color $YELLOW \ + --text-clear-color "00000000" \ + --ring-ver-color $BLUE \ + --text-ver-color "00000000" \ + --ring-wrong-color $RED \ + --text-wrong-color "00000000" \ + --text-color $GREEN