Quick access and action shortcuts

This commit is contained in:
Nina Chlóe Kassandra Reiß
2026-07-02 16:05:05 +02:00
parent 750021fe75
commit bed13f328a
3 changed files with 73 additions and 20 deletions
+1
View File
@@ -4,6 +4,7 @@ local background = require("background")
local status_bar = require("status_bar") local status_bar = require("status_bar")
local devices = require("devices") local devices = require("devices")
local workspaces = require("workspaces") local workspaces = require("workspaces")
local program_launcher = require("program_launcher")
-- On event -- On event
hl.on("hyprland.start", function() hl.on("hyprland.start", function()
+70
View File
@@ -0,0 +1,70 @@
-- Filename: program_launcher.lua
-- Author: Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>
-- Copyright: MIT-License
-- Description: Program launcher with shortcuts, direct keybinds and categorized program search.
-- Direct binds
local mainMod = "SUPER"
-- Applications
hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd("kitty"))
hl.bind(mainMod .. " + C", hl.dsp.window.close())
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd("nemo"))
hl.bind(mainMod .. " + R", hl.dsp.exec_cmd("wofi --show drun"))
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.exec_cmd("firefox"))
hl.bind(mainMod .. " + SHIFT + P", hl.dsp.exec_cmd("firefox --private-window"))
-- Screenshots
hl.bind(
mainMod .. " + S",
hl.dsp.exec_cmd(
[[hyprshot -m window -m active -z -o ~/Pictures/screenshots -f $(date +"sc_%Y-%m-%d_%H-%M-%s").png]]
)
)
hl.bind(
mainMod .. " + SHIFT + S",
hl.dsp.exec_cmd(
[[hyprshot --clipboard-only -m window -m active -z -o ~/Pictures/screenshots -f $(date +"sc_%Y-%m-%d_%H-%M-%s").png]]
)
)
hl.bind(
mainMod .. " + ALT + S",
hl.dsp.exec_cmd([[hyprshot -m region -z -o ~/Pictures/screenshots -f $(date +"sc_%Y-%m-%d_%H-%M-%s").png]])
)
hl.bind(
mainMod .. " + SHIFT + ALT + S",
hl.dsp.exec_cmd(
[[hyprshot --clipboard-only -m region -z -o ~/Pictures/screenshots -f $(date +"sc_%Y-%m-%d_%H-%M-%s").png]]
)
)
-- Window management
hl.bind(mainMod .. " + T", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }))
hl.bind(mainMod .. " + P", hl.dsp.window.pin())
-- Brightness
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set 5%+"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true })
-- Volume
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("pamixer -d 4"), { locked = true, repeating = true })
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("pamixer -i 4"), { locked = true, repeating = true })
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("pamixer -t"), { locked = true })
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("pamixer --default-source -t"), { locked = true })
hl.bind(mainMod .. " + XF86AudioLowerVolume", hl.dsp.exec_cmd("pamixer --default-source -d 4"))
hl.bind(mainMod .. " + XF86AudioRaiseVolume", hl.dsp.exec_cmd("pamixer --default-source -i 4"))
-- Lock
hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("swaylock -c 000000 -e -i ~/.config/hypr/wallpaper/background.png"))
-- Mouse
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
hl.bind(mainMod .. " + SHIFT + mouse:272", hl.dsp.window.resize(), { mouse = true })
return {}
+2 -20
View File
@@ -27,26 +27,8 @@ hl.bind("CTRL + ALT + SHIFT + RIGHT", hl.dsp.window.move({ workspace = "+1" }))
-- Move window to previous / next workspace silently -- Move window to previous / next workspace silently
hl.bind(mainMod .. " + CTRL + SHIFT + H", hl.dsp.window.move({ workspace = "-1", follow = false })) hl.bind(mainMod .. " + CTRL + SHIFT + H", hl.dsp.window.move({ workspace = "-1", follow = false }))
hl.bind(mainMod .. " + CTRL + SHIFT + L", hl.dsp.window.move({ workspace = "+1", follow = false })) hl.bind(mainMod .. " + CTRL + SHIFT + L", hl.dsp.window.move({ workspace = "+1", follow = false }))
hl.bind(mainMod .. " + CTRL + SHIFT + LEFT", hl.dsp.window.move({ workspace = "-1", follow = false })) -- hl.bind(mainMod .. " + CTRL + SHIFT + LEFT", hl.dsp.window.move({ workspace = "-1", follow = false }))
hl.bind(mainMod .. " + CTRL + SHIFT + RIGHT", hl.dsp.window.move({ workspace = "+1", follow = false })) -- hl.bind(mainMod .. " + CTRL + SHIFT + RIGHT", hl.dsp.window.move({ workspace = "+1", follow = false }))
-- Move window to numbered workspaces (follow)
for i = 1, 10 do
local key = i % 10
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
end
-- Move window to numbered workspaces (silent)
for i = 1, 10 do
local key = i % 10
hl.bind(
mainMod .. " + ALT + " .. key,
hl.dsp.window.move({
workspace = i,
follow = false,
})
)
end
return { return {
start = function() end, start = function() end,