Xfce Forum

Sub domains
 

You are not logged in.

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

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

[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: 305

Re: [HowTo] Universal Switch Button

Helpful, thanks.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 516.18 KiB (Peak: 528.43 KiB) ]