1
0
Fork 0

update `sway` config

main
urosm 2024-04-11 19:24:12 +02:00
parent a3e7da50cf
commit da8ab1ba0b
1 changed files with 64 additions and 55 deletions

View File

@ -15,6 +15,7 @@ set $magenta #ff1170
set $red #fa3500 set $red #fa3500
# workspaces # workspaces
set $wsq 0:q:cmd
set $wsw 1:w:www set $wsw 1:w:www
set $wse 2:e:txt set $wse 2:e:txt
set $wsr 3:r:doc set $wsr 3:r:doc
@ -38,14 +39,14 @@ bar {
strip_workspace_numbers yes strip_workspace_numbers yes
wrap_scroll yes wrap_scroll yes
colors { colors {
background $blue background $black
statusline $black statusline $blue
separator $black separator $blue
# border background text # border background text
focused_workspace $magenta $magenta $black focused_workspace $black $black $magenta
active_workspace $magenta $magenta $white active_workspace $black $black $white
inactive_workspace $blue $blue $black inactive_workspace $black $black $blue
urgent_workspace $red $red $black urgent_workspace $black $black $red
} }
} }
@ -56,12 +57,11 @@ workspace_layout tabbed
xwayland disable xwayland disable
# bindsym ###################################################################### # bindsym ######################################################################
bindsym { # floating
bindsym $mod+shift+f floating toggle
# floating
$mod+shift+f floating toggle
# focus # focus
bindsym {
$mod+$up focus up $mod+$up focus up
$mod+$down focus down $mod+$down focus down
$mod+$left focus left $mod+$left focus left
@ -69,20 +69,25 @@ bindsym {
$mod+a focus parent $mod+a focus parent
$mod+s focus child $mod+s focus child
$mod+g focus mode_toggle $mod+g focus mode_toggle
}
# fullscreen # fullscreen
$mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
# mode # mode
bindsym {
$mod+d mode $layout_mode, fullscreen disable $mod+d mode $layout_mode, fullscreen disable
$mod+escape mode $session_mode, fullscreen disable $mod+escape mode $session_mode, fullscreen disable
}
# move # move
bindsym {
$mod+shift+$up move up $mod+shift+$up move up
$mod+shift+$down move down $mod+shift+$down move down
$mod+shift+$left move left $mod+shift+$left move left
$mod+shift+$right move right $mod+shift+$right move right
--to-code $mod+shift+tab move workspace back_and_forth, workspace back_and_forth --to-code $mod+shift+tab move workspace back_and_forth, workspace back_and_forth
--to-code $mod+shift+q move workspace $wsq, workspace $wsq
--to-code $mod+shift+w move workspace $wsw, workspace $wsw --to-code $mod+shift+w move workspace $wsw, workspace $wsw
--to-code $mod+shift+e move workspace $wse, workspace $wse --to-code $mod+shift+e move workspace $wse, workspace $wse
--to-code $mod+shift+r move workspace $wsr, workspace $wsr --to-code $mod+shift+r move workspace $wsr, workspace $wsr
@ -95,25 +100,30 @@ bindsym {
--to-code $mod+shift+bracketleft move workspace prev, workspace prev --to-code $mod+shift+bracketleft move workspace prev, workspace prev
--to-code $mod+shift+bracketright move workspace next, workspace next --to-code $mod+shift+bracketright move workspace next, workspace next
$mod+colon move scratchpad $mod+colon move scratchpad
}
# scratchpad # scratchpad
$mod+semicolon scratchpad show bindsym $mod+semicolon scratchpad show
# sticky # sticky
$mod+shift+g sticky toggle bindsym $mod+shift+g sticky toggle
# exec # exec
bindsym {
$mod+return exec footclient $mod+return exec footclient
$mod+shift+return exec foot $mod+shift+return exec foot
$mod+space exec fuzzel $mod+space exec footclient -T "run" sh -c "IFS=:; find \$PATH -type f,l -perm -100 | fzy -p'run > ' | xargs -r swaymsg exec"
$mod+shift+space exec fuzzel_open.sh -e $HOME/.cache -e $HOME/.mozilla -e $HOME/.thunderbird -e *.git* $mod+shift+space exec footclient -T "find" sh -c "find | fzy -p'find > ' | xargs -r swaymsg exec xdg-open"
$mod+home exec fuzzel_nmcli.sh $mod+home exec footclient -T "nmcli" nmcli_fzy.sh
$mod+end exec fuzzel_udisksctl.sh $mod+shift+home exec footclient -T "nmtui" sh -c "nmtui"
$mod+end exec footclient -T "mount" udisksctl_fzy.sh
$mod+x exec makoctl dismiss $mod+x exec makoctl dismiss
$mod+shift+x exec makoctl restore $mod+shift+x exec makoctl restore
print exec grim - | wl-copy print exec grim - | wl-copy
}
# exec (laptop) # exec (laptop)
bindsym {
XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
@ -122,18 +132,20 @@ bindsym {
XF86MonBrightnessDown exec brightnessctl set "1%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" XF86MonBrightnessDown exec brightnessctl set "1%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
shift+XF86MonBrightnessUp exec brightnessctl set "+10%"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" shift+XF86MonBrightnessUp exec brightnessctl set "+10%"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
shift+XF86MonBrightnessDown exec brightnessctl set "10%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" shift+XF86MonBrightnessDown exec brightnessctl set "10%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
}
# kill # resize
$mod+q kill bindsym {
# resize
$mod+control+$left resize shrink width $mod+control+$left resize shrink width
$mod+control+$down resize grow height $mod+control+$down resize grow height
$mod+control+$up resize shrink height $mod+control+$up resize shrink height
$mod+control+$right resize grow width $mod+control+$right resize grow width
}
# workspace # workspace
bindsym {
--to-code $mod+tab workspace back_and_forth --to-code $mod+tab workspace back_and_forth
--to-code $mod+q workspace $wsq
--to-code $mod+w workspace $wsw --to-code $mod+w workspace $wsw
--to-code $mod+e workspace $wse --to-code $mod+e workspace $wse
--to-code $mod+r workspace $wsr --to-code $mod+r workspace $wsr
@ -148,11 +160,11 @@ bindsym {
} }
# client.* ##################################################################### # client.* #####################################################################
# class border background text indicator child_border # class border background text indicator child_border
client.focused $magenta $magenta $black $red $black client.focused $black $black $magenta $red $black
client.focused_inactive $blue $blue $black $black $black client.focused_inactive $black $black $blue $black $black
client.unfocused $blue $blue $black $black $black client.unfocused $black $black $blue $black $black
client.urgent $red $red $black $red $black client.urgent $black $black $red $black $black
# default_border ############################################################### # default_border ###############################################################
default_border normal 0 default_border normal 0
@ -170,11 +182,11 @@ exec {
before-sleep 'swaylock -fu -c$blue' before-sleep 'swaylock -fu -c$blue'
wlsunset -l 45 -L 15 wlsunset -l 45 -L 15
mako mako
foot --server
firefox
thunderbird
} }
workspace $wse
exec "foot --server", exec "sleep 0.1; footclient"
# focus_wrapping ############################################################### # focus_wrapping ###############################################################
focus_wrapping yes focus_wrapping yes
@ -201,24 +213,24 @@ input "type:touchpad" {
# session # session
mode $session_mode { mode $session_mode {
bindsym { bindsym {
r reload, mode default r reload, mode default
l exec swaylock -fu -c$blue, mode default l exec swaylock -fu -c$blue, mode default
q exit, mode default q exit, mode default
s exec systemctl suspend, mode default s exec systemctl suspend, mode default
b exec systemctl reboot, mode default b exec systemctl reboot, mode default
p exec systemctl poweroff, mode default p exec systemctl poweroff, mode default
escape mode default escape mode default
} }
} }
# layout # layout
mode $layout_mode { mode $layout_mode {
bindsym { bindsym {
h layout splith, mode default h layout splith, mode default
v layout splitv, mode default v layout splitv, mode default
s layout stacking, mode default s layout stacking, mode default
t layout tabbed, mode default t layout tabbed, mode default
escape mode default escape mode default
} }
} }
@ -226,7 +238,4 @@ mode $layout_mode {
seat * hide_cursor 1000 seat * hide_cursor 1000
# output ####################################################################### # output #######################################################################
output * background $blue solid_color output * background $black solid_color
# workspace ####################################################################
workspace $wse