mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 09:15:22 +01:00
[GH-ISSUE #641] [Question] about script and custom module? #4433
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#4433
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bluebyt on GitHub (Jun 15, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/641
I have recently migrated from Waybar to Ironbar, but I don't know how to convert this custom module:
Waybar module:
If I use the script module then I use something like this, but I cannot use the click command:
cmd = "~/.config/scripts/airpod3.sh --status"If I use the custom module, I can use the click command, but I cannot execute the command for the status:
on_click = "!~/.config/scripts/airpod3.sh --toggle"airpod3.sh
Does anybody know how to do this?
@JakeStanger commented on GitHub (Jun 16, 2024):
You should be able to use any of
script,labelorcustomfor this. Thescriptmodule would be easiest. It does supporton_click- if that's not working are you able to share the relevant config please and I can have a look?@bluebyt commented on GitHub (Jun 16, 2024):
The "--status" is working, but not "--toggle"
If I run it manually it work.
airpod3.sh
Configuration
Config
Styles
@leoVici9 commented on GitHub (Jun 22, 2024):
is the "!" in the on_click before the script intentional ? To get more information what is happing put some notify_send in the script and follow the steps in the notifications.
@bluebyt commented on GitHub (Jun 22, 2024):
The symbol "!" is mandatory according to the wiki for the custom module.
I tried with "!" and without it and it doesn't work in both case.
Custom module
To execute shell commands, prefix them with an !. For example, if you want to run
~/.local/bin/my-script.shon click, you'd set on_click to!~/.local/bin/my-script.sh.@leoVici9 commented on GitHub (Jun 22, 2024):
well in mybar (:-) a custom module an image with a shell script does not work with ! and does work without !
this works:
@bluebyt commented on GitHub (Oct 14, 2024):
Finally I got some time to play with this!
I used the script module to do this and its works!
Thanks for your help @JakeStanger and @bertSN1601