From bed13f328af083ffb42b145f38c12174a526ee40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nina=20Chl=C3=B3e=20Kassandra=20Rei=C3=9F?= Date: Thu, 2 Jul 2026 16:05:05 +0200 Subject: [PATCH] Quick access and action shortcuts --- hyprland.lua | 1 + program_launcher.lua | 70 ++++++++++++++++++++++++++++++++++++++++++++ workspaces.lua | 22 ++------------ 3 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 program_launcher.lua diff --git a/hyprland.lua b/hyprland.lua index 0cb1ffc..c0ba3cc 100644 --- a/hyprland.lua +++ b/hyprland.lua @@ -4,6 +4,7 @@ local background = require("background") local status_bar = require("status_bar") local devices = require("devices") local workspaces = require("workspaces") +local program_launcher = require("program_launcher") -- On event hl.on("hyprland.start", function() diff --git a/program_launcher.lua b/program_launcher.lua new file mode 100644 index 0000000..cffe887 --- /dev/null +++ b/program_launcher.lua @@ -0,0 +1,70 @@ +-- Filename: program_launcher.lua +-- Author: Nina Chloe Kassandra Reiß +-- 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 {} diff --git a/workspaces.lua b/workspaces.lua index cae9aef..3d5f75b 100644 --- a/workspaces.lua +++ b/workspaces.lua @@ -27,26 +27,8 @@ hl.bind("CTRL + ALT + SHIFT + RIGHT", hl.dsp.window.move({ workspace = "+1" })) -- 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 + 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 + 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 +-- 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 })) return { start = function() end,