dotfiles/i3/config

306 lines
12 KiB
Plaintext
Raw Normal View History

2017-12-06 18:30:31 +01:00
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
2017-09-20 17:23:24 +02:00
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set the mod key to the "Windows key" and the floating modifier to the mod key.
set $mod Mod4
floating_modifier $mod
############################################
# Constants #
############################################
set $urgentTextColour #101218
2018-12-27 08:27:03 +01:00
set $primaryBackgroundColour #1e1e1e
set $secondaryBackgroundColour #252526
set $tertiaryBackgroundColour #333333
set $textColour #848484
set $focusedTextColour #f6f6f7
2017-09-20 17:23:24 +02:00
set $statusLineColour #d1d4e0
2018-12-27 08:27:03 +01:00
set $urgentBackground #ef5350
2017-09-20 17:23:24 +02:00
set $indicatorColour #fcc09e
set $workspace1 "1: "
set $workspace2 "2: "
set $workspace3 "3: "
set $workspace4 "4: "
set $workspace5 "5: "
2017-09-20 17:23:24 +02:00
set $workspace6 "6: "
set $workspace7 "7: "
set $workspace8 "8: "
set $workspace9 "9: "
set $workspace10 "10:  "
2018-07-02 22:16:18 +02:00
set $workspace11 " Virtualbox"
set $workspace12 " Enpass"
2017-09-20 17:23:24 +02:00
############################################
# i3 management keys #
############################################
# kill focused window
bindsym $mod+Shift+q kill
# 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+shift+s layout stacking
2018-07-02 22:16:18 +02:00
bindsym $mod+shift+t layout tabbed
2017-09-20 17:23:24 +02:00
bindsym $mod+shift+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# 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+Escape exec "i3-nagbar -t warning -m 'Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+Delete exec "i3-nagbar -t alert -m 'Do you really want to shut down?' -b 'Yes, Shutdown' 'shutdown -h now'"
bindsym $mod+Shift+BackSpace exec "i3-nagbar -t error -m 'Do you really want to reboot?' -b 'Yes, Reboot' 'reboot'"
2017-09-20 17:23:24 +02:00
# focus on the parent window
2018-07-02 22:16:18 +02:00
bindsym $mod+shift+alt+p focus parent
2017-09-20 17:23:24 +02:00
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
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
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Lock the computer
bindsym $mod+l exec /bin/bash ~/.config/i3/scripts/i3lock.sh
2018-07-02 22:42:48 +02:00
# Lock the computer
bindsym $mod+shift+l exec /bin/bash ~/.config/i3/scripts/suspend.sh
2017-09-20 17:23:24 +02:00
############################################
# Application Keys #
############################################
bindsym $mod+Return exec xfce4-terminal # terminal
bindsym $mod+e exec nautilus # File manager
bindsym Print exec gnome-screenshot # Fullscreen screenshot
bindsym $mod+Print exec /bin/bash ~/.config/i3/scripts/screenshot.sh # Show screenshot window
2017-09-20 17:23:24 +02:00
bindsym $mod+shift+b exec /bin/bash ~/.config/i3/scripts/brightness.sh
# Rofi
2018-12-27 08:27:03 +01:00
# window: background border dividerline
# normal: odd lines - text colour - even lines - hover lines - hover text colour
# active: background
bindsym $mod+d exec "rofi -color-window '#1e1e1e, #333333, #333333' -color-normal '#1e1e1e, #848484, #1e1e1e, #333333, #f6f6f7' -lines 10 -line-padding 5 -show run"
bindsym $mod+Tab exec "rofi -color-window '#1e1e1e, #333333, #333333' -color-normal '#1e1e1e, #848484, #1e1e1e, #333333, #f6f6f7' -color-active '#333333, #ef5350, #0000ff, #333333, #f6f6f7' -lines 10 -line-padding 5 -show"
2017-09-20 17:23:24 +02:00
############################################
# Media keys #
############################################
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
############################################
# Workspaces #
############################################
# switch to workspace
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10
2018-07-02 22:16:18 +02:00
bindsym $mod+w workspace $workspace11
bindsym $mod+p workspace $workspace12
2017-09-20 17:23:24 +02:00
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace $workspace5
bindsym $mod+Shift+6 move container to workspace $workspace6
bindsym $mod+Shift+7 move container to workspace $workspace7
bindsym $mod+Shift+8 move container to workspace $workspace8
bindsym $mod+Shift+9 move container to workspace $workspace9
bindsym $mod+Shift+0 move container to workspace $workspace10
2018-07-02 22:16:18 +02:00
bindsym $mod+Shift+w move container to workspace $workspace11
bindsym $mod+Shift+p move container to workspace $workspace12
2017-09-20 17:23:24 +02:00
############################################
# Appearance settings #
############################################
# Set the default font
#font pango:DejaVu Sans Mono 8
font pango:System San Francisco Display 10
# Bar decoration
bar {
status_command i3blocks -c ~/.config/i3/i3blocks.conf
position top
strip_workspace_numbers no
2017-12-24 18:20:15 +01:00
tray_output primary
2017-09-20 17:23:24 +02:00
colors {
separator $textColour
background $primaryBackgroundColour
statusline $statusLineColour
# border background text
focused_workspace $primaryBackgroundColour $primaryBackgroundColour $focusedTextColour
active_workspace $primaryBackgroundColour $secondaryBackgroundColour $textColour
inactive_workspace $primaryBackgroundColour $primaryBackgroundColour $textColour
urgent_workspace $primaryBackgroundColour $primaryBackgroundColour $urgentBackground
}
}
new_window 1pixel
hide_edge_borders both
2018-12-27 08:27:03 +01:00
# Window Colours
2017-09-20 17:23:24 +02:00
# border background text indicator
client.focused $primaryBackgroundColour $primaryBackgroundColour $focusedTextColour $indicatorColour
client.focused_inactive $secondaryBackgroundColour $secondaryBackgroundColour $textColour $indicatorColour
client.unfocused $secondaryBackgroundColour $secondaryBackgroundColour $textColour $indicatorColour
client.urgent $secondaryBackgroundColour $urgentBackground $urgentTextColour $indicatorColour
# Floating windows
for_window [class="Pavucontrol"] floating enable
for_window [class="Lxappearance"] floating enable
for_window [class="Arandr"] floating enable
for_window [class="Eog"] floating enable
############################################
# Workspace specific tools #
# Use xprop to determine class #
############################################
assign [class="Google Play Music Desktop Player"] $workspace10
assign [class="Franz"] $workspace9
2018-07-02 22:16:18 +02:00
assign [class="Enpass-Desktop"] $workspace12
assign [class="Enpass"] $workspace12
2018-07-02 22:16:18 +02:00
assign [class="VirtualBox Machine"] $workspace11
2017-09-20 17:23:24 +02:00
2017-09-26 09:55:23 +02:00
# database stuff
assign [class="MongoDB Compass"] $workspace8
assign [class="robo3t"] $workspace8
assign [class="Mysql-workbench-bin"] $workspace8
2018-06-09 13:57:20 +02:00
assign [class="sqlops"] $workspace8
2017-09-20 17:23:24 +02:00
############################################
# i3-gaps #
############################################
# Disable window titlebars entirely
for_window [class="^.*"] border pixel 2
# Set inner/outer gaps
gaps inner 10
# gaps outer 0
bindsym $mod+Shift+plus gaps inner all plus 5
bindsym $mod+Shift+minus gaps inner all minus 5
bindsym $mod+Shift+Home gaps inner all set 10
# Smart borders (draw borders around container only if it is not the only container on this workspace)
smart_borders on
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps.
# Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace).
# If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
2017-09-20 17:23:24 +02:00
############################################
# Autorun #
############################################
exec --no-startup-id i3-msg 'workspace $workspace2; exec xfce4-terminal' && i3-msg 'workspace $workspace1'
exec 'enpass'
exec --no-startup-id nm-applet
exec_always feh --bg-scale ~/Pictures/Wallpapers/wallpaper.jpg
exec /usr/bin/compton
exec /bin/bash ~/.config/i3/scripts/startup.sh