Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
223 lines (168 sloc) 6.56 KB
# Dave Eddy's i3 config
#
# Author: Dave Eddy <dave@daveeddy.com>
# Date: June 19, 2018
# License: MIT
# Set keys
set $alt Mod1
set $sup Mod4
set $ctrl Control
# Disabled system bell
exec --no-startup-id xset b off
# Setup system to lock when suspended/screensaver
exec --no-startup-id exec xss-lock -- ~/bin/i3lock-retry -enfi ~/Pictures/lock.png
# Set screensaver to 10 minutes (xss-lock will start lock)
exec --no-startup-id xset s 600
# Set suspend to 10 minutes (xss-lock will start lock if not already locked)
# no automatic sleep
#exec --no-startup-id xautolock -time 10 -locker 'systemctl suspend' -detectsleep
# Enable tap-to-click on the touchpad
exec --no-startup-id xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1
# Disable middle-mouse button on the touchpad itself
exec --no-startup-id xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Middle Emulation Enabled' 1
# Set the DPI
exec --no-startup-id xrandr --output eDP1 --dpi 96
# Reduce tearing and fix notification area on xfce4-panel
exec --no-startup-id compton -CG --backend glx --vsync opengl-swc -b -D 0 --no-fading-openclose
# Keyboard Repeat Rate
exec --no-startup-id xset r rate 250 44
# Backgruond Image
exec --no-startup-id feh --bg-fill ~/Pictures/bg.png
# Load Xresources
exec --no-startup-id xrdb -merge ~/.Xresources
# Load xfce4-panel
exec --no-startup-id exec xfce4-panel --disable-wm-check
# Load volumeicon
exec --no-startup-id exec volumeicon
# Load network manager applet
exec --no-startup-id exec nm-applet
# Set initial keyboard layout
exec --no-startup-id setxkbmap dvorak,us
# Disable Bluetooth (done in my BIOS)
#exec --no-startup-id bluetooth off
# Disable CapsLock (why doesn't this work?!)
exec --no-startup-id setxkbmap -option caps:none
# Hide mouse when typing
exec --no-startup-id exec xbanish -i shift -i control -i mod1 -i mod4
# Start keeweb in the scratch space
#for_window [title="KeeWeb"] move scratchpad
#exec --no-startup-id KeeWeb
# Float some windows by default
for_window [class="Xfce4-panel" instance="xfce4-panel"] floating enable
for_window [class="Lxappearance" instance="lxappearance"] floating enable
for_window [class="Nm-connection-editor" instance="nm-connection-editor"] floating enable
# Give all windows a border
for_window [class="^.*"] border pixel 1
# Default font
font pango:DejaVu Sans Mono 12
# i3-gaps
gaps inner 9
gaps outer 0
# Use Mouse+$sup to drag floating windows to their wanted position
floating_modifier $sup
# Backlight keys
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 5
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 5
# Volume keys (handled by volumeicon, left in here for reference)
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
# Screenshots
bindsym --release Print exec scrot '%Y-%m-%d_%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots'
bindsym --release $sup+Print exec scrot -s '%Y-%m-%d_%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots'
# Start screensaver (xss-lock will start lock)
bindsym $sup+shift+l exec xset s activate
# start a terminal
bindsym $sup+Return exec exec urxvt
# kill focused window
bindsym $sup+q kill
# Toggle Keyboard Layout
bindsym $ctrl+space exec ~/bin/keyboard toggle
# Rofi
bindsym $alt+space exec exec rofi -modi drun -show-icons -show drun -sidebar-mode
bindsym $alt+Tab exec exec rofi -show window
# reload the configuration file
bindsym $sup+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $sup+Shift+r restart
# move focus
bindsym $sup+Left focus left
bindsym $sup+Right focus right
bindsym $sup+Down focus down
bindsym $sup+Up focus up
bindsym $alt+shift+Left focus left
bindsym $alt+shift+Right focus right
bindsym $alt+shift+Up focus up
bindsym $alt+shift+Down focus down
# move window
bindsym $sup+Shift+Left move left
bindsym $sup+Shift+Right move right
bindsym $sup+Shift+Down move down
bindsym $sup+Shift+Up move up
# Resize
bindsym $sup+Ctrl+Right resize shrink width 1 px or 1 ppt
bindsym $sup+Ctrl+Up resize grow height 1 px or 1 ppt
bindsym $sup+Ctrl+Down resize shrink height 1 px or 1 ppt
bindsym $sup+Ctrl+Left resize grow width 1 px or 1 ppt
# split in horizontal orientation
bindsym $sup+h split h
# split in vertical orientation
bindsym $sup+v split v
# enter fullscreen mode for the focused container
bindsym $alt+Return fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $sup+s layout stacking
bindsym $sup+n layout toggle split
bindsym $sup+t layout tabbed
bindsym $sup+space layout toggle split
# toggle tiling / floating
bindsym $sup+Shift+space floating toggle
# change focus between tiling / floating windows
#bindsym $sup+space focus mode_toggle
# focus the parent container
bindsym $sup+a focus parent
# focus the child container
bindsym $sup+d focus child
# Move to scratchpad
bindsym $sup+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $sup+minus scratchpad show
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $sup+1 workspace $ws1
bindsym $sup+2 workspace $ws2
bindsym $sup+3 workspace $ws3
bindsym $sup+4 workspace $ws4
bindsym $sup+5 workspace $ws5
bindsym $sup+6 workspace $ws6
bindsym $sup+7 workspace $ws7
bindsym $sup+8 workspace $ws8
bindsym $sup+9 workspace $ws9
bindsym $sup+0 workspace $ws10
# Switch to next/prev workspace
bindsym $ctrl+Left workspace prev
bindsym $ctrl+Right workspace next
# move focused container to workspace
bindsym $sup+Shift+1 move container to workspace $ws1
bindsym $sup+Shift+2 move container to workspace $ws2
bindsym $sup+Shift+3 move container to workspace $ws3
bindsym $sup+Shift+4 move container to workspace $ws4
bindsym $sup+Shift+5 move container to workspace $ws5
bindsym $sup+Shift+6 move container to workspace $ws6
bindsym $sup+Shift+7 move container to workspace $ws7
bindsym $sup+Shift+8 move container to workspace $ws8
bindsym $sup+Shift+9 move container to workspace $ws9
bindsym $sup+Shift+0 move container to workspace $ws10
# exit i3 (logs you out of your X session)
bindsym $sup+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'"