Alternatives to manual keybinds for system management?

I wonder what do people use to :

  1. Turn off / restart / restart into windows / suspend / lock their system
  2. Turn on hyprsunset / switch to dark mode
  3. Turn off their monitor(s)

I have keyboard shortcuts for most of these things. It works but not ideal and i’m kinda running out of space, especially now that I want to have also a keyboard shortcut to turn DPMS on / off since if I manually turn off my monitor (with button) waybar’s idle_inhibitor for some reason doesn’t work.

So either I re-think my shortcuts orrrr i put most things to rofi or something. Need some inspiration.

  1. terminal / terminal / terminal / terminal / hyprlock
  2. gammastep / none
  3. hypridle

The only kbd shortcut here is Ctrl + L for manual locking via hyprlock.

1 Like

Submaps my friend. Submaps.

1 Like

Yeah I’m aware of them but managed without. Still… a lot of keyboard shortcuts.

I think I will just create a small script and put half of these things to rofi and keep some of the keyboard shortcuts to:

  1. turn off / on monitor
  2. suspend
bindd = $mod, return, Utilities, submap, utilities
submap = utilities, reset
bindd = ,escape, UTILITIES, submap, reset
bindd = ,a, Notification Center, exec, ncthing -t
bindd = ,s, Calendar, exec, $script/toggle.sh calendar
bindd = ,d, Clock, exec, $script/toggle.sh clock
bindd = ,f, Clipboard History, exec, $clipboard_history
binnd = ,g, Audio Output Select, exec, $audio-output-select
bindd = ,w, Toggle clock, exec, pkill -f -12 nwg-wrapper
bindd = ,r, Capture, submap, capture
bindd = ,q, Quit, submap, reset
submap = reset

One example of the things i use to keep track of keybinds.

1 Like

There are a couple of options.
Keybinds and or submaps
Waybar modules
Hyprlauncher or rofi (if you prefer it) pointing to bash scripts

submaps are absolutely awesome for me.
I like to use only one finger to to things.

The brain get’s clogged sometimes with all these combinations.
conky comes in conveniently as a reminder.

wev and code:keynumber are your friends.

1 Like

That’s cool, what do you use the capture submap for? screenshots / recording?

1 Like

I didn’t know Hyprlauncher even existed hah.

Also first time I hear about Conky. From my understanding reading about it, you can put shortcuts on your desktop wallpaper. Do you just put the most important ones?

Yup. That’s just another submap.

$record_dir = $(xdg-user-dir VIDEOS)
$record_start1 = wf-recorder --audio -o HDMI-A-1 -f "$record_dir/$(date +'%d-%m-%y_%H-%M-%S').mp4" -c h264_nvenc & disown
$record_start2 = wf-recorder --audio -o DP-1 -f "$record_dir/$(date +'%d-%m-%y_%H-%M-%S').mp4" -c h264_nvenc & disown
$record_stop  = killall -s SIGINT wf-recorder
$record_copy = f="$record_dir/$(ls -t -- "$record_dir" 2>/dev/null | head -n1)";\
if [[ -n $f ]] && (( $(date +%s) - $(stat -c %Y -- "$f") < 200 ));\
  then printf 'file://%s\n' "$f" | wl-copy --type text/uri-list; notify-send "Recording copied" "$f";\
elif [[ -n $f ]];\
then notify-send "Recording" "$f failed to find file";\
else notify-send "Recording" "No recordings found";\
fi
$submap_reset = hyprctl submap reset

submap = capture, reset
bindd = ,w,[Rec] Record mon1,exec, $record_start1; $beep system-ready
bindd = ,r,[Rec] Record mon2,exec, $record_start2; $beep system-ready
bindd = ,e,[Rec] Stop recording,exec, $record_stop; $beep system-shutdown; notify-send "Recording" "Stopped";
bindd = ,q,[Rec] Quit and copy,exec, $record_stop; $beep system-shutdown; sleep 0.3; $record_copy;
bindd = ,a,[Clip] Monitor,exec, hyprshot -m output --clipboard-only
bindd = ,s,[Clip] Region,exec, hyprshot -m region -z --clipboard-only
bindd = ,d,[Clip] Active monitor,exec, hyprshot -m active -m output -z --clipboard-only
bindd = ,f,[Clip] Active window,exec, hyprshot -m active -m window -z --clipboard-only
bindd = ,z,[Save] Active monitor,exec, hyprshot -m active -m output -o $(xdg-user-dir PICTURES)/screenshots -f $(date +'%d-%m-%y_%H-%M-%S.png');
bindd = ,x,[Save] Region,exec, hyprshot -m region -o $(xdg-user-dir PICTURES)/screenshots -f $(date +'%d-%m-%y_%H-%M-%S.png');
bindd = ,c,[Save] Window,exec, hyprshot -m active -m window -o $(xdg-user-dir PICTURES)/screenshots -f $(date +'%d-%m-%y_%H-%M-%S.png');
bindd = ,escape, [Close], submap, reset
bindd = ,m,Monitor select,submap, monitor_select
bindd = $mod,t,Description test, submap, test
bindd = ,l,Layertest, submap, layer
submap = reset

submap = layer, capture
bindd = ,backspace, [Back], submap, capture
bindd = ,escape, [Close], submap, reset
submap = reset

But it’s a bit messy since i do a bunch of testing and stuff.

2 Likes

conky is treated as a layer by hyprland and yes it is great on the desktop.
You can display a number of things like cpu, mem, fans, network, storage, feeds and many more.
You need to do a lot of reading.
But it is also great to present static information like keybinds etc.

I would also strongly point you to the examples by @Ergon for submaps.
It’s an awesome feature of hyprland.

I use keybinds, submaps, conky and waybar (for session actions). It’s worth your time reading waybar’s wiki.

hyprlauncher is part of hypr eco system. There is little to configure (for the moment) but it is lightning fast and works great with hyprland (of course).

1 Like