2023-07-16 09:49:32 +08:00
|
|
|
# vim: filetype=swayconfig
|
2022-08-25 09:45:10 +08:00
|
|
|
|
|
|
|
set $mod Mod4
|
|
|
|
set $left h
|
|
|
|
set $down j
|
|
|
|
set $up k
|
|
|
|
set $right l
|
2024-03-06 19:58:57 +08:00
|
|
|
set $term kitty -1
|
2024-01-13 11:38:48 +08:00
|
|
|
set $menu fuzzel
|
2022-08-25 09:45:10 +08:00
|
|
|
|
2023-03-07 15:11:17 +08:00
|
|
|
# my keybinds
|
2022-08-25 09:45:10 +08:00
|
|
|
|
2022-08-28 14:00:34 +08:00
|
|
|
# screenshot
|
2024-03-21 15:58:51 +08:00
|
|
|
bindsym $mod+Print exec grim -g "$(slurp -d)" - | wl-copy
|
|
|
|
bindsym $mod+Shift+s exec grim -g "$(slurp -d)" - | wl-copy
|
2022-08-28 14:00:34 +08:00
|
|
|
# notification client
|
2022-08-25 09:45:10 +08:00
|
|
|
bindsym $mod+m exec swaync-client -t -sw
|
2022-08-28 14:00:34 +08:00
|
|
|
# Logout
|
|
|
|
bindsym $mod+Ctrl+l exec ~/.config/sway/scripts/logout.sh
|
|
|
|
# Change fcitx IME
|
|
|
|
bindsym $mod+Ctrl+space exec fcitx5-remote -t
|
2022-09-04 17:17:37 +08:00
|
|
|
# Change theme
|
|
|
|
bindsym $mod+Ctrl+t exec ~/.config/sway/scripts/themes.sh
|
2022-08-25 09:45:10 +08:00
|
|
|
|
2023-03-07 15:11:17 +08:00
|
|
|
# bind gesture
|
|
|
|
bindgesture swipe:3:right workspace prev
|
|
|
|
bindgesture swipe:3:left workspace next
|
|
|
|
|
|
|
|
# use mouse wheel to switch workspaces
|
|
|
|
bindsym --whole-window $mod+button4 workspace prev
|
|
|
|
bindsym --whole-window $mod+button5 workspace next
|
|
|
|
# side buttons
|
|
|
|
bindsym --whole-window $mod+button8 workspace prev
|
|
|
|
bindsym --whole-window $mod+button9 workspace next
|
|
|
|
|
|
|
|
# bind fn keys
|
2022-08-25 09:45:10 +08:00
|
|
|
bindsym XF86AudioMicMute exec amixer set Capture toggle
|
2022-11-30 14:10:00 +08:00
|
|
|
exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob
|
2024-01-08 10:29:15 +08:00
|
|
|
bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+ && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob
|
2024-01-06 11:35:43 +08:00
|
|
|
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob
|
2022-08-25 09:45:10 +08:00
|
|
|
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && ~/.config/sway/scripts/getmute.sh > $SWAYSOCK.wob
|
2024-01-10 21:07:26 +08:00
|
|
|
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 && xbacklight -get > $SWAYSOCK.wob
|
|
|
|
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 && xbacklight -get > $SWAYSOCK.wob
|
|
|
|
bindsym XF86KbdBrightnessUp exec xbacklight -ctrl asus::kbd_backlight -inc 25
|
|
|
|
bindsym XF86KbdBrightnessDown exec xbacklight -ctrl asus::kbd_backlight -dec 25
|
2022-08-25 09:45:10 +08:00
|
|
|
|
|
|
|
bindsym XF86AudioPause exec 'playerctl pause'
|
|
|
|
bindsym XF86AudioPlay exec 'playerctl play'
|
|
|
|
bindsym XF86AudioStop exec 'playerctl stop'
|
|
|
|
bindsym XF86AudioNext exec 'playerctl next'
|
|
|
|
bindsym XF86AudioPrev exec 'playerctl previous'
|
|
|
|
|
|
|
|
# sticky window
|
2024-07-20 11:36:08 +08:00
|
|
|
bindsym $mod+Ctrl+s sticky toggle
|
2022-08-25 09:45:10 +08:00
|
|
|
|
|
|
|
# Start a terminal
|
|
|
|
bindsym $mod+Return exec $term
|
|
|
|
bindsym $mod+n exec $term
|
|
|
|
# Kill focused window
|
|
|
|
bindsym $mod+w kill
|
|
|
|
# Start your launcher
|
|
|
|
bindsym $mod+Shift+Return exec $menu
|
|
|
|
bindsym $mod+Shift+n exec $menu
|
|
|
|
|
|
|
|
floating_modifier $mod normal
|
|
|
|
|
|
|
|
bindsym $mod+Ctrl+r reload
|
|
|
|
bindsym $mod+Ctrl+q exit
|
|
|
|
|
|
|
|
|
|
|
|
# Move your focus around
|
|
|
|
bindsym $mod+$left focus left
|
|
|
|
bindsym $mod+$down focus down
|
|
|
|
bindsym $mod+$up focus up
|
|
|
|
bindsym $mod+$right focus right
|
|
|
|
# Move the focused window with the same, but add Shift
|
|
|
|
bindsym $mod+Shift+$left move left 24px
|
|
|
|
bindsym $mod+Shift+$down move down 24px
|
|
|
|
bindsym $mod+Shift+$up move up 24px
|
|
|
|
bindsym $mod+Shift+$right move right 24px
|
|
|
|
# resize windows
|
|
|
|
bindsym $mod+less resize shrink width 24px
|
|
|
|
bindsym $mod+greater resize grow width 24px
|
|
|
|
bindsym $mod+minus resize shrink height 24px
|
|
|
|
bindsym $mod+plus resize grow height 24px
|
|
|
|
# Switch to workspace
|
|
|
|
bindsym $mod+1 workspace number 1
|
|
|
|
bindsym $mod+2 workspace number 2
|
|
|
|
bindsym $mod+3 workspace number 3
|
|
|
|
bindsym $mod+4 workspace number 4
|
|
|
|
bindsym $mod+5 workspace number 5
|
|
|
|
bindsym $mod+6 workspace number 6
|
|
|
|
bindsym $mod+7 workspace number 7
|
|
|
|
bindsym $mod+8 workspace number 8
|
|
|
|
bindsym $mod+9 workspace number 9
|
|
|
|
# Move focused container to workspace
|
|
|
|
bindsym $mod+Shift+1 move container to workspace number 1
|
|
|
|
bindsym $mod+Shift+2 move container to workspace number 2
|
|
|
|
bindsym $mod+Shift+3 move container to workspace number 3
|
|
|
|
bindsym $mod+Shift+4 move container to workspace number 4
|
|
|
|
bindsym $mod+Shift+5 move container to workspace number 5
|
|
|
|
bindsym $mod+Shift+6 move container to workspace number 6
|
|
|
|
bindsym $mod+Shift+7 move container to workspace number 7
|
|
|
|
bindsym $mod+Shift+8 move container to workspace number 8
|
|
|
|
bindsym $mod+Shift+9 move container to workspace number 9
|
|
|
|
#
|
|
|
|
# Layout stuff:
|
|
|
|
#
|
|
|
|
# You can "split" the current object of your focus with
|
|
|
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
|
|
|
# respectively.
|
|
|
|
bindsym $mod+c splith
|
|
|
|
bindsym $mod+v splitv
|
|
|
|
# Switch the current container between different layout styles
|
|
|
|
bindsym $mod+s layout stacking
|
|
|
|
bindsym $mod+t layout tabbed
|
|
|
|
bindsym $mod+e layout toggle split
|
|
|
|
# Make the current focus fullscreen
|
|
|
|
bindsym $mod+f fullscreen
|
|
|
|
# Toggle the current focus between tiling and floating mode
|
|
|
|
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 or child container
|
|
|
|
bindsym $mod+a focus parent
|
|
|
|
bindsym $mod+z focus child
|
|
|
|
|
|
|
|
# Move the currently focused window to the scratchpad
|
|
|
|
bindsym $mod+Shift+0 move scratchpad
|
|
|
|
bindsym $mod+0 scratchpad show
|