Use night-mode channel instead of bimlas

It's easier to find but it may conflict with other XFCE stuff.
This commit is contained in:
bimlas 2020-04-10 20:32:01 +02:00
parent 9e4c9f0b78
commit 060a3eca39

View file

@ -5,7 +5,7 @@ function show_usage()
progname=`basename "$0"` progname=`basename "$0"`
echo "$progname [night|day|toggle]" echo "$progname [night|day|toggle]"
echo "Without parameters it will set dark theme from $SUNSET to $SUNRISE" echo "Without parameters it will set dark theme from $SUNSET to $SUNRISE"
echo 'Use `xfce4-settings-editor` -> `bimlas/night-mode` to modify settings' echo 'Use `xfce4-settings-editor` -> `night-mode` to modify settings'
} }
function parse_args() function parse_args()
@ -90,10 +90,10 @@ function _set_night()
function get_config() function get_config()
{ {
result=`xfconf-query --channel 'bimlas' --property "/night-mode/$1" 2> /dev/null` result=`xfconf-query --channel 'night-mode' --property "/$1" 2> /dev/null`
if ! [ "$result" ]; then if ! [ "$result" ]; then
result="$3" result="$3"
xfconf-query --channel 'bimlas' --property "/night-mode/$1" --set "$result" --create --type "$2" xfconf-query --channel 'night-mode' --property "/$1" --set "$result" --create --type "$2"
fi fi
echo "$result" echo "$result"
@ -123,5 +123,5 @@ echo "<txtclick>$0 toggle</txtclick>"
echo "<tool> echo "<tool>
Night mode: $SUNSET - $SUNRISE Night mode: $SUNSET - $SUNRISE
Click to toggle mode for a while Click to toggle mode for a while
Use \`xfce4-settings-editor\` -> \`bimlas/night-mode\` to modify settings Use \`xfce4-settings-editor\` -> \`night-mode\` to modify settings
</tool>" </tool>"