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