X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=states%2Fsway%2Ffiles%2Fconfig.jinja;h=ab4019e6a8d79f8c06f410781b57909800df7bf6;hb=380c2791e2b37cc5003acc8825aea8dc3a710aa5;hp=786fb699967f2f06934c81f42ac38182188e7004;hpb=0dd88a896dd0af0ab1904be4ecee011fd638b833;p=max%2Fsaltfiles.git diff --git a/states/sway/files/config.jinja b/states/sway/files/config.jinja index 786fb69..ab4019e 100644 --- a/states/sway/files/config.jinja +++ b/states/sway/files/config.jinja @@ -30,9 +30,8 @@ client.focused_inactive $black $black_super $white $black $black set $mod Mod4 -# Slight gaps between windows -gaps inner 5 -gaps outer 5 +# Slight gaps around windows +gaps inner 6 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -50,6 +49,9 @@ set $ws8 "8" set $ws9 "9" set $ws10 "10" +set $music "Music" +set $chat "Chat" + mode "$ratpoison" { # All/most commands in this mode should revert to the default mode on comleption. # We are emulating ratpoison (kinda) here @@ -68,6 +70,9 @@ mode "$ratpoison" { bindsym 8 exec 'swaymsg mode "default"; swaymsg workspace $ws8' bindsym 9 exec 'swaymsg mode "default"; swaymsg workspace $ws9' bindsym 0 exec 'swaymsg mode "default"; swaymsg workspace $ws10' + bindsym m exec 'swaymsg mode "default"; swaymsg workspace $music' + bindsym a exec 'swaymsg mode "default"; swaymsg workspace $chat' + bindsym Shift+1 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws1' bindsym Shift+2 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws2' @@ -79,6 +84,8 @@ mode "$ratpoison" { bindsym Shift+8 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws8' bindsym Shift+9 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws9' bindsym Shift+0 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws10' + bindsym Shift+m exec 'swaymsg mode "default"; swaymsg move container to workspace $music' + bindsym Shift+a exec 'swaymsg mode "default"; swaymsg move container to workspace $chat' # Moving focus # bindsym Tab focus right mode "default" @@ -106,7 +113,7 @@ mode "$ratpoison" { bindsym Shift+e exec 'swaymsg mode "default"; swaymsg exec dmenu_run' - bindsym $mod+l exec 'swaymsg mode "default"; "lock.{{ host }}"' + bindsym $mod+l exec 'swaymsg mode "default"; "lock.nosmartcard"' bindsym Escape mode "default" } @@ -171,7 +178,10 @@ mode "resize" { bindsym $mod+p mode "resize" +bindsym XF86MonBrightnessUp exec "brightnessctl set +100" +bindsym XF86MonBrightnessDown exec "brightnessctl set 100-" +bindsym XF86ScreenSaver exec "lock.nosmartcard" hide_edge_borders both @@ -182,66 +192,42 @@ focus_on_window_activation urgent for_window [class="^rdesktop"] move workspace number 9; floating disable for_window [class="Pinentry"] floating enable -exec swayidle \ - timeout 300 "lock.{{ host }}" \ - timeout 600 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on" \ - before-sleep "lock.{{ host }}" - -# Magnesium specific section -{% if host == 'magnesium' %} -bar { - id bar_left - status_command conky-i3bar - position top - output "HDMI-A-3" - font pango:Liberation Mono 10 - colors { - background $black_super - focused_background $black - focused_workspace $black_super $yellow_super $black - active_workspace $black_super $blue_super $black - inactive_workspace $black_super $black_super $white_super - urgent_workspace $black $red_super $white - } -} - -bar { - id bar_right - position top - output "HDMI-A-2" - font pango:Liberation Mono 10 - colors { - background $black_super - focused_background $black - focused_workspace $black_super $yellow_super $black - active_workspace $black_super $blue_super $black - inactive_workspace $black_super $black_super $white_super - urgent_workspace $black $red_super $white - } -} - +{% set lockcmd = "swaylock -e -f -i ~/Pictures/lockscreen_1080_1.png" %} -workspace 1 output HDMI-A-3 -workspace 2 output HDMI-A-2 +exec swayidle -w \ +timeout 300 "{{lockcmd}}" \ + timeout 600 'systemctl suspend' \ + before-sleep "{{lockcmd}}" -output HDMI-A-2 { - position 0 1080 - background ~/Pictures/background_1080_1.png fit +# This keyboard has this layout on all machines: +input 1241:36:HOLDCHIP_USB_Keyboard { + xkb_layout us + xkb_variant colemak + xkb_options ctrl:nocaps } -output HDMI-A-3 { - position 0 0 - background ~/Pictures/background_1080_2.png fit +input 16700:8455:DELL_Dell_USB_Entry_Keyboard { + xkb_layout gb + xkb_variant colemak + xkb_options ctrl:nocaps } +input 7504:24616:unspecified_ErgoDox_ergonomic_keyboard { + xkb_layout gb +} +input 9494:21:CM_Storm_Quickfire_Pro_Ultimate_6_key { + xkb_layout gb + xkb_variant colemak + xkb_options ctrl:nocaps +} -font pango:Liberation Mono 8 - -input 1241:36:HOLDCHIP_USB_Keyboard { - xkb_layout us +input 1:1:AT_Translated_Set_2_keyboard { + xkb_layout gb xkb_variant colemak xkb_options ctrl:nocaps } -{% endif %} + +# host specific section +{%- do salt.log.error('sway/files/' + host) -%} +{% include 'sway/files/' + host %}