1
0
Fork 0

sway: formatting

main
urosm 2024-09-13 20:35:39 +02:00
parent a0b6f992d1
commit c2a73d46ec
1 changed files with 167 additions and 140 deletions

View File

@ -17,7 +17,7 @@ set $orange #d06600
set $green #009843 set $green #009843
# workspaces # workspaces
set $wsq 0:q:cmd set $wsq 0:q:bot
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
@ -26,7 +26,7 @@ set $wsy 5:y:cmd
set $wsu 6:u:cmd set $wsu 6:u:cmd
set $wsi 7:i:cmd set $wsi 7:i:cmd
set $wso 8:o:cmd set $wso 8:o:cmd
set $wsp 9:p:rdp set $wsp 9:p:top
# modes # modes
set $session_mode "session: (r)eload (l)ock (q)uit (s)uspend (h)ibernate re(b)oot (p)oweroff" set $session_mode "session: (r)eload (l)ock (q)uit (s)uspend (h)ibernate re(b)oot (p)oweroff"
@ -48,10 +48,6 @@ set $swaylock swaylock -f \
--text-ver-color=#00000000 \ --text-ver-color=#00000000 \
--text-wrong-color=#00000000 --text-wrong-color=#00000000
# strings
set $mounted "Mounted %f at %d"
set $unmounted "Unmounted %s"
# bar ########################################################################## # bar ##########################################################################
bar { bar {
separator_symbol " | " separator_symbol " | "
@ -94,6 +90,39 @@ bindsym {
# fullscreen # fullscreen
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
# mark
bindsym {
$mod+shift+grave mark --toggle '`'
$mod+shift+1 mark --toggle '1'
$mod+shift+2 mark --toggle '2'
$mod+shift+3 mark --toggle '3'
$mod+shift+4 mark --toggle '4'
$mod+shift+5 mark --toggle '5'
$mod+shift+6 mark --toggle '6'
$mod+shift+7 mark --toggle '7'
$mod+shift+8 mark --toggle '8'
$mod+shift+9 mark --toggle '9'
$mod+shift+0 mark --toggle '0'
$mod+shift+minus mark --toggle '-'
$mod+shift+equal mark --toggle '='
}
bindsym {
$mod++grave [con_mark="`"] focus
$mod++1 [con_mark="1"] focus
$mod++2 [con_mark="2"] focus
$mod++3 [con_mark="3"] focus
$mod++4 [con_mark="4"] focus
$mod++5 [con_mark="5"] focus
$mod++6 [con_mark="6"] focus
$mod++7 [con_mark="7"] focus
$mod++8 [con_mark="8"] focus
$mod++9 [con_mark="9"] focus
$mod++0 [con_mark="0"] focus
$mod++minus [con_mark="-"] focus
$mod++equal [con_mark="="] focus
}
# mode # mode
bindsym { bindsym {
$mod+d mode $layout_mode, fullscreen disable $mod+d mode $layout_mode, fullscreen disable
@ -130,17 +159,17 @@ bindsym $mod+shift+g sticky toggle
# exec # exec
bindsym --to-code { bindsym --to-code {
$mod+return exec footclient $mod+return exec "$TERMINAL"
$mod+space exec fuzzel $mod+space exec fuzzel
$mod+home exec footclient nmtui connect $mod+slash exec find "$HOME" $find_exclude_expr -prune -o -print | fuzzel -dp'open > ' | xargs -r xdg-open
$mod+shift+home exec footclient nmtui $mod+question exec find "$HOME" $find_exclude_expr -prune -o -type f -print0 | xargs -0r grep -in "$(wl-paste)" 2>/dev/null | awk -F: '{ printf("%8s %-62s\t%-80s\\n","+"$2,"\\""$1"\\"",$3) }' | fuzzel -dw160 -p"open > " | cut -f1 | xargs -r "$TERMINAL" "$EDITOR"
$mod+apostrophe exec swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.nodes==[] and .type=="con" and .focused==false) | (.id|tostring) + "\t" + .name' | fuzzel -dp'focus > ' | cut -f1 | xargs -rI{} swaymsg [con_id={}] focus
$mod+home exec "$TERMINAL" nmtui connect
$mod+shift+home exec "$TERMINAL" nmtui
$mod+end exec devmon -c $mod+end exec devmon -c
$mod+n exec makoctl dismiss $mod+n exec makoctl dismiss
$mod+shift+n exec makoctl restore $mod+shift+n exec makoctl restore
print exec grim - | wl-copy print exec grim - | wl-copy
$mod+slash exec find "$HOME" $find_exclude_expr -prune -o -print | fuzzel -dp'open > ' | xargs -r xdg-open
$mod+question exec find "$HOME" $find_exclude_expr -prune -o -type f -print0 | xargs -0r grep -in "$(wl-paste)" 2>/dev/null | awk -F: '{ printf("%8s %-62s\t%-80s\\n","+"$2,"\\""$1"\\"",$3) }' | fuzzel -dw160 -p"open > " | cut -f1 | xargs -r "$TERMINAL" "$EDITOR"
$mod+apostrophe exec swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.nodes==[] and .type=="con" and .focused==false) | (.id|tostring) + "\t" + .name' | fuzzel -dp'focus > ' | cut -f1 | xargs -rI{} swaymsg [con_id={}] focus
} }
# exec (laptop) # exec (laptop)
@ -195,9 +224,9 @@ default_floating_border normal 0
# exec ######################################################################### # exec #########################################################################
exec { exec {
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
hash dbus-update-activation-environment 2>/dev/null && \ hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway
swayidle -w \ swayidle -w \
timeout 300 'brightnessctl -s set 1%' resume 'brightnessctl -r' \ timeout 300 'brightnessctl -s set 1%' resume 'brightnessctl -r' \
timeout 600 '$swaylock' \ timeout 600 '$swaylock' \
@ -206,12 +235,12 @@ exec {
before-sleep '$swaylock' before-sleep '$swaylock'
wlsunset -l 45 -L 15 wlsunset -l 45 -L 15
mako --max-visible=0 mako --max-visible=0
devmon \ devmon --exec-on-drive 'notify-send "Mounted %f at %d"' --exec-on-unmount 'notify-send "Unmounted %f"'
--exec-on-drive 'notify-send "Mounted %f at %d"' \
--exec-on-unmount 'notify-send "Unmounted %f"'
foot -s foot -s
wayneko --layer overlay --type inu --background-colour 0xe2e2e2 --outline-colour 0x856cff
} }
# focus_wrapping ############################################################### # focus_wrapping ###############################################################
focus_wrapping yes focus_wrapping yes
@ -229,9 +258,7 @@ input "type:keyboard" {
} }
# touchpad # touchpad
input "type:touchpad" { input "type:touchpad" tap enabled
tap enabled
}
# mode ######################################################################### # mode #########################################################################