diff --git a/.config/sway/config b/.config/sway/config index a5873c2..986710a 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -1,81 +1,39 @@ +# variables #################################################################### # logo key set $mod Mod4 - # home row direction keys set $left h set $down j set $up k set $right l -# apps -set $term footclient -set $term_float footclient --app-id=foot_float -set $browser firefox -set $email thunderbird - -# menus -set $drun fuzzel -set $mountmenu fuzzel_mount.sh -set $findmenu fuzzel_find_and_open.sh -set $wifimenu $term_float nmtui - -# colors -set $bg #292526 -set $dimmed #6185ff -set $accent #ff3e8b -set $error #ff404f - -# TODO: figure out how this is viable -# set $xkb_layout_mode "keyboard layout: (g)b (s)i" -# bindsym alt+shift mode $xkb_layout_mode -# -# mode $xkb_layout_mode { -# bindsym g input "type:keyboard" xkb_layout gb, mode default -# bindsym s input "type:keyboard" xkb_layout si, mode default -# } - -seat * hide_cursor 5000 - -# output -output * bg $bg solid_color - -# key bindings +# key bindings ################################################################# # start terminal -bindsym $mod+return exec $term -bindsym $mod+shift+return exec $term_float -bindsym $mod+t exec foot - +bindsym $mod+return exec footclient +bindsym $mod+shift+return exec foot # start browser -bindsym $mod+w exec $browser -bindsym $mod+shift+w exec $email - -# start menus -bindsym $mod+space exec $drun -bindsym $mod+home exec $wifimenu -bindsym $mod+insert exec $mountmenu -bindsym $mod+e exec $findmenu - +bindsym $mod+w exec firefox +bindsym $mod+shift+w exec thunderbird +# start menu +bindsym $mod+space exec fuzzel +bindsym $mod+home exec footclient nmtui +bindsym $mod+o exec fuzzel_do.sh # notifications -bindsym $mod+slash exec notify-send -e -h string:x-canonical-private-synchronous:status "$(date)" "Battery: $(cat /sys/class/power_supply/BAT0/capacity)%" bindsym $mod+x exec makoctl dismiss bindsym $mod+shift+x exec makoctl dismiss -a bindsym $mod+z exec makoctl restore - # kill window bindsym $mod+q kill - # move focus bindsym $mod+$up focus up bindsym $mod+$down focus down bindsym $mod+$left focus left bindsym $mod+$right focus right - # move focused window bindsym $mod+shift+$up move up bindsym $mod+shift+$down move down bindsym $mod+shift+$left move left bindsym $mod+shift+$right move right - # switch to workspace bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 @@ -89,7 +47,6 @@ bindsym $mod+9 workspace number 9 bindsym $mod+0 workspace number 10 bindsym $mod+next workspace next bindsym $mod+prior workspace prev - # move focused to workspace bindsym $mod+shift+1 move container to workspace number 1, workspace number 1 bindsym $mod+shift+2 move container to workspace number 2, workspace number 2 @@ -103,52 +60,25 @@ bindsym $mod+shift+9 move container to workspace number 9, workspace number 9 bindsym $mod+shift+0 move container to workspace number 10, workspace number 10 bindsym $mod+shift+next move container to workspace next, workspace next bindsym $mod+shift+prior move container to workspace prev, workspace prev - # resize -set $resize_mode "resize" -bindsym $mod+r mode $resize_mode - -mode $resize_mode { - bindsym $left resize shrink width - bindsym $down resize grow height - bindsym $up resize shrink height - bindsym $right resize grow width - bindsym $mod+$left resize shrink width 25 px - bindsym $mod+$down resize grow height 25 px - bindsym $mod+$up resize shrink height 25 px - bindsym $mod+$right resize grow width 25 px - bindsym escape mode default - bindsym $mod+escape mode default - bindsym $mod+r mode default -} - +bindsym $mod+control+$left resize shrink width +bindsym $mod+control+$down resize grow height +bindsym $mod+control+$up resize shrink height +bindsym $mod+control+$right resize grow width # layout +bindsym $mod+a focus parent +bindsym $mod+shift+a focus child +bindsym $mod+s layout toggle split +bindsym $mod+shift+s split toggle bindsym $mod+d layout toggle tabbed split bindsym $mod+f fullscreen toggle bindsym $mod+shift+f floating toggle bindsym $mod+g focus mode_toggle bindsym $mod+shift+g sticky toggle - -# scratchpad -bindsym $mod+period move to scratchpad +bindsym $mod+period move scratchpad bindsym $mod+shift+period scratchpad show - -# floating -for_window [window_type="dialog"] floating enable -for_window [window_type="utility"] floating enable -for_window [window_type="toolbar"] floating enable -for_window [window_type="splash"] floating enable -for_window [window_type="menu"] floating enable -for_window [window_type="dropdown_menu"] floating enable -for_window [window_type="popup_menu"] floating enable -for_window [window_type="tooltip"] floating enable -for_window [window_type="notification"] floating enable - -# rules -for_window [title="About Mozilla Firefox"] floating enable -for_window [app_id="foot_float"] floating enable -for_window [app_id="foot"] inhibit_idle focus - +# mouse +floating_modifier $mod normal # laptop bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+;\ exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" @@ -166,14 +96,36 @@ bindsym shift+XF86MonBrightnessUp exec brightnessctl set "+10%";\ exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" bindsym shift+XF86MonBrightnessDown exec brightnessctl set "10%-";\ exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" - # screenshots -bindsym print exec grimshot save screen +bindsym print exec grim - | wl-copy -# session +# mark mode #################################################################### +set $mark_mode "mark" +mode $mark_mode { + bindsym a mark --toggle a, mode default + bindsym b mark --toggle b, mode default + bindsym c mark --toggle c, mode default + bindsym backspace unmark, mode default + # return + bindsym escape mode "default" + bindsym $mod+escape mode "default" +} +bindsym $mod+m mode $mark_mode + +# tab mode ##################################################################### +set $tab_mode "tab" +mode $tab_mode { + bindsym a [con_mark="a"] focus, mode default + bindsym b [con_mark="b"] focus, mode default + bindsym c [con_mark="c"] focus, mode default + # return + bindsym escape mode "default" + bindsym $mod+escape mode "default" +} +bindsym $mod+tab mode $tab_mode + +# session mode ################################################################# set $session_mode "session: (r)eload (l)ock (q)uit (s)uspend re(b)oot (p)oweroff" -bindsym $mod+escape mode $session_mode - mode $session_mode { bindsym r reload, mode default bindsym l exec swaylock, mode default @@ -181,66 +133,64 @@ mode $session_mode { bindsym s exec systemctl suspend, mode default bindsym b exec systemctl reboot, mode default bindsym p exec systemctl poweroff, mode default + # return bindsym escape mode default bindsym $mod+escape mode default } +bindsym $mod+escape mode $session_mode + +# visuals ###################################################################### +set $bg #292526 +set $dimmed #6185ff +set $accent #ff3e8b +set $error #ff404f + +# output +output * { + background $bg solid_color + adaptive_sync on +} # border -default_border none +default_border normal 1 default_floating_border normal 1 -set $border_mode "border: (n)one (t)itle (p)ixel" -bindsym $mod+b mode $border_mode +# class border background text indicator child_border +client.focused $accent $accent $bg $error $bg +client.focused_inactive $dimmed $dimmed $bg $bg $bg +client.unfocused $dimmed $dimmed $bg $bg $bg +client.urgent $error $error $bg $error $bg -mode $border_mode { - bindsym n border none, mode default - bindsym t border normal 1, mode default - bindsym p border pixel 1, mode default - bindsym escape mode default - bindsym $mod+escape mode default - bindsym $mod+b mode default +# behaviour #################################################################### +workspace_layout tabbed +focus_follows_mouse yes +focus_wrapping yes + +# statusbar #################################################################### +bar { + # status_command ~/src/swaystatus/build/swaystatus + status_command statusline.sh + separator_symbol " | " + colors { + background $bg + statusline $dimmed + separator $dimmed + # border background text + focused_workspace $bg $bg $accent + active_workspace $dimmed $bg $dimmed + inactive_workspace $bg $bg $dimmed + urgent_workspace $bg $bg $error + } } -# class border background text indicator child_border -client.focused $accent $accent $bg $error $accent -client.focused_inactive $dimmed $dimmed $bg $bg $dimmed -client.unfocused $dimmed $dimmed $bg $bg $dimmed -client.urgent $error $error $bg $error $error +# xwayland ##################################################################### +xwayland disable -# statusbar -bar colors { - background $bg - statusline $dimmed - separator $dimmed - # border background text - focused_workspace $bg $bg $accent - active_workspace $dimmed $bg $dimmed - inactive_workspace $bg $bg $dimmed - urgent_workspace $bg $bg $error - } -} - -set $bar_mode "bar: (d)ock (h)ide (i)nvisible (o)verlay" -bindsym $mod+shift+b mode $bar_mode, bar mode dock - -mode $bar_mode { - bindsym d bar mode dock, mode default - bindsym h bar mode hide, mode default - bindsym i bar mode invisible, mode default - bindsym o bar mode overlay, mode default - bindsym escape mode default - bindsym $mod+escape mode default - bindsym $mod+shift+b mode default -} - -# autostart +# autostart #################################################################### exec swayidle exec wlsunset -l 45 -L 15 exec mako exec foot --server -# xwayland -xwayland disable - -# include +# include ###################################################################### include ~/.config/sway/`hostname` diff --git a/.config/sway/milano b/.config/sway/milano index 8b66d21..e95038d 100644 --- a/.config/sway/milano +++ b/.config/sway/milano @@ -2,9 +2,13 @@ input "type:keyboard" { xkb_layout gb,si xkb_options caps:escape,grp:alt_shift_toggle + repeat_delay 200 + repeat_rate 30 } input "type:touchpad" { tap enabled } +# seat +seat * hide_cursor 5000 diff --git a/.config/sway/torino b/.config/sway/torino index 2a0fcb1..b0f716c 100644 --- a/.config/sway/torino +++ b/.config/sway/torino @@ -8,4 +8,13 @@ input "type:keyboard" { xkb_layout us,si xkb_options caps:escape,grp:alt_shift_toggle xkb_numlock enabled + repeat_delay 300 + repeat_rate 30 } + +input "type:touchpad" { + tap enabled +} + +# seat +seat * hide_cursor 5000