config cleanup, rename numbered workspaces w/o quotes, rework save/restore modes for i3-tree-save

This commit is contained in:
Alex Kelly 2022-06-21 23:27:08 -04:00
parent 6de9d4b709
commit 9e06bf33a6
3 changed files with 51 additions and 62 deletions

24
conf.d/bar.conf Normal file
View file

@ -0,0 +1,24 @@
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
# status_command i3status
#}
bar {
# status_command i3status
mode dock
status_command ~/.local/bin/py3status
strip_workspace_numbers yes
position bottom
# font pango: Hack, Font Awesome 5 Free Regular 10
# font pango: Font Awesome 5 Free Solid, Font Awesome 5 Brands Regular 8
font pango:Font Awesome 5 Free Solid, Font Awesome 5 Brands Regular, Font Awesome 5 Brands Regular, Hack 10
# separator_symbol "⁞"
separator_symbol "⸽"
colors {
statusline #686f9a
separator #5ccc96
# background #2f343f
background #30365F
}
}

View file

@ -1,15 +1,15 @@
# Restore workspace mode.
mode "restore" {
bindsym 1 exec $i3_resurrect restore -w 1
bindsym 2 exec $i3_resurrect restore -w 2
bindsym 3 exec $i3_resurrect restore -w 3
bindsym 4 exec $i3_resurrect restore -w 4
bindsym 5 exec $i3_resurrect restore -w 5
bindsym 6 exec $i3_resurrect restore -w 6
bindsym 7 exec $i3_resurrect restore -w 7
bindsym 8 exec $i3_resurrect restore -w 8
bindsym 9 exec $i3_resurrect restore -w 9
bindsym 0 exec $i3_resurrect restore -w 0
bindsym 1 exec "i3-msg 'workspace $ws1; append_layout ~/.config/i3/layout/w1.json'"
bindsym 2 exec "i3-msg 'workspace $ws2; append_layout ~/.config/i3/layout/w2.json'"
bindsym 3 exec "i3-msg 'workspace $ws3; append_layout ~/.config/i3/layout/w3.json'"
bindsym 4 exec "i3-msg 'workspace $ws4; append_layout ~/.config/i3/layout/w4.json'"
bindsym 5 exec "i3-msg 'workspace $ws5; append_layout ~/.config/i3/layout/w5.json'"
bindsym 6 exec "i3-msg 'workspace $ws6; append_layout ~/.config/i3/layout/w6.json'"
bindsym 7 exec "i3-msg 'workspace $ws7; append_layout ~/.config/i3/layout/w7.json'"
bindsym 8 exec "i3-msg 'workspace $ws8; append_layout ~/.config/i3/layout/w8.json'"
bindsym 9 exec "i3-msg 'workspace $ws9; append_layout ~/.config/i3/layout/w9.json'"
bindsym 0 exec "i3-msg 'workspace $ws0; append_layout ~/.config/i3/layout/w10.json'"
# Back to normal: Enter, Escape, or n
bindsym Return mode "default"

69
config
View file

@ -11,7 +11,6 @@
set $mod Mod4
set $alt Mod1
set $i3_resurrect ~/.local/bin/i3-resurrect
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
@ -22,15 +21,16 @@ set $ws3 3:terminal
set $ws4 4:code
set $ws5 5:music
set $ws6 6:tasks
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
set $ws7 7
set $ws8 8
set $ws9 9
set $ws10 10
# 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
font pango:FiraCode 8
hide_edge_borders smart
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
@ -61,13 +61,6 @@ exec --no-startup-id "i3-msg 'workspace $ws4; append_layout ~/.config/i3/layout/
exec --no-startup-id "i3-msg 'workspace $ws5: append_layout ~/.config/i3/layout/w5.json'"
exec --no-startup-id "i3-msg 'workspace $ws6; append_layout ~/.config/i3/layout/w6.json'"
# 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
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
@ -97,14 +90,9 @@ bindsym $mod+Return exec kitty
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
#bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
bindsym $mod+b bar mode hide
bindsym $mod+Shift+b bar mode dock
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
@ -218,29 +206,6 @@ mode "resize" {
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
# status_command i3status
#}
bar {
# status_command i3status
status_command ~/.local/bin/py3status
strip_workspace_numbers yes
position bottom
# font pango: Hack, Font Awesome 5 Free Regular 10
# font pango: Font Awesome 5 Free Solid, Font Awesome 5 Brands Regular 8
font pango:Font Awesome 5 Free Solid, Font Awesome 5 Brands Regular, Font Awesome 5 Brands Regular, Hack 10
# separator_symbol "⁞"
separator_symbol "⸽"
colors {
statusline #686f9a
separator #5ccc96
# background #2f343f
background #30365F
}
}
for_window [all] title_window_icon on
for_window [all] title_window_icon padding 1px
@ -249,16 +214,16 @@ for_window [all] title_format "%class"
# Save workspace mode.
mode "save" {
bindsym 1 exec $i3_resurrect save -w 1
bindsym 2 exec $i3_resurrect save -w 2
bindsym 3 exec $i3_resurrect save -w 3
bindsym 4 exec $i3_resurrect save -w 4
bindsym 5 exec $i3_resurrect save -w 5
bindsym 6 exec $i3_resurrect save -w 6
bindsym 7 exec $i3_resurrect save -w 7
bindsym 8 exec $i3_resurrect save -w 8
bindsym 9 exec $i3_resurrect save -w 9
bindsym 0 exec $i3_resurrect save -w 0
bindsym 1 exec "i3-save-tree --workspace=1 > $HOME/.config/i3/layout/w1.json"
bindsym 2 exec "i3-save-tree --workspace=2 > $HOME/.config/i3/layout/w2.json"
bindsym 3 exec "i3-save-tree --workspace=3 > $HOME/.config/i3/layout/w3.json"
bindsym 4 exec "i3-save-tree --workspace=4 > $HOME/.config/i3/layout/w4.json"
bindsym 5 exec "i3-save-tree --workspace=5 > $HOME/.config/i3/layout/w5.json"
bindsym 6 exec "i3-save-tree --workspace=6 > $HOME/.config/i3/layout/w6.json"
bindsym 7 exec "i3-save-tree --workspace=7 > $HOME/.config/i3/layout/w7.json"
bindsym 8 exec "i3-save-tree --workspace=8 > $HOME/.config/i3/layout/w8.json"
bindsym 9 exec "i3-save-tree --workspace=9 > $HOME/.config/i3/layout/w9.json"
bindsym 0 exec "i3-save-tree --workspace=0 > $HOME/.config/i3/layout/w10.json"
# Back to normal: Enter, Escape, or s
bindsym Return mode "default"