Skip to content

Instantly share code, notes, and snippets.

@andnils
Last active January 3, 2019 22:12
Show Gist options
  • Save andnils/e6f956d9cbf3abfe2dab42fbe6fa0461 to your computer and use it in GitHub Desktop.
Save andnils/e6f956d9cbf3abfe2dab42fbe6fa0461 to your computer and use it in GitHub Desktop.
i3 config
set $mod Mod4
# font pango:Ubuntu Mono 16
font pango:Fira Sans SemiBold 16
floating_modifier $mod
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Shift+q kill
bindsym $mod+d exec dmenu_run -fn "Ubuntu Mono-18"
bindsym $mod+space exec rofi -show drun -matching normal -drun-match-fields name -display-drun " "
bindsym $mod+p exec rofi -show window -display-window " "
# change focus
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+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 toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+t floating toggle
# change focus between tiling / floating windows
bindsym $mod+t focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+Shift+a focus child
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 $ws0 0: 
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws0
# bind mod+§ (section) to intelliJ also
bindsym $mod+section workspace $ws0
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws0; workspace $ws0
assign [class="(?i)Emacs"] $ws3
assign [class="^jetbrains-.+"] $ws0
assign [class="(?i)spotify"] $ws8
assign [class="(?i)Skype"] $ws9
assign [class="(?i)slack"] $ws9
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
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'"
# bindsym $mod+adiaeresis exec "/home/anders/bin/jira.sh"
# resize window (you can also use the mouse for that)
mode "resize" {
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 Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
mode "workspacemove" {
bindsym Down move workspace to output down
bindsym Up move workspace to output up
bindsym Shift+Down move container to output down
bindsym Shift+Up move container to output up
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws0
# bind mod+§ (section) to intelliJ also
bindsym $mod+section workspace $ws0
}
bindsym $mod+odiaeresis mode "workspacemove"
# HANDLE VOLUME
#### bindsym XF86AudioRaiseVolume exec amixer set Master 5%+
#### bindsym XF86AudioLowerVolume exec amixer set Master 5%-
#### bindsym XF86AudioMute exec amixer set Master toggle
## Volume control
# Path to volume control, without trailing slash
set $volumepath ~/Tools/i3-volume
set $statuscmd i3status
set $statussig SIGUSR1
set $volumestep 5
bindsym XF86AudioRaiseVolume exec $volumepath/volume -np -i $volumestep -t $statuscmd -u $statussig
bindsym XF86AudioLowerVolume exec $volumepath/volume -np -d $volumestep -t $statuscmd -u $statussig
bindsym XF86AudioMute exec $volumepath/volume -mn -t $statuscmd -u $statussig
# HANDLE BACKLIGHT
bindsym XF86MonBrightnessUp exec /usr/local/bin/brightlight -i 10
bindsym XF86MonBrightnessDown exec /usr/local/bin/brightlight -d 10
#bindsym F5 exec backlight -d 10
#bindsym F6 exec backlight -i 10
bindsym $mod+l exec --no-startup-id i3exit lock
set $mode_system System (l) lock, (e) logout, (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"
bindsym $mod+o mode "$mode_system"
bindsym $mod+Tab workspace next
bindsym $mod+b workspace back_and_forth
# focus_on_window_activation smart|urgent|focus|none
focus_on_window_activation focus
focus_follows_mouse no
# exec --no-startup-id xautolock -time 3 -locker "i3exit lock" -corners ----
#exec --no-startup-id i3-msg 'workspace $ws1'; exec /usr/bin/firefox
#exec --no-startup-id i3-msg 'workspace $ws2'; exec i3-sensible-terminal
#exec --no-startup-id i3-msg 'workspace $ws3'; exec emacs
exec --no-startup-id compton -D 7 -f
exec --no-startup-id i3-msg 'workspace $ws1; exec /usr/bin/firefox'
exec --no-startup-id i3-msg 'workspace $ws2; exec i3-sensible-terminal'
exec --no-startup-id i3-msg 'workspace $ws3; exec emacs'
# exec_always --no-startup-id feh --bg-scale /home/anders/Pictures/wallpaper.png
exec_always --no-startup-id nm-applet
exec_always --no-startup-id blueman-applet
exec_always --no-startup-id dropbox start
set $textcol #f2f2f2
set $bgcol #4e4743
set $lightbg #534c48
set $lighter #92857e
set $red #f15d22
set $orange #faa41a
set $blue #48b9c7
# class border backgr. text indicator child_border
client.focused $bgcol $bgcol $textcol $textcol
client.focused_inactive $bgcol $bgcol $textcol $textcol
client.unfocused $bgcol $bgcol $lighter $lighter
client.urgent $red $red $textcol $textcol
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
# tray_padding 2
tray_output primary
#separator_symbol " | "
separator_symbol " "
strip_workspace_numbers yes
font pango:FontAwesome 14
# font pango:Fira Sans Book 16
colors {
separator $orange
background $bgcol
statusline $textcol
focused_workspace $lightbg $lightbg $orange
active_workspace $lightbg $lightbg $orange
inactive_workspace $lightbg $lightbg $blue
urgent_workspace $lightbg $lightbg $red
binding_mode $lightbg $lightbg $orange
}
}
# exec --no-startup-id xfce4-panel --disable-wm-check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment