Support shared, device-specific i3 configurations
Separated i3/configuration since some of my devices support XFree86 keysyms while others do not. This introduced some cascading changes. - Removed ~/.config/i3/config from this repo. Since I will be switching between devices semi-regularly and that file will be generated each time I switch to a different device running an X session, I don't want the i3/config to spam my `gst` and `gd` when I haven't changed configuration in either config.shared or config.device. - Update aliases, variables, etc. to point to config.shared instead of the generated file. - Ensure that X sessions generate the i3/config file. - Ensure that i3 reload and restart command generate the i3/config file.
This commit is contained in:
parent
ef8621e7da
commit
7bcfa26f51
9 changed files with 54 additions and 34 deletions
|
|
@ -1,6 +1,3 @@
|
|||
set $mod Mod1
|
||||
set $super Mod4
|
||||
|
||||
# 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
|
||||
|
|
@ -15,6 +12,9 @@ set $super Mod4
|
|||
# than it is in Linux, I prefer to support the OSX KBDs to reduce the number of
|
||||
# KBDs my feeble memory needs to store.
|
||||
|
||||
set $mod Mod1
|
||||
set $super Mod4
|
||||
|
||||
# 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
|
||||
|
|
@ -51,21 +51,9 @@ bindsym $mod+Ctrl+Shift+e split h; exec emacsclient --create-frame ~/progra
|
|||
bindsym $mod+Ctrl+Shift+c split h; exec google-chrome
|
||||
bindsym $mod+Ctrl+Shift+s split h; exec spotify
|
||||
|
||||
# audio controls
|
||||
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
|
||||
|
||||
# pass integration
|
||||
bindsym $mod+Ctrl+backslash exec ~/.config/i3/passmenu # mirroring the 1password KBD
|
||||
|
||||
# screen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec light -A 10
|
||||
bindsym XF86MonBrightnessDown exec light -U 10
|
||||
|
||||
# integrate with Emacs's org-mode
|
||||
bindsym $mod+o exec zsh -i -c org_capture
|
||||
for_window [class="GoogleEmacs" instance="org-protocol-capture"] floating enable
|
||||
|
|
@ -84,21 +72,16 @@ bindsym $mod+space exec --no-startup-id dmenu_run
|
|||
bindsym $mod+t exec --no-startup-id ~/.config/i3/dmenu_timer.sh ~/.local/share/sounds/gong.mp3
|
||||
|
||||
# file manager
|
||||
bindsym $mod+x exec st -e lf
|
||||
|
||||
# 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
|
||||
bindsym $mod+n exec st -e lf
|
||||
|
||||
# Screenshot
|
||||
bindsym $mod+s exec zsh -i -c snipit
|
||||
bindsym Ctrl+Print exec scrot ~/Pictures/screenshots/%b-%d-%Y_%T.png # Windows style
|
||||
bindsym $mod+Shift+4 exec zsh -i -c snipit
|
||||
bindsym Ctrl+Print exec scrot ~/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+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
|
||||
# bindsym $mod+Print exec scrot --focused ~/Pictures/screenshots/%b-%d-%Y_%T.png # Windows style
|
||||
# TODO: debug
|
||||
bindsym $mod+Shift+4 exec scrot --select ~/Pictures/screenshots/%b-%d-%Y_%T.png # OSX style
|
||||
# bindsym $mod+Shift+4 exec scrot --select ~/Pictures/screenshots/%b-%d-%Y_%T.png # OSX style
|
||||
# Integration with Google's screenshot hosting server
|
||||
|
||||
# online documentation
|
||||
|
|
@ -212,8 +195,8 @@ bindsym $mod+Ctrl+9 move container to workspace $ws9
|
|||
bindsym $mod+Ctrl+0 move container to workspace $ws10
|
||||
|
||||
# reload, restart i3
|
||||
bindsym $super+r reload
|
||||
bindsym $super+Shift+r restart
|
||||
bindsym $super+r exec cat ~/.config/i3/config.shared ~/.config/i3/config.device >~/.config/i3/config; reload
|
||||
bindsym $super+Shift+r exec cat ~/.config/i3/config.shared ~/.config/i3/config.device >~/.config/i3/config; restart
|
||||
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
|
|
@ -268,6 +251,6 @@ bar {
|
|||
focused_workspace $black $black $bright_cyan
|
||||
active_workspace $red $bright_blue $blue
|
||||
inactive_workspace $black $black $bright_black
|
||||
urgent_workspace $bright_black $black $magenta
|
||||
urgent_workspace $magenta $black $magenta
|
||||
}
|
||||
}
|
||||
|
|
@ -267,7 +267,7 @@ nnoremap <leader>ea :vsplit ~/aliases.zsh<CR>
|
|||
nnoremap <leader>ef :vsplit ~/functions.zsh<CR>
|
||||
nnoremap <leader>el :vsplit ~/variables.zsh<CR>
|
||||
nnoremap <leader>ex :vsplit ~/.Xresources<CR>
|
||||
nnoremap <leader>ei :vsplit ~/.config/i3/config<CR>
|
||||
nnoremap <leader>ei :vsplit ~/.config/i3/config.shared<CR>
|
||||
|
||||
" quickly source your vimrc
|
||||
nnoremap <leader>sv :source $MYVIMRC<CR>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue