Skip to content

Instantly share code, notes, and snippets.

@Sheepolution
Last active February 10, 2019 16:24
Show Gist options
  • Save Sheepolution/e8fed60ff35282f7bad7 to your computer and use it in GitHub Desktop.
Save Sheepolution/e8fed60ff35282f7bad7 to your computer and use it in GitHub Desktop.
i3wm config file
set $mod Mod4
set $TERMINAL urxvt
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
font pango:DejaVu Sans Mono 10
font pango:DejaVu Sans Mono, Terminus Bold Semi-Condensed 11
font pango:Terminus 11px
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
#Back and Forth
workspace_auto_back_and_forth yes
# kill focused window
bindsym $mod+x kill
#Switch
bindsym $mod+Tab move workspace to output right
# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run -b -fn 'xft:Terminus:pixelsize=11' -nb '#121212' -nf '#9ac0cd' -sb '#121212' -sf '#bf3f34' -p 'COMMAND: '
bindsym $mod+d exec rofi -show run -font "snap 10" -fg "#505050" -bg "#000000" -hlfg "#ffb964" -hlbg "#000000" -o 8
bindsym $mod+shift+d exec rofi -show window -font "snap 10" -fg "#505050" -bg "#000000" -hlfg "#ffb964" -hlbg "#000000" -o 8
#CHANGING BORDER STYLE
bindsym $mod+t border normal
bindsym $mod+y border 1pixel
bindsym $mod+u border none
#Have new windows start borderless
new_window none
#locking
bindsym $mod+l exec lock
#sticky
bindsym $mod+Shift+s sticky toggle
#title format
bindsym $mod+p title_format "Important | %title"
#Have certain windows float at start
for_window [title="urxvt"] floating enable
for_window [title="_float"] floating enable border none
for_window [title="HexChat"] floating enable
# change focus
#bindsym $mod+j focus left
#bindsym $mod+k focus down
#bindsym $mod+l focus up
#bindsym $mod+semicolon focus right
# change focus arrow 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+J move left
#bindsym $mod+Shift+K move down
#bindsym $mod+Shift+L move up
#bindsym $mod+Shift+semicolon move right
#Arrow 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+h 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+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e 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
# focus the child container
bindcode $mod+d focus child
#Bind workspace to screen
#workspace 9 output DVI-D-0
#workspace desktop output DVI-D-0
# switch to workspace
bindsym $mod+1 workspace 1: chrome
bindsym $mod+2 workspace 2: sublime
bindsym $mod+3 workspace 3: discord
bindsym $mod+4 workspace 4: thunar
bindsym $mod+5 workspace 5: terminal
bindsym $mod+6 workspace 6: music
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace desktop
# move focused container to workspace
bindsym $mod+Shift+exclam move container to workspace 1: chrome
bindsym $mod+Shift+at move container to workspace 2: sublime
bindsym $mod+Shift+numbersign move container to workspace 3: discord
bindsym $mod+Shift+dollar move container to workspace 4: thunar
bindsym $mod+Shift+percent move container to workspace 5: terminal
bindsym $mod+Shift+6 move container to workspace 6: music
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 desktop
# reload the configuration file
bindsym $mod+Shift+C reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+E exec "i3-nagbar -t warning -m 'Leaving so soon?' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym Shift+Left resize shrink width 50 px or 50 ppt
bindsym Shift+Down resize grow height 50 px or 50 ppt
bindsym Shift+Up resize shrink height 50 px or 50 ppt
bindsym Shift+Right resize grow width 50 px or 50 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym Mod4+m mode "moveit"
}
bindsym $mod+r mode "resize"
#Move windows with keyboard
mode "moveit" {
bindsym Up move up 20px
bindsym Left move left 20px
bindsym Down move down 20px
bindsym Right move right 20px
bindsym Shift+Up move up 100px
bindsym Shift+Left move left 100px
bindsym Shift+Down move down 100px
bindsym Shift+Right move right 100px
bindsym Mod4+m mode "default"
bindsym Mod4+r mode "resize"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym Mod4+m focus floating; mode "moveit"
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
#GAPS
gaps inner 10
gaps outer 10
#Moving mouse with keyboard
#bindsym ;eft exec xdotool mousemove_relative 5 5
# take screenshot
# bindsym Print exec scrot '%Y-%m-%d-%t_$wx$h.png' -e 'mv $ $f ~/images/'
#bindsym Print exec scrot 'Screenshot - %Y-%m-%d--%_$wx$h_scrot.png' -e 'mv $f ~/imrages/'
# colors
# class border backgr. text
client.focused #121212 #121212 #9098D6
#client.focused #bf3f34 #bf3f34 #bf3f34
client.unfocused #121212 #121212 #999f99
client.focused_inactive #121212 #121212 #121212
client.urgent #121212 #121212 #ee0000
#121212 #121212 #bf3f34
#active_workspace #121212 #121212 #696f89
### ADDED KEY BINDINGS ###
bindsym $MOD+Return exec $TERMINAL
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
#status_command i3status
status_command ~/.i3/mystatus.sh
tray_output HDMI-0
position bottom
workspace_buttons yes
tray_padding 1
# mode hide
mode dock
strip_workspace_numbers yes
colors {
statusline #76c2d6
background #121212
# class border backgrd text
focused_workspace #121212 #121212 #bf3f34
active_workspace #121212 #121212 #696f89
inactive_workspace #121212 #121212 #696f89
urgent_workspace #121212 #ff0000 #ffffff
}
}
exec_always feh --randomize --bg-fill ~/big_disk/Wallpapers/*
#Audio stuff
bindsym XF86AudioRaiseVolume exec amixer -q set Master 2dB+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 2dB- unmute
bindsym XF86AudioMute exec amixer -q set Master toggle
#Exaile
bindsym XF86AudioPlay exec audacious -t
bindsym XF86AudioPrev exec audacious -r
bindsym XF86AudioNext exec audacious -f
#Esperanto
#bindsym $mod + i exec setxkbmap -layout "us" -variant "alt-intl" -option "lv3:lwin_switch,esperanto:qwerty" && xmodmap -e 'keycode 133 = Super_R'
#screenshot
bindsym Print exec sleep 0.1 && scrot -s -e 'mv $f ~/big_disk/Images/Screenshots && cat ~/big_disk/Images/Screenshots/$n|xclip -i -selection clipboard -t image/png'
bindsym $mod+Print exec puush -b
bindsym $mod+Shift+Print exec scrot -e 'mv $f ~/big_disk/Images/Screenshots && cat ~/big_disk/Images/Screenshots/$n|xclip -i -selection clipboard -t image/png'
# scrot & gimp - select window or rectangle
#bindsym $mod + Print exec echo "scrot -s -e 'mv $f /tmp/ && cat /tmp/$n|xclip -i -selection clipboard -t image/png'"|xclip -i -selection clipboard
bindsym $mod+Shift+o exec xdotool key ctrl+C && \mkdir -p /tmp/love-try && \xclip -o > /tmp/love-try/main.lua && \love /tmp/love-try
# AUTOSTART
exec --no-startup-id i3-msg 'workspace 1: chrome; exec google-chrome; workspace 2: sublime; exec subl; workspace 3: discord; exec discord; exec xset -dpms; exec xset s off; feh --randomize --bg-fill ~/big_disk/Wallpapers/*;
#dunst -config ~/.i3/config_dunst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment