Extends i3 to support gLinux setup
Disables i3-gaps code temporarily until I get a proper installation working. Formats existing code to prefer alignment of text across similar, adjacent definitions. Defines new KBDs for screenlocking, music player controls, volume controls. Defines a rough manifesto of KBDs and the reasoning behind some choices.
This commit is contained in:
		
							parent
							
								
									85e7b74c16
								
							
						
					
					
						commit
						731faded8d
					
				
					 1 changed files with 120 additions and 56 deletions
				
			
		| 
						 | 
					@ -1,5 +1,19 @@
 | 
				
			||||||
set $mod Mod1
 | 
					set $mod Mod1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Font for window titles. Will also be used by the bar unless a different font
 | 
					# Font for window titles. Will also be used by the bar unless a different font
 | 
				
			||||||
# is used in the bar {} block below.
 | 
					# is used in the bar {} block below.
 | 
				
			||||||
font pango:monospace 8
 | 
					font pango:monospace 8
 | 
				
			||||||
| 
						 | 
					@ -8,27 +22,76 @@ font pango:monospace 8
 | 
				
			||||||
floating_modifier $mod
 | 
					floating_modifier $mod
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# gaps
 | 
					# gaps
 | 
				
			||||||
gaps inner 20
 | 
					# gaps inner 20
 | 
				
			||||||
gaps outer 0
 | 
					# gaps outer 0
 | 
				
			||||||
smart_gaps on
 | 
					# 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
 | 
				
			||||||
 | 
					bindsym $mod+Ctrl+t            split v; exec gnome-terminal
 | 
				
			||||||
 | 
					bindsym $mod+Ctrl+Return       split v; exec gnome-terminal
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					bindsym $mod+Ctrl+Shift+t      split h; exec gnome-terminal
 | 
				
			||||||
 | 
					bindsym $mod+Ctrl+Shift+Return split h; exec gnome-terminal
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# audio controls
 | 
					# audio controls
 | 
				
			||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
 | 
					bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +10%   # MBP Volume Up
 | 
				
			||||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
 | 
					bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -10%   # MBP Volume Down
 | 
				
			||||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
 | 
					bindsym XF86AudioMute        exec --no-startup-id pactl set-sink-mute   0 toggle # MBP Mute
 | 
				
			||||||
 | 
					bindsym F12                  exec --no-startup-id pactl set-sink-volume 2 +10%   # same Fn keys as MBP
 | 
				
			||||||
 | 
					bindsym F11                  exec --no-startup-id pactl set-sink-volume 2 -10%   # same Fn keys as MBP
 | 
				
			||||||
 | 
					bindsym F10                  exec --no-startup-id pactl set-sink-mute   2 toggle # same Fn keys as MBP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# screen brightness controls
 | 
					# screen brightness controls
 | 
				
			||||||
bindsym XF86MonBrightnessUp   exec light -A 10
 | 
					bindsym XF86MonBrightnessUp   exec light -A 10
 | 
				
			||||||
bindsym XF86MonBrightnessDown exec light -U 10
 | 
					bindsym XF86MonBrightnessDown exec light -U 10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ensure wallpaper
 | 
					# ensure wallpaper
 | 
				
			||||||
exec --no-startup-id feh --bg-scale ~/pictures/blurred.jpg
 | 
					exec --no-startup-id feh --bg-scale ~/Pictures/cartoon-outdoors.jpg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# start a terminal
 | 
					# ensure system service that run through XDG start
 | 
				
			||||||
bindsym $mod+Return exec terminator
 | 
					exec dex -ae i3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# no title bars
 | 
					# no title bars
 | 
				
			||||||
for_window [class="^.*"] border pixel 3
 | 
					for_window [class="^.*"] border pixel 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# disable mouse hover focus
 | 
					# disable mouse hover focus
 | 
				
			||||||
focus_follows_mouse no
 | 
					focus_follows_mouse no
 | 
				
			||||||
| 
						 | 
					@ -36,17 +99,15 @@ focus_follows_mouse no
 | 
				
			||||||
# kill focused window
 | 
					# kill focused window
 | 
				
			||||||
bindsym $mod+q exec ~/.config/i3/i3-and-emacs quit
 | 
					bindsym $mod+q exec ~/.config/i3/i3-and-emacs quit
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# start dmenu (a program launcher)
 | 
					 | 
				
			||||||
