]> git.friedersdorff.com Git - max/dotfiles.git/blob - sway/.config/sway/config.base
Merge branch 'master' of git.friedersdorff.com:max/dotfiles
[max/dotfiles.git] / sway / .config / sway / config.base
1 # Colors
2 set $black #000000
3 set $black_super #555555
4
5 set $red #f92672
6 set $red_super #dd4278
7
8 set $green #74e22e
9 set $green_super #9dc54b
10
11 set $yellow #e6db74
12 set $yellow_super #d1ca89
13
14 set $blue #66d9ef
15 set $blue_super #7accda
16
17 set $magenta #ae81ff
18 set $magenta_super #b392ef
19
20 set $cyan #00d9d9
21 set $cyan_super #c8f0f0
22
23 set $white #f5deb3
24 set $white_super #ffffff
25
26 client.focused $black $yellow_super $black $black $black
27 client.focused_inactive $black $black_super $white $black $black 
28
29
30 set $mod Mod4
31
32
33 # Use Mouse+$mod to drag floating windows to their wanted position
34 floating_modifier $mod
35
36 bindsym Control+t mode "$ratpoison"
37
38 set $ws1 "1"
39 set $ws2 "2"
40 set $ws3 "3"
41 set $ws4 "4"
42 set $ws5 "5"
43 set $ws6 "6"
44 set $ws7 "7"
45 set $ws8 "8"
46 set $ws9 "9"
47 set $ws10 "10"
48
49 mode "$ratpoison" {
50 # All/most commands in this mode should revert to the default mode on comleption.
51 # We are emulating ratpoison (kinda) here
52
53 # Moving to workspaces
54 #  bindsym n workspace next mode "default"
55 #    bindsym Shift+n workspace prev mode "default"
56
57     bindsym 1 exec 'swaymsg mode "default"; swaymsg workspace $ws1'
58     bindsym 2 exec 'swaymsg mode "default"; swaymsg workspace $ws2'
59     bindsym 3 exec 'swaymsg mode "default"; swaymsg workspace $ws3'
60     bindsym 4 exec 'swaymsg mode "default"; swaymsg workspace $ws4'
61     bindsym 5 exec 'swaymsg mode "default"; swaymsg workspace $ws5'
62     bindsym 6 exec 'swaymsg mode "default"; swaymsg workspace $ws6'
63     bindsym 7 exec 'swaymsg mode "default"; swaymsg workspace $ws7'
64     bindsym 8 exec 'swaymsg mode "default"; swaymsg workspace $ws8'
65     bindsym 9 exec 'swaymsg mode "default"; swaymsg workspace $ws9'
66     bindsym 0 exec 'swaymsg mode "default"; swaymsg workspace $ws10'
67
68     bindsym Shift+1 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws1'
69     bindsym Shift+2 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws2'
70     bindsym Shift+3 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws3'
71     bindsym Shift+4 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws4'
72     bindsym Shift+5 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws5'
73     bindsym Shift+6 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws6'
74     bindsym Shift+7 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws7'
75     bindsym Shift+8 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws8'
76     bindsym Shift+9 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws9'
77     bindsym Shift+0 exec 'swaymsg mode "default"; swaymsg move container to workspace $ws10'
78
79 # Moving focus
80 #    bindsym Tab focus right mode "default"
81 #    bindsym Shift+Tab focus left mode "default"
82
83     bindsym h exec 'swaymsg mode "default"; swaymsg focus left'
84     bindsym j exec 'swaymsg mode "default"; swaymsg focus down' 
85     bindsym k exec 'swaymsg mode "default"; swaymsg focus up' 
86     bindsym l exec 'swaymsg mode "default"; swaymsg focus right' 
87
88
89 # Moving windows
90     bindsym Shift+h exec 'swaymsg mode "default"; swaymsg move left'
91     bindsym Shift+j exec 'swaymsg mode "default"; swaymsg move down'
92     bindsym Shift+k exec 'swaymsg mode "default"; swaymsg move up'
93     bindsym Shift+l exec 'swaymsg mode "default"; swaymsg move right'
94
95 # Changing split modes
96     bindsym v exec 'swaymsg mode "default"; swaymsg split v'
97     bindsym o exec 'swaymsg mode "default"; swaymsg split h'
98
99
100     bindsym c exec 'swaymsg mode "default"; swaymsg exec termite'
101     bindsym q exec 'swaymsg mode "default"; swaymsg kill'
102
103     bindsym Shift+e exec 'swaymsg mode "default"; swaymsg exec dmenu_run'
104
105     bindsym $mod+l exec 'swaymsg mode "default"; swaylock -c 000000' 
106     bindsym Escape mode "default"
107 }
108
109
110
111 # There also is the (new) i3-dmenu-desktop which only displays applications
112 # shipping a .desktop file. It is a wrapper around dmenu, so you need that
113 # installed.
114 # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
115
116 # enter fullscreen mode for the focused container
117 bindsym $mod+t fullscreen toggle
118
119 # change container layout (stacked, tabbed, toggle split)
120 bindsym $mod+r layout stacking
121 bindsym $mod+w layout tabbed
122 bindsym $mod+f layout toggle split
123
124 # toggle tiling / floating
125 bindsym $mod+Shift+space floating toggle
126
127 # change focus between tiling / floating windows
128 bindsym $mod+space focus mode_toggle
129
130 # focus the parent container
131 bindsym $mod+a focus parent
132
133 # focus the child container
134 #bindsym $mod+d focus child
135
136 #reload the configuration file
137 bindsym $mod+Shift+c reload
138 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
139 bindsym $mod+Shift+r restart
140 # exit i3 (logs you out of your X session)
141 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'"
142
143 # resize window (you can also use the mouse for that)
144 mode "resize" {
145 # These bindings trigger as soon as you enter the resize mode
146
147 # Pressing left will shrink the window’s width.
148 # Pressing right will grow the window’s width.
149 # Pressing up will shrink the window’s height.
150 # Pressing down will grow the window’s height.
151   bindsym h resize shrink width 10 px or 10 ppt
152     bindsym j resize grow height 10 px or 10 ppt
153     bindsym k resize shrink height 10 px or 10 ppt
154     bindsym l resize grow width 10 px or 10 ppt
155
156 # same bindings, but for the arrow keys
157     bindsym Left resize shrink width 10 px or 10 ppt
158     bindsym Down resize grow height 10 px or 10 ppt
159     bindsym Up resize shrink height 10 px or 10 ppt
160     bindsym Right resize grow width 10 px or 10 ppt
161
162 # back to normal: Enter or Escape or $mod+r
163     bindsym Return mode "default"
164     bindsym Escape mode "default"
165     bindsym $mod+p mode "default"
166 }
167
168 bindsym $mod+p mode "resize"
169
170
171
172 hide_edge_borders both 
173
174 focus_follows_mouse no
175
176 focus_on_window_activation urgent
177
178 for_window [class="^rdesktop"] move workspace number 9; floating disable
179 for_window [class="Pinentry"] floating enable
180
181 exec swayidle \
182   timeout 300 'swaylock -c 000000' \
183   timeout 600 'swaymsg "output * dpms off"' \
184     resume 'swaymsg "output * dpms on" \
185   before-sleep 'swaylock -c 000000'