From e909a97e8f18808f9e72e8efe0920fcb29a75446 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 3 Mar 2021 20:52:55 -0500 Subject: put volume and brightness in the status bar instead of using perspektiv --- bin/hornet/status | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bin') diff --git a/bin/hornet/status b/bin/hornet/status index d068a17..f360aff 100755 --- a/bin/hornet/status +++ b/bin/hornet/status @@ -138,6 +138,29 @@ sub handle_i3status { }; } + chomp(my $brightness = `backlight get`); + splice @$line, -1, 0, { + name => 'brightness', + full_text => "\N{WHITE SUN WITH RAYS} $brightness%", + color => '#FFFFFF' + }; + + chomp(my $volume = `volume get`); + if ($volume eq 'mute') { + splice @$line, -1, 0, { + name => 'volume', + full_text => "\N{SPEAKER}", + color => '#FFFFFF' + }; + } + else { + splice @$line, -1, 0, { + name => 'volume', + full_text => "\N{SPEAKER WITH THREE SOUND WAVES} $volume%", + color => '#FFFFFF' + }; + } + $current_data = $line; show_status(); -- cgit v1.2.3-54-g00ecf