79f26bb488783eea2063d690ebb4f72ba092c1a1
[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 bindsym $mod+5 $ex "/a/bin/ds/stream-interlude"
34 bindsym $mod+6 $ex "i3-split-maybe"; exec "/usr/local/bin/start-tor-browser"
35 bindsym $mod+7 $ex "/a/bin/ds/laptop-xrandr"
36 #bindsym $mod+6 $ex "/a/bin/redshift.sh"
37 # bindsym $mod+equal $ex "t s w; t in"
38 # bindsym $mod+Home $ex "t out"
39 # #bindsym $mod+End $ex "t s x; t in"
40 # bindsym $mod+grave $ex "t s lunch; t in; t out -a '45 minutes from now'"
41
42
43 bindsym $mod+1 focus parent
44 bindsym $mod+shift+1 focus child
45
46 # note, i used to have a key: "floating toggle; floating toggle" to
47 # as undo split, as suggested here https://github.com/i3/i3/issues/3808
48 # but something
49 #
50 bindsym $mod+grave floating toggle
51 bindsym $mod+equal $ex "i3-set-layout splith"
52 # move firefox to current workspace.
53 # https://i3wm.org/docs/userguide.html#keybindings
54 # get class with xprop, example output
55 # WM_CLASS(STRING) = "irssi", "URxvt"
56 # xprop |& grep WM_CLASS
57 bindsym $mod+w $ex i3-pull abrowser
58 bindsym $mod+shift+w fullscreen toggle
59
60 bindsym $mod+e $ex i3-pull emacs
61 bindsym $mod+shift+e unmark emacs; mark emacs
62 bindsym $mod+r $ex "/a/bin/ds/xl"
63
64 bindsym $mod+t $ex "i3-set-layout splitv"
65 #bindsym $mod+Shift+t move workspace to output up
66 bindsym $mod+Shift+t move workspace to output BIG-RIGHT eDP-1
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 i3-pull term
131 bindsym $mod+shift+b unmark term; mark term
132 # for use to cleanup extra emacs windows
133 # https://faq.i3wm.org/question/7662/reverse-perl-matches-in-criteria-in-i3-config.1.html
134 # I found their regex slightly wrong. This is a hacky way to
135 # ignore my irc emacs instances, their window titles
136 # are irc room names. Another way would be to hack on the
137 # window title, or xprop stuff, but I figure I'm switching
138 # to wayland soon, lets wait and see how things work there.
139 bindsym $mod+shift+6 [class="Emacs" title="^(?!#[a-zA-Z][a-zA-Z-]*$)"] move workspace current
140
141 bindsym $mod+c kill
142
143
144 bindsym $mod+Home split horizontal
145 bindsym $mod+Shift+End move container to workspace 7
146 bindsym $mod+End workspace 7
147 bindsym $mod+Shift+q move container to workspace 8
148 bindsym $mod+q workspace 8
149
150 bindsym $mod+Shift+8 move container to workspace 9
151 bindsym $mod+8 workspace 9
152 bindsym $mod+Shift+9 move container to workspace 10
153 bindsym $mod+9 workspace 10
154
155 bindsym $mod+m $ex "dunstctl close-all"
156 bindsym $mod+Shift+m border toggle
157
158 # 65 = space.
159 # toggle tiling / floating.
160 #
161 # The idea here is: when floating a window, make it sticky and 1080p,
162 # because the only reason we want to do this is to keep it on screen
163 # when doing an obs broacast. When unfloating a window, just act as a
164 # normal unfloat. There is a quirk with this: in a layout with 3 windows,
165 # 2 stacked, 1 tall, floating and ufloating the tall one will make it
166 # another stacked one, but still 1920x1080, you need to move it to the
167 # right to get it back into its tall spot. I could automate this,
168 # but I'm not bothering right now
169 bindcode $mod+65 $ex obs-auto-scene-switch-toggle; floating toggle; sticky enable; resize set 1920 1080; move position 100 ppt 0 ppt
170
171 # change focus between tiling / floating windows
172 bindcode $mod+shift+65 focus mode_toggle
173
174 bindsym $mod+shift+h $ex /b/ds/stream-clip hc
175 bindsym $mod+j $ex "i3-split-maybe"; exec emacsclient -c
176 bindsym $mod+shift+j $ex /b/ds/stream-clip up
177 bindsym $mod+k $ex "i3-split-maybe"; exec konsole
178 bindsym $mod+shift+k $ex /b/ds/stream-clip intro
179 bindsym $mod+l $ex dmenu_run
180 bindsym $mod+shift+l $ex /b/ds/stream-clip steady
181 bindsym $mod+shift+semicolon $ex /b/ds/stream-clip sad
182 # note default is 27% on my system76. not sure if these
183 # keybinds will screw up other laptop brightness keys.
184 bindsym XF86MonBrightnessUp $ex brightnessctl s +5%
185 bindsym XF86MonBrightnessDown $ex brightnessctl s 5%-
186 for_window [class="copyq" instance="copyq" window_type="normal"] floating enable
187 bindsym $mod+y $ex copyq-restart
188
189 # Font for window titles. Will also be used by the bar unless a different font
190 # is used in the bar {} block below.
191 font pango:monospace 7
192
193 hide_edge_borders vertical
194
195 #exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
196
197 # Start clipster daemon
198 #exec --no-startup-id /a/opt/clipster/clipster -d
199
200 # title bars but no borders. i tried this out a bit
201 #default_border normal 0
202
203 # default border is like 2 pixels
204 default_border pixel
205 # for debugging
206 #default_border normal 10
207
208 # I dont see a way to make processing windows act like normal windows,
209 # this does it.
210 # https://unix.stackexchange.com/questions/450700/opening-a-programme-in-a-floating-window-in-i3
211 #
212 # This is the info for a processing window launched from the ide.
213 # I'm not sure I want it like this, so commenting it out for now.
214 #for_window [class="processing-core-PApplet" instance="processing-core-PApplet"] floating disable
215
216 # this is the processing window for my app named focus.
217 for_window [class="focus" instance="focus"] floating disable
218
219 client.focused #4c7899 #285577 #ffffff #2e9ef4 #ff4400
220 client.focused_inactive #333333 #5f676a #ffffff #484e50 #DBEEF4
221 client.unfocused #333333 #222222 #888888 #292d2e #B8C8CD