bindsym Mod4+space exec --no-startup-id i3-dmenu-desktop --dmenu='rofi -i -dmenu -width 40 -lines 8'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# GTK Themes
 | 
					# GTK Themes
 | 
				
			||||||
exec --no-startup-id gnome-settings-daemon
 | 
					exec --no-startup-id gnome-settings-daemon
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# wireless selection mechanism
 | 
					# wireless selection mechanism
 | 
				
			||||||
exec --no-startup-id nm-applet
 | 
					exec --no-startup-id nm-applet
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# lock the screen
 | 
					# lock the screen (Window's famous Ctrl-Alt-Delete)
 | 
				
			||||||
bindsym $mod+Shift+o exec "gnome-screensaver-command --lock "
 | 
					bindsym $mod+Ctrl+Delete exec "/usr/share/goobuntu-desktop-files/xsecurelock.sh"
 | 
				
			||||||
 | 
					bindsym $mod+Shift+q     exec "/usr/share/goobuntu-desktop-files/xsecurelock.sh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# sound applet
 | 
					# sound applet
 | 
				
			||||||
exec --no-startup-id gnome-sound-applet
 | 
					exec --no-startup-id gnome-sound-applet
 | 
				
			||||||
| 
						 | 
					@ -61,14 +122,10 @@ bindsym $mod+k exec ~/.config/i3/i3-and-emacs up
 | 
				
			||||||
bindsym $mod+l exec ~/.config/i3/i3-and-emacs right
 | 
					bindsym $mod+l exec ~/.config/i3/i3-and-emacs right
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# move focused window
 | 
					# move focused window
 | 
				
			||||||
bindsym $mod+Shift+h move left
 | 
					bindsym $mod+Shift+h move left  100
 | 
				
			||||||
bindsym $mod+Shift+j move down
 | 
					bindsym $mod+Shift+j move down  100
 | 
				
			||||||
bindsym $mod+Shift+k move up
 | 
					bindsym $mod+Shift+k move up    100
 | 
				
			||||||
bindsym $mod+Shift+l move right
 | 
					bindsym $mod+Shift+l move right 100
 | 
				
			||||||
 | 
					 | 
				
			||||||
# split in vertical orientation
 | 
					 | 
				
			||||||
bindsym $mod+v split v
 | 
					 | 
				
			||||||
bindsym $mod+Shift+v split h
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# enable duplicating the current window vertically or horizontally
 | 
					# enable duplicating the current window vertically or horizontally
 | 
				
			||||||
# bindsym $mod+- split v exec terminator
 | 
					# bindsym $mod+- split v exec terminator
 | 
				
			||||||
| 
						 | 
					@ -79,14 +136,17 @@ bindsym $mod+z fullscreen toggle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# change container layout (stacked, tabbed, toggle split)
 | 
					# change container layout (stacked, tabbed, toggle split)
 | 
				
			||||||
bindsym $mod+s layout stacking
 | 
					bindsym $mod+s layout stacking
 | 
				
			||||||
bindsym $mod+w layout tabbed
 | 
					bindsym $mod+t layout tabbed
 | 
				
			||||||
bindsym $mod+e layout toggle split
 | 
					bindsym $mod+e layout toggle split
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# toggle tiling / floating
 | 
					# toggle tiling / floating
 | 
				
			||||||
bindsym $mod+Shift+space floating toggle
 | 
					bindsym $mod+Shift+f floating toggle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# toggle stickiness
 | 
				
			||||||
 | 
					bindsym $mod+Shift+s sticky toggle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# change focus between tiling / floating windows
 | 
					# change focus between tiling / floating windows
 | 
				
			||||||
bindsym $mod+space focus mode_toggle
 | 
					bindsym $mod+f focus mode_toggle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# focus the parent container
 | 
					# focus the parent container
 | 
				
			||||||
bindsym $mod+a focus parent
 | 
					bindsym $mod+a focus parent
 | 
				
			||||||
| 
						 | 
					@ -104,7 +164,7 @@ set $ws8 "8"
 | 
				
			||||||
set $ws9  "9"
 | 
					set $ws9  "9"
 | 
				
			||||||
set $ws10 "10"
 | 
					set $ws10 "10"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# switch to workspace
 | 
					# jump to workspace
 | 
				
			||||||
bindsym $mod+1 workspace $ws1
 | 
					bindsym $mod+1 workspace $ws1
 | 
				
			||||||
bindsym $mod+2 workspace $ws2
 | 
					bindsym $mod+2 workspace $ws2
 | 
				
			||||||
bindsym $mod+3 workspace $ws3
 | 
					bindsym $mod+3 workspace $ws3
 | 
				
			||||||
| 
						 | 
					@ -116,24 +176,22 @@ bindsym $mod+8 workspace $ws8
 | 
				
			||||||
bindsym $mod+9 workspace $ws9
 | 
					bindsym $mod+9 workspace $ws9
 | 
				
			||||||
bindsym $mod+0 workspace $ws10
 | 
					bindsym $mod+0 workspace $ws10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# move focused container to workspace
 | 
					# move and follow focused container to workspace
 | 
				
			||||||
bindsym $mod+Shift+1 move container to workspace $ws1
 | 
					bindsym $mod+Shift+1 move container to workspace $ws1;  workspace $ws1
 | 
				
			||||||
bindsym $mod+Shift+2 move container to workspace $ws2
 | 
					bindsym $mod+Shift+2 move container to workspace $ws2;  workspace $ws2
 | 
				
			||||||
bindsym $mod+Shift+3 move container to workspace $ws3
 | 
					# 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
 | 
					# 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
 | 
					bindsym $mod+Shift+5 move container to workspace $ws5;  workspace $ws5
 | 
				
			||||||
bindsym $mod+Shift+6 move container to workspace $ws6
 | 
					bindsym $mod+Shift+6 move container to workspace $ws6;  workspace $ws6
 | 
				
			||||||
bindsym $mod+Shift+7 move container to workspace $ws7
 | 
					bindsym $mod+Shift+7 move container to workspace $ws7;  workspace $ws7
 | 
				
			||||||
bindsym $mod+Shift+8 move container to workspace $ws8
 | 
					bindsym $mod+Shift+8 move container to workspace $ws8;  workspace $ws8
 | 
				
			||||||
bindsym $mod+Shift+9 move container to workspace $ws9
 | 
					bindsym $mod+Shift+9 move container to workspace $ws9;  workspace $ws9
 | 
				
			||||||
bindsym $mod+Shift+0 move container to workspace $ws10
 | 
					bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# reload the configuration file
 | 
					# reload the configuration file
 | 
				
			||||||
bindsym $mod+Shift+c reload
 | 
					bindsym $mod+Shift+c reload
 | 
				
			||||||
# exit i3 (logs you out of your X session)
 | 
					# 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'"
 | 
					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'"
 | 
				
			||||||
# lock screen
 | 
					 | 
				
			||||||
bindsym $mod+Control+BackSpace exec "i3lock -c 232423"
 | 
					 | 
				
			||||||
# implemented a sleeping KBD
 | 
					# implemented a sleeping KBD
 | 
				
			||||||
# sudo pm-suspend
 | 
					# sudo pm-suspend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -147,13 +205,19 @@ mode "resize" {
 | 
				
			||||||
        bindsym Caps_Lock    mode "default"
 | 
					        bindsym Caps_Lock    mode "default"
 | 
				
			||||||
        bindsym $mod+Shift+r mode "default"
 | 
					        bindsym $mod+Shift+r mode "default"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
bindsym $mod+Shift+r mode "resize"
 | 
					bindsym $mod+Shift+r mode "resize"
 | 
				
			||||||
 | 
					# NOTE: this eclipses the restart kbd, so rebind that to something useful
 | 
				
			||||||
 | 
					bindsym $mod+r restart
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Colors
 | 
					# Colors
 | 
				
			||||||
set $foreground #e60053
 | 
					set $foreground #8cffa9
 | 
				
			||||||
set $background #dfdfdf
 | 
					set $background #dfdfdf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# window borders
 | 
					# window borders
 | 
				
			||||||
# Format:      border      background  text        indicator   child_border
 | 
					# Format:      border      background  text        indicator   child_border
 | 
				
			||||||
client.focused $foreground $background $foreground $foreground $foreground
 | 
					client.focused $foreground $background $foreground $foreground $foreground
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bar {
 | 
				
			||||||
 | 
					    status_command i3status
 | 
				
			||||||
 | 
					    position top
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue