This commit is contained in:
2018-12-04 10:48:02 -05:00
parent 5573bbb562
commit 146ffb643e
9 changed files with 22 additions and 13 deletions

View File

@@ -206,9 +206,10 @@ set $ws7 "7 "
workspace $ws7 output $samsung
bindsym $mod+F7 workspace $ws7; exec $def_term
set $ws8 "8 "
set $ws8 "8 "
# assign [class="jetbrains-"] $ws8
bindsym $mod+F8 workspace $ws8; exec $def_term
workspace $ws8 output $samsung
bindsym $mod+F8 workspace $ws8; exec urxvt -e htop -s PERCENT_CPU
set $ws9 "9 "
workspace $ws9 output $samsung
@@ -220,10 +221,10 @@ workspace $ws10 output $samsung
bindsym $mod+F10 workspace $ws10; exec $def_term
bindsym Mod4+s workspace $ws10; exec spotify
set $ws11 "11 "
assign [class="Summoners War Exporter"] $ws11
workspace $ws11 output $benq
bindsym $mod+F11 workspace $ws11; exec $def_term
set $ws11 "11 "
# assign [class="Summoners War Exporter"] $ws11
workspace $ws11 output $samsung
bindsym $mod+F11 workspace $ws8; exec $def_term
set $ws12 "12 "
bindsym $mod+F12 workspace $ws12; exec $def_term

View File

@@ -29,7 +29,7 @@ GetOptions("help|h" => \&help,
# Get CPU usage
$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is
open (MPSTAT, 'mpstat |') or die;
open (MPSTAT, 'mpstat 1 1 -P ALL |') or die;
while (<MPSTAT>) {
if (/^.*\s+(\d+\.\d+)\s+$/) {
$cpu_usage = 100 - $1; # 100% - %idle