summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-08-14 16:54:58 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-08-17 15:59:58 -0700
commit706bdd75455760e197cb29db27d39e8513548c67 (patch)
treef196c5b8a109fbe1cdbb27c88d9181585e3d521c /scripts
parentfaf9bffe02a1407990373453935705f5b8de378d (diff)
downloaddotfiles-706bdd75455760e197cb29db27d39e8513548c67.tar.gz
compact the workspace list, show & hide the workspace buttons
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/desktop/i3status-wrapper4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/desktop/i3status-wrapper b/scripts/desktop/i3status-wrapper
index 5c4a25c8..af487b0c 100755
--- a/scripts/desktop/i3status-wrapper
+++ b/scripts/desktop/i3status-wrapper
@@ -78,7 +78,7 @@ unless (fork // die "couldn't fork()!") {
my $caffeinated_id;
open my $events, "-|",
- $wmipc, "-t", "subscribe", "-m", '[ "window" ]';
+ $wmipc, "-t", "subscribe", "-m", '[ "window", "workspace" ]';
while (my $event = decode_json <$events>) {
if ($event->{change} eq "mark") {
@@ -91,5 +91,7 @@ while (my $event = decode_json <$events>) {
undef $caffeinated_id, undef $info{caffeinated_name};
kill USR1 => $i3status;
}
+ } elsif ($event->{change} eq "init" or $event->{change} eq "empty") {
+ compact_workspaces;
}
}