summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-01-15 09:58:22 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-01-15 14:56:44 -0700
commit955c3c09d78cdef2be60a68268759aa21e85f3c9 (patch)
treeaab8c344d453b8a944d2cbdc72de9c0f4c727ea0 /.config
parent581280939f7531154b779edde3738f68c8b03e7b (diff)
downloaddotfiles-955c3c09d78cdef2be60a68268759aa21e85f3c9.tar.gz
sync i3 config with sway config & cut it down
Leave just what I can expect to need when I have to use X11.
Diffstat (limited to '.config')
-rw-r--r--.config/i3/config236
1 files changed, 47 insertions, 189 deletions
diff --git a/.config/i3/config b/.config/i3/config
index f6c2d7c8..88017a99 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -2,8 +2,6 @@
#
# 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.
font pango:Cousine 10
@@ -28,8 +26,8 @@ client.placeholder #000000 #000000 #FFFFF6 #000000 #000000
client.background #FFFFF6
-# Use Mouse+$mod to drag floating windows to their wanted position
-floating_modifier $mod
+# Use Mouse+Mod4 to drag floating windows to their wanted position
+floating_modifier Mod4
# default workspace layout
workspace_layout tabbed
@@ -40,15 +38,22 @@ workspace_layout tabbed
# toggle this setting around the execution of C-i o, however)
focus_wrapping workspace
+mouse_warping output
+
# Put bindings I don't need to repeat under C-i, so that we have enough keys
# left on the right hand that caps lock can be our only Super modifier, yet we
# do not need any one-handed chording. *Only* bindings I might want to hit more
# than once in a row should be outside of this C-i map
-mode "Window management" {
+mode "C-i-" {
# make a fresh Emacs frame -- typically this gets invoked only on
# empty workspaces, as otherwise I use commands under `C-x 5` to get
# more Emacs frames
- bindsym Return exec emacsclient -a "" -nc, mode "default"
+ bindsym Return exec ~/src/dotfiles/scripts/desktop/emacsclient, mode "default"
+
+ # override the script's usual logic to start a fresh, non-debug daemon
+ bindsym Shift+Return \
+ exec ~/src/dotfiles/scripts/desktop/emacsclient --installed, \
+ mode "default"
# start a terminal emulator
bindsym BackSpace exec xfce4-terminal, mode "default"
@@ -67,7 +72,7 @@ mode "Window management" {
bindsym Shift+l exec systemctl suspend, mode "default"
# kill focused window
- bindsym k kill, mode "default"
+ bindsym k exec pkill -u $USER -f --signal USR1 i3status-wrapper, kill, mode "default"
# start dmenu (a program launcher)
bindsym Shift+p exec dmenu_run \
@@ -98,6 +103,9 @@ mode "Window management" {
# bindsym s layout stacking, mode "default"
bindsym w layout tabbed, mode "default"
+ # make a container independently tabbed
+ bindsym q split v, layout tabbed, mode "default"
+
# toggle tiling / floating
bindsym t floating toggle, mode "default"
@@ -173,7 +181,7 @@ mode "Window management" {
mode "default"
# sends window to next unused but doesn't change view to that
# workspace because this binding is more like C-i [0-9]+ than it is
- # like $mod+Ctrl+j/k
+ # like Mod4+Ctrl+j/k
bindsym Shift+j exec --no-startup-id \
~/src/dotfiles/scripts/desktop/fresh-workspace --send, \
mode "default"
@@ -195,64 +203,7 @@ mode "Window management" {
# exit i3 (logs you out of your X session)
bindsym Ctrl+Shift+e exec i3-quit, mode "default"
- bindsym g mode "Launch program"
-
- # bindsym bracketleft exec debian-ftp-master-cut-note, mode "default"
- bindsym Shift+bracketleft exec xdo-evince-highlight, mode "default"
-
- # Workspaces do not ever get assigned to particular purposes / windows
- # don't get assigned to particular workspaces. If I can't find where
- # I was working on something, there's my bindings to `workspace
- # {next,prev}_on_output`. Long-running processes like builds, for
- # example, stay in the workspace(s) where I'm working on that
- # task/project
- #
- # Previously I thought that instead of having them on a dedicated
- # workspace, windows that are almost always open should be put on the
- # scratcpad:
- #
- # Note that we have to move to scratchpad at startup ('move to
- # scratchpad' below), or the toggle key won't work.
- #
- # Once every so often I'll have to launch the program, and then
- # immediately use the toggle key to make it visible. This is a
- # bit inelegant, but much more reliable than binding the key to a
- # script which starts the program if it's not around and otherwise
- # toggles
- #
- # However, I now think that scratchpad windows are unwieldy for
- # various reasons, so just having them as regular windows with
- # shortcuts to get back to them is better.
-
- # chat
- bindsym Shift+n exec xfce4-terminal \
- --title="irssi" -x /bin/sh -c "mosh athena /home/spwhitton/src/dotfiles/bin/ii", \
- mode "default"
- # bindsym n [class="^Xfce4-terminal$" title="^irssi$"] scratchpad show, \
- # mode "default"
- bindsym n [class="^Xfce4-terminal$" title="^irssi$"] focus, mode "default"
-
- # bindsym space mode "Move focus/windows"
- # bindsym Shift+space mode "Move focus/windows"
-
- bindsym Shift+b bar hidden_state toggle, mode "default"
-
- # This says: resize so that an Emacs window taking up the rest of the
- # width has (eq (frame-width) 160). So should be <<33. The value 32
- # is for melete's monitor, using the Cousine font as installed from
- # the Debian archive. We don't choose this value with any hope of
- # fitting 80 columns into the smaller window, note, though sometimes
- # we'll be able to. Idea is to have something we want to stay visible
- # in the right split and Emacs frame where we're doing most of our
- # work taking up the larger portion of the screen, and such that Emacs
- # will prefer to split horizontally to pop to or display other buffers
- bindsym minus resize set width 32 ppt, mode "default"
- # And this says ensure that the current window can be an Emacs frame
- # with at least 80 columns. Value is based on melete's monitor, using
- # the Inconsolata font as installed from athena's apt repo (see
- # spw/maybe-change-frame-font function for why one of these bindings
- # is based on Cousine and the other is based on Inconsolata)
- bindsym equal resize set width 39 ppt, mode "default"
+ bindsym g mode "C-i g-"
bindsym space mode "default"
bindsym Ctrl+g mode "default"
@@ -260,115 +211,52 @@ mode "Window management" {
# C-i is perfect for window manager bindings because it will never be
# bound in my Emacs config, as text terminals typically cannot
# distinguish between <tab> and C-i
-bindsym Ctrl+i mode "Window management"
-
-# mode "Move focus/windows" {
-# # bullseye: 'focus next' maybe
-# bindsym f focus right
-# # bullseye: 'focus prev' maybe
-# bindsym b focus left
-# bindsym n focus down
-# bindsym p focus up
-# bindsym a workspace prev_on_output
-# bindsym e workspace next_on_output
-# bindsym z focus output left
-# bindsym x focus output right
-
-# bindsym Shift+f move right
-# bindsym Shift+b move left
-# bindsym Shift+n move down
-# bindsym Shift+p move up
-# bindsym Shift+a move container to workspace prev_on_output
-# bindsym Shift+e move container to workspace next_on_output
-# bindsym Shift+z move workspace to output left
-# bindsym Shift+x move workspace to output right
-
-# bindsym --release space mode "default"
-# bindsym --release Shift+space mode "default"
-# }
+bindsym Ctrl+i mode "C-i-"
# change focus
-bindsym $mod+j focus left
-bindsym $mod+k focus right
-bindsym $mod+n focus down
-bindsym $mod+p focus up
-# bindsym $mod+Left focus left
-# bindsym $mod+Down focus down
-# bindsym $mod+Up focus up
-# bindsym $mod+Right focus right
+bindsym Mod4+j focus left
+bindsym Mod4+k focus right
+bindsym Mod4+n focus down
+bindsym Mod4+p focus up
# move focused window
-bindsym $mod+Ctrl+j move left
-bindsym $mod+Ctrl+k move right
-bindsym $mod+Ctrl+n move down
-bindsym $mod+Ctrl+p move up
-# bindsym $mod+Ctrl+Left move left
-# bindsym $mod+Ctrl+Down move down
-# bindsym $mod+Ctrl+Up move up
-# bindsym $mod+Ctrl+Right move right
+bindsym Mod4+Ctrl+j move left
+bindsym Mod4+Ctrl+k move right
+bindsym Mod4+Ctrl+n move down
+bindsym Mod4+Ctrl+p move up
-bindsym $mod+apostrophe layout toggle split
+bindsym Mod4+apostrophe layout toggle split
-# maybe C-M-i for this?
-bindsym $mod+l kill
+bindsym Mod1+Ctrl+i exec pkill -u $USER -f --signal USR1 i3status-wrapper, kill
# Cycle through all workspaces on monitor. Unlike C-i j and C-i [0-9]+, these
# move the container *and* switch view to the other workspace, because there
-# are more like $mod+Ctrl+j/k than they are like the C-i bindings
-bindsym $mod+comma workspace prev_on_output
-bindsym $mod+period workspace next_on_output
-bindsym $mod+Ctrl+less move container to workspace prev_on_output, \
+# are more like Mod4+Ctrl+j/k than they are like the C-i bindings
+bindsym Mod4+comma workspace prev_on_output
+bindsym Mod4+period workspace next_on_output
+bindsym Mod4+Ctrl+less move container to workspace prev_on_output, \
workspace prev_on_output
-bindsym $mod+Ctrl+greater move container to workspace next_on_output, \
+bindsym Mod4+Ctrl+greater move container to workspace next_on_output, \
workspace next_on_output
# # move focus between monitors -- if we have more than one monitor, we
# # probably have a numeric keypad available.
# # subtleties: <https://github.com/i3/i3/issues/2558>
-# bindsym $mod+Mod2+KP_4 focus output left
-# bindsym $mod+KP_Left focus output left
-# bindsym $mod+Mod2+KP_6 focus output right
-# bindsym $mod+KP_Right focus output right
+# bindsym Mod4+Mod2+KP_4 focus output left
+# bindsym Mod4+KP_Left focus output left
+# bindsym Mod4+Mod2+KP_6 focus output right
+# bindsym Mod4+KP_Right focus output right
# # move focused workspace between monitors
-# bindsym $mod+Ctrl+Mod2+KP_Left move workspace to output left
-# bindsym $mod+Ctrl+KP_4 move workspace to output left
-# bindsym $mod+Ctrl+Mod2+KP_Right move workspace to output right
-# bindsym $mod+Ctrl+KP_6 move workspace to output right
-
-bindsym $mod+i focus output left
-bindsym $mod+Ctrl+i move workspace to output left
-bindsym $mod+o focus output right
-bindsym $mod+Ctrl+o move workspace to output right
-
-# toggle music
-bindsym Print exec mpc toggle
-
-# # resize window (you can also use the mouse for that)
-# 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 j resize shrink width 10 px or 10 ppt
-# bindsym k resize grow height 10 px or 10 ppt
-# bindsym l resize shrink height 10 px or 10 ppt
-# bindsym semicolon resize grow width 10 px or 10 ppt
-
-# # same bindings, but for the arrow keys
-# 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"
+# bindsym Mod4+Ctrl+Mod2+KP_Left move workspace to output left
+# bindsym Mod4+Ctrl+KP_4 move workspace to output left
+# bindsym Mod4+Ctrl+Mod2+KP_Right move workspace to output right
+# bindsym Mod4+Ctrl+KP_6 move workspace to output right
+
+bindsym Mod4+i focus output left
+bindsym Mod4+Ctrl+i move workspace to output left
+bindsym Mod4+o focus output right
+bindsym Mod4+Ctrl+o move workspace to output right
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
@@ -405,7 +293,7 @@ bar {
}
# single key launching
-mode "Launch program" {
+mode "C-i g-" {
# start a graphical file manager
bindsym g exec thunar , mode "default"
@@ -416,12 +304,6 @@ mode "Launch program" {
# # get a new VT from lightdm
# bindsym g exec dm-tool switch-to-greeter , mode "default"
- # open virt-viewer pointed at develacc
- bindsym d exec develacc-please , mode "default"
-
- # connect to Debian's ftp-master server for ftpteam work
- bindsym f mode "ftp-master"
-
# adjust volume
bindsym v exec xfce4-terminal -e alsamixer , mode "default"
@@ -435,30 +317,6 @@ mode "Launch program" {
bindsym Ctrl+g mode "default"
}
-mode "ftp-master" {
- bindsym f exec debian-ftp-master , mode "default"
-
- bindsym n exec debian-ftp-master-cut-note , mode "default"
-
- bindsym Ctrl+g mode "default"
-}
-
-# # managing outputs (thanks h01ger and Qubes i3 config)
-# set $mode_display Manage displays: (j/k) VGA on/off (n/m) laptop display on/off (x) arandr
-# mode "$mode_display" {
-# bindsym j exec --no-startup-id xrandr --output VGA-1 --auto --left-of LVDS-1, exec ~/src/dotfiles/bin/i3-startup-always, mode "default"
-# bindsym n exec --no-startup-id xrandr --output LVDS-1 --auto, exec ~/src/dotfiles/bin/i3-startup-always, mode "default"
-# bindsym k exec --no-startup-id xrandr --output VGA-1 --auto --off, exec ~/src/dotfiles/bin/i3-startup-always, mode "default"
-# bindsym m exec --no-startup-id xrandr --output LVDS-1 --auto --off, exec ~/src/dotfiles/bin/i3-startup-always, mode "default"
-
-# # launch xrandr graphical config
-# bindsym x exec arandr , mode "default"
-
-# bindsym Ctrl+g mode "default"
-# }
-
-# bindsym $mod+x mode "$mode_display"
-
# audio
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%