diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf new file mode 100644 index 0000000..4327dc6 --- /dev/null +++ b/config/hypr/hypridle.conf @@ -0,0 +1,33 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ ░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ██ █ ██ ███ █████████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██ + +general { + lock_cmd = hyprlock + unlock_cmd = loginctl unlock-session + before_sleep_cmd = hyprlock + inhibit_sleep = 3 +} + +listener { + timeout = 300 + on-timeout = hyprlock --grace 15 +} + +listener { + timeout = 360 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +listener { + timeout = 600 + on-timeout = systemctl suspend + on-resume = hyprctl dispatch dpms on +} diff --git a/config/hypr/hyprland/binds/device.lua b/config/hypr/hyprland/binds/device.lua index df93d9f..fad007c 100644 --- a/config/hypr/hyprland/binds/device.lua +++ b/config/hypr/hyprland/binds/device.lua @@ -1,10 +1,35 @@ -local function exit_submap() - hl.dispatch(hl.dsp.submap("reset")) -end +return function(is_laptop) + local function exit_submap() + hl.dispatch(hl.dsp.submap("reset")) + end -hl.define_submap("launch", function() - hl.bind("l", function() - hl.dispatch(hl.dsp.exec_cmd("librewolf")) - exit_submap() + hl.define_submap("device", function() + hl.bind("m", function() + hl.dispatch(hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle")) + exit_submap() + end) + + if is_laptop then + hl.bind("d", function() + hl.dispatch(hl.dsp.exec_cmd("notify-send 'Set to mirror internal display' --app-name'Hyprctl'")) + hl.monitor({ + output = "HDMI-A-1", + mirror = "eDP-1", + }) + exit_submap() + end) + hl.bind("e", function() + hl.dispatch(hl.dsp.exec_cmd("notify-send 'Set to expand internal display' --app-name'Hyprctl'")) + hl.monitor({ + output = "HDMI-A-1", + mirror = "", + }) + exit_submap() + end) + end + + hl.bind("Escape", function() + exit_submap() + end) end) -end) +end diff --git a/config/hypr/hyprland/binds/groups.lua b/config/hypr/hyprland/binds/groups.lua new file mode 100644 index 0000000..31b792b --- /dev/null +++ b/config/hypr/hyprland/binds/groups.lua @@ -0,0 +1,42 @@ +local function exit_submap() + hl.dispatch(hl.dsp.submap("reset")) +end + +hl.bind("Super + Q", hl.dsp.exit()) + +hl.define_submap("groups", function() + hl.bind("c", function() + hl.dispatch(hl.dsp.group.toggle()) + exit_submap() + end) + + hl.bind("l", function() + hl.dispatch(hl.dsp.group.next()) + exit_submap() + end) + + hl.bind("h", function() + hl.dispatch(hl.dsp.group.prev()) + exit_submap() + end) + + hl.bind("Ctrl + L", function() + hl.dispatch(hl.dsp.exec_cmd("notify-send 'Group locking toggled' --app-name='Hyprtclt'")) + hl.dispatch(hl.dsp.group.lock_active()) + exit_submap() + end) + + hl.bind("Shift + L", function() + hl.dispatch(hl.dsp.window.move({ into_or_create_group = "r" })) + exit_submap() + end) + + hl.bind("Shift + H", function() + hl.dispatch(hl.dsp.window.move({ into_or_create_group = "l" })) + exit_submap() + end) + + hl.bind("Escape", function() + exit_submap() + end) +end) diff --git a/config/hypr/hyprland/binds/launch.lua b/config/hypr/hyprland/binds/launch.lua index 88259ba..4ace624 100644 --- a/config/hypr/hyprland/binds/launch.lua +++ b/config/hypr/hyprland/binds/launch.lua @@ -2,76 +2,47 @@ local function exit_submap() hl.dispatch(hl.dsp.submap("reset")) end +local function launcher(program) + return function () + hl.dispatch(hl.dsp.exec_cmd(program)) + exit_submap() + end +end + hl.define_submap("launch", function() -- Librewolf - hl.bind("l", function() - hl.dispatch(hl.dsp.exec_cmd("librewolf")) - exit_submap() - end) + hl.bind("l", launcher("librewolf")) -- Steam - hl.bind("s", function() - hl.dispatch(hl.dsp.exec_cmd("steam")) - exit_submap() - end) + hl.bind("s", launcher("steam")) -- Discord - hl.bind("d", function() - hl.dispatch(hl.dsp.exec_cmd("vesktop")) - exit_submap() - end) + hl.bind("d", launcher("vesktop")) -- Kitty - hl.bind("k", function() - hl.dispatch(hl.dsp.exec_cmd("kitty")) - exit_submap() - end) - hl.bind("Return", function() - hl.dispatch(hl.dsp.exec_cmd("kitty")) - exit_submap() - end) + hl.bind("k", launcher("kitty")) + hl.bind("Return", launcher("kitty")) -- Filezilla - hl.bind("f", function() - hl.dispatch(hl.dsp.exec_cmd("filezilla")) - exit_submap() - end) + hl.bind("f", launcher("filezilla")) -- Thunderbird - hl.bind("t", function() - hl.dispatch(hl.dsp.exec_cmd("thunderbird")) - exit_submap() - end) + hl.bind("t", launcher("thunderbird")) -- Zathura - hl.bind("z", function() - hl.dispatch(hl.dsp.exec_cmd("zathura")) - exit_submap() - end) + hl.bind("z", launcher("zathura")) -- Brave - hl.bind("Shift + B", function() - hl.dispatch(hl.dsp.exec_cmd("brave")) - exit_submap() - end) + hl.bind("Shift + B", launcher("brave")) -- bsmanager - hl.bind("b", function() - hl.dispatch(hl.dsp.exec_cmd("/opt/bs-manager/bs-manager")) - exit_submap() - end) + hl.bind("b", launcher("/opt/bs-manager/bs-manager")) -- ALVR - hl.bind("p", function() - hl.dispatch(hl.dsp.exec_cmd("alvr_dashboard")) - exit_submap() - end) + hl.bind("p", launcher("alvr_dashboard")) -- Qalculate - hl.bind("c", function() - hl.dispatch(hl.dsp.exec_cmd("qalculate-qt")) - exit_submap() - end) + hl.bind("c", launcher("qalculate-qt")) -- AirPlay hl.bind("a", function() diff --git a/config/hypr/hyprland/binds/notifications.lua b/config/hypr/hyprland/binds/notifications.lua new file mode 100644 index 0000000..b878d20 --- /dev/null +++ b/config/hypr/hyprland/binds/notifications.lua @@ -0,0 +1,34 @@ +local function exit_submap() + hl.dispatch(hl.dsp.submap("reset")) +end + +hl.define_submap("notifications", function() + hl.bind("c", function() + hl.dispatch(hl.dsp.exec_cmd("swaync-client --hide-all")) + exit_submap() + end) + + hl.bind("d", function() + hl.dispatch(hl.dsp.exec_cmd("swaync-client --clear-all")) + exit_submap() + end) + + hl.bind("h", function() + hl.dispatch(hl.dsp.exec_cmd("swaync-client -cp")) + exit_submap() + end) + + hl.bind("s", function() + hl.dispatch(hl.dsp.exec_cmd("swaync-client -op")) + exit_submap() + end) + + hl.bind("t", function() + hl.dispatch(hl.dsp.exec_cmd("swaync-client -t")) + exit_submap() + end) + + hl.bind("Escape", function() + exit_submap() + end) +end) diff --git a/config/hypr/hyprland/binds/screenshot.lua b/config/hypr/hyprland/binds/screenshot.lua new file mode 100644 index 0000000..fe39fe9 --- /dev/null +++ b/config/hypr/hyprland/binds/screenshot.lua @@ -0,0 +1,39 @@ +local function exit_submap() + hl.dispatch(hl.dsp.submap("reset")) +end + +hl.define_submap("screenshot", function() + hl.bind("y", function() + hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copy area")) + exit_submap() + end) + + hl.bind("c", function() + hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copysave area")) + exit_submap() + end) + + hl.bind("s", function() + hl.dispatch(hl.dsp.exec_cmd("grimblast --notify save area")) + exit_submap() + end) + + hl.bind("Shift + y", function() + hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copy screen")) + exit_submap() + end) + + hl.bind("Shift + c", function() + hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copysave screen")) + exit_submap() + end) + + hl.bind("Shift + s", function() + hl.dispatch(hl.dsp.exec_cmd("grimblast --notify save screen")) + exit_submap() + end) + + hl.bind("Escape", function() + exit_submap() + end) +end) diff --git a/config/hypr/hyprland/binds/window.lua b/config/hypr/hyprland/binds/window.lua new file mode 100644 index 0000000..102947f --- /dev/null +++ b/config/hypr/hyprland/binds/window.lua @@ -0,0 +1,42 @@ +local function exit_submap() + hl.dispatch(hl.dsp.submap("reset")) +end + +hl.bind("Super + Q", hl.dsp.exit()) + +hl.define_submap("window", function() + hl.bind("x", function() + hl.dispatch(hl.dsp.exit()) + exit_submap() + end) + + hl.bind("q", function() + hl.dispatch(hl.dsp.exit()) + exit_submap() + end) + + hl.bind("f", function() + hl.dispatch(hl.dsp.window.fullscreen({ mode = "fullscreen" })) + exit_submap() + end) + + hl.bind("v", function() + hl.dispatch(hl.dsp.window.float()) + exit_submap() + end) + + hl.bind("c", function() + hl.dispatch(hl.dsp.window.center()) + exit_submap() + end) + + hl.bind("Shift + K", function() + hl.dispatch(hl.dsp.exec_cmd("notify-send 'Insta-Kill activated' --app-name='Hyprtclt'")) + hl.dispatch(hl.dsp.exec_cmd("hyprctl kill")) + exit_submap() + end) + + hl.bind("Escape", function() + exit_submap() + end) +end) diff --git a/config/hypr/hyprland/binds/workspace.lua b/config/hypr/hyprland/binds/workspace.lua new file mode 100644 index 0000000..5f0f702 --- /dev/null +++ b/config/hypr/hyprland/binds/workspace.lua @@ -0,0 +1,38 @@ +local function exit_submap() + hl.dispatch(hl.dsp.submap("reset")) +end + +for i = 1, 10, 1 do + hl.bind("Super + " .. tostring(i % 10), hl.dsp.focus({ workspace = tostring(i) })) + hl.bind("Super + Shift + " .. tostring(i % 10), hl.dsp.window.move({ workspace = tostring(i), follow = 1 })) +end + +hl.bind("Super + h", hl.dsp.focus({ direction = "l" })) +hl.bind("Super + l", hl.dsp.focus({ direction = "r" })) +hl.bind("Super + j", hl.dsp.focus({ direction = "d" })) +hl.bind("Super + k", hl.dsp.focus({ direction = "u" })) + +hl.bind("Super + M", hl.dsp.workspace.toggle_special("main")) +hl.bind("Super + Shift + M", hl.dsp.window.move({ workspace = "special:main" })) + +hl.define_submap("notifications", function() + for i = 1, 10, 1 do + hl.bind(tostring(i % 10), hl.dsp.focus({ workspace = tostring(i) })) + hl.bind("Shift + " .. tostring(i % 10), hl.dsp.window.move({ workspace = tostring(i), follow = 1 })) + end + + hl.bind("h", hl.dsp.focus({ direction = "l" })) + hl.bind("l", hl.dsp.focus({ direction = "r" })) + hl.bind("j", hl.dsp.focus({ direction = "d" })) + hl.bind("k", hl.dsp.focus({ direction = "u" })) + + hl.bind("Shift + l", hl.dsp.window.move({ workspace = "+1", follow = 1 })) + hl.bind("Shift + h", hl.dsp.window.move({ workspace = "-1", follow = 1 })) + + hl.bind("M", hl.dsp.workspace.toggle_special("main")) + hl.bind("Shift + M", hl.dsp.window.move({ workspace = "special:main" })) + + hl.bind("Escape", function() + exit_submap() + end) +end) diff --git a/config/hypr/hyprland/core/group.lua b/config/hypr/hyprland/core/group.lua index 365e30f..7743f03 100644 --- a/config/hypr/hyprland/core/group.lua +++ b/config/hypr/hyprland/core/group.lua @@ -1 +1,10 @@ --- TODO: Check out what this does (pretty sure as in i3) +-- TODO: colours +hl.config({ + group = { + auto_group = false, + + groupbar = { + gradients = true, + } + } +}) diff --git a/config/hypr/hyprland/windowrules/floating.lua b/config/hypr/hyprland/windowrules/floating.lua new file mode 100644 index 0000000..f264b94 --- /dev/null +++ b/config/hypr/hyprland/windowrules/floating.lua @@ -0,0 +1 @@ +-- Floating windows & their positioning diff --git a/config/hypr/hyprland/windowrules/idle.lua b/config/hypr/hyprland/windowrules/idle.lua new file mode 100644 index 0000000..2b36887 --- /dev/null +++ b/config/hypr/hyprland/windowrules/idle.lua @@ -0,0 +1 @@ +-- Idleinhibits diff --git a/config/hypr/hyprland/windowrules/layer.lua b/config/hypr/hyprland/windowrules/layer.lua new file mode 100644 index 0000000..9eb7f60 --- /dev/null +++ b/config/hypr/hyprland/windowrules/layer.lua @@ -0,0 +1 @@ +-- set the layer diff --git a/config/hypr/hyprland/windowrules/main.lua b/config/hypr/hyprland/windowrules/main.lua new file mode 100644 index 0000000..4a56018 --- /dev/null +++ b/config/hypr/hyprland/windowrules/main.lua @@ -0,0 +1,3 @@ +hl.window_rule({ + name = "" +}) diff --git a/config/hypr/hyprland/windowrules/positioning.lua b/config/hypr/hyprland/windowrules/positioning.lua new file mode 100644 index 0000000..e69de29 diff --git a/config/hypr/hyprland/windowrules/tags.lua b/config/hypr/hyprland/windowrules/tags.lua new file mode 100644 index 0000000..e69de29 diff --git a/config/hypr/hyprland/windowrules/workspaces.lua b/config/hypr/hyprland/windowrules/workspaces.lua new file mode 100644 index 0000000..1357955 --- /dev/null +++ b/config/hypr/hyprland/windowrules/workspaces.lua @@ -0,0 +1,15 @@ +-- Set the workspace for certain apps +hl.window_rule({ + match = { class = ".*steam_app.*", title = "ALVR.*|^hidden-terminator" }, + workspace = 1, +}) + +hl.window_rule({ + match = { class = "evince|okular|org\\.pwmt\\.zathura|librewolf", title = "BSManager|Beat Saber.*" }, + workspace = 2, +}) + +hl.window_rule({ + match = { class = "minecraft-launcher", title = ".*Minecraft.*|.*[Ss]team.*" }, + workspace = 3, +}) diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf new file mode 100644 index 0000000..8f7a70c --- /dev/null +++ b/config/hypr/hyprlock.conf @@ -0,0 +1,95 @@ +#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░ +#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ +#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒ ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒ +#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓ +#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ +#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓ +#█ ████ ████ ████ ██████ ████ ████ ████████ █ ██ ██████████ ██████ █████ ██ ███ ████ █████ █ +#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██ + + +# ┌ ┐ +# │ BACKGROUND │ +# └ ┘ +background { + monitor = + path = /home/janis/NextCloud/Wallpapers/nvim/nvim-simple.png # Or screenshot + + blur_passes = 1 +} + +# ┌ ┐ +# │ PASSWORD INPUT │ +# └ ┘ +input-field { + monitor = + size = 300, 40 + outline_thickness = 3 + dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = false + outer_color = rgb(92, 155, 63) + inner_color = rgb(200, 200, 200) + font_color = rgb(10, 10, 10) + fade_on_empty = true + placeholder_text = Input Password... # Text rendered in the input box when it's empty. + hide_input = false + + position = 0, -80 + halign = center + valign = center +} + +label { + monitor = + text = $TIME + color = + font_size = 150 + font_family = Comfortaa + + position = 0, 80 + halign = center + valign = center +} + +label { + monitor = + text = $LAYOUT + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Comfortaa + + position = 0, 0 + halign = right + valign = bottom +} + +label { + monitor = + text = $USER + color = rgba(200, 200, 200, 1.0) + font_size = 12 + font_family = Comfortaa + + position = 0, 0 + halign = left + valign = bottom + shadow_passes = 3 +} + +label { + monitor = + text = Failed attempts: $ATTEMPTS + color = rgba(200, 0, 0, 1.0) + font_size = 12 + font_family = Adwaita Sans + + position = 0, 20 + halign = center + valign = bottom + shadow_passes = 3 + shadow_size = 5 + shadow_boost = 3 + shadow_color = rgb(255,255,255) +} diff --git a/config/hypr/xdg-portal-hyprland b/config/hypr/xdg-portal-hyprland new file mode 100755 index 0000000..61a3648 --- /dev/null +++ b/config/hypr/xdg-portal-hyprland @@ -0,0 +1,8 @@ +#!/bin/bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/libexec/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & \ No newline at end of file