From a6f6f2af904f669000d7ec9019e0335066b88e55 Mon Sep 17 00:00:00 2001 From: drymer Date: Sat, 28 Oct 2017 21:31:08 +0200 Subject: [PATCH] Change background and standarize some scripts --- roles/i3-dotfiles/files/config | 3 +- roles/i3-dotfiles/files/scripts/memory | 40 ++----------------------- roles/i3-dotfiles/files/scripts/sensors | 2 +- roles/i3-dotfiles/files/scripts/susp | 6 ---- roles/pip-packages/defaults/main.yml | 1 + 5 files changed, 6 insertions(+), 46 deletions(-) delete mode 100755 roles/i3-dotfiles/files/scripts/susp diff --git a/roles/i3-dotfiles/files/config b/roles/i3-dotfiles/files/config index 3fabe48..bab4df3 100644 --- a/roles/i3-dotfiles/files/config +++ b/roles/i3-dotfiles/files/config @@ -182,7 +182,7 @@ client.unfocused #222222 #222222 #ffffff #729FCF client.urgent #FF0000 #8C5665 #ffffff #FF0000 # Wallpaper -exec --no-startup-id feh --bg-scale ~/Imagenes/debian-blue.jpg +exec --no-startup-id feh --bg-scale ~/Imagenes/debian-background.jpg # Autostart exec --no-startup-id xbacklight -set 100 @@ -201,7 +201,6 @@ assign [class="(?i)chromium"] $ws2 assign [class="(?i)qutebrowser"] $ws2 assign [class="(?i)icecat"] $ws2 assign [title="bittorrent"] $ws3 -assign [class="(?i)keepassx"] $ws5 assign [class="(?i)gnucash"] $ws6 assign [title="Steam"] $ws7 assign [class="(?i)mumble"] $ws8 diff --git a/roles/i3-dotfiles/files/scripts/memory b/roles/i3-dotfiles/files/scripts/memory index 0e8482b..4d25558 100755 --- a/roles/i3-dotfiles/files/scripts/memory +++ b/roles/i3-dotfiles/files/scripts/memory @@ -16,45 +16,11 @@ TYPE="${BLOCK_INSTANCE:-mem}" +ram=$(free -h | grep Mem | awk '{print $7}' | sed "s/$//") -ram=`awk -v type=$TYPE ' -/^MemTotal:/ { - mem_total=$2 -} -/^MemFree:/ { - mem_free=$2 -} -/^Buffers:/ { - mem_free+=$2 -} -/^Cached:/ { - mem_free+=$2 -} -/^SwapTotal:/ { - swap_total=$2 -} -/^SwapFree:/ { - swap_free=$2 -} -END { - # full text - if (type == "swap") - printf("%.1f\n", (swap_total-swap_free)/1024/1024) - else - printf("%.1f\n", mem_free/1024/1024) - - # TODO: short text - - # TODO: color (if less than X%) -} -' /proc/meminfo` - -if [[ ($ram < 4) && ($ram > 2) ]] +if [[ $ram -ge 6 ]] then - echo -n "  $ram " -elif [[ ($ram < 2) ]] -then - echo -n "  $ram " + echo -n "  $ram " else echo -n "  $ram " fi diff --git a/roles/i3-dotfiles/files/scripts/sensors b/roles/i3-dotfiles/files/scripts/sensors index 399de4d..e69c39e 100755 --- a/roles/i3-dotfiles/files/scripts/sensors +++ b/roles/i3-dotfiles/files/scripts/sensors @@ -1,3 +1,3 @@ #!/bin/sh -echo -n "  " $(acpi -t | cut -d' ' -f4) "º " +echo -n "  " $(acpi -t | grep "Thermal 1" | cut -d' ' -f4) "º " diff --git a/roles/i3-dotfiles/files/scripts/susp b/roles/i3-dotfiles/files/scripts/susp deleted file mode 100755 index 050c11d..0000000 --- a/roles/i3-dotfiles/files/scripts/susp +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -~/.i3/scripts/lock -sleep 1 -echo 'mem' > /sys/power/state - diff --git a/roles/pip-packages/defaults/main.yml b/roles/pip-packages/defaults/main.yml index e267196..12cbd08 100644 --- a/roles/pip-packages/defaults/main.yml +++ b/roles/pip-packages/defaults/main.yml @@ -12,3 +12,4 @@ pip_packages: - virtualenv - virtualenvwrapper - nikola + - jenkins-cli