diff --git a/airootfs/etc/skel/.config/hypr/custom/env.lua b/airootfs/etc/skel/.config/hypr/custom/env.lua new file mode 100644 index 0000000..f075398 --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/env.lua @@ -0,0 +1,15 @@ +-- This file will not be overwritten across dots-hyprland updates. +-- The file name is for the sake of organization and does not matter +-- See the corresponding files in ~/.config/hypr/hyprland for examples +-- + +hl.env("XCURSOR_THEME", "Catppuccin Macchiato Dark") +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_THEME", "Catppuccin Macchiato Dark") +hl.env("HYPRCURSOR_SIZE", "24") +hl.env("WEBKIT_DISABLE_DMABUF_RENDERER", "1") + +ecosystem = { + no_donation_nag = true, + no_update_news = false, +} diff --git a/airootfs/etc/skel/.config/hypr/custom/execs.lua b/airootfs/etc/skel/.config/hypr/custom/execs.lua new file mode 100644 index 0000000..8c6f3d8 --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/execs.lua @@ -0,0 +1,8 @@ +-- This file will not be overwritten across dots-hyprland updates. +-- The file name is for the sake of organization and does not matter +-- See the corresponding files in ~/.config/hypr/hyprland for examples + +hl.on("hyprland.start", function() + hl.exec_cmd("hyprctl setcursor 'Catppuccin Macchiato Dark' 24") + hl.exec_cmd("kdeconnectd &") +end) diff --git a/airootfs/etc/skel/.config/hypr/custom/general.lua b/airootfs/etc/skel/.config/hypr/custom/general.lua new file mode 100644 index 0000000..3837560 --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/general.lua @@ -0,0 +1,9 @@ +-- This file will not be overwritten across dots-hyprland updates. +-- The file name is for the sake of organization and does not matter +-- See the corresponding files in ~/.config/hypr/hyprland for examples + +hl.config({ + input = { + kb_options = "caps:escape", + }, +}) diff --git a/airootfs/etc/skel/.config/hypr/custom/keybinds.lua b/airootfs/etc/skel/.config/hypr/custom/keybinds.lua new file mode 100644 index 0000000..97ffd30 --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/keybinds.lua @@ -0,0 +1,79 @@ +-- This file will not be overwritten across dots-hyprland updates. +-- The file name is for the sake of organization and does not matter +-- See the corresponding files in ~/.config/hypr/hyprland for examples + +--##! Overrides +--# Unbind upstream binds we want to replace +hl.unbind("SUPER + B") -- sidebar toggle -> we use this for browser +hl.unbind("SUPER + T") -- terminal (we don't want this combo) +hl.unbind("CTRL + ALT + T") -- terminal (we don't want this combo) +hl.unbind("SUPER + W") -- browser (we use B instead) +hl.unbind("SUPER + ALT + Page_Up") +hl.unbind("SUPER + ALT + Page_Down") +hl.unbind("SUPER + SHIFT + Page_Up") +hl.unbind("SUPER + SHIFT + Page_Down") +hl.unbind("SUPER + O") +hl.unbind("SUPER + X") + +--# Unbind workspace focus with named keys (we use code: keys) +for i = 0, 9 do + hl.unbind("SUPER + " .. i) +end + +--# Rebind browser on B (previously sidebar toggle) +hl.bind("SUPER + B", hl.dsp.exec_cmd(browser), { description = "App: Browser" }) + +--# Rebind Obsidian +hl.bind( + "SUPER + X", + hl.dsp.exec_cmd("/home/alvin/.local/bin/Obsidian.AppImage --password-store=gnome-libsecret"), + { description = "App: Obsidian" } +) + +--##! Workspace +--# Switching with raw keycodes (layout-independent) +for i = 1, 10 do + local numberkey = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 } + hl.bind("SUPER + code:" .. numberkey[i], function() + hl.dispatch(hl.dsp.focus({ workspace = workspace_in_group(i) })) + end) +end +--# keypad numbers +for i = 1, 10 do + local numpadkey = { 87, 88, 89, 83, 84, 85, 79, 80, 81, 90 } + hl.bind("SUPER + code:" .. numpadkey[i], function() + hl.dispatch(hl.dsp.focus({ workspace = workspace_in_group(i) })) + end) +end + +--#/# bind = SUPER+CTRL, code:,, -- Send to workspace & switch +for i = 1, 10 do + local numberkey = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 } + hl.bind("SUPER + CTRL + code:" .. numberkey[i], function() + hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = true })) + end) +end +--# keypad numbers +for i = 1, 10 do + local numpadkey = { 87, 88, 89, 83, 84, 85, 79, 80, 81, 90 } + hl.bind("SUPER + CTRL + code:" .. numpadkey[i], function() + hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = true })) + end) +end + +--#/# bind = SUPER+ALT+SHIFT, Page_↑/↓,, -- Send to workspace left/right +for i = 1, 6 do + local key = { "SUPER + ALT + Page_", "SUPER + SHIFT + Page_", "CTRL + SUPER + SHIFT + " } + local keycombos = + { key[1] .. "down", key[1] .. "up", key[2] .. "down", key[2] .. "up", key[3] .. "Right", key[3] .. "Left" } + local prefix = { "+", "-", "r+", "r-", "r+", "r-" } + hl.bind(keycombos[i], hl.dsp.window.move({ workspace = prefix[i] .. "1" })) -- # [hidden] +end + +--##! Utilities +--#/# bind = SUPER+SHIFT+V, -- Paste as keystrokes +hl.bind( + "SUPER + SHIFT + V", + hl.dsp.exec_cmd("/home/alvin/.config/hypr/custom/scripts/paste-as-type.sh"), + { description = "App: Browser Script" } +) diff --git a/airootfs/etc/skel/.config/hypr/custom/rules.lua b/airootfs/etc/skel/.config/hypr/custom/rules.lua new file mode 100644 index 0000000..4faf63e --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/rules.lua @@ -0,0 +1,3 @@ +-- This file will not be overwritten across dots-hyprland updates. +-- The file name is for the sake of organization and does not matter +-- See the corresponding files in ~/.config/hypr/hyprland for examples diff --git a/airootfs/etc/skel/.config/hypr/custom/scripts/__restore_video_wallpaper.sh b/airootfs/etc/skel/.config/hypr/custom/scripts/__restore_video_wallpaper.sh new file mode 100755 index 0000000..ea4b4fb --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/scripts/__restore_video_wallpaper.sh @@ -0,0 +1,2 @@ +#!/bin/bash +# The content of this script will be generated by switchwall.sh - Don't modify it by yourself. diff --git a/airootfs/etc/skel/.config/hypr/custom/scripts/paste-as-type.sh b/airootfs/etc/skel/.config/hypr/custom/scripts/paste-as-type.sh new file mode 100755 index 0000000..c4ff27e --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/scripts/paste-as-type.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Grab text content from wayland clipboard +text=$(wl-paste --no-newline 2>/dev/null) + +if [ -n "$text" ]; then + # Type out the clipboard string using ydotool + ydotool type -- "$text" +fi diff --git a/airootfs/etc/skel/.config/hypr/custom/variables.lua b/airootfs/etc/skel/.config/hypr/custom/variables.lua new file mode 100644 index 0000000..694f226 --- /dev/null +++ b/airootfs/etc/skel/.config/hypr/custom/variables.lua @@ -0,0 +1,8 @@ +-- This file will not be overwritten across dots-hyprland updates. +-- The file name is for the sake of organization and does not matter +-- See the corresponding files in ~/.config/hypr/hyprland for examples + +terminal = "kitty" +browser = "zen-browser" +codeEditor = "nvim" +textEditor = "obsidian"