435c5feda8bb0f7721b7ae623d8b3d028ec1ff22
[distro-setup] / i3-sway / common.conf
1 ####### DO NOT EDIT LIVE CONFIG. generated from /a/bin/distro-setup/i3-sway/gen #######
2
3 # random thoughts: what to do with a window I don't have room for?
4 # * I could tabify it
5 # * I could split an existing window with it
6 # * I could send it away to another workspace,
7 # * I could resize it to be very small.
8
9
10 # todo: think whether this is useful: https://github.com/tmfink/i3-wk-switch
11 # todo: see comment by Jakstern551 here for tip about jumping to windows
12 # https://old.reddit.com/r/i3wm/comments/k8m4k4/share_your_i3_tips_and_tricks_that_you_have/
13
14 # https://i3wm.org/docs/userguide.html#keybindings
15 #To get the current mapping of your keys, use xmodmap -pke. To
16 #interactively enter a key and see what keysym it is configured to, use
17 #xev.
18 set $mod Mod4
19
20 # for non-gui apps, use this.
21 set $ex exec --no-startup-id
22
23 bindsym $mod+2 $ex "i3-split-maybe"; exec "pavucontrol"
24 # calling without -no-remote makes this to be the instance that links
25 # will open in from other applications.
26 # unused. todo: consider binding this to some key on the right side of keyboard.
27 #bindsym $mod+3 $ex "i3-split-maybe"; exec "abrowser"
28 # calling just abrowser mysteriously stopped working,
29 # so I figured out this is how to get output, but then
30 # it suddenly started working again.
31 #bindsym $mod+3 exec "abrowser 2>&1 >/tmp/l"
32 #bindsym $mod+3 exec "abrowser -no-remote -P sfw"
33 bindsym $mod+4 $ex "i3-split-maybe"; exec "abrowser -no-remote -P firefox-main-profile"
34 bindsym $mod+5 $ex "/a/bin/ds/stream-interlude"
35 bindsym $mod+6 $ex "i3-split-maybe"; exec "/usr/local/bin/start-tor-browser"
36 bindsym $mod+7 $ex "/a/bin/ds/myx"
37 #bindsym $mod+6 $ex "/a/bin/redshift.sh"
38 # bindsym $mod+equal $ex "t s w; t in"
39 # bindsym $mod+Home $ex "t out"
40 # #bindsym $mod+End $ex "t s x; t in"
41 # bindsym $mod+grave $ex "t s lunch; t in; t out -a '45 minutes from now'"
42
43
44 bindsym $mod+1 focus parent
45 bindsym $mod+shift+1 focus child
46
47 # note, i used to have a key: "floating toggle; floating toggle" to
48 # as undo split, as suggested here https://github.com/i3/i3/issues/3808
49 # but something
50 #
51 bindsym $mod+grave floating toggle
52 bindsym $mod+equal $ex "i3-set-layout splith"
53 # move firefox to current workspace.
54 # https://i3wm.org/docs/userguide.html#keybindings
55 # get class with xprop, example output
56 # WM_CLASS(STRING) = "irssi", "URxvt"
57 # xprop |& grep WM_CLASS
58 bindsym $mod+w $ex "/a/exe/i3-abrowser"
59 bindsym $mod+shift+w fullscreen toggle
60
61 bindsym $mod+e $ex "/a/exe/i3-emacs"
62 # unused
63 #bindsym $mod+shift+e
64 bindsym $mod+r $ex "/a/bin/ds/xl"
65
66 bindsym $mod+t $ex "i3-set-layout splitv"
67
68 bindsym $mod+g $ex "i3-set-layout tabbed"
69
70
71 # Use Mouse+$mod to drag floating windows to their wanted position
72 floating_modifier $mod
73
74 bindsym $mod+u focus left; $ex "i3-mouse-warp"
75 # i dont expect to use this much
76 bindsym $mod+shift+u $ex "i3-auto-layout-toggle"
77 bindsym $mod+i focus right; $ex "i3-mouse-warp"
78 bindsym $mod+o focus up; $ex "i3-mouse-warp"
79 bindsym $mod+p focus down; $ex "i3-mouse-warp"
80
81 bindsym $mod+Left $ex "i3-split-push left"
82 bindsym $mod+Right $ex "i3-split-push right"
83 bindsym $mod+Up $ex "i3-split-push up"
84 bindsym $mod+Down $ex "i3-split-push down"
85
86 # for testing in case there is a problem with above.
87 # these could be rebound to other things.
88 bindsym $mod+shift+Left move left
89 bindsym $mod+shift+Right move right
90 bindsym $mod+shift+Up move up
91 bindsym $mod+shift+Down move down
92
93 bindsym $mod+Shift+a move container to workspace 1
94 bindsym $mod+a workspace 1
95
96
97 bindsym $mod+Shift+s move container to workspace 4
98 bindsym $mod+s workspace 4
99
100 bindsym $mod+Shift+d move container to workspace 3
101 bindsym $mod+d workspace 3
102
103 bindsym $mod+Shift+f move container to workspace 2
104 bindsym $mod+f workspace 2
105
106 bindsym $mod+Shift+z move container to workspace 5
107 bindsym $mod+z workspace 5
108
109 bindsym $mod+Shift+x move container to workspace 6
110 bindsym $mod+x workspace 6
111
112 bindsym $mod+v split vertical
113 bindsym $mod+Shift+v move workspace to output BIG-LEFT
114
115 # 122 = XF86AudioLowerVolume, keyboardio function + t
116 bindcode 122 $ex "toggle-mute unmute"; mode "ptt"
117 mode "ptt" {
118 # normally, if we hold down a button, it will start automatically
119 # repeating itself, up and down events. But this stops that from
120 # happening. Based on testing, making mode be 1st or 2nd doesn't matter.
121 bindcode --release 122 $ex "toggle-mute mute"; mode "default"
122 }
123 # 171 = XF86AudioNext, keyboardio function + g
124 bindcode 171 $ex "toggle-mute unmute"
125
126 ## temp for testing, add antying here
127 #bindsym $mod+shift+5 $ex "/a/a.sh"
128
129
130 bindsym $mod+b $ex "/a/exe/i3-konsole"
131 bindsym $mod+shift+b unmark term; mark term
132
133
134 # for use to cleanup extra emacs windows
135 # https://faq.i3wm.org/question/7662/reverse-perl-matches-in-criteria-in-i3-config.1.html
136 # I found their regex slightly wrong. This is a hacky way to
137 # ignore my irc emacs instances, their window titles
138 # are irc room names. Another way would be to hack on the
139 # window title, or xprop stuff, but I figure I'm switching
140 # to wayland soon, lets wait and see how things work there.
141 bindsym $mod+shift+6 [class="Emacs" title="^(?!#[a-zA-Z][a-zA-Z-]*$)"] move workspace current
142
143 bindsym $mod+c kill
144
145 bindsym $mod+Home split horizontal
146 bindsym $mod+Shift+End move container to workspace 7
147 bindsym $mod+End workspace 7
148 bindsym $mod+Shift+q move container to workspace 8
149 bindsym $mod+q workspace 8
150
151 bindsym $mod+Shift+8 move container to workspace 9
152 bindsym $mod+8 workspace 9
153 bindsym $mod+Shift+9 move container to workspace 10
154 bindsym $mod+9 workspace 10
155
156 bindsym $mod+m $ex "dunstctl close-all"
157 bindsym $mod+Shift+m border toggle
158
159 # 65 = space.
160 # toggle tiling / floating.
161 #
162 # The idea here is: when floating a window, make it sticky and 1080p,
163 # because the only reason we want to do this is to keep it on screen
164 # when doing an obs broacast. When unfloating a window, just act as a
165 # normal unfloat. There is a quirk with this: in a layout with 3 windows,
166 # 2 stacked, 1 tall, floating and ufloating the tall one will make it
167 # another stacked one, but still 1920x1080, you need to move it to the
168 # right to get it back into its tall spot. I could automate this,
169 # but I'm not bothering right now
170 bindcode $mod+65 $ex obs-auto-scene-switch-toggle; floating toggle; sticky enable; resize set 1920 1080; move position 100 ppt 0 ppt
171
172 # change focus between tiling / floating windows
173 bindcode $mod+shift+65 focus mode_toggle
174
175 bindsym $mod+shift+h $ex /b/ds/stream-clip hc
176 bindsym $mod+j $ex "i3-split-maybe"; exec emacsclient -c
177 bindsym $mod+shift+j $ex /b/ds/stream-clip up
178 bindsym $mod+k $ex "i3-split-maybe"; exec konsole
179 bindsym $mod+shift+k $ex /b/ds/stream-clip intro
180 bindsym $mod+l $ex dmenu_run
181 bindsym $mod+shift+l $ex /b/ds/stream-clip steady
182 bindsym $mod+shift+semicolon $ex /b/ds/stream-clip sad
183 # note default is 27% on my system76. not sure if these
184 # keybinds will screw up other laptop brightness keys.
185 bindsym XF86MonBrightnessUp $ex brightnessctl s +5%
186 bindsym XF86MonBrightnessDown $ex brightnessctl s 5%-
187 for_window [class="copyq" instance="copyq" window_type="normal"] floating enable
188 # eh, dont really like web page titles + a long browser name string.
189 for_window [class="firefox" instance="Navigator" window_role="browser"] title_format "b"
190 bindsym $mod+y $ex copyq-restart
191 bindsym $mod+shift+y $ex "/a/exe/i3-chat"
192
193 # Font for window titles. Will also be used by the bar unless a different font
194 # is used in the bar {} block below.
195 font pango:monospace 7
196
197 hide_edge_borders vertical
198
199 #exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
200
201 # Start clipster daemon
202 #exec --no-startup-id /a/opt/clipster/clipster -d
203
204 # title bars but no borders. i tried this out a bit
205 #default_border normal 0
206
207 # default border is like 2 pixels
208 default_border pixel
209 # for debugging
210 #default_border normal 10
211
212 # I dont see a way to make processing windows act like normal windows,
213 # this does it.
214 # https://unix.stackexchange.com/questions/450700/opening-a-programme-in-a-floating-window-in-i3
215 #
216 # This is the info for a processing window launched from the ide.
217 # I'm not sure I want it like this, so commenting it out for now.
218 #for_window [class="processing-core-PApplet" instance="processing-core-PApplet"] floating disable
219
220 # this is the processing window for my app named focus.
221 for_window [class="focus" instance="focus"] floating disable
222
223 client.focused #4c7899 #285577 #ffffff #2e9ef4 #ff4400
224 client.focused_inactive #333333 #5f676a #ffffff #484e50 #DBEEF4
225 client.unfocused #333333 #222222 #888888 #292d2e #B8C8CD