Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-12-03 02:44:19

chang-zhao
Member
Registered: 2023-11-20
Posts: 35

[HowTo] Universal Switch Button

Here is a Switch Button script for XFCE panel, implemented via genmon plugin.

Switch Button GIF

It tracks its state (on/off), and with minimal modifications it can have more than 2 states (as many as you want).

When clicked, it runs commands, e.g.

  genmon-switch-on.sh      when "switching on"
  genmon-switch-off.sh      when "switching off"

(It changes its icon and sends notifications in accordance, using `notify-send`).

It can be used to:

  • Switch day/night visual theme

  • Start/stop some background process/service (e.g. web server)

  • Open/close a remote connection (SOCKS5, ssh etc.)

...and whatnot. Details, scripts, usage:

https://codeberg.org/chang-zhao/genmon-switch

Last edited by chang-zhao (2023-12-03 02:45:50)

Offline

#2 2023-12-03 03:29:07

CwF
Member
Registered: 2018-01-28
Posts: 290

Re: [HowTo] Universal Switch Button

Helpful, thanks.

Offline

Board footer

Powered by FluxBB