aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xScripts/.local/scripts/status/connection5
-rwxr-xr-xScripts/.local/scripts/status/datetime2
-rwxr-xr-xScripts/.local/scripts/status/memory8
-rw-r--r--SystemD/.config/systemd/user/emacs.service4
4 files changed, 8 insertions, 11 deletions
diff --git a/Scripts/.local/scripts/status/connection b/Scripts/.local/scripts/status/connection
index 8e4ebf3..277dedf 100755
--- a/Scripts/.local/scripts/status/connection
+++ b/Scripts/.local/scripts/status/connection
@@ -3,8 +3,11 @@
internet=$(nmcli g | sed -n 2p | awk '{print $1}')
if [[ $internet == "connected" ]]
then
- con=$(nmcli | grep "connected to" | sed 's/.*: connected to \(.*\)/\1/g')
+ con=$(nmcli | grep "connected to" | sed "s/.*: connected to \(.*\)/\1/g")
echo "" $con
+elif [[ $internet == "disconnected" ]]
+then
+ echo ""
else
echo " Not Connected"
fi
diff --git a/Scripts/.local/scripts/status/datetime b/Scripts/.local/scripts/status/datetime
index 65ebe14..0732357 100755
--- a/Scripts/.local/scripts/status/datetime
+++ b/Scripts/.local/scripts/status/datetime
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
-echo " $(date +'%A %d %b %R')"
+echo " $(date +'%a %d %b %R')"
diff --git a/Scripts/.local/scripts/status/memory b/Scripts/.local/scripts/status/memory
index 2d1c328..e9e6f8d 100755
--- a/Scripts/.local/scripts/status/memory
+++ b/Scripts/.local/scripts/status/memory
@@ -5,10 +5,4 @@ used=$(echo $line | awk '{print $3}');
available=$(echo $line | awk '{print $2}');
value=$(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1)
-emacs=$(systemctl --user status emacs | grep "Memory: " | sed "s/[ ]*//;s/Memory: //")
-if [[ $emacs -eq "" ]];
-then
- emacs="N/A"
-fi
-
-echo "⾝ $(printf "%dMB" $used) $value% -> $emacs"
+echo "⾝ $(printf "%dMB" $used) $value%"
diff --git a/SystemD/.config/systemd/user/emacs.service b/SystemD/.config/systemd/user/emacs.service
index 3c98bfb..b0e76f8 100644
--- a/SystemD/.config/systemd/user/emacs.service
+++ b/SystemD/.config/systemd/user/emacs.service
@@ -3,8 +3,8 @@ Description=Emacs
[Service]
Type=forking
-ExecStart=/usr/local/bin/emacs --bg-daemon
-ExecStop=/usr/local/bin/emacsclient --eval "(kill-emacs)"
+ExecStart=/usr/bin/emacs --bg-daemon
+ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Restart=on-failure
TimeoutStartSec=0