From d6da227aadaf0afa6d2f15d47ca7204212301e54 Mon Sep 17 00:00:00 2001 From: Rong Date: Sun, 1 Jun 2025 09:15:59 +0800 Subject: [PATCH] feat: add new mode for shortcuts --- .config/sway/config | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.config/sway/config b/.config/sway/config index 841a255..03b4913 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -24,7 +24,7 @@ input "type:keyboard" { ### Output configuration # # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) -output * bg ~/Pictures/wallpapers/astro.jpg fill +output * bg ~/pic/wallpapers/astro.jpg fill # ### Idle configuration # @@ -53,10 +53,8 @@ output * bg ~/Pictures/wallpapers/astro.jpg fill exec swayidle -w \ timeout 150 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ before-sleep 'swaylock -f -c 000000' - # Exit sway (logs you out of your Wayland session) - bindsym $mod++e exec 'swaymsg exit' # Shutdown now! - bindsym $mod+Shift+e exec shutdown now + bindsym $mod+Shift+e exec ~/.local/bin/shut # Move your focus around bindsym $mod+$left focus left @@ -80,8 +78,8 @@ output * bg ~/Pictures/wallpapers/astro.jpg fill bindsym $mod+Shift+Right move right # Mode Settings # Use keyboard as mouse -bindsym $mod+semicolon mode $mode_arrow; seat seat0 hide_cursor when-typing disable -mode $mode_arrow { +bindsym $mod+semicolon mode "Arrow"; seat seat0 hide_cursor when-typing disable +mode "Arrow" { bindsym Escape mode "default" ; seat seat0 hide_cursor when-typing enable bindsym Space mode "default" ; seat seat0 hide_cursor when-typing enable bindsym $mod+semicolon mode "default"; seat seat0 hide_cursor when-typing enable @@ -91,12 +89,13 @@ mode $mode_arrow { bindsym k exec wtype -k "Up" bindsym l exec wtype -k "Right" } -bindsym $mod+w mode $mode_wmenu -mode $mode_wmenu { +bindsym $mod+w mode "WMENU" +mode "WMENU" { bindsym b exec ~/.local/bin/wbookmark; mode "default" - # bindsym h exec dunstify $(cat ~/Documents/wmenuhelp.txt) + bindsym h exec dunstify $(cat ~/doc/wmenuhelp.txt) bindsym p exec ~/.local/bin/wpicker; mode "default" bindsym a exec ~/.local/bin/wwallp; mode "default" + bindsym r exec ~/.local/bin/wrecord; mode "default" bindsym Escape mode "default" bindsym Space mode "default" } @@ -181,9 +180,6 @@ bindsym $mod+r mode "resize" # control your volume bindsym $mod+minus exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g; s/^0//' > $wobfifo;exec pkill -SIGRTMIN+1 i3blocks bindsym $mod+equal exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g; s/^0//' > $wobfifo;exec pkill -SIGRTMIN+1 i3blocks - # Start wf-recorder with slurp to select a specific part of the screen - bindsym Ctrl+Print exec wf-recorder -a -f ~/Videos/records/recording_$(date +"%Y-%m-%d-%H:%M.avi");exec notify-send "Recording" - bindsym Ctrl+Shift+Print exec killall -s SIGINT wf-recorder;exec notify-send "Stop recording!" # Make sure that some apps are always floating for_window [app_id="simulator"] floating enable for_window [app_id="simulator"] swaymsg move position center