aboutsummaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-09 21:11:43 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-09 21:11:43 +0530
commitde58295210063ed7088b411d0da8ef37b33cb863 (patch)
tree089e946d9b302db19f9f3bb9ea32554761525365 /.scripts
parent3d99cb44596006f8b6cfbf0f1f0daad5e54bd164 (diff)
switched to lemonbar
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/cpu_temp.sh3
-rwxr-xr-x.scripts/get_wifi_name.sh3
-rwxr-xr-x.scripts/ram_usage.sh3
-rwxr-xr-x.scripts/secondmonitor.sh2
4 files changed, 10 insertions, 1 deletions
diff --git a/.scripts/cpu_temp.sh b/.scripts/cpu_temp.sh
new file mode 100755
index 0000000..f2dd2b6
--- /dev/null
+++ b/.scripts/cpu_temp.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+acpi -t | awk '{ print $4 }' | sed 's/\../%/' | tr -d '\n'
diff --git a/.scripts/get_wifi_name.sh b/.scripts/get_wifi_name.sh
new file mode 100755
index 0000000..57d44a3
--- /dev/null
+++ b/.scripts/get_wifi_name.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+nmcli -t -f active,ssid dev wifi | grep -e '^yes' | cut -d\' -f2 | sed 's/^yes://' | tr -d '\n'
diff --git a/.scripts/ram_usage.sh b/.scripts/ram_usage.sh
new file mode 100755
index 0000000..b611831
--- /dev/null
+++ b/.scripts/ram_usage.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+free | awk '/^Mem/ { printf("%.0f%\n", $3/$2 * 100.0) }' | tr -d '\n'
diff --git a/.scripts/secondmonitor.sh b/.scripts/secondmonitor.sh
index ca7fac6..84a5960 100755
--- a/.scripts/secondmonitor.sh
+++ b/.scripts/secondmonitor.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-xrandr --output HDMI-0 --dpi 120 --mode 1920x1080 --pos 0x0 --rotate normal --output eDP-1-1 --dpi 120 --primary --mode 1920x1080 --pos 1920x679 --rotate normal
+xrandr --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal --output eDP-1-1 --primary --mode 1920x1080 --pos 1920x673 --rotate normal