mostly improvements, wip
[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
13 # https://i3wm.org/docs/userguide.html#keybindings
14 #To get the current mapping of your keys, use xmodmap -pke. To
15 #interactively enter a key and see what keysym it is configured to, use
16 #xev.
17 set $mod Mod4
18
19 # for non-gui apps, use this.
20 set $ex exec --no-startup-id
21
22 bindsym $mod+2 $ex "/b/ds/i3-split-maybe"; exec "pavucontrol"
23 # calling without -no-remote makes this to be the instance that links
24 # will open in from other applications.
25 bindsym $mod+3 $ex "/b/ds/i3-split-maybe"; exec "abrowser"
26 # calling just abrowser mysteriously stopped working,
27 # so I figured out this is how to get output, but then
28 # it suddenly started working again.
29 #bindsym $mod+3 exec "abrowser 2>&1 >/tmp/l"
30 #bindsym $mod+3 exec "abrowser -no-remote -P sfw"
31 bindsym $mod+4 $ex "/b/ds/i3-split-maybe"; exec "abrowser -no-remote -P firefox-main-profile"
32 # todo: figure out a stream delay & way to cut the stream.
33 # settings, advanced, stream delay
34 bindsym $mod+5 $ex "/a/bin/ds/stream-interlude"
35 bindsym $mod+6 $ex "/b/ds/i3-split-maybe"; exec "/usr/local/bin/start-tor-browser"
36 bindsym $mod+7 $ex "/a/bin/ds/laptop-xrandr"
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 # undo split: https://github.com/i3/i3/issues/3808
47 bindsym $mod+grave floating toggle; floating toggle
48 bindsym $mod+equal $ex "/a/exe/i3-set-layout splith"
49 # move firefox to current workspace.
50 # https://i3wm.org/docs/userguide.html#keybindings
51 # get class with xprop, example output
52 # WM_CLASS(STRING) = "irssi", "URxvt"
53 # xprop |& grep WM_CLASS
54 bindsym $mod+w $ex i3-pull abrowser
55 bindsym $mod+shift+w fullscreen toggle
56
57 bindsym $mod+e $ex i3-pull emacs
58 bindsym $mod+shift+e unmark emacs; mark emacs
59 bindsym $mod+r $ex "/a/bin/ds/xl"
60
61 # todo, in newer i3, make this toggle split tabbed.
62 bindsym $mod+t $ex "/a/exe/i3-set-layout splitv"
63 #bindsym $mod+Shift+t move workspace to output up
64 bindsym $mod+Shift+t move workspace to output right
65
66 # todo: consider a command that moves a window, and erases any single
67 # container window left behind.
68
69 # todo: port /b/ds/i3-maybe-double-move into python.
70
71 # todo: consider a command which alters things as if the current window
72 # had been created into a single window split. For horizontal split,
73 # this would be like: focus left, split vertical, focus right, move
74 # left. With that, we could totally eliminate single window containers.
75
76 bindsym $mod+g $ex "/a/exe/i3-set-layout tabbed"
77
78 bindsym $mod+shift+g $ex "/b/ds/i3-auto-layout-toggle"
79
80 # Use Mouse+$mod to drag floating windows to their wanted position
81 floating_modifier $mod
82
83 bindsym $mod+u focus left; $ex "i3-mouse-warp"
84 bindsym $mod+i focus right; $ex "i3-mouse-warp"
85 bindsym $mod+o focus up; $ex "i3-mouse-warp"
86 bindsym $mod+p focus down; $ex "i3-mouse-warp"
87
88 bindsym $mod+Left $ex "/a/exe/i3-maybe-double-move left"
89 bindsym $mod+Right $ex "i3-maybe-double-move right"
90 bindsym $mod+Up $ex "i3-maybe-double-move up"
91 bindsym $mod+Down $ex "i3-maybe-double-move down"
92
93 bindsym $mod+Shift+a move container to workspace 4
94 bindsym $mod+a workspace 4
95
96 bindsym $mod+Shift+s move container to workspace 3
97 bindsym $mod+s workspace 3
98
99 bindsym $mod+Shift+d move container to workspace 2
100 bindsym $mod+d workspace 2
101
102 bindsym $mod+Shift+f move container to workspace 1
103 bindsym $mod+f workspace 1
104
105 bindsym $mod+Shift+z move container to workspace 5
106 bindsym $mod+z workspace 5
107
108 bindsym $mod+Shift+x move container to workspace 6
109 bindsym $mod+x workspace 6
110
111
112 # todo, in newer i3, make this split toggle
113 bindsym $mod+v split vertical
114 bindsym $mod+Shift+v split horizontal
115 #
116 ## temp for testing, add antying here
117 ##bindsym $mod+shift+g
118 bindsym $mod+b $ex i3-pull term
119 bindsym $mod+shift+b unmark term; mark term
120 # for use to cleanup extra emacs windows
121 # https://faq.i3wm.org/question/7662/reverse-perl-matches-in-criteria-in-i3-config.1.html
122 # I found their regex slightly wrong. This is a hacky way to
123 # ignore my irc emacs instances, their window titles
124 # are irc room names. Another way would be to hack on the
125 # window title, or xprop stuff, but I figure I'm switching
126 # to wayland soon, lets wait and see how things work there.
127 bindsym $mod+shift+6 [class="Emacs" title="^(?!#[a-zA-Z][a-zA-Z-]*$)"] move workspace current
128
129 bindsym $mod+c kill
130
131
132 bindsym $mod+Shift+Home move container to workspace 7
133 bindsym $mod+Home workspace 7
134 bindsym $mod+Shift+q move container to workspace 8
135 bindsym $mod+q workspace 8
136
137 bindsym $mod+Shift+8 move container to workspace 9
138 bindsym $mod+8 workspace 9
139 bindsym $mod+Shift+9 move container to workspace 10
140 bindsym $mod+9 workspace 10
141
142 bindsym $mod+m $ex "dunstctl close-all"
143 bindsym $mod+Shift+m border toggle
144
145 # 65 = space.
146 # toggle tiling / floating.
147 #
148 # The idea here is: when floating a window, make it sticky and 1080p,
149 # because the only reason we want to do this is to keep it on screen
150 # when doing an obs broacast. When unfloating a window, just act as a
151 # normal unfloat. There is a quirk with this: in a layout with 3 windows,
152 # 2 stacked, 1 tall, floating and ufloating the tall one will make it
153 # another stacked one, but still 1920x1080, you need to move it to the
154 # right to get it back into its tall spot. I could automate this,
155 # but I'm not bothering right now
156 bindcode $mod+65 $ex obs-auto-scene-switch-toggle; floating toggle; sticky enable; resize set 1920 1080; move position 100 ppt 0 ppt
157
158 # change focus between tiling / floating windows
159 bindcode $mod+shift+65 focus mode_toggle
160 # Use Mouse+$mod to drag floating windows to their wanted position
161 floating_modifier $mod
162
163 bindsym $mod+shift+h $ex /b/ds/stream-clip hc
164 bindsym $mod+j $ex "/b/ds/i3-split-maybe"; exec emacsclient -c
165 bindsym $mod+shift+j $ex /b/ds/stream-clip up
166 bindsym $mod+k $ex "/b/ds/i3-split-maybe"; exec konsole
167 bindsym $mod+shift+k $ex /b/ds/stream-clip intro
168 bindsym $mod+l $ex dmenu_run
169 bindsym $mod+shift+l $ex /b/ds/stream-clip steady
170 bindsym $mod+shift+semicolon $ex /b/ds/stream-clip sad
171 # note default is 27% on my system76. not sure if these
172 # keybinds will screw up other laptop brightness keys.
173 bindsym XF86MonBrightnessUp $ex brightnessctl s +5%
174 bindsym XF86MonBrightnessDown $ex brightnessctl s 5%-
175
176 # Font for window titles. Will also be used by the bar unless a different font
177 # is used in the bar {} block below.
178 font pango:monospace 7
179
180 hide_edge_borders vertical
181
182 #exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
183
184 # Start clipster daemon
185 #exec --no-startup-id /a/opt/clipster/clipster -d
186
187
188 # shortcut to selection widget (primary)
189 bindsym $mod+End $ex "/b/ds/toggle-mute"
190
191 # title bars but no borders. i tried this out a bit
192 #default_border normal 0
193 default_border pixel 4
194 # for debugging
195 default_border normal 10
196
197 # I dont see a way to make processing windows act like normal windows,
198 # this does it.
199 # https://unix.stackexchange.com/questions/450700/opening-a-programme-in-a-floating-window-in-i3
200 #
201 # This is the info for a processing window launched from the ide.
202 # I'm not sure I want it like this, so commenting it out for now.
203 #for_window [class="processing-core-PApplet" instance="processing-core-PApplet"] floating disable
204
205 # this is the processing window for my app named focus.
206 for_window [class="focus" instance="focus"] floating disable
207
208 # client.focused #4c7899 #285577 #ffffff #2e9ef4 #ff4400
209 # client.focused_inactive #333333 #5f676a #ffffff #484e50 #DBEEF4
210 # client.unfocused #333333 #222222 #888888 #292d2e #B8C8CD