diff options
Diffstat (limited to 'dots/i3-config')
-rw-r--r-- | dots/i3-config | 299 |
1 files changed, 299 insertions, 0 deletions
diff --git a/dots/i3-config b/dots/i3-config new file mode 100644 index 0000000..6d49f0c --- /dev/null +++ b/dots/i3-config @@ -0,0 +1,299 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +font pango:DejaVu Sans Mono 16 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q sset Master 4%+ unmute +bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q sset Master 4%- unmute +# amixer doesn't unmute properly +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle + +# use these keys for focus, movement, and resize directions when reaching for +# the arrows is not convenient +set $up k +set $down j +set $left h +set $right l + +client.background dom0 #32302f +client.focused dom0 #522702 #643002 #ffffff #a6907d +client.focused_inactive dom0 #522702 #361a01 #ffffff #a6907d +client.unfocused dom0 #522702 #361a01 #999999 #a6907d +client.urgent dom0 #666666 #a6907d #ce0000 #a6907d + +client.background red #cc241d +client.focused red #e53b27 #e53b27 #ffffff #f19b90 +client.focused_inactive red #e53b27 #902519 #ffffff #f19b90 +client.unfocused red #e53b27 #902519 #999999 #f19b90 +client.urgent red #e53b27 #f19b90 #ce0000 #f19b90 + + +client.background orange #d79921 +client.focused orange #d05f03 #d05f03 #ffffff #daa67e +client.focused_inactive orange #d05f03 #7b3702 #ffffff #daa67e +client.unfocused orange #d05f03 #7b3702 #999999 #daa67e +client.urgent orange #d05f03 #daa67e #ce0000 #daa67e + +client.background yellow #fabd2f +client.focused yellow #999b00 #999b00 #ffffff #cacb7c +client.focused_inactive yellow #999b00 #666700 #ffffff #cacb7c +client.unfocused yellow #999b00 #666700 #999999 #cacb7c +client.urgent yellow #999b00 #cacb7c #ce0000 #cacb7c + +client.background green #98971a +client.focused green #04af5b #04af5b #ffffff #7dd5aa +client.focused_inactive green #04af5b #02713b #ffffff #7dd5aa +client.unfocused green #04af5b #02713b #999999 #7dd5aa +client.urgent green #04af5b #7dd5aa #ce0000 #7dd5aa + +client.background gray #92837a +client.focused gray #8c959f #8c959f #ffffff #c3c8cd +client.focused_inactive gray #8c959f #676d75 #ffffff #c3c8cd +client.unfocused gray #8c959f #676d75 #999999 #c3c8cd +client.urgent gray #8c959f #c3c8cd #ce0000 #c3c8cd + +client.background blue #458588 +client.focused blue #3384d6 #3384d6 #ffffff #95bee8 +client.focused_inactive blue #3384d6 #1f5082 #ffffff #95bee8 +client.unfocused blue #3384d6 #1f5082 #999999 #95bee8 +client.urgent blue #3384d6 #95bee8 #ce0000 #95bee8 + +client.background purple #b16286 +client.focused purple #8f5cbe #8f5cbe #ffffff #c6abdd +client.focused_inactive purple #8f5cbe #5c3e78 #ffffff #c6abdd +client.unfocused purple #8f5cbe #5c3e78 #999999 #c6abdd +client.urgent purple #8f5cbe #c6abdd #ce0000 #c6abdd + +client.background black #282828 +client.focused black #595959 #595959 #ffffff #a3a3a3 +client.focused_inactive black #595959 #3a3a3a #ffffff #a3a3a3 +client.unfocused black #595959 #3a3a3a #999999 #a3a3a3 +client.urgent black #595959 #a3a3a3 #ce0000 #a3a3a3 + +gaps inner 20 +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" +} + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal in the domain of the currently active window +bindsym $mod+Return exec qubes-i3-sensible-terminal +bindsym $mod+Shift+Return exec xfce4-terminal + +# kill focused window +bindsym $mod+q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu="dmenu -i -nb #d2d2d2 -nf #000000 -sb #63a0ff" + +bindsym $mod+Shift+d exec rofi -show + +# 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+period 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+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus next window (cycle) right +bindsym $mod+Tab focus right + +# focus next window (cycle) down +bindsym $mod+Shift+Tab focus down + +# Disable scratchpad shortcuts +# move the currently focused window to the scratchpad +bindsym $mod+Shift+minus move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +bindsym $mod+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 $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+10 move container to workspace $ws10 + +# 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 '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'" + +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 $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 or Mod1+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym Mod1+r mode "default" +} + +bindsym $mod+r mode "resize" + +exec ~/.screenlayout/home.sh +exec nitrogen --restore + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command qubes-i3status + colors { + background #3c3836 + statusline #fbf1c7 + + #class #border #backgr #text + focused_workspace #d79921 #d79921 #fbf1c7 + active_workspace #333333 #888888 #f5f5f5 + inactive_workspace #d79921 #3c3836 #fbf1c7 + urgent_workspace #bd2727 #e79e27 #333333 + } +} + +# Avoids screen size fingerprinting +for_window [title="Tor Browser"] floating enable + +# Make sure all xdg autostart entries are started, this is (among other things) +# necessary to make sure transient vm's come up +exec --no-startup-id qubes-i3-xdg-autostart + +# Switch capslock to escape +exec xmodmap -e "clear lock" #disable caps lock switch +exec xmodmap -e "keysym Caps_Lock = Escape" #set caps_lock as escape + +# Focus to urgent window +bindsym $mod+x [urgent=latest] focus + +# Move back and forth to last workspace +bindsym $mod+z workspace back_and_forth + +# Enable connected but disable outputs +bindsym XF86Display exec --no-startup-id xrandr --auto + +# Lock screen shortcut +bindsym Control+Mod1+l exec --no-startup-id i3lock -f -c ff0000 + +# Execute org-capture in 'emacs-org' +bindsym $mod+c exec qvm-run emacs-org 'emacsclient --eval '(+org-capture/open-frame INITIAL-INPUT-KEY)' |