diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-01-15 11:48:50 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-01-16 17:17:31 +0000 |
commit | 0a25a48115ed00af486955e16060655cc2fade31 (patch) | |
tree | a842df025704676c6e9db017891e0f3a1fdf43ed | |
parent | ccb5894f525fc0076e5f643cbef299dd81090f08 (diff) | |
download | dotfiles-0a25a48115ed00af486955e16060655cc2fade31.tar.gz |
i3status-wrapper: implement commands to change the column count
-rw-r--r-- | .config/sway/config | 7 | ||||
-rwxr-xr-x | scripts/desktop/i3status-wrapper | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/.config/sway/config b/.config/sway/config index 70f22651..8b9a23ab 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -241,6 +241,13 @@ mode "C-i-" { # # height 120 by `spw/maybe-scale-basic-faces'. # bindsym equal resize set width 43 ppt, mode "default" + bindsym minus exec \ + ~/src/dotfiles/scripts/desktop/i3status-wrapper-msg cols decr, \ + mode "default" + bindsym equal exec \ + ~/src/dotfiles/scripts/desktop/i3status-wrapper-msg cols incr, \ + mode "default" + bindsym Ctrl+y exec ~/src/dotfiles/scripts/desktop/sway-ftp-master-cut-note , mode "default" bindsym --locked Ctrl+g mode "default" diff --git a/scripts/desktop/i3status-wrapper b/scripts/desktop/i3status-wrapper index b4e90dd9..2431e74c 100755 --- a/scripts/desktop/i3status-wrapper +++ b/scripts/desktop/i3status-wrapper @@ -252,6 +252,11 @@ unless (fork // warn "couldn't fork command pipe reader") { }; kill USR1 => $i3status; } + } elsif ($cmd =~ /^cols (incr|decr)$/) { + $info{paper_ws}{$info{focused_ws}}{ncols} + += $1 eq "incr" ? 1 : -1; + normalise_ws_cols(); + kill USR1 => $i3status; } tied(%info)->unlock; } |