power menu, redshift, polybar
This commit is contained in:
14
.config/polybar/scripts/isrunning-dropbox/README.md
Normal file
14
.config/polybar/scripts/isrunning-dropbox/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Script: isrunning-dropbox
|
||||
|
||||
A script that shows if the dropbox client is running. You can also start and stop the client.
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/isrunning-dropbox]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/isrunning-dropbox.sh
|
||||
interval = 5
|
||||
click-left = ~/polybar-scripts/isrunning-dropbox.sh --toggle &
|
||||
```
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
--toggle)
|
||||
if [ "$(pgrep dropbox)" ]; then
|
||||
pkill -f dropbox
|
||||
else
|
||||
dropbox &
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [ "$(pgrep dropbox)" ]; then
|
||||
echo "#1"
|
||||
else
|
||||
echo "#2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user