Skip to content

Instantly share code, notes, and snippets.

@nullbio
Created September 13, 2016 04:35
Show Gist options
  • Select an option

  • Save nullbio/eb5bd053c49636d1f96f77790e37f1e9 to your computer and use it in GitHub Desktop.

Select an option

Save nullbio/eb5bd053c49636d1f96f77790e37f1e9 to your computer and use it in GitHub Desktop.
set $mod Mod1
##############################################################################
# tiling & workspace #
##############################################################################
floating_modifier $mod
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+H move left
bindsym $mod+Shift+J move down
bindsym $mod+Shift+K move up
bindsym $mod+Shift+L move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+V split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, default)
bindsym $mod+comma layout stacking
bindsym $mod+period layout tabbed
bindsym $mod+slash layout default
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+exclam move container to workspace 1
bindsym $mod+Shift+at move container to workspace 2
bindsym $mod+Shift+numbersign move container to workspace 3
bindsym $mod+Shift+dollar move container to workspace 4
bindsym $mod+Shift+percent move container to workspace 5
bindsym $mod+Shift+asciicircum move container to workspace 6
bindsym $mod+Shift+ampersand move container to workspace 7
bindsym $mod+Shift+asterisk move container to workspace 8
bindsym $mod+Shift+parenleft move container to workspace 9
bindsym $mod+Shift+parenright move container to workspace 10
##############################################################################
# general settings #
##############################################################################
# Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window pixel 2
new_float normal
# Hide borders
hide_edge_borders none
# Font for window titles. Will also be used by the bar unless a different font is used in the bar {} block below.
font pango:Droid Sans 8
# transparency for terminals
exec xcompmgr -c -f -n
# gaps configuration
for_window [class="^.*"] border pixel 2
gaps inner 10
gaps outer 10
smart_gaps on
smart_borders on
##############################################################################
# bar settings and colors #
##############################################################################
# Color chooser
# arch blue #1793D1
# debian red #D70A53
# manjaro green #2ECC71
# plasma green #18B092
# matrix green #00FF00
# mint green #5FAA24
# numix #C84433
# ubuntu orange #F37320
# vertex dark #2C6FF0
set $color1 #3B1AF6
set $color2 #126EF5
set $color3 #8D0EF6
set $color4 #009600
# Start i3bar to display a workspace bar with a system tray
bar {
status_command i3status
font pango: Terminus, Icon 9
separator_symbol " ■ "
#--config ~/.i3/i3status.conf
tray_output primary
colors {
background #000000
statusline #808080
separator #808080
focused_workspace #000000 #000000 #ffffff
active_workspace #000000 #000000 #9C9C9C
inactive_workspace #000000 #000000 #454545
urgent_workspace #000000 #000000 #F52031
}
}
# Layout colors bord bg text
client.focused #1F1F1F $color2 #BBBBBB #4F4F4F
client.focused_inactive #000000 #000000 #424242 #121212
client.unfocused #000000 #000000 #4F4F4F #1A1A1A
client.urgent #1A1A1A #3B89B5 #a5a5a5 #1A1A1A
client.background #121212
##############################################################################
# volume keybinds #
##############################################################################
# Audio controls
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute alsa_output.pci-0000_00_1b.0.iec958-stereo toggle && killall -SIGUSR1 i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume alsa_output.pci-0000_00_1b.0.iec958-stereo -10% && killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume alsa_output.pci-0000_00_1b.0.iec958-stereo +10% && killall -SIGUSR1 i3status
bindsym XF86AudioPlay exec --no-startup-id rhythmbox-client --play-pause
bindsym XF86AudioPrev exec --no-startup-id rhythmbox-client --previous
bindsym XF86AudioNext exec --no-startup-id rhythmbox-client --next
##############################################################################
# shut down / restart #
##############################################################################
# Reload status bar
bindsym $mod+Shift+r reload
# kill focused window
bindsym $mod+Shift+q kill
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+p restart
# Handle user sessions
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+S) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+S exec --no-startup-id i3exit shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Pause mode "$mode_system"
##############################################################################
# applications #
##############################################################################
# Start Applications
bindsym $mod+c exec gnome-calculator
bindsym $mod+b exec google-chrome
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+d exec dmenu_run
# Screenshots
bindsym Print exec scrot -e 'mv $f ~/Pictures/Screenshots' && sleep 1 && exec notify-send 'screenshot has been saved in ~/Pictures/Screenshots'
bindsym $mod+Print exec scrot -ue 'mv $f ~/Pictures/Screenshots' && sleep 1 && exec notify-send 'screenshot has been saved in ~/Pictures/Screenshots'
bindsym $mod+Shift+Print exec scrot -se 'mv $f ~/Pictures/Screenshots' && sleep 1 && exec notify-send 'screenshot has been saved in ~/Pictures/Screenshots'
# Open specific applications in floating mode
for_window [title="Workrave"] floating enable
for_window [title="Workrave"] move absolute position 3730 970
for_window [title="TeamViewer"] floating enable
for_window [title="TeamViewer Panel"] floating enable; move absolute 100 100 100 400
for_window [title="Computers & Contacts"] floating enable
for_window [title="alsamixer"] floating enable border pixel 2
for_window [title="tty-clock"] floating enable border pixel 2
for_window [class="Calamares"] floating enable border normal
for_window [class="Clipgrab"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [class="Galculator"] floating enable border pixel 2
for_window [class="GParted"] floating enable border normal
for_window [title="i3_help"] floating enable
for_window [class="Lightdm-gtk-greeter-settings"] floating enable
for_window [class="Lxappearance"] floating enable
for_window [class="manjaro-settings-manager-gui"] floating enable border normal
for_window [title="MuseScore: Play Panel"] floating enable
for_window [class="Nitrogen"] floating enable border normal
for_window [class="octopi"] floating enable
for_window [class="Pamac-manager"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [class="Qtconfig-qt4"] floating enable
for_window [class="Thus"] floating enable border normal
for_window [class="(?i)System-config-printer.py"] floating enable border normal
for_window [class="Skype"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="Transmission-gtk"] floating enable
for_window [class="Android-file-transfer"] floating enable
for_window [class="VLC"] floating enable
##############################################################################
# resize windows #
##############################################################################
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 5 px or 5 ppt
bindsym k resize grow height 5 px or 5 ppt
bindsym l resize shrink height 5 px or 5 ppt
bindsym odiaeresis resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize shrink height 10 px or 10 ppt
bindsym Up resize grow height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
##############################################################################
# autostart #
##############################################################################
# Autostart applications
exec --no-startup-id nm-applet
exec --no-startup-id volumeicon
exec --no-startup-id nitrogen --restore
exec --no-startup-id xautolock -time 30 -locker lock
exec --no-startup-id xset r rate 210 45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment