Skip to content

Commit 7a86958

Browse files
committed
i3: new
1 parent 1235372 commit 7a86958

File tree

2 files changed

+175
-220
lines changed

2 files changed

+175
-220
lines changed

.i3/config

+131-164
Original file line numberDiff line numberDiff line change
@@ -1,176 +1,143 @@
1-
# Set modifier key to alt
2-
set $mod Mod1
3-
4-
# Set display resolution
5-
exec_always --no-startup-id xrandr --output HDMI-0 --mode 1920x1080 --rate 60
6-
7-
# Apply .Xresource. As far as I know, only needed here if using starx (dont have a login manager)
8-
exec_always --no-startup-id xrdb ~/.Xresources
9-
10-
# Apply a background different than the one used by wal
11-
# If this isn't needed, remove it and remove -n flag from the above command
12-
exec_always --no-startup-id feh --bg-fill ~/Pictures/wally.jpg
13-
14-
# Execute polybar on launch. Script kills current ones on i3 refresh, otherwise they duplicate
15-
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
16-
17-
exec_always --no-startup-id setxkbmap -layout us -option caps:escape
18-
19-
exec_always --no-startup-id compton
20-
21-
font pango:MesloLGM Nerd Font 8
22-
23-
# Press mod key to be able to resize floating windows
24-
floating_modifier $mod
25-
26-
# Open new terminal
27-
bindsym $mod+Return exec i3-sensible-terminal
28-
29-
#Close window
30-
bindsym $mod+Shift+q kill
31-
32-
# Open dmenu
33-
bindsym $mod+d exec dmenu_run -fn 'Overpass Mono:pixelsize=15' -l 3 -nf '#707880' -sf '#cc6666' -nb '#1d1f21' -sb '#1d1f21'
34-
35-
# Change focus
36-
bindsym $mod+j focus left
37-
bindsym $mod+k focus down
38-
bindsym $mod+l focus up
39-
bindsym $mod+semicolon focus right
40-
41-
# Alternatively, you can use the cursor keys:
42-
bindsym $mod+Left focus left
43-
bindsym $mod+Down focus down
44-
bindsym $mod+Up focus up
45-
bindsym $mod+Right focus right
46-
47-
# Move focused window
48-
bindsym $mod+Shift+j move left
49-
bindsym $mod+Shift+k move down
50-
bindsym $mod+Shift+l move up
51-
bindsym $mod+Shift+semicolon move right
52-
53-
# Alternatively, you can use the cursor keys:
54-
bindsym $mod+Shift+Left move left
55-
bindsym $mod+Shift+Down move down
56-
bindsym $mod+Shift+Up move up
57-
bindsym $mod+Shift+Right move right
58-
59-
# Split in horizontal orientation
60-
bindsym $mod+h split h
61-
62-
# Split in vertical orientation
63-
bindsym $mod+v split v
64-
65-
# Enter fullscreen mode for the focused container
66-
bindsym $mod+f fullscreen toggle
67-
68-
# Change container layout (stacked, tabbed, toggle split)
69-
bindsym $mod+s layout stacking
70-
bindsym $mod+w layout tabbed
71-
bindsym $mod+e layout toggle split
72-
73-
# Toggle tiling / floating
74-
bindsym $mod+Shift+space floating toggle
75-
76-
# Change focus between tiling / floating windows
77-
bindsym $mod+space focus mode_toggle
78-
79-
# Focus the parent container
80-
bindsym $mod+a focus parent
81-
82-
# Focus the child container
83-
#bindsym $mod+d focus child
84-
85-
# Switch to workspace
86-
bindsym $mod+1 workspace 1
87-
bindsym $mod+2 workspace 2
88-
bindsym $mod+3 workspace 3
89-
bindsym $mod+4 workspace 4
90-
bindsym $mod+5 workspace 5
91-
bindsym $mod+6 workspace 6
92-
bindsym $mod+7 workspace 7
93-
bindsym $mod+8 workspace 8
94-
bindsym $mod+9 workspace 9
95-
bindsym $mod+0 workspace 10
96-
97-
# Move focused container to workspace
98-
bindsym $mod+Shift+1 move container to workspace 1
99-
bindsym $mod+Shift+2 move container to workspace 2
100-
bindsym $mod+Shift+3 move container to workspace 3
101-
bindsym $mod+Shift+4 move container to workspace 4
102-
bindsym $mod+Shift+5 move container to workspace 5
103-
bindsym $mod+Shift+6 move container to workspace 6
104-
bindsym $mod+Shift+7 move container to workspace 7
105-
bindsym $mod+Shift+8 move container to workspace 8
106-
bindsym $mod+Shift+9 move container to workspace 9
107-
bindsym $mod+Shift+0 move container to workspace 10
108-
109-
# Reload the configuration file
110-
bindsym $mod+Shift+c reload
111-
# Restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
112-
bindsym $mod+Shift+r restart
113-
# Exit i3 (logs you out of your X session)
114-
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'"
115-
116-
# Resize window (you can also use the mouse for that)
1+
# set modifier
2+
set $super Mod4
3+
set $alt Mod1
4+
5+
# set font
6+
font pango: Noto Sans 8
7+
8+
# Use Mouse+$super to drag floating windows to their wanted position
9+
floating_modifier $super
10+
11+
#autostart
12+
exec --no-startup-id hsetroot -center ~/Pictures/wally.jpg
13+
exec --no-startup-id xsettingsd &
14+
exec --no-startup-id setxkbmap -layout us -option caps:escape
15+
exec --no-startup-id $HOME/.config/polybar/launch.sh
16+
exec --no-startup-id compton -b
17+
18+
# start a terminal
19+
bindsym $super+Return exec i3-sensible-terminal
20+
21+
# start dmenu (a program launcher)
22+
bindsym $super+Shift+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Noto Sans:size=8'"
23+
bindsym Control+space exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 8'
24+
25+
# common apps keybinds
26+
bindsym Print exec scrot 'Cheese_%a-%d%b%y_%H.%M.png' -e 'viewnior ~/$f'
27+
bindsym $alt+Control+l exec i3lock -i ~/Pictures/wally.jpg
28+
bindsym $super+w exec firefox
29+
30+
#change volume
31+
bindsym XF86AudioRaiseVolume exec amixer -c 0 set PCM 2dB+
32+
bindsym XF86AudioLowerVolume exec amixer -c 0 set PCM 2dB-
33+
bindsym XF86AudioMute exec amixer set Master toggle
34+
35+
# music control
36+
bindsym XF86AudioNext exec mpc next
37+
bindsym XF86AudioPrev exec mpc prev
38+
bindsym XF86AudioPlay exec mpc toggle
39+
bindsym XF86AudioStop exec mpc stop
40+
41+
# kill focused window
42+
bindsym $super+q kill
43+
bindsym $alt+F4 kill
44+
45+
# change focus
46+
bindsym $super+h focus left
47+
bindsym $super+j focus down
48+
bindsym $super+k focus up
49+
bindsym $super+l focus right
50+
51+
# move focused window
52+
bindsym $super+Shift+h move left
53+
bindsym $super+Shift+j move down
54+
bindsym $super+Shift+k move up
55+
bindsym $super+Shift+l move right
56+
57+
# split in horizontal orientation
58+
bindsym $super+Control+h split h
59+
60+
# split in vertical orientation
61+
bindsym $super+Control+v split v
62+
63+
# enter fullscreen mode for the focused container
64+
bindsym $super+f fullscreen toggle
65+
66+
# change container layout split
67+
bindsym $super+s layout toggle split
68+
69+
# toggle tiling / floating
70+
bindsym $super+space floating toggle
71+
72+
# change focus between tiling / floating windows
73+
bindsym $super+Shift+space focus mode_toggle
74+
75+
# switch to workspace
76+
bindsym Shift+Control+h workspace next
77+
bindsym Shift+Control+l workspace prev
78+
bindsym $super+1 workspace 1
79+
bindsym $super+2 workspace 2
80+
bindsym $super+3 workspace 3
81+
bindsym $super+4 workspace 4
82+
bindsym $super+5 workspace 5
83+
bindsym $super+6 workspace 6
84+
85+
# move focused container to workspace
86+
bindsym $super+Shift+1 move container to workspace 1
87+
bindsym $super+Shift+2 move container to workspace 2
88+
bindsym $super+Shift+3 move container to workspace 3
89+
bindsym $super+Shift+4 move container to workspace 4
90+
bindsym $super+Shift+5 move container to workspace 5
91+
bindsym $super+Shift+6 move container to workspace 6
92+
93+
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
94+
bindsym $super+Shift+r restart
95+
96+
# exit i3
97+
bindsym $super+Shift+q exec "i3-nagbar -t warning -m 'Really, exit?' -b 'Yes' 'i3-msg exit'"
98+
99+
# resize window (you can also use the mouse for that)
117100
mode "resize" {
118-
# These bindings trigger as soon as you enter the resize mode
119-
120-
# Pressing left will shrink the window’s width.
121-
# Pressing right will grow the window’s width.
122-
# Pressing up will shrink the window’s height.
123-
# Pressing down will grow the window’s height.
124-
bindsym j resize shrink width 5 px or 5 ppt
125-
bindsym k resize grow height 5 px or 5 ppt
126-
bindsym l resize shrink height 5 px or 5 ppt
127-
bindsym semicolon resize grow width 5 px or 5 ppt
128-
129-
# same bindings, but for the arrow keys
130101
bindsym Left resize shrink width 5 px or 5 ppt
131102
bindsym Down resize grow height 5 px or 5 ppt
132103
bindsym Up resize shrink height 5 px or 5 ppt
133104
bindsym Right resize grow width 5 px or 5 ppt
134-
135-
# back to normal: Enter or Escape
136105
bindsym Return mode "default"
137-
bindsym Escape mode "default"
138106
}
107+
bindsym $super+r mode "resize"
139108

140-
bindsym $mod+r mode "resize"
141-
142-
# Start i3bar to display a workspace bar (plus the system information i3status
143-
# Finds out, if available)
109+
# panel
144110
bar {
111+
colors {
112+
background #2f343f
113+
statusline #2f343f
114+
separator #4b5262
115+
116+
# colour of border, background, and text
117+
focused_workspace #2f343f #bf616a #d8dee8
118+
active_workspace #2f343f #2f343f #d8dee8
119+
inactive_workspace #2f343f #2f343f #d8dee8
120+
urgent_workspace #2f343f #ebcb8b #2f343f
121+
}
145122
status_command i3status
146-
mode invisible
147-
font pango:Overpass Regular 8
148123
}
149124

150-
new_window pixel 2
151-
152-
hide_edge_borders vertical
153-
154-
# Color variables
155-
set $unfocused_border #1D1F21
156-
set $focused_border #CC6666
157-
158-
# class border backgr. text indicator child_border
159-
client.focused #ffffff #ffffff #ffffff #ffffff $focused_border
160-
client.focused_inactive #ffffff #ffffff #ffffff #ffffff $focused_border
161-
client.unfocused #ffffff #ffffff #ffffff #ffffff $unfocused_border
162-
client.urgent #ffffff #ffffff #ffffff #ffffff $focused_border
163-
client.placeholder #ffffff #ffffff #ffffff #ffffff #ffffff
164-
165-
client.background #ffffff
166-
167-
# Pulse Audio controls
168-
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
169-
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
170-
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
171-
172-
# Media player controls
173-
bindsym XF86AudioPlay exec playerctl play
174-
bindsym XF86AudioPause exec playerctl pause
175-
bindsym XF86AudioNext exec playerctl next
176-
bindsym XF86AudioPrev exec playerctl previous
125+
# window rules, you can find the window class using xprop
126+
for_window [class=".*"] border pixel 4
127+
assign [class=URxvt] 1
128+
assign [class=Firefox|Transmission-gtk] 2
129+
assign [class=Thunar|File-roller] 3
130+
assign [class=Geany|Evince|Gucharmap|Soffice|libreoffice*] 4
131+
assign [class=Audacity|Vlc|mpv|Ghb|Xfburn|Gimp*|Inkscape] 5
132+
assign [class=Lxappearance|System-config-printer.py|Lxtask|GParted|Pavucontrol|Exo-helper*|Lxrandr|Arandr] 6
133+
for_window [class=Viewnior|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable
134+
for_window [class=URxvt|Firefox|Geany|Evince|Soffice|libreoffice*|mpv|Ghb|Xfburn|Gimp*|Inkscape|Vlc|Lxappearance|Audacity] focus
135+
for_window [class=Xfburn|GParted|System-config-printer.py|Lxtask|Pavucontrol|Exo-helper*|Lxrandr|Arandr] focus
136+
137+
# colour of border, background, text, indicator, and child_border
138+
client.focused #bf616a #2f343f #d8dee8 #bf616a #d8dee8
139+
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
140+
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
141+
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
142+
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
143+
client.background #2f343f

0 commit comments

Comments
 (0)