2018-10-02 15:46:49 +02:00
|
|
|
set $mod Mod1
|
|
|
|
|
2019-03-05 19:24:36 +01:00
|
|
|
# Keymapping philosophy:
|
|
|
|
# When I feel it's appropriate, I try to borrow existing KBDs from OSX or
|
|
|
|
# Windows. For example, I use Ctrl+Alt+Del to start the screen lock, since this
|
|
|
|
# is a really well-known KBD. One notable difference is that when I'm borrowing
|
|
|
|
# OSX KBDs, I prefer using Alt instead of Super since the keyboard that I'm
|
|
|
|
# using has the Alt key in the same location as the Super key on my mac
|
|
|
|
# keyboard. I could rebind this, and I just may. But for now, that's worth
|
|
|
|
# pointing out.
|
|
|
|
# The reason behind borrowing from Windows and OSX is that some of these
|
|
|
|
# keybindings are hardwired into my muscle memory. I also tend to work between
|
|
|
|
# Linux and OSX quite often. Since OSX is much more difficult to remap KBDs
|
|
|
|
# than it is in Linux, I prefer to support the OSX KBDs to reduce the number of
|
|
|
|
# KBDs my feeble memory needs to store.
|
|
|
|
|
2018-10-02 15:46:49 +02:00
|
|
|
# Font for window titles. Will also be used by the bar unless a different font
|
|
|
|
# is used in the bar {} block below.
|
|
|
|
font pango:monospace 8
|
|
|
|
|
|
|
|
# Use Mouse+$mod to drag floating windows to their wanted position
|
|
|
|
floating_modifier $mod
|
|
|
|
|
|
|
|
# gaps
|
2019-03-05 19:24:36 +01:00
|
|
|
# gaps inner 20
|
|
|
|
# gaps outer 0
|
|
|
|
# smart_gaps on
|
|
|
|
|
|
|
|
# KBD Principles:
|
|
|
|
# $mod+Ctrl+<app_char> = starting an application vertically
|
|
|
|
# $mod+Ctrl+Shift+<app_char> = starting an application horizontally
|
|
|
|
# where <app_char> is a reserved character for a commonly used application.
|
|
|
|
#
|
|
|
|
# <app_char> definitions:
|
|
|
|
# terminal = t, Return
|
|
|
|
# emacs = e
|
|
|
|
# chrome = c
|
|
|
|
# spotify = s
|
|
|
|
#
|
|
|
|
# Vertical
|
2019-03-08 19:14:39 +01:00
|
|
|
bindsym $mod+Ctrl+t split v; exec gnome-terminal
|
|
|
|
bindsym $mod+Ctrl+Return split v; exec gnome-terminal
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym $mod+Ctrl+e split v; exec emacs
|
|
|
|
bindsym $mod+Ctrl+c split v; exec google-chrome
|
|
|
|
bindsym $mod+Ctrl+s split v; exec spotify
|
|
|
|
# Horizontal
|
2019-03-08 19:14:39 +01:00
|
|
|
bindsym $mod+Ctrl+Shift+t split h; exec gnome-terminal
|
|
|
|
bindsym $mod+Ctrl+Shift+Return split h; exec gnome-terminal
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym $mod+Ctrl+Shift+e split h; exec emacs
|
|
|
|
bindsym $mod+Ctrl+Shift+c split h; exec google-chrome
|
|
|
|
bindsym $mod+Ctrl+Shift+s split h; exec spotify
|
2018-10-02 15:46:49 +02:00
|
|
|
|
2018-10-06 23:12:04 +02:00
|
|
|
# audio controls
|
2019-03-06 18:05:55 +01:00
|
|
|
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% # MBP Volume Up
|
|
|
|
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% # MBP Volume Down
|
|
|
|
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # MBP Mute
|
|
|
|
bindsym F12 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% # same Fn keys as MBP
|
|
|
|
bindsym F11 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% # same Fn keys as MBP
|
|
|
|
bindsym F10 exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # same Fn keys as MBP
|
2018-10-06 23:12:04 +02:00
|
|
|
|
|
|
|
# screen brightness controls
|
2019-01-13 20:26:14 +01:00
|
|
|
bindsym XF86MonBrightnessUp exec light -A 10
|
|
|
|
bindsym XF86MonBrightnessDown exec light -U 10
|
2018-10-06 23:12:04 +02:00
|
|
|
|
2018-10-02 15:46:49 +02:00
|
|
|
# ensure wallpaper
|
2019-03-05 19:24:36 +01:00
|
|
|
exec --no-startup-id feh --bg-scale ~/Pictures/cartoon-outdoors.jpg
|
|
|
|
|
|
|
|
# ensure system service that run through XDG start
|
|
|
|
exec dex -ae i3
|
2018-10-02 15:46:49 +02:00
|
|
|
|
2019-03-05 19:24:36 +01:00
|
|
|
# rofi window, workspace settings
|
|
|
|
bindsym Mod4+space exec --no-startup-id i3-dmenu-desktop --dmenu='rofi -i -dmenu -width 40 -lines 8'
|
|
|
|
bindsym $mod+space exec "rofi -show run"
|
|
|
|
bindsym $mod+w exec "rofi -show window"
|
|
|
|
bindsym $mod+b exec "rofi -show Workspace"
|
|
|
|
|
|
|
|
# music player kbds
|
|
|
|
bindsym F9 exec --no-startup-id playerctl next # same Fn keys as MBP
|
|
|
|
bindsym F8 exec --no-startup-id playerctl play-pause # same Fn keys as MBP
|
|
|
|
bindsym F7 exec --no-startup-id playerctl previous # same Fn keys as MBP
|
|
|
|
|
|
|
|
# Screenshot
|
|
|
|
bindsym Ctrl+Print exec scrot ~/Pictures/screenshots/%b-%d-%Y_%T.png # Windows style
|
|
|
|
# TODO: debug
|
|
|
|
bindsym $mod+Print exec scrot --focused ~/Pictures/screenshots/%b-%d-%Y_%T.png # Windows style
|
|
|
|
bindsym $mod+Shift+3 exec scrot ~/Pictures/screenshots/%b-%d-%Y_%T.png # OSX style
|
|
|
|
# TODO: debug
|
|
|
|
bindsym $mod+Shift+4 exec scrot --select ~/Pictures/screenshots/%b-%d-%Y_%T.png # OSX style
|
|
|
|
|
|
|
|
# online documentation
|
|
|
|
bindsym $mod+Shift+slash exec google-chrome https://i3wm.org/docs/userguide.html
|
2018-10-02 15:46:49 +02:00
|
|
|
|
|
|
|
# no title bars
|
2019-03-05 19:24:36 +01:00
|
|
|
for_window [class="^.*"] border pixel 2
|
2018-10-02 15:46:49 +02:00
|
|
|
|
|
|
|
# disable mouse hover focus
|
|
|
|
focus_follows_mouse no
|
|
|
|
|
|
|
|
# kill focused window
|
2019-01-13 20:26:14 +01:00
|
|
|
bindsym $mod+q exec ~/.config/i3/i3-and-emacs quit
|
2018-10-02 15:46:49 +02:00
|
|
|
|
2019-01-13 20:26:14 +01:00
|
|
|
# GTK Themes
|
|
|
|
exec --no-startup-id gnome-settings-daemon
|
|
|
|
|
|
|
|
# wireless selection mechanism
|
|
|
|
exec --no-startup-id nm-applet
|
|
|
|
|
2019-03-05 19:24:36 +01:00
|
|
|
# lock the screen (Window's famous Ctrl-Alt-Delete)
|
|
|
|
bindsym $mod+Ctrl+Delete exec "/usr/share/goobuntu-desktop-files/xsecurelock.sh"
|
|
|
|
bindsym $mod+Shift+q exec "/usr/share/goobuntu-desktop-files/xsecurelock.sh"
|
2019-01-13 20:26:14 +01:00
|
|
|
|
|
|
|
# sound applet
|
|
|
|
exec --no-startup-id gnome-sound-applet
|
|
|
|
|
2018-10-02 15:46:49 +02:00
|
|
|
# change focus
|
2019-01-13 20:26:14 +01:00
|
|
|
bindsym $mod+h exec ~/.config/i3/i3-and-emacs left
|
|
|
|
bindsym $mod+j exec ~/.config/i3/i3-and-emacs down
|
|
|
|
bindsym $mod+k exec ~/.config/i3/i3-and-emacs up
|
|
|
|
bindsym $mod+l exec ~/.config/i3/i3-and-emacs right
|
2018-10-02 15:46:49 +02:00
|
|
|
|
|
|
|
# move focused window
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym $mod+Shift+h move left 100
|
|
|
|
bindsym $mod+Shift+j move down 100
|
|
|
|
bindsym $mod+Shift+k move up 100
|
|
|
|
bindsym $mod+Shift+l move right 100
|
2018-10-06 23:12:04 +02:00
|
|
|
|
|
|
|
# enable duplicating the current window vertically or horizontally
|
|
|
|
# bindsym $mod+- split v exec terminator
|
|
|
|
# bindsym $mod+\ split h exec terminator
|
2018-10-02 15:46:49 +02:00
|
|
|
|
|
|
|
# enter fullscreen mode for the focused container
|
|
|
|
bindsym $mod+z fullscreen toggle
|
|
|
|
|
|
|
|
# change container layout (stacked, tabbed, toggle split)
|
|
|
|
bindsym $mod+s layout stacking
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym $mod+t layout tabbed
|
2018-10-02 15:46:49 +02:00
|
|
|
bindsym $mod+e layout toggle split
|
|
|
|
|
|
|
|
# toggle tiling / floating
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym $mod+Shift+f floating toggle
|
|
|
|
|
|
|
|
# toggle stickiness
|
|
|
|
bindsym $mod+Shift+s sticky toggle
|
2018-10-02 15:46:49 +02:00
|
|
|
|
|
|
|
# change focus between tiling / floating windows
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym $mod+f focus mode_toggle
|
2018-10-02 15:46:49 +02:00
|
|
|
|
|
|
|
# focus the parent container
|
|
|
|
bindsym $mod+a focus parent
|
|
|
|
|
|
|
|
# Define names for default workspaces for which we configure key bindings later on.
|
|
|
|
# We use variables to avoid repeating the names in multiple places.
|
2019-03-05 19:24:36 +01:00
|
|
|
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"
|
2018-10-02 15:46:49 +02:00
|
|
|
set $ws10 "10"
|
|
|
|
|
2019-03-05 19:24:36 +01:00
|
|
|
# jump to workspace
|
2018-10-02 15:46:49 +02:00
|
|
|
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 $ws10
|
|
|
|
|
2019-03-05 19:24:36 +01:00
|
|
|
# move and follow 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 # commented out to support screenshot KBD
|
|
|
|
# bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 # commented out to support screenshot KBD
|
|
|
|
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 $ws10; workspace $ws10
|
2018-10-02 15:46:49 +02:00
|
|
|
|
|
|
|
# reload the configuration file
|
|
|
|
bindsym $mod+Shift+c reload
|
|
|
|
|
|
|
|
# resize window (you can also use the mouse for that)
|
|
|
|
mode "resize" {
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym h resize shrink width 10 px or 10 ppt
|
2018-10-02 15:46:49 +02:00
|
|
|
bindsym j resize shrink height 10 px or 10 ppt
|
2019-03-05 19:24:36 +01:00
|
|
|
bindsym k resize grow height 10 px or 10 ppt
|
|
|
|
bindsym l resize grow width 10 px or 10 ppt
|
|
|
|
bindsym Return mode "default"
|
|
|
|
bindsym Caps_Lock mode "default"
|
2019-01-13 20:26:14 +01:00
|
|
|
bindsym $mod+Shift+r mode "default"
|
2018-10-02 15:46:49 +02:00
|
|
|
}
|
2019-01-13 20:26:14 +01:00
|
|
|
bindsym $mod+Shift+r mode "resize"
|
2019-03-05 19:24:36 +01:00
|
|
|
# NOTE: this eclipses the restart kbd, so rebind that to something useful
|
|
|
|
bindsym $mod+r restart
|
2018-10-02 15:46:49 +02:00
|
|
|
|
2019-01-13 20:26:14 +01:00
|
|
|
# Colors
|
2019-03-05 19:24:36 +01:00
|
|
|
set $foreground #8cffa9
|
2019-01-13 20:26:14 +01:00
|
|
|
set $background #dfdfdf
|
|
|
|
|
|
|
|
# window borders
|
|
|
|
# Format: border background text indicator child_border
|
|
|
|
client.focused $foreground $background $foreground $foreground $foreground
|
2019-03-05 19:24:36 +01:00
|
|
|
|
|
|
|
bar {
|
|
|
|
status_command i3status
|
|
|
|
position top
|
|
|
|
}
|