Skip to content

Instantly share code, notes, and snippets.

@ryanzyy
Last active April 1, 2020 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanzyy/3c81f029541861b34767bd75a942e487 to your computer and use it in GitHub Desktop.
Save ryanzyy/3c81f029541861b34767bd75a942e487 to your computer and use it in GitHub Desktop.
i3 config
set $super Mod4
set $alt Mod1
# composite manager
exec --no-startup-id picom -b
# set font
font pango: Noto Sans 8
# Use Mouse+$super to drag floating windows to their wanted position
floating_modifier $super
# start a terminal
bindsym $super+Return exec alacritty
# start dmenu (a program launcher)
bindsym $super+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Noto Sans:size=8'"
#change volume
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%-
bindsym XF86AudioMute exec amixer set Master toggle
# music control
bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc prev
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioStop exec mpc stop
# kill focused window
bindsym $super+Shift+q kill
bindsym $alt+F4 kill
# change focus
bindsym $super+h focus left
bindsym $super+j focus down
bindsym $super+k focus up
bindsym $super+l focus right
# split in horizontal orientation
# split in vertical orientation
bindsym $super+v split toggle
# enter fullscreen mode for the focused container
bindsym $super+f fullscreen toggle
# change container layout split
bindsym $super+s layout toggle split
# toggle tiling / floating
bindsym $super+space floating toggle
# change focus between tiling / floating windows
bindsym $super+Shift+space focus mode_toggle
# switch to workspace
bindsym $super+1 workspace 1
bindsym $super+2 workspace 2
bindsym $super+3 workspace 3
bindsym $super+4 workspace 4
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $super+Shift+r restart
# exit i3
bindsym $super+q exec "i3-nagbar -t warning -m 'Really, exit?' -b 'Yes' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym h resize shrink width 5 px or 5 ppt
bindsym j resize grow height 5 px or 5 ppt
bindsym k resize shrink height 5 px or 5 ppt
bindsym l resize grow width 5 px or 5 ppt
bindsym Return mode "default"
}
bindsym $super+r mode "resize"
mode "rearrange" {
bindsym h focus left
bindsym j focus down
bindsym k focus up
bindsym l focus right
# move focused window
bindsym $super+h move left
bindsym $super+j move down
bindsym $super+k move up
bindsym $super+l move right
# move focused container to workspace
bindsym $super+1 move container to workspace 1
bindsym $super+2 move container to workspace 2
bindsym $super+3 move container to workspace 3
bindsym $super+4 move container to workspace 4
bindsym Return mode "default"
}
bindsym $super+w mode "rearrange"
# panel
bar {
colors {
background #2f343f
statusline #2f343f
separator #4b5262
# colour of border, background, and text
focused_workspace #2f343f #bf616a #d8dee8
active_workspace #2f343f #2f343f #d8dee8
inactive_workspace #2f343f #2f343f #d8dee8
urgent_workspacei #2f343f #ebcb8b #2f343f
}
status_command i3status
}
# window rules, you can find the window class using xprop
for_window [class=".*"] border pixel 4
# colour of border, background, text, indicator, and child_border
client.focused #bf616a #2f343f #d8dee8 #bf616a #d8dee8
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.background #2f343f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment