Replies: 8 comments
-
You can set it up, but it's tricky. The problem is that there is currently
no hotkey protocol in wayland so we need to use side channels. You can in
theory setup your compositor to send an RT signal to sfwbar upon pressing a
key combo and then add a trigger in sfwbar to minimize / restore windows
upon receipt of the trigger.
…On Tue, 7 Jan 2025, 02:43 knm100, ***@***.***> wrote:
Sometimes, I need call the showdesktop fastly, I hope the showdesktop can
be bonded to a shortcut.
—
Reply to this email directly, view it on GitHub
<#311>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHPFFFDIY7YFQLZIBZSHPD2JM5ODAVCNFSM6AAAAABUWY5Z5GVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXG44TAOJUGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I bonded the F10 to sent SIGUSR2 to sfwbar (compositor:labwc).
set trigger in showdesktop.widget as the following code
then the sfwabr crashed (no coredump) when I pressed F10. |
Beta Was this translation helpful? Give feedback.
-
SIGUSR2 is reserved for hide/show bar. Try using SIGRTMIN+1 instead. You
also won't be able to use WidgetState here, since TriggerAction will call
your code unattached to any widget, so you probably want to wrap the code
in a function and have triggeraction call that function on a specific
widget. I.e.
Function ShowDesktop() {
...
}
TriggerAction "SIGRTMIN+", Fuction "MyWidget", "ShowDesktop"
…On Mon, Jan 13, 2025 at 2:46 AM knm100 ***@***.***> wrote:
I bonded the F10 to sent SIGUSR2 to sfwbar (compositor:labwc).
<keybind key="F10">
<action name="Execute" command="killall -SIGUSR2 sfwbar" />
</keybind>
set trigger in showdesktop.widget as the following code
TriggerAction "SIGUSR2", action = {
if WidgetState(1)
ShowWindows;
else
HideWindows;
}
then the sfwabr crashed (no coredump) when I pressed F10.
—
Reply to this email directly, view it on GitHub
<#311 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHPFFE55NIMPCLRIJ7RENT2KMSJ7AVCNFSM6AAAAABUWY5Z5GVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBRGU2TSMI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I setted a trigger in sfwbar.conf and confirmed that the trigger is ok, it can trigger the power.sh to run. |
Beta Was this translation helpful? Give feedback.
-
The address in the function call (i.e. "showdesktop.widget") should be an
id of a widget, not a widget config file. I.e. you need to a have widget
declared in the layout section"
layout {
...
button 'mywidget' {
...
}
}
Then you call Function "mywidget", "ShowDesktop"
…On Tue, Jan 14, 2025 at 5:37 AM knm100 ***@***.***> wrote:
I setted a trigger in sfwbar.conf
TriggerAction "SIGRTMIN+1", Exec "/home/knm/.config/sfwbar/power.sh"
typedkill -s SIGRTMIN+1 `ps -A | grep sfwbar | awk '{print $1}' in a
terminal
and confirmed that the trigger is ok, it can trigger the power.sh to run.
then, I change Exec "/home/knm/.config/sfwbar/power.sh" to Fuction
"showdesktop.widget", "HideWindows"
but kill -s SIGRTMIN+1 `ps -A | grep sfwbar | awk '{print $1}' can't the
Fuction HideWindows
—
Reply to this email directly, view it on GitHub
<#311 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHPFFGRIPMK23UXIB7ZYKT2KSPANAVCNFSM6AAAAABUWY5Z5GVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBSG44DENY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
setted a trigger in sfwbar.conf
add widget id
but it seem to trigger only HideWindows. |
Beta Was this translation helpful? Give feedback.
-
This should hopefully be fixed in the latest git. Also, most configs do
have a default action of sigrtmin+1 bound to switcher next in the default
config. So, it may be far to use sigrtmin+3.
…On Tue, Jan 14, 2025 at 2:10 PM knm100 ***@***.***> wrote:
setted a trigger in sfwbar.conf
TriggerAction "SIGRTMIN+1", Function "ShortcutCall", "ShowDesktop"
add the following Function to showdesktop.widget
Function ShowDesktop() {
if WidgetState(1)
ShowWindows;
else
HideWindows;
}
add widget id ShortCall in the behind of button of showdesktop.widget
layout {
button 'ShrotcutCall' {
------------------------
}
but it seem to trigger only HideWindows.
—
Reply to this email directly, view it on GitHub
<#311 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHPFFFOXCLDZICBTRF2EZL2KULE3AVCNFSM6AAAAABUWY5Z5GVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBTGIYTGMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
the git rev r1776.d014394 still only trigger HideWindows. |
Beta Was this translation helpful? Give feedback.
-
Sometimes, I need call the showdesktop fastly, I hope the showdesktop can be bonded to a shortcut.
Beta Was this translation helpful? Give feedback.
All reactions