]> git.lizzy.rs Git - i3-setup.git/blob - i3-config
Create LICENSE
[i3-setup.git] / i3-config
1 set $mod Mod4
2 floating_modifier $mod
3
4 font pango:Ubuntu 11
5
6 # startup
7 exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
8 exec --no-startup-id nm-applet
9 exec_always --no-startup-id feh --bg-fill $HOME/wallpaper.png
10 exec_always --no-startup-id killall -qw picom; picom -b
11
12 # audio keys
13 set $refresh_i3status killall -SIGUSR1 i3status
14 bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
15 bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
16 bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
17 bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
18
19 # applications
20 bindsym $mod+Return exec $HOME/.local/kitty.app/bin/kitty
21 bindsym $mod+Shift+f exec firefox
22 bindsym $mod+Shift+d exec discord
23 bindsym $mod+Shift+h exec hexchat
24 bindsym $mod+Shift+m exec element-desktop
25
26 # screenshot
27 bindsym Print exec scrot
28
29 # kill focused window
30 bindsym $mod+Shift+q kill
31
32 # start dmenu (a program launcher)
33 bindsym $mod+d exec dmenu_run
34
35 # gaps
36 for_window [class=".*"] border pixel 0
37 gaps inner 10
38 gaps outer 0
39 smart_borders on
40 smart_borders no_gaps
41
42 # Start i3bar to display a workspace bar (plus the system information i3status
43 # finds out, if available)
44 bar {
45         status_command i3status
46         height 25
47         position top
48         output primary
49 }
50
51 # split in horizontal orientation
52 bindsym $mod+h split h
53
54 # split in vertical orientation
55 bindsym $mod+v split v
56
57 # enter fullscreen mode for the focused container
58 bindsym $mod+f fullscreen toggle
59
60 # change container layout (stacked, tabbed, toggle split)
61 bindsym $mod+s layout stacking
62 bindsym $mod+w layout tabbed
63 bindsym $mod+e layout toggle split
64
65 # toggle tiling / floating
66 bindsym $mod+Shift+space floating toggle
67
68 # change focus between tiling / floating windows
69 bindsym $mod+space focus mode_toggle
70
71 # focus the parent container
72 bindsym $mod+a focus parent
73
74 # Define names for default workspaces for which we configure key bindings later on.
75 # We use variables to avoid repeating the names in multiple places.
76 set $ws1 "1"
77 set $ws2 "2"
78 set $ws3 "3"
79 set $ws4 "4"
80 set $ws5 "5"
81 set $ws6 "6"
82 set $ws7 "7"
83 set $ws8 "8"
84 set $ws9 "9"
85 set $ws10 "10"
86
87 # switch to workspace
88 bindsym $mod+1 workspace number $ws1
89 bindsym $mod+2 workspace number $ws2
90 bindsym $mod+3 workspace number $ws3
91 bindsym $mod+4 workspace number $ws4
92 bindsym $mod+5 workspace number $ws5
93 bindsym $mod+6 workspace number $ws6
94 bindsym $mod+7 workspace number $ws7
95 bindsym $mod+8 workspace number $ws8
96 bindsym $mod+9 workspace number $ws9
97 bindsym $mod+0 workspace number $ws10
98
99 # move focused container to workspace
100 bindsym $mod+Shift+1 move container to workspace number $ws1
101 bindsym $mod+Shift+2 move container to workspace number $ws2
102 bindsym $mod+Shift+3 move container to workspace number $ws3
103 bindsym $mod+Shift+4 move container to workspace number $ws4
104 bindsym $mod+Shift+5 move container to workspace number $ws5
105 bindsym $mod+Shift+6 move container to workspace number $ws6
106 bindsym $mod+Shift+7 move container to workspace number $ws7
107 bindsym $mod+Shift+8 move container to workspace number $ws8
108 bindsym $mod+Shift+9 move container to workspace number $ws9
109 bindsym $mod+Shift+0 move container to workspace number $ws10
110
111 # change focus
112 bindsym $mod+j focus left
113 bindsym $mod+k focus down
114 bindsym $mod+l focus up
115 bindsym $mod+odiaeresis focus right
116
117 # alternatively, you can use the cursor keys:
118 bindsym $mod+Left focus left
119 bindsym $mod+Down focus down
120 bindsym $mod+Up focus up
121 bindsym $mod+Right focus right
122
123 # move focused window
124 bindsym $mod+Shift+j move left
125 bindsym $mod+Shift+k move down
126 bindsym $mod+Shift+l move up
127 bindsym $mod+Shift+odiaeresis move right
128
129 # alternatively, you can use the cursor keys:
130 bindsym $mod+Shift+Left move left
131 bindsym $mod+Shift+Down move down
132 bindsym $mod+Shift+Up move up
133 bindsym $mod+Shift+Right move right
134
135 # reload the configuration file
136 bindsym $mod+Shift+c reload
137 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
138 bindsym $mod+Shift+r restart
139 # exit i3 (logs you out of your X session)
140 # 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'"
141
142 bindsym $mod+r mode "resize"
143
144 # resize window (you can also use the mouse for that)
145 mode "resize" {
146         # These bindings trigger as soon as you enter the resize mode
147
148         # Pressing left will shrink the window’s width.
149         # Pressing right will grow the window’s width.
150         # Pressing up will shrink the window’s height.
151         # Pressing down will grow the window’s height.
152         bindsym j resize shrink width 10 px or 10 ppt
153         bindsym k resize grow height 10 px or 10 ppt
154         bindsym l resize shrink height 10 px or 10 ppt
155         bindsym odiaeresis resize grow width 10 px or 10 ppt
156
157         # same bindings, but for the arrow keys
158         bindsym Left resize shrink width 10 px or 10 ppt
159         bindsym Down resize grow height 10 px or 10 ppt
160         bindsym Up resize shrink height 10 px or 10 ppt
161         bindsym Right resize grow width 10 px or 10 ppt
162
163         # back to normal: Enter or Escape or $mod+r
164         bindsym Return mode "default"
165         bindsym Escape mode "default"
166         bindsym $mod+r mode "default"
167 }