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