diff options
author | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-28 17:02:20 -0400 |
---|---|---|
committer | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-28 17:33:42 -0400 |
commit | 7e183e38d8ac3d0fc0d5ab257b63771e5badaa31 (patch) | |
tree | f006478d09ae4ec788a97d4c08e8a5e5bbe7b10b /dot/config | |
parent | 49b42e352dae1eac7499090db68e5f18ebe75c8b (diff) |
package installer that auto-backports i3-wm
Diffstat (limited to 'dot/config')
-rw-r--r-- | dot/config/i3/config | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/dot/config/i3/config b/dot/config/i3/config new file mode 100644 index 0000000..9d27da4 --- /dev/null +++ b/dot/config/i3/config | |||
@@ -0,0 +1,178 @@ | |||
1 | # i3 config file (v4) | ||
2 | # Please see https://i3wm.org/docs/userguide.html for a complete reference! | ||
3 | |||
4 | set $mod Mod4 | ||
5 | |||
6 | # These require a newer i3 than available in Debian bullseye. | ||
7 | # The version in Debian sid backports without issue (but isn't in | ||
8 | # bullseye-backports). | ||
9 | hide_edge_borders smart_no_gaps | ||
10 | smart_borders no_gaps | ||
11 | |||
12 | # Font for window titles. Will also be used by the bar unless a different font | ||
13 | # is used in the bar {} block below. | ||
14 | font pango:monospace 8 | ||
15 | |||
16 | # This font is widely installed, provides lots of unicode glyphs, right-to-left | ||
17 | # text rendering and scalability on retina/hidpi displays (thanks to pango). | ||
18 | #font pango:DejaVu Sans Mono 8 | ||
19 | |||
20 | # The combination of xss-lock, nm-applet and pactl is a popular choice, so | ||
21 | # they are included here as an example. Modify as you see fit. | ||
22 | |||
23 | # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the | ||
24 | # screen before suspend. Use loginctl lock-session to lock your screen. | ||
25 | exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork | ||
26 | |||
27 | # NetworkManager is the most popular way to manage wireless networks on Linux, | ||
28 | # and nm-applet is a desktop environment-independent system tray GUI for it. | ||
29 | exec --no-startup-id nm-applet | ||
30 | |||
31 | # Use pactl to adjust volume in PulseAudio. | ||
32 | set $refresh_i3status killall -SIGUSR1 i3status | ||
33 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status | ||
34 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status | ||
35 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status | ||
36 | bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status | ||
37 | |||
38 | # Use Mouse+$mod to drag floating windows to their wanted position | ||
39 | floating_modifier $mod | ||
40 | |||
41 | # start a terminal | ||
42 | bindsym $mod+Return exec i3-sensible-terminal | ||
43 | |||
44 | # kill focused window | ||
45 | bindsym $mod+Shift+q kill | ||
46 | bindsym $mod+Shift+c kill | ||
47 | |||
48 | # start dmenu (a program launcher) | ||
49 | bindsym $mod+d exec --no-startup-id dmenu_run | ||
50 | bindsym $mod+p exec --no-startup-id dmenu_run | ||
51 | # A more modern dmenu replacement is rofi: | ||
52 | # bindcode $mod+40 exec "rofi -modi drun,run -show drun" | ||
53 | # There also is i3-dmenu-desktop which only displays applications shipping a | ||
54 | # .desktop file. It is a wrapper around dmenu, so you need that installed. | ||
55 | # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop | ||
56 | |||
57 | # change focus | ||
58 | # it would be nicer if jk and hl were interchangeable in vsplit and hsplit modes. | ||
59 | bindsym $mod+h focus left | ||
60 | bindsym $mod+j focus down | ||
61 | bindsym $mod+k focus up | ||
62 | bindsym $mod+l focus right | ||
63 | |||
64 | # alternatively, you can use the cursor keys: | ||
65 | bindsym $mod+Left focus left | ||
66 | bindsym $mod+Down focus down | ||
67 | bindsym $mod+Up focus up | ||
68 | bindsym $mod+Right focus right | ||
69 | |||
70 | # move focused window | ||
71 | bindsym $mod+Shift+h move left | ||
72 | bindsym $mod+Shift+j move down | ||
73 | bindsym $mod+Shift+k move up | ||
74 | bindsym $mod+Shift+l move right | ||
75 | |||
76 | # alternatively, you can use the cursor keys: | ||
77 | bindsym $mod+Shift+Left move left | ||
78 | bindsym $mod+Shift+Down move down | ||
79 | bindsym $mod+Shift+Up move up | ||
80 | bindsym $mod+Shift+Right move right | ||
81 | |||
82 | # enter fullscreen mode for the focused container | ||
83 | bindsym $mod+f fullscreen toggle | ||
84 | |||
85 | # change container layout (stacked, tabbed, toggle split) | ||
86 | bindsym $mod+s layout stacking | ||
87 | bindsym $mod+w layout tabbed | ||
88 | bindsym $mod+e layout toggle split | ||
89 | |||
90 | # toggle tiling / floating | ||
91 | bindsym $mod+t floating toggle | ||
92 | |||
93 | # change focus between tiling / floating windows | ||
94 | bindsym $mod+Shift+space fullscreen toggle | ||
95 | bindsym $mod+space layout toggle stacking tabbed splitv splith | ||
96 | |||
97 | # focus the parent container | ||
98 | bindsym $mod+a focus parent | ||
99 | |||
100 | # focus the child container | ||
101 | #bindsym $mod+d focus child | ||
102 | |||
103 | # Define names for default workspaces for which we configure key bindings later on. | ||
104 | # We use variables to avoid repeating the names in multiple places. | ||
105 | set $ws1 "1" | ||
106 | set $ws2 "2" | ||
107 | set $ws3 "3" | ||
108 | set $ws4 "4" | ||
109 | set $ws5 "5" | ||
110 | set $ws6 "6" | ||
111 | set $ws7 "7" | ||
112 | set $ws8 "8" | ||
113 | set $ws9 "9" | ||
114 | set $ws10 "10" | ||
115 | |||
116 | # switch to workspace | ||
117 | bindsym $mod+1 workspace number $ws1 | ||
118 | bindsym $mod+2 workspace number $ws2 | ||
119 | bindsym $mod+3 workspace number $ws3 | ||
120 | bindsym $mod+4 workspace number $ws4 | ||
121 | bindsym $mod+5 workspace number $ws5 | ||
122 | bindsym $mod+6 workspace number $ws6 | ||
123 | bindsym $mod+7 workspace number $ws7 | ||
124 | bindsym $mod+8 workspace number $ws8 | ||
125 | bindsym $mod+9 workspace number $ws9 | ||
126 | bindsym $mod+0 workspace number $ws10 | ||
127 | |||
128 | # move focused container to workspace | ||
129 | bindsym $mod+Shift+1 move container to workspace number $ws1 | ||
130 | bindsym $mod+Shift+2 move container to workspace number $ws2 | ||
131 | bindsym $mod+Shift+3 move container to workspace number $ws3 | ||
132 | bindsym $mod+Shift+4 move container to workspace number $ws4 | ||
133 | bindsym $mod+Shift+5 move container to workspace number $ws5 | ||
134 | bindsym $mod+Shift+6 move container to workspace number $ws6 | ||
135 | bindsym $mod+Shift+7 move container to workspace number $ws7 | ||
136 | bindsym $mod+Shift+8 move container to workspace number $ws8 | ||
137 | bindsym $mod+Shift+9 move container to workspace number $ws9 | ||
138 | bindsym $mod+Shift+0 move container to workspace number $ws10 | ||
139 | |||
140 | # reload the configuration file | ||
141 | #bindsym $mod+Shift+c reload | ||
142 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) | ||
143 | bindsym $mod+Shift+r restart | ||
144 | # exit i3 (logs you out of your X session) | ||
145 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" | ||
146 | |||
147 | # resize window (you can also use the mouse for that) | ||
148 | mode "resize" { | ||
149 | # These bindings trigger as soon as you enter the resize mode | ||
150 | |||
151 | # Pressing left will shrink the window’s width. | ||
152 | # Pressing right will grow the window’s width. | ||
153 | # Pressing up will shrink the window’s height. | ||
154 | # Pressing down will grow the window’s height. | ||
155 | bindsym h resize shrink width 10 px or 10 ppt | ||
156 | bindsym j resize grow height 10 px or 10 ppt | ||
157 | bindsym k resize shrink height 10 px or 10 ppt | ||
158 | bindsym l resize grow width 10 px or 10 ppt | ||
159 | |||
160 | # same bindings, but for the arrow keys | ||
161 | bindsym Left resize shrink width 10 px or 10 ppt | ||
162 | bindsym Down resize grow height 10 px or 10 ppt | ||
163 | bindsym Up resize shrink height 10 px or 10 ppt | ||
164 | bindsym Right resize grow width 10 px or 10 ppt | ||
165 | |||
166 | # back to normal: Enter or Escape or $mod+r | ||
167 | bindsym Return mode "default" | ||
168 | bindsym Escape mode "default" | ||
169 | bindsym $mod+r mode "default" | ||
170 | } | ||
171 | |||
172 | bindsym $mod+r mode "resize" | ||
173 | |||
174 | # Start i3bar to display a workspace bar (plus the system information i3status | ||
175 | # finds out, if available) | ||
176 | bar { | ||
177 | status_command i3status | ||
178 | } | ||