]> git.friedersdorff.com Git - max/saltfiles.git/blob - states/sway/files/config.jinja.old
Configure some moar
[max/saltfiles.git] / states / sway / files / config.jinja.old
1 {% set host = grains['host'] %}
2 # Colors
3 set $black #000000
4 set $black_super #555555
5
6 set $red #f92672
7 set $red_super #dd4278
8
9 set $green #74e22e
10 set $green_super #9dc54b
11
12 set $yellow #e6db74
13 set $yellow_super #d1ca89
14
15 set $blue #66d9ef
16 set $blue_super #7accda
17
18 set $magenta #ae81ff
19 set $magenta_super #b392ef
20
21 set $cyan #00d9d9
22 set $cyan_super #c8f0f0
23
24 set $white #f5deb3
25 set $white_super #ffffff
26
27 client.focused $black $yellow_super $black $black $black
28 client.focused_inactive $black $black_super $white $black $black 
29
30
31 set $mod Mod4
32
33 # Slight gaps around windows
34 gaps inner 6
35
36 # Use Mouse+$mod to drag floating windows to their wanted position
37 floating_modifier $mod
38
39 bindsym Control+t mode "$ratpoison"
40
41 set $ws1 "1"
42 set $ws2 "2"
43 set $ws3 "3"
44 set $ws4 "4"
45 set $ws5 "5"
46 set $ws6 "6"
47 set $ws7 "7"
48 set $ws8 "8"
49 set $ws9 "9"
50 set $ws10 "10"
51
52 set $music "Music"
53 set $chat "Chat"
54
55 mode "$ratpoison" {
56 # All/most commands in this mode should revert to the default mode on comleption.
57 # We are emulating ratpoison (kinda) here
58
59 # Moving to workspaces
60 #  bindsym n workspace next mode "default"
61 #    bindsym Shift+n workspace prev mode "default"
62
63     bindsym 1 exec 'swaymsg mode "default"; swaymsg workspace $ws1'
64     bindsym 2 exec 'swaymsg mode "default"; swaymsg workspace $ws2'
65     bindsym 3 exec 'swaymsg mode "default"; swaymsg workspace $ws3'
66     bindsym 4 exec 'swaymsg mode "default"; swaymsg workspace $ws4'
67     bindsym 5 exec 'swaymsg mode "default"; swaymsg workspace $ws5'
68     bindsym 6 exec 'swaymsg mode "default"; swaymsg workspace $ws6'
69     bindsym 7 exec 'swaymsg mode "default"; swaymsg workspace $ws7'
70     bindsym 8 exec 'swaymsg mode "default"; swaymsg workspace $ws8'
71     bindsym 9 exec 'swaymsg mode "default"; swaymsg workspace $ws9'
72     bindsym 0 exec 'swaymsg mode "default"; swaymsg workspace $ws10'
73     bindsym m exec 'swaymsg mode "default"; swaymsg workspace $music'
74     bindsym a exec 'swaymsg mode "default"; swaymsg workspace $chat'
75
76
77     bindsym Shift+1 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws1'
78     bindsym Shift+2 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws2'
79     bindsym Shift+3 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws3'
80     bindsym Shift+4 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws4'
81     bindsym Shift+5 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws5'
82     bindsym Shift+6 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws6'
83     bindsym Shift+7 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws7'
84     bindsym Shift+8 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws8'
85     bindsym Shift+9 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws9'
86     bindsym Shift+0 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws10'
87     bindsym Shift+m exec 'swaymsg mode "default"; swaymsg move container to workspace $music'
88     bindsym Shift+a exec 'swaymsg mode "default"; swaymsg move container to workspace $chat'
89
90 # Moving focus
91 #    bindsym Tab focus right mode "default"
92 #    bindsym Shift+Tab focus left mode "default"
93
94     bindsym h exec 'swaymsg mode "default"; swaymsg focus left'
95     bindsym j exec 'swaymsg mode "default"; swaymsg focus down' 
96     bindsym k exec 'swaymsg mode "default"; swaymsg focus up' 
97     bindsym l exec 'swaymsg mode "default"; swaymsg focus right' 
98
99
100 # Moving windows
101     bindsym Shift+h exec 'swaymsg mode "default"; swaymsg move left'
102     bindsym Shift+j exec 'swaymsg mode "default"; swaymsg move down'
103     bindsym Shift+k exec 'swaymsg mode "default"; swaymsg move up'
104     bindsym Shift+l exec 'swaymsg mode "default"; swaymsg move right'
105
106 # Changing split modes
107     bindsym v exec 'swaymsg mode "default"; swaymsg split v'
108     bindsym o exec 'swaymsg mode "default"; swaymsg split h'
109
110
111     bindsym c exec 'swaymsg mode "default"; swaymsg exec termite'
112     bindsym q exec 'swaymsg mode "default"; swaymsg kill'
113
114     bindsym Shift+e exec 'swaymsg mode "default"; swaymsg exec dmenu_run'
115
116     bindsym $mod+l exec 'swaymsg mode "default"; "lock.nosmartcard"' 
117     bindsym Escape mode "default"
118 }
119
120
121
122 # There also is the (new) i3-dmenu-desktop which only displays applications
123 # shipping a .desktop file. It is a wrapper around dmenu, so you need that
124 # installed.
125 # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
126
127 # enter fullscreen mode for the focused container
128 bindsym $mod+t fullscreen toggle
129
130 # change container layout (stacked, tabbed, toggle split)
131 bindsym $mod+r layout stacking
132 bindsym $mod+w layout tabbed
133 bindsym $mod+f layout toggle split
134
135 # toggle tiling / floating
136 bindsym $mod+Shift+space floating toggle
137
138 # change focus between tiling / floating windows
139 bindsym $mod+space focus mode_toggle
140
141 # focus the parent container
142 bindsym $mod+a focus parent
143
144 # focus the child container
145 #bindsym $mod+d focus child
146
147 #reload the configuration file
148 bindsym $mod+Shift+c reload
149 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
150 bindsym $mod+Shift+r restart
151 # exit i3 (logs you out of your X session)
152 bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
153
154 # resize window (you can also use the mouse for that)
155 mode "resize" {
156 # These bindings trigger as soon as you enter the resize mode
157
158 # Pressing left will shrink the window’s width.
159 # Pressing right will grow the window’s width.
160 # Pressing up will shrink the window’s height.
161 # Pressing down will grow the window’s height.
162   bindsym h resize shrink width 10 px or 10 ppt
163     bindsym j resize grow height 10 px or 10 ppt
164     bindsym k resize shrink height 10 px or 10 ppt
165     bindsym l resize grow width 10 px or 10 ppt
166
167 # same bindings, but for the arrow keys
168     bindsym Left resize shrink width 10 px or 10 ppt
169     bindsym Down resize grow height 10 px or 10 ppt
170     bindsym Up resize shrink height 10 px or 10 ppt
171     bindsym Right resize grow width 10 px or 10 ppt
172
173 # back to normal: Enter or Escape or $mod+r
174     bindsym Return mode "default"
175     bindsym Escape mode "default"
176     bindsym $mod+p mode "default"
177 }
178
179 bindsym $mod+p mode "resize"
180
181 bindsym XF86MonBrightnessUp exec "brightnessctl set +100"
182 bindsym XF86MonBrightnessDown exec "brightnessctl set 100-"
183
184 bindsym XF86ScreenSaver exec "lock.nosmartcard"
185
186 hide_edge_borders both 
187
188 focus_follows_mouse no
189
190 focus_on_window_activation urgent
191
192 for_window [class="^rdesktop"] move workspace number 9; floating disable
193 for_window [class="Pinentry"] floating enable
194
195 {% set lockcmd = "swaylock -e -f -i ~/Pictures/lockscreen_1080_1.png" %}
196
197 exec swayidle -w \
198 timeout 300 "{{lockcmd}}" \
199   timeout 600 'systemctl suspend' \
200     before-sleep "{{lockcmd}}"
201
202 # This keyboard has this layout on all machines:
203 input 1241:36:HOLDCHIP_USB_Keyboard {
204   xkb_layout us
205   xkb_variant colemak
206   xkb_options ctrl:nocaps
207 }
208
209 input 16700:8455:DELL_Dell_USB_Entry_Keyboard {
210   xkb_layout gb
211   xkb_variant colemak
212   xkb_options ctrl:nocaps
213 }
214
215 input 7504:24616:unspecified_ErgoDox_ergonomic_keyboard {
216   xkb_layout gb
217 }
218
219 input 9494:21:CM_Storm_Quickfire_Pro_Ultimate_6_key {
220   xkb_layout gb
221   xkb_variant colemak
222   xkb_options ctrl:nocaps
223 }
224
225 input 1:1:AT_Translated_Set_2_keyboard {
226   xkb_layout gb
227   xkb_variant colemak
228   xkb_options ctrl:nocaps
229 }
230
231 input 9610:4102:Gaming_KB__Gaming_KB {
232   xkb_layout gb
233   xkb_variant colemak
234   xkb_options ctrl:nocaps
235 }
236
237 # host specific section
238 {%- do salt.log.error('sway/files/' + host) -%}
239 {% include 'sway/files/' + host %}