4.7.22
how to install a hotkey to press with finger one click on keyboard: "poweroff"?
Martinus
How to have one-key "poweroff"?
Moderator: Forum moderators
How to have one-key "poweroff"?
- gychang
- Posts: 596
- Joined: Fri Aug 28, 2020 4:51 pm
- Location: San Diego, CA
- Has thanked: 208 times
- Been thanked: 64 times
Re: terminal commands
Martinus wrote: Mon Jul 04, 2022 4:47 pm4.7.22
how to install a hotkey to press with finger one click on keyboard: "poweroff"?
Martinus
not quite one finger press, but add alias po='wmpoweroff && exit' to /root/.bashrc, then run "source /root/.bashrc" and to poweroff open terminal and enter "po"
Re: How to have one-key "poweroff"?
In BionicPup64, I can press the power button to poweroff
(just a quick normal press, do not hold the power button for 5 or 10 seconds.)
You can create a script in maybe /root/
Code: Select all
#!/bin/sh
exec poweroff
then drag the script to the desktop (pinboard)
then right click the icon, select Edit item
then click click to set
then press the keys you want,
for example, Super+F2
or any other key or keys you want
(the Super key is the Win key)
If it works well, you could set a shortcut key using jwmdesk
instead of the rox pinboard.
I just press the power button to poweroff.
Re: How to have one-key "poweroff"?
How to have one-key poweroff
Thank you all, who answered to this Question.
July.11. 22
Here I must extend with some more information.
I use different puppies since about 16 years,
Many years ago i found "poweroff" in user/bin.
I dragged it to the screen .
There I can switch off the computer with one Left-mouseclick on it.
Mouseclicks are never as comfortable and as quick as keyboard-klicks.
In desktop settings I could install "close" for finger once on F8.
It has been really more comfortable than with searching and click with mouse.
I know. nearly each programs can be realized with puppy. But I am now a grandpa user, who has nearly all his Linux knowledge forgotten. So I come back to the Question on top to improve my every day duties with your help.
cheers
Martinus
- wizard
- Posts: 1993
- Joined: Sun Aug 09, 2020 7:50 pm
- Has thanked: 2667 times
- Been thanked: 694 times
- wizard
- Posts: 1993
- Joined: Sun Aug 09, 2020 7:50 pm
- Has thanked: 2667 times
- Been thanked: 694 times
Re: How to have one-key "poweroff"?
This works in slacko 6.3 and 7.0
Set up F8 key as single key shutdown.
Menu>Desktop>Desktop Settings>Shortcuts>Add new shortcut
-in the Key line type: F8
-in the Action line type: exec: poweroff
(Note: no spaces in the action line)
-click Apply
-click Cancel
-click OK in the JWM shortcuts window
wizard
Big pile of OLD computers
- bigpup
- Moderator
- Posts: 7031
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 925 times
- Been thanked: 1535 times
Re: How to have one-key "poweroff"?
For other Puppy versions that have JWMDesk
menu -> Desktop -> JWMDesk -> JWM hotkey -> Add new shortcut
Most newer Puppies it is this command that does the shutdown:
wmpoweroff
It will make sure it is a normal shutdown.
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
Re: How to have one-key "poweroff"?
12.7.22
Hello, to all.who answered to: How to have one-key "poweroff"
Special thanks to wizard, who introduced the magic word "exec:"!
Now I can use the one-key fingers on F8 for close and F7 for exec:poweroff.
I tried it today successfully with five Puppy versions. In all cases it needed a few seconds to save data from open processes, as I expect it. Maybe so it works on all Puppies.
"wmpoweroff" works with mouse, is for keyboard not required.
best wishes to all friends
Martinus