9e4cedcccf44836336889f260cf61d62c4a94a00
[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 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 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/obs-i3-interlude"
35 bindsym $mod+6 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 "dunstctl close-all"
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 # todo, in newer i3, make this toggle split tabbed
61 bindsym $mod+t layout toggle splith splitv tabbed
62 #bindsym $mod+Shift+t move workspace to output up
63 bindsym $mod+Shift+t move workspace to output right
64 # there's a bug about this. it is not logical that there is no "split
65 # tabbed", but you accomplish that by doing this.
66 bindsym $mod+g split vertical, layout tabbed
67 bindsym $mod+shift+g $ex "/b/ds/i3-auto-layout-toggle"
68
69 # Use Mouse+$mod to drag floating windows to their wanted position
70 floating_modifier $mod
71
72 bindsym $mod+u focus left; $ex "i3-mouse-warp"
73 bindsym $mod+i focus right; $ex "i3-mouse-warp"
74 bindsym $mod+o focus up; $ex "i3-mouse-warp"
75 bindsym $mod+p focus down; $ex "i3-mouse-warp"
76
77 bindsym $mod+Left $ex "/a/exe/i3-maybe-double-move left"
78 bindsym $mod+Right $ex "i3-maybe-double-move right"
79 bindsym $mod+Up $ex "i3-maybe-double-move up"
80 bindsym $mod+Down $ex "i3-maybe-double-move down"
81
82 bindsym $mod+Shift+a move container to workspace 4
83 bindsym $mod+a workspace 4
84
85 bindsym $mod+Shift+s move container to workspace 3
86 bindsym $mod+s workspace 3
87
88 bindsym $mod+Shift+d move container to workspace 2
89 bindsym $mod+d workspace 2
90
91 bindsym $mod+Shift+f move container to workspace 1
92 bindsym $mod+f workspace 1
93
94 bindsym $mod+Shift+z move container to workspace 5
95 bindsym $mod+z workspace 5
96
97 bindsym $mod+Shift+x move container to workspace 6
98 bindsym $mod+x workspace 6
99
100
101 # todo, in newer i3, make this split toggle
102 bindsym $mod+v split vertical
103 bindsym $mod+Shift+v split horizontal
104 #
105 ## temp for testing, add antying here
106 ##bindsym $mod+shift+g
107 bindsym $mod+b $ex i3-pull term
108 bindsym $mod+shift+b unmark term; mark term
109 # for use to cleanup extra emacs windows
110 # https://faq.i3wm.org/question/7662/reverse-perl-matches-in-criteria-in-i3-config.1.html
111 # I found their regex slightly wrong. This is a hacky way to
112 # ignore my irc emacs instances, their window titles
113 # are irc room names. Another way would be to hack on the
114 # window title, or xprop stuff, but I figure I'm switching
115 # to wayland soon, lets wait and see how things work there.
116 bindsym $mod+shift+6 [class="Emacs" title="^(?!#[a-zA-Z][a-zA-Z-]*$)"] move workspace current
117
118 bindsym $mod+c kill
119
120
121 bindsym $mod+Shift+Home move container to workspace 7
122 bindsym $mod+Home workspace 7
123 bindsym $mod+Shift+q move container to workspace 8
124 bindsym $mod+q workspace 8
125
126 bindsym $mod+Shift+8 move container to workspace 9
127 bindsym $mod+8 workspace 9
128 bindsym $mod+Shift+9 move container to workspace 10
129 bindsym $mod+9 workspace 10
130
131 bindsym $mod+Shift+m border toggle
132
133 # 65 = space.
134 # toggle tiling / floating.
135 #
136 # The idea here is: when floating a window, make it sticky and 1080p,
137 # because the only reason we want to do this is to keep it on screen
138 # when doing an obs broacast. When unfloating a window, just act as a
139 # normal unfloat. There is a quirk with this: in a layout with 3 windows,
140 # 2 stacked, 1 tall, floating and ufloating the tall one will make it
141 # another stacked one, but still 1920x1080, you need to move it to the
142 # right to get it back into its tall spot. I could automate this,
143 # but I'm not bothering right now
144 bindcode $mod+65 $ex obs-auto-scene-switch-toggle; floating toggle; sticky enable; resize set 1920 1080; move position 100 ppt 0 ppt
145
146 # change focus between tiling / floating windows
147 bindcode $mod+shift+65 focus mode_toggle
148 # Use Mouse+$mod to drag floating windows to their wanted position
149 floating_modifier $mod
150
151 bindsym $mod+shift+h $ex clip-hc
152 bindsym $mod+j $ex emacsclient -c
153 bindsym $mod+shift+j $ex clip-up
154 bindsym $mod+k $ex konsole
155 bindsym $mod+shift+k $ex mpv --profile=a /a/bin/data/clips/enter-in.flac
156 bindsym $mod+l $ex dmenu_run
157 bindsym $mod+shift+l $ex mpv --profile=a /a/bin/data/clips/tokyo-eye.flac
158 bindsym $mod+shift+semicolon $ex clip-sad
159 # note default is 27% on my system76. not sure if these
160 # keybinds will screw up other laptop brightness keys.
161 bindsym XF86MonBrightnessUp $ex brightnessctl s +5%
162 bindsym XF86MonBrightnessDown $ex brightnessctl s 5%-
163
164 # Font for window titles. Will also be used by the bar unless a different font
165 # is used in the bar {} block below.
166 font pango:monospace 7
167
168 # todo: only available in newer i3n
169 hide_edge_borders vertical
170
171 #exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
172
173 # Start clipster daemon
174 #exec --no-startup-id /a/opt/clipster/clipster -d
175
176
177 # shortcut to selection widget (primary)
178 bindsym $mod+End $ex /a/opt/clipster/clipster -sp
179
180 # title bars but no borders. i tried this out a bit
181 #default_border normal 0
182 default_border pixel 4
183
184 # I dont see a way to make processing windows act like normal windows,
185 # this does it.
186 # https://unix.stackexchange.com/questions/450700/opening-a-programme-in-a-floating-window-in-i3
187 #
188 # This is the info for a processing window launched from the ide.
189 # I'm not sure I want it like this, so commenting it out for now.
190 #for_window [class="processing-core-PApplet" instance="processing-core-PApplet"] floating disable
191
192 # this is the processing window for my app named focus.
193 for_window [class="focus" instance="focus"] floating disable
194
195 client.focused #4c7899 #285577 #ffffff #2e9ef4 #ff4400
196 client.focused_inactive #333333 #5f676a #ffffff #484e50 #DBEEF4
197 client.unfocused #333333 #222222 #888888 #292d2e #B8C8CD