101 Commits

Author SHA1 Message Date
clsty d192a25faa Merge remote-tracking branch 'refs/remotes/origin/main'
Comment on Discussion When sdata/dist-arch/ Changes / comment_on_discussion (push) Waiting to run
2026-06-05 14:50:37 +08:00
clsty 0bfade5c36 Fix microtex build failure (#3422) 2026-06-05 14:49:57 +08:00
end-4 d619ddcd82 not use raw keycode binds for super+alt+ws (fixes #3368) 2026-06-05 08:42:06 +02:00
clsty 3cb611c04e No more sleep 0
Comment on Discussion When sdata/dist-arch/ Changes / comment_on_discussion (push) Has been cancelled
2026-05-29 13:46:40 +08:00
Minh f5b2b7548d Fix wrong dpms syntax (#3407) 2026-05-26 20:19:33 +02:00
VietNguyenx e0f2a34949 Wrong dpms syntax 2026-05-27 01:06:27 +07:00
end-4 6eb590b1a2 add light/dark wallpaper variant switching based on suffix 2026-05-25 00:27:31 +02:00
Minh 14376cec94 fix(ii): send configured User-Agent to Konachan requests (#3232) 2026-05-24 23:51:29 +02:00
Minh 397fb8d8c4 Fix broken waifu.im image and tag search (#3239) 2026-05-24 23:45:50 +02:00
Minh aa044b4563 fix source url safe access 2026-05-24 23:45:15 +02:00
end-4 a15f2a8a39 add a weak anti flashbang variant 2026-05-24 23:37:01 +02:00
end-4 9b149e6fef qs: sidebar: quick toggle: friendlier/shorter default state text 2026-05-24 23:34:21 +02:00
Minh eb3613d3ed fix: show escaped text for selected entry in clipboard (#3303) 2026-05-24 23:28:35 +02:00
Minh 091da11da5 Fix monitor scale type (#3312) 2026-05-24 23:26:05 +02:00
Minh a56cee16f1 Restore nwg-displays entry (#3381) 2026-05-24 22:55:37 +02:00
Minh 54a1d172d7 add file existence check for nwg displays include 2026-05-24 22:55:17 +02:00
Minh c58bb07a6b fix(qs): NotificationItem polish() loop on Qt 6.11 — freezes sidebar (#3388) 2026-05-24 22:52:56 +02:00
Minh 9c115f7a8f fix: hypridle Lua-dispatch compatibility for lock and DPMS (#3393) 2026-05-24 22:34:45 +02:00
Minh b9e05599bc Fix screen corners only appearing on integrated monitor (#3386) 2026-05-24 11:28:01 +02:00
Love, Trevor S ce80951210 fix: hypridle dispatch commands for Lua-based Hyprland 2026-05-22 11:41:16 -07:00
RamonBritoDev 6eaa869fac fix(qs): NotificationItem polish() loop on Qt 6.11
summaryText.Layout.fillWidth depended on summaryRow.implicitWidth,
its own parent RowLayout, creating a circular dependency:

  summaryText.Layout.fillWidth
    -> changes summaryText.width
    -> changes summaryRow.implicitWidth
    -> re-evaluates summaryText.Layout.fillWidth (loop)

Qt 6.10 tolerated this through layout settling heuristics, but
Qt 6.11.1 detects the loop and emits "ColumnLayout called polish()
inside updatePolish() of ColumnLayout" warnings repeatedly, pinning
CPU at 100% and freezing the sidebar/notification UI when opened.

Use root.width (the stable width inherited from the parent ListView)
as the reference for the elision threshold instead of the recursive
summaryRow.implicitWidth.
2026-05-21 16:23:40 +00:00
Jihed Kdiss 8f9cf67be7 fix(screenCorners): remove shadowing screen property to fix multi-monitor corner rendering 2026-05-21 14:16:22 +01:00
Zhengjie Min 20d1ff065b style: space indent 2026-05-20 11:38:00 -04:00
Zhengjie Min 25fe0ab01e fix(hyprland): restore nwg-display entry 2026-05-20 11:32:13 -04:00
Minh c1b37bc467 fix(hyprsunset): remove vestigial Hyprland.dispatch broken under .lua schema (#3356) 2026-05-18 23:40:22 +02:00
Minh b470bf3fe8 Fix: XDG_DATA_DIRS now expands correctly (fixes 3354) (#3358) 2026-05-18 23:06:27 +02:00
GregorVal d4e777911e Fix: XDG_DATA_DIRS now expands correctly
Previously the environmental variable would become literally 
*:$XDG_DATA_DIRS
Now the variable is expanded correctly
2026-05-17 14:46:26 +02:00
zzalli d4d78a5e62 fix(hyprsunset): remove vestigial Hyprland.dispatch broken under .lua schema 2026-05-17 15:36:14 +03:00
end-4 c0706258b1 add back some repetitive keybinds to cheatsheet 2026-05-16 23:27:26 +02:00
Minh 68c67aced4 Update keybinds.lua to allow hl.unbind() (#3336) 2026-05-14 19:43:29 +02:00
VietNguyenx 215ac747d8 Update keybinds.lua 2026-05-15 00:31:29 +07:00
end-4 9eda50178b remove redundant scripts 2026-05-14 14:37:06 +02:00
end-4 d5f9afe7c0 qs: remove no longer necessary unlock refocus hack 2026-05-14 14:34:45 +02:00
end-4 5c66902900 qs: fix wrong capitalization in cheatsheet 2026-05-14 14:34:07 +02:00
end-4 28ba8a4f43 hl: make custom stuff optional 2026-05-14 12:35:29 +02:00
end-4 798d35a538 hl: remove that whatever jetbrains windowrule (fixes #3324) 2026-05-14 12:28:05 +02:00
end-4 7d5ce9a793 hl: fix #3327 send to scratchpad desc at wrong scope 2026-05-14 12:25:28 +02:00
end-4 c53265754c hl: create custom config files automatically 2026-05-14 12:21:00 +02:00
end-4 239b532ec6 ctrl+super+shift+d for dark/light toggle (like powertoys) 2026-05-14 10:43:23 +02:00
end-4 d1daedc6d2 qs: cheatsheet: display categories nicely 2026-05-14 09:37:45 +02:00
end-4 2ade168a20 hl config: remove unused bash scripts 2026-05-14 08:17:29 +02:00
end-4 08201f2ac0 hl: keybinds: fix workspace groups, categorize descriptions 2026-05-14 08:16:47 +02:00
Minh ad12fe6ddf feat: notification on specific monitor (#3292) 2026-05-13 20:01:56 +02:00
end-4 9e1568fcdc qs: rename config option notifications.monitor to notifications.forceMonitor 2026-05-13 20:01:21 +02:00
Minh b7b2e6e10d fix Hyprsunset default color temperature (#3254) 2026-05-13 19:49:51 +02:00
Minh 00a4235a81 Update emoji list to emoji 17.0 (#3268) 2026-05-13 19:48:48 +02:00
Minh c504cdf22b Fix kitty config (#3284) 2026-05-13 19:47:06 +02:00
Minh e6d2a7d88c Fix HOME env in lua (#3316) 2026-05-13 19:46:22 +02:00
Minh b50a4a7faa Merge branch 'main' into fix-home-env 2026-05-13 19:46:12 +02:00
Minh 737eb7c356 Do not override XDG_DATA_DIRS (fixes #2583) (#3321) 2026-05-13 19:42:50 +02:00
Minh 5ce6280d98 fix(keybinds): correct fullscreen and maximize bind syntax (#3306) 2026-05-13 19:39:43 +02:00
GregorVal f7773acab4 Do not override XDG_DATA_DIRS (fixes #2583) 2026-05-13 17:51:41 +02:00
imitoy e8721b4b01 Fix HOME env in lua 2026-05-13 16:03:09 +08:00
PetLucy b85ed8691a Fix monitor scale type
Changes the default monitor scale value from `"1"` to `1`.

This fixes the typo in the default monitor configuration.
2026-05-12 15:23:17 -05:00
Rasmion ac8d0e9a42 fix: specify toggle action explicitly 2026-05-12 22:00:36 +02:00
Minh 412b2222c2 readme: move warning content to wiki 2026-05-12 15:37:00 +02:00
Rasmion d6b27cf9dd fix(keybinds): correct fullscreen and maximize bind syntax 2026-05-12 14:45:53 +02:00
end-4 c53e9891cb qs: fix super key hold state properly 2026-05-12 12:07:33 +02:00
end-4 1e442f1af0 qs: temp fix super key always thought to be held down 2026-05-12 11:13:26 +02:00
Minh 20dde15900 readme: add hyprland 0.55 warning 2026-05-12 11:04:30 +02:00
end-4 ba0e76da1b fix hyprland theming 2026-05-12 10:47:44 +02:00
end-4 1c117e0880 add example keybind for editing user keybinds 2026-05-12 10:34:59 +02:00
end-4 7aad60eb2c install script: add check for hyprland.conf rename 2026-05-12 10:31:40 +02:00
end-4 a9f87c06ca install script: rename hyprland.conf to not use it 2026-05-12 10:06:10 +02:00
end-4 281b3e5627 previous commit but in the "legacy" script 2026-05-12 09:59:17 +02:00
end-4 388783e992 hyprland: exclude monitors and workspaces conf 2026-05-12 09:55:24 +02:00
end-4 ae7f6bd165 fix keybind cheatsheet 2026-05-12 09:28:07 +02:00
lnb 403f7aa685 fix: show escaped text for selected entry in clipboard 2026-05-12 12:04:28 +05:30
end-4 807c761ed0 qs: fix some manual hyprland dispatches 2026-05-12 08:28:10 +02:00
end-4 7dcbabcd8c fix screen locking 2026-05-12 08:11:47 +02:00
end-4 2e161911bc qs: fix hyprland overrides (game mode, anti flashbang) 2026-05-12 07:54:56 +02:00
end-4 e11d084be8 remove redundant wallpaper switching stuff 2026-05-11 23:46:23 +02:00
end-4 760c7034aa qs: fix hyprland dispatchers 2026-05-11 23:45:44 +02:00
Minh 6c041b953a migrate hyprland config to lua (#3269) 2026-05-11 23:02:05 +02:00
end-4 9f4afde0c5 use globalshortcut for 4finger up touchpad gesture 2026-05-11 23:00:50 +02:00
end-4 010f070eef fix stuff 2026-05-11 22:52:48 +02:00
Linuxius f6b97c4649 Update general.lua 2026-05-09 21:57:36 +02:00
electricsteve 0da83ba460 feat: notification on specific monitor 2026-05-09 19:10:43 +02:00
fb24m 74c10b915d fix kitty config 2026-05-07 21:45:11 +04:00
Linuxius 0ae900515e Add files via upload 2026-05-07 19:20:37 +02:00
Linuxius c3147dc7ff Add files via upload 2026-05-07 11:19:53 +02:00
Linuxius fb3ec1fdfc Add files via upload 2026-05-06 19:15:03 +02:00
Linuxius d1cd892c0f Add files via upload 2026-05-03 13:16:49 +02:00
Linuxius 63495d0b28 Add files via upload 2026-05-03 11:13:26 +02:00
Linuxius 36a4a19bca Add files via upload 2026-05-03 11:12:54 +02:00
ThomasNoorlander c693a3f539 Create variables.lua 2026-05-02 17:50:36 +02:00
ThomasNoorlander c0888cbb98 Create rules.lua 2026-05-02 17:50:24 +02:00
ThomasNoorlander 2cfb0c2757 Create keybinds.lua 2026-05-02 17:50:11 +02:00
ThomasNoorlander b034a712a9 Create general.lua 2026-05-02 17:49:57 +02:00
ThomasNoorlander aff6206930 Create execs.lua 2026-05-02 17:49:42 +02:00
ThomasNoorlander 0e1f6a97fc Create env.lua 2026-05-02 17:49:28 +02:00
ThomasNoorlander 7834f22243 Add files via upload 2026-05-02 17:48:52 +02:00
ThomasNoorlander cec16c8720 Create main.lua 2026-05-02 17:48:26 +02:00
ThomasNoorlander 54e19afa81 Add files via upload 2026-05-02 17:47:55 +02:00
Hanz Montano ffabb85693 feat: update emoji list to emoji 17.0 2026-05-02 12:09:57 +08:00
Reluckycf 72d950ed51 change hyprsunset default color temp to 6000 2026-04-25 18:58:48 -05:00
Kashi754 4eef9ea18e Fix still tags not being applied to search request. 2026-04-21 19:23:21 +09:00
Kashi754 329fa31262 Fix broken waifu.im image and tag search 2026-04-15 18:16:56 +09:00
Hugo Hsi 14f8b84635 fix(ii): add Konachan support in sidebar 2026-04-14 01:58:37 -04:00
Hugo Hsi 36e0c3fddc fix(ii): remove Konachan wallpaper UA fallback 2026-04-14 01:58:30 -04:00
Hugo Hsi d24cbff7ac fix(ii): send user agent for Konachan wallpaper 2026-04-14 01:51:08 -04:00
98 changed files with 1672 additions and 1810 deletions
+5 -1
View File
@@ -17,6 +17,10 @@
<h3></h3>
</div>
> [!WARNING]
> Hyprland 0.55 update:
> If your distro has not shipped Hyprland 0.55 and/or you're not ready for it, you should switch to the Pre-Hyprland Luaification release (or not update yet, if you're going to do that). See the wiki for more info: [Install](https://ii.clsty.link/en/ii-qs/01setup/#automated-installation) | [Update](https://ii.clsty.link/en/ii-qs/01setup/#updating)
<details>
<summary>What this is/isn't</summary>
@@ -39,7 +43,7 @@
<details>
<summary>Installation</summary>
- _If you're new to Linux and decide to use Hyprland, you're in for a tough ride._
- **IMPORTANT: Hyprland 0.55 Update**: If your distro has not shipped Hyprland 0.55 and/or you're not ready for it, you should switch to the Pre-Hyprland Luaification release. See [the wiki](https://ii.clsty.link/en/ii-qs/01setup/) for more info
- Just run `bash <(curl -s https://ii.clsty.link/get)`
- Or, clone this repo and run `./setup install`
- See [the wiki](https://ii.clsty.link/en/ii-qs/01setup/) for more details
-23
View File
@@ -1,23 +0,0 @@
# hyprlang noerror false
# You can put extra environment variables here
# https://wiki.hyprland.org/Configuring/Environment-variables/
# ######### Input method ##########
# See https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland
#env = QT_IM_MODULE, fcitx
#env = XMODIFIERS, @im=fcitx
#env = SDL_IM_MODULE, fcitx
#env = GLFW_IM_MODULE, ibus
#env = INPUT_METHOD, fcitx
# ######## Wayland #########
# Tearing
# env = WLR_DRM_NO_ATOMIC, 1
# ?
# env = WLR_NO_HARDWARE_CURSORS, 1
# ######## EDITOR #########
#https://wiki.archlinux.org/title/Category:Text_editors
# for example: vi nano nvim ...
#env = EDITOR, vim
+1
View File
@@ -0,0 +1 @@
-7
View File
@@ -1,7 +0,0 @@
# hyprlang noerror false
# You can make apps auto-start here
# Relevant Hyprland wiki section: https://wiki.hyprland.org/Configuring/Keywords/#executing
# Input method
# exec-once = fcitx5
+1
View File
@@ -0,0 +1 @@
-7
View File
@@ -1,7 +0,0 @@
# hyprlang noerror false
# Put general config stuff here
# Here's a list of every variable: https://wiki.hyprland.org/Configuring/Variables/
# monitor=,addreserved, 0, 0, 0, 0 # Custom reserved area
# HDMI port: mirror display. To see device name, use `hyprctl monitors`
+1
View File
@@ -0,0 +1 @@
-25
View File
@@ -1,25 +0,0 @@
# hyprlang noerror false
# See https://wiki.hyprland.org/Configuring/Binds/
#!
##! User
bind = Ctrl+Super, Slash, exec, xdg-open ~/.config/illogical-impulse/config.json # Edit shell config
bind = Ctrl+Super+Alt, Slash, exec, xdg-open ~/.config/hypr/custom/keybinds.conf # Edit extra keybinds
##! Apps
# bind = Super, Return, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "${TERMINAL}" "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # Terminal
# bind = Super, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "${TERMINAL}" "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # [hidden] (terminal) (alt)
# bind = Ctrl+Alt, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "${TERMINAL}" "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # [hidden] (terminal) (for Ubuntu people)
# bind = Super, E, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" "${TERMINAL}" "kitty -1 fish -c yazi" # File manager
# bind = Super, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "google-chrome-stable" "zen-browser" "firefox" "brave" "chromium" "microsoft-edge-stable" "opera" "librewolf" # Browser
# bind = Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "code" "codium" "cursor" "zed" "zedit" "zeditor" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" "command -v micro && kitty -1 micro" # Code editor
# bind = Ctrl+Super+Shift+Alt, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "wps" "onlyoffice-desktopeditors" "libreoffice" # Office software
# bind = Super, X, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kate" "gnome-text-editor" "emacs" # Text editor
# bind = Ctrl+Super, V, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol" # Volume mixer
# bind = Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "qs -p ~/.config/quickshell/$qsConfig/settings.qml" "systemsettings" "gnome-control-center" "better-control" # Settings app
# bind = Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitor --page-name Processes" "command -v btop && kitty -1 fish -c btop" # Task manager
# Add stuff here
# Use #! to add an extra column on the cheatsheet
# Use ##! to add a section in that column
# Add a comment after a bind to add a description, like above
+1
View File
@@ -0,0 +1 @@
hl.bind("CTRL+SUPER+ALT+Slash", hl.dsp.exec_cmd("xdg-open ~/.config/hypr/custom/keybinds.lua"), {description = "Edit user keybinds"} )
-12
View File
@@ -1,12 +0,0 @@
# hyprlang noerror false
# You can put custom rules here
# Window/layer rules: https://wiki.hyprland.org/Configuring/Window-Rules/
# Workspace rules: https://wiki.hyprland.org/Configuring/Workspace-Rules/
# ######## Window rules ########
# Uncomment to apply global transparency to all windows:
# windowrule = opacity 0.89 override 0.89 override, match:class .*
# Disable blur for all xwayland apps
# windowrule = no_blur on, match:xwayland 1
+1
View File
@@ -0,0 +1 @@
-2
View File
@@ -1,2 +0,0 @@
# hyprlang noerror false
# For all available variables, see ~/.config/hypr/hyprland/variables.conf
+1
View File
@@ -0,0 +1 @@
+4 -4
View File
@@ -1,11 +1,11 @@
$lock_cmd = hyprctl dispatch global quickshell:lock & pidof qs quickshell hyprlock || hyprlock
$lock_cmd = hyprctl dispatch 'hl.dsp.global("quickshell:lock")' & pidof qs quickshell hyprlock || hyprlock
# $lock_cmd = pidof hyprlock || hyprlock
$suspend_cmd = systemctl suspend || loginctl suspend
general {
lock_cmd = $lock_cmd
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch global quickshell:lockFocus
after_sleep_cmd = hyprctl dispatch 'hl.dsp.global("quickshell:lockFocus")'
inhibit_sleep = 3
}
@@ -16,8 +16,8 @@ listener {
listener {
timeout = 600 # 10mins
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })'
on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
}
listener {
-49
View File
@@ -1,49 +0,0 @@
# This file sources other files in `hyprland` and `custom` folders
# You wanna add your stuff in files in `custom`
# --- Environment variables ---
source=hyprland/env.conf
# hyprlang noerror true
source=custom/env.conf
# hyprlang noerror false
# --- Other vars ---
source=hyprland/variables.conf
# hyprlang noerror true
source=custom/variables.conf
# hyprlang noerror false
# --- Defaults ---
# hyprlang if !dontLoadDefaultExecs
source=hyprland/execs.conf
# hyprlang endif
# hyprlang if !dontLoadDefaultGeneral
source=hyprland/general.conf
# hyprlang endif
# hyprlang if !dontLoadDefaultRules
source=hyprland/rules.conf
# hyprlang endif
# hyprlang if !dontLoadDefaultColors
source=hyprland/colors.conf
# hyprlang endif
# hyprlang if !dontLoadDefaultKeybinds
source=hyprland/keybinds.conf
# hyprlang endif
# --- Custom ---
# hyprlang noerror true
source=custom/execs.conf
# hyprlang noerror true
source=custom/general.conf
# hyprlang noerror true
source=custom/rules.conf
# hyprlang noerror true
source=custom/keybinds.conf
# hyprlang noerror false
# --- nwg-displays support ---
source=workspaces.conf
source=monitors.conf
# --- Shell overrides ---
source=hyprland/shellOverrides/main.conf
+44
View File
@@ -0,0 +1,44 @@
-- This file sources other files in `hyprland` and `custom` folders
-- You wanna add your stuff in files in `custom`
-- Internal stuff --
require("hyprland.lib")
require("hyprland.services")
-- Environment variables --
require("hyprland.env")
if is_file_exists(HOME .. "/.config/hypr/custom/env.lua") then
require("custom.env")
end
-- Default configurations --
require("hyprland.execs")
require("hyprland.general")
require("hyprland.rules")
require("hyprland.colors")
require("hyprland.keybinds")
-- Custom configurations --
if is_file_exists(HOME .. "/.config/hypr/custom/execs.lua") then
require("custom.execs")
end
if is_file_exists(HOME .. "/.config/hypr/custom/general.lua") then
require("custom.general")
end
if is_file_exists(HOME .. "/.config/hypr/custom/rules.lua") then
require("custom.rules")
end
if is_file_exists(HOME .. "/.config/hypr/custom/keybinds.lua") then
require("custom.keybinds")
end
-- nwg-displays support --
if is_file_exists(HOME .. "/.config/hypr/workspaces.lua") then
require("workspaces")
end
if is_file_exists(HOME .. "/.config/hypr/monitors.lua") then
require("monitors")
end
-- Shell overrides --
require("hyprland.shellOverrides.main")
-34
View File
@@ -1,34 +0,0 @@
# exec = export SLURP_ARGS='-d -c FFDAD4BB -b 673B3444 -s 00000000'
general {
col.active_border = rgba(F7DCDE39)
col.inactive_border = rgba(A58A8D30)
}
misc {
background_color = rgba(1D1011FF)
}
plugin {
hyprbars {
# Honestly idk if it works like css, but well, why not
bar_text_font = Google Sans Flex Medium, Rubik, Geist, AR One Sans, Reddit Sans, Inter, Roboto, Ubuntu, Noto Sans, sans-serif
bar_height = 30
bar_padding = 10
bar_button_padding = 5
bar_precedence_over_border = true
bar_part_of_window = true
bar_color = rgba(1D1011FF)
col.text = rgba(F7DCDEFF)
# example buttons (R -> L)
# hyprbars-button = color, size, on-click
hyprbars-button = rgb(F7DCDE), 13, 󰖭, hyprctl dispatch killactive
hyprbars-button = rgb(F7DCDE), 13, 󰖯, hyprctl dispatch fullscreen 1
hyprbars-button = rgb(F7DCDE), 13, 󰖰, hyprctl dispatch movetoworkspacesilent special
}
}
windowrule = border_color rgba(FFB2BCAA) rgba(FFB2BC77), match:pin 1
+16
View File
@@ -0,0 +1,16 @@
hl.config({
general = {
col = {
active_border = "rgba(44464f77)",
inactive_border = "rgba(1a1b2033)",
},
},
misc = {
background_color = "rgba(121318FF)",
},
})
hl.window_rule({ -- not sure how to syntax "pin 1"
match = { pin = 1 },
border_color = "rgba(afc6ffAA) rgba(afc6ff77)",
})
-13
View File
@@ -1,13 +0,0 @@
# ############ Wayland #############
env = ELECTRON_OZONE_PLATFORM_HINT,auto
######### Applications #########
env = XDG_DATA_DIRS,$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
# ############ Themes #############
env = QT_QPA_PLATFORM, wayland;xcb
env = QT_QPA_PLATFORMTHEME, kde
env = XDG_MENU_PREFIX, plasma-
# ######## Virtual envrionment #########
env = ILLOGICAL_IMPULSE_VIRTUAL_ENV, ~/.local/state/quickshell/.venv
+16
View File
@@ -0,0 +1,16 @@
local home_dir = os.getenv("HOME")
-- Wayland
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
-- Applications
local xdg_data_dirs_old = os.getenv("XDG_DATA_DIRS") or ""
hl.env("XDG_DATA_DIRS", home_dir .. "/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:" .. xdg_data_dirs_old)
-- Themes
hl.env("QT_QPA_PLATFORM", "wayland;xcb")
hl.env("QT_QPA_PLATFORMTHEME", "kde")
hl.env("XDG_MENU_PREFIX", "plasma-")
-- Virtual environment
hl.env("ILLOGICAL_IMPULSE_VIRTUAL_ENV", home_dir .. "/.local/state/quickshell/.venv")
-25
View File
@@ -1,25 +0,0 @@
# Bar, wallpaper
exec-once = ~/.config/hypr/hyprland/scripts/start_geoclue_agent.sh
exec-once = qs -c $qsConfig &
exec-once = ~/.config/hypr/custom/scripts/__restore_video_wallpaper.sh
# Core components (authentication, lock screen, notification daemon)
exec-once = gnome-keyring-daemon --start --components=secrets
exec-once = hypridle
exec-once = dbus-update-activation-environment --all
exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk
# Audio
exec-once = easyeffects --hide-window --service-mode
# Clipboard: history
# exec-once = wl-paste --watch cliphist store &
exec-once = wl-paste --type text --watch bash -c 'cliphist store && qs -c $qsConfig ipc call cliphistService update'
exec-once = wl-paste --type image --watch bash -c 'cliphist store && qs -c $qsConfig ipc call cliphistService update'
# Cursor
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
# Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200)
# This causes https://github.com/end-4/dots-hyprland/issues/2427
# exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml
+25
View File
@@ -0,0 +1,25 @@
-- put former exec-once commands inside the func and former exec commands outside
hl.on("hyprland.start", function ()
-- Bar, wallpaper
hl.exec_cmd("$HOME/.config/hypr/hyprland/scripts/start_geoclue_agent.sh")
hl.exec_cmd("qs -c $qsConfig")
hl.exec_cmd("$HOME/.config/hypr/custom/scripts/__restore_video_wallpaper.sh")
-- Core components (authentication, lock screen, notification daemon)
hl.exec_cmd("gnome-keyring-daemon --start --components=secrets")
hl.exec_cmd("hypridle")
hl.exec_cmd("dbus-update-activation-environment --all")
hl.exec_cmd("sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") -- Some fix idk
-- Audio
hl.exec_cmd("easyeffects --hide-window --service-mode")
-- Clipboard: history
--hl.exec_cmd("wl-paste --watch cliphist store")
hl.exec_cmd("wl-paste --type text --watch bash -c 'cliphist store && qs -c $qsConfig ipc call cliphistService update'")
hl.exec_cmd("wl-paste --type image --watch bash -c 'cliphist store && qs -c $qsConfig ipc call cliphistService update'")
-- Cursor
hl.exec_cmd("hyprctl setcursor Bibata-Modern-Classic 24")
end)
-171
View File
@@ -1,171 +0,0 @@
# MONITOR CONFIG
monitor=,preferred,auto,1
gesture = 3, swipe, move,
gesture = 3, pinch, float
gesture = 4, horizontal, workspace
gesture = 4, up, dispatcher, global, quickshell:overviewWorkspacesToggle
gesture = 4, down, dispatcher, global, quickshell:overviewWorkspacesClose
gestures {
workspace_swipe_distance = 700
workspace_swipe_cancel_ratio = 0.2
workspace_swipe_min_speed_to_force = 5
workspace_swipe_direction_lock = true
workspace_swipe_direction_lock_threshold = 10
workspace_swipe_create_new = true
}
general {
# Gaps and border
gaps_in = 4
gaps_out = 5
gaps_workspaces = 50
border_size = 1
col.active_border = rgba(0DB7D455)
col.inactive_border = rgba(31313600)
resize_on_border = true
no_focus_fallback = true
allow_tearing = true # This just allows the `immediate` window rule to work
snap {
enabled = true
window_gap = 4
monitor_gap = 5
respect_gaps = true
}
}
dwindle {
preserve_split = true
smart_split = false
smart_resizing = false
# precise_mouse_move = true
}
decoration {
# 2 = circle, higher = squircle, 4 = very obvious squircle
# Clear squircles look really off; we use only extra .4 here to make the rounding feel more continuous
rounding_power = 2
rounding = 18
blur {
enabled = true
xray = true
special = false
new_optimizations = true
size = 10
passes = 3
brightness = 1
noise = 0.05
contrast = 0.89
vibrancy = 0.5
vibrancy_darkness = 0.5
popups = false
popups_ignorealpha = 0.6
input_methods = true
input_methods_ignorealpha = 0.8
}
shadow {
enabled = true
ignore_window = true
range = 20
offset = 0 2
render_power = 10
color = rgba(00000020)
}
# Dim
dim_inactive = true
dim_strength = 0.05
dim_special = 0.2
}
animations {
enabled = true
# Curves
bezier = expressiveFastSpatial, 0.42, 1.67, 0.21, 0.90
bezier = expressiveSlowSpatial, 0.39, 1.29, 0.35, 0.98
bezier = expressiveDefaultSpatial, 0.38, 1.21, 0.22, 1.00
bezier = emphasizedDecel, 0.05, 0.7, 0.1, 1
bezier = emphasizedAccel, 0.3, 0, 0.8, 0.15
bezier = standardDecel, 0, 0, 0, 1
bezier = menu_decel, 0.1, 1, 0, 1
bezier = menu_accel, 0.52, 0.03, 0.72, 0.08
bezier = stall, 1, -0.1, 0.7, 0.85
# Configs
# windows
animation = windowsIn, 1, 3, emphasizedDecel, popin 80%
animation = fadeIn, 1, 3, emphasizedDecel
animation = windowsOut, 1, 2, emphasizedDecel, popin 90%
animation = fadeOut, 1, 2, emphasizedDecel
animation = windowsMove, 1, 3, emphasizedDecel, slide
animation = border, 1, 10, emphasizedDecel
# layers
animation = layersIn, 1, 2.7, emphasizedDecel, popin 93%
animation = layersOut, 1, 2.4, menu_accel, popin 94%
# fade
animation = fadeLayersIn, 1, 0.5, menu_decel
animation = fadeLayersOut, 1, 2.7, stall
# workspaces
animation = workspaces, 1, 7, menu_decel, slide
## specialWorkspace
animation = specialWorkspaceIn, 1, 2.8, emphasizedDecel, slidevert
animation = specialWorkspaceOut, 1, 1.2, emphasizedAccel, slidevert
# zoom
animation = zoomFactor, 1, 3, standardDecel
}
input {
kb_layout = us
numlock_by_default = true
repeat_delay = 250
repeat_rate = 35
follow_mouse = 1
off_window_axis_events = 2
touchpad {
natural_scroll = yes
disable_while_typing = true
clickfinger_behavior = true
scroll_factor = 0.7
}
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
vfr = 1
vrr = 0
mouse_move_enables_dpms = true
key_press_enables_dpms = true
animate_manual_resizes = false
animate_mouse_windowdragging = false
enable_swallow = false
swallow_regex = (foot|kitty|allacritty|Alacritty)
on_focus_under_fullscreen = 2
allow_session_lock_restore = true
session_lock_xray = true
initial_workspace_tracking = false
focus_on_activate = true
}
binds {
scroll_event_delay = 0
hide_special_on_workspace_change = true
}
cursor {
zoom_factor = 1
zoom_rigid = false
zoom_disable_aa = true
hotspot_padding = 1
}
xwayland {
force_zero_scaling = true
}
+305
View File
@@ -0,0 +1,305 @@
-- MONITOR CONFIG
hl.monitor({
output = "",
mode = "preferred",
position = "auto",
scale = 1
})
hl.gesture({
fingers = 3,
direction = "swipe",
action = "move"
})
hl.gesture({
fingers = 3,
direction = "pinch",
action = "fullscreen"
})
hl.gesture({
fingers = 4,
direction = "horizontal",
action = "workspace"
})
hl.gesture({
fingers = 4,
direction = "up",
action = function()
hl.dispatch(hl.dsp.global("quickshell:overviewWorkspacesToggle"))
end
})
hl.gesture({
fingers = 4,
direction = "down",
action = function()
hl.dispatch(hl.dsp.global("quickshell:overviewWorkspacesToggle"))
end
})
hl.config({
gestures = {
workspace_swipe_distance = 700,
workspace_swipe_cancel_ratio = 0.2,
workspace_swipe_min_speed_to_force = 5,
workspace_swipe_direction_lock = true,
workspace_swipe_direction_lock_threshold = 10,
workspace_swipe_create_new = true
},
general = {
-- Gaps and border
gaps_in = 4,
gaps_out = 5,
gaps_workspaces = 50,
border_size = 1,
col = {
active_border = "rgba(0DB7D455)",
inactive_border = "rgba(31313600)"
},
resize_on_border = true,
no_focus_fallback = true,
allow_tearing = true, -- This just allows the `immediate` window rule to work
snap = {
enabled = true,
window_gap = 4,
monitor_gap = 5,
respect_gaps = true
}
},
decoration = {
-- 2 = circle, higher = squircle, 4 = very obvious squircle
-- Fuck clearly visible squircles. 100% Apple brainrot.
rounding_power = 2.5,
rounding = 18,
blur = {
enabled = true,
xray = true,
special = false,
new_optimizations = true,
size = 10,
passes = 3,
brightness = 1,
noise = 0.05,
contrast = 0.89,
vibrancy = 0.5,
vibrancy_darkness = 0.5,
popups = false,
popups_ignorealpha = 0.6,
input_methods = true,
input_methods_ignorealpha = 0.8
},
shadow = {
enabled = true,
range = 20,
offset = {0, 2},
render_power = 10,
color = "rgba(00000020)"
},
-- Dim
dim_inactive = true,
dim_strength = 0.05,
dim_special = 0.2
},
animations = {
enabled = true
},
dwindle = {
preserve_split = true,
smart_split = false,
smart_resizing = false
-- precise_mouse_move = true,
},
})
-- Curves
hl.curve("expressiveFastSpatial", {
type = "bezier",
points = {{0.42, 1.67}, {0.21, 0.90}}
})
hl.curve("expressiveSlowSpatial", {
type = "bezier",
points = {{0.39, 1.29}, {0.35, 0.98}}
})
hl.curve("expressiveDefaultSpatial", {
type = "bezier",
points = {{0.38, 1.21}, {0.22, 1.00}}
})
hl.curve("emphasizedDecel", {
type = "bezier",
points = {{0.05, 0.7}, {0.1, 1}}
})
hl.curve("emphasizedAccel", {
type = "bezier",
points = {{0.3, 0}, {0.8, 0.15}}
})
hl.curve("standardDecel", {
type = "bezier",
points = {{0, 0}, {0, 1}}
})
hl.curve("menu_decel", {
type = "bezier",
points = {{0.1, 1}, {0, 1}}
})
hl.curve("menu_accel", {
type = "bezier",
points = {{0.52, 0.03}, {0.72, 0.08}}
})
hl.curve("stall", {
type = "bezier",
points = {{1, -0.1}, {0.7, 0.85}}
})
-- Configs
-- windows
hl.animation({
leaf = "windowsIn",
enabled = true,
speed = 3,
bezier = "emphasizedDecel",
style = "popin 80%"
})
hl.animation({
leaf = "fadeIn",
enabled = true,
speed = 3,
bezier = "emphasizedDecel"
})
hl.animation({
leaf = "windowsOut",
enabled = true,
speed = 2,
bezier = "emphasizedDecel",
style = "popin 90%"
})
hl.animation({
leaf = "fadeOut",
enabled = true,
speed = 2,
bezier = "emphasizedDecel"
})
hl.animation({
leaf = "windowsMove",
enabled = true,
speed = 3,
bezier = "emphasizedDecel",
style = "slide"
})
hl.animation({
leaf = "border",
enabled = true,
speed = 10,
bezier = "emphasizedDecel"
})
-- layers
hl.animation({
leaf = "layersIn",
enabled = true,
speed = 2.7,
bezier = "emphasizedDecel",
style = "popin 93%"
})
hl.animation({
leaf = "layersOut",
enabled = true,
speed = 2.4,
bezier = "menu_accel",
style = "popin 94%"
})
-- fade
hl.animation({
leaf = "fadeLayersIn",
enabled = true,
speed = 0.5,
bezier = "menu_decel"
})
hl.animation({
leaf = "fadeLayersOut",
enabled = true,
speed = 2.7,
bezier = "stall"
})
-- workspaces
hl.animation({
leaf = "workspaces",
enabled = true,
speed = 7,
bezier = "menu_decel",
style = "slide"
})
-- specialWorkspace
hl.animation({
leaf = "specialWorkspaceIn",
enabled = true,
speed = 2.8,
bezier = "emphasizedDecel",
style = "slidevert"
})
hl.animation({
leaf = "specialWorkspaceOut",
enabled = true,
speed = 1.2,
bezier = "emphasizedAccel",
style = "slidevert"
})
-- zoom
hl.animation({
leaf = "zoomFactor",
enabled = true,
speed = 3,
bezier = "standardDecel"
})
hl.config({
input = {
kb_layout = "us",
numlock_by_default = true,
repeat_delay = 250,
repeat_rate = 35,
follow_mouse = 1,
off_window_axis_events = 2,
touchpad = {
natural_scroll = true,
disable_while_typing = true,
clickfinger_behavior = true,
scroll_factor = 0.7
}
},
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true,
vrr = 0,
mouse_move_enables_dpms = true,
key_press_enables_dpms = true,
animate_manual_resizes = false,
animate_mouse_windowdragging = false,
enable_swallow = false,
swallow_regex = "(foot|kitty|allacritty|Alacritty)",
on_focus_under_fullscreen = 2,
allow_session_lock_restore = true,
session_lock_xray = true,
initial_workspace_tracking = false,
focus_on_activate = true
},
binds = {
scroll_event_delay = 0,
hide_special_on_workspace_change = true
},
cursor = {
zoom_factor = 1,
zoom_rigid = false,
zoom_disable_aa = true,
hotspot_padding = 1
},
xwayland = {
force_zero_scaling = true
}
})
-272
View File
@@ -1,272 +0,0 @@
# Lines ending with `# [hidden]` won't be shown on cheatsheet
# Lines starting with #! are section headings
# DO NOT REMOVE THIS EXEC OR YOU WON'T BE ABLE TO USE ANY KEYBIND
exec = hyprctl dispatch submap global
# This is required for catchall to work
submap = global
#!
##! Shell
# These absolutely need to be on top, or they won't work consistently
bindid = Super, Super_L, Toggle search, global, quickshell:searchToggleRelease # Toggle search
bindid = Super, Super_R, Toggle search, global, quickshell:searchToggleRelease # [hidden] Toggle search
bind = Super, Super_L, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || fuzzel # [hidden] Launcher (fallback)
bind = Super, Super_R, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || fuzzel # [hidden] Launcher (fallback)
binditn = Super, catchall, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Ctrl, Super_L, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Ctrl, Super_R, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse:272, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse:273, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse:274, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse:275, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse:276, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse:277, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse_up, global, quickshell:searchToggleReleaseInterrupt # [hidden]
bind = Super, mouse_down,global, quickshell:searchToggleReleaseInterrupt # [hidden]
bindit = ,Super_L, global, quickshell:workspaceNumber # [hidden]
bindit = ,Super_R, global, quickshell:workspaceNumber # [hidden]
bind = Super, Tab, global, quickshell:overviewWorkspacesToggle # Toggle overview
bindd = Super, V, Clipboard history >> clipboard, global, quickshell:overviewClipboardToggle # Clipboard history >> clipboard
bindd = Super, Period, Emoji >> clipboard, global, quickshell:overviewEmojiToggle # Emoji >> clipboard
bind = Super, A, global, quickshell:sidebarLeftToggle # Toggle left sidebar
bind = Super+Alt, A, global, quickshell:sidebarLeftToggleDetach # [hidden]
bind = Super, B, global, quickshell:sidebarLeftToggle # [hidden]
bind = Super, O, global, quickshell:sidebarLeftToggle # [hidden]
bindd = Super, N, Toggle right sidebar, global, quickshell:sidebarRightToggle # Toggle right sidebar
bindd = Super, Slash, Toggle cheatsheet, global, quickshell:cheatsheetToggle # Toggle cheatsheet
bindd = Super, K, Toggle on-screen keyboard, global, quickshell:oskToggle # Toggle on-screen keyboard
bindd = Super, M, Toggle media controls, global, quickshell:mediaControlsToggle # Toggle media controls
bind = Super, G, global, quickshell:overlayToggle # Toggle overlay
bindd = Ctrl+Alt, Delete, Toggle session menu, global, quickshell:sessionToggle # Toggle session menu
bindd = Super, J, Toggle bar, global, quickshell:barToggle # Toggle bar
bind = Ctrl+Alt, Delete, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill wlogout || wlogout -p layer-shell # [hidden] Session menu (fallback)
bind = Shift+Super+Alt, Slash, exec, qs -p ~/.config/quickshell/$qsConfig/welcome.qml # [hidden] Launch welcome app
bindle=, XF86MonBrightnessUp, exec, qs -c $qsConfig ipc call brightness increment || brightnessctl s 5%+ # [hidden]
bindle=, XF86MonBrightnessDown, exec, qs -c $qsConfig ipc call brightness decrement || brightnessctl s 5%- # [hidden]
bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ -l 1.5# [hidden]
bindle=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- # [hidden]
bindl = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle # [hidden]
bindld = Super+Shift,M, Toggle mute, exec, wpctl set-mute @DEFAULT_SINK@ toggle # [hidden]
bindl = Alt ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden]
bindl = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden]
bindld = Super+Alt,M, Toggle mic, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden]
bindd = Ctrl+Super, T, Toggle wallpaper selector, global, quickshell:wallpaperSelectorToggle # Wallpaper selector
bindd = Ctrl+Super+Alt, T, Select random wallpaper, global, quickshell:wallpaperSelectorRandom # Random wallpaper
bindd = Ctrl+Super, T, Change wallpaper, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/colors/switchwall.sh # [hidden] Change wallpaper (fallback)
bind = Ctrl+Super, R, exec, killall ydotool qs quickshell; qs -c $qsConfig & # Restart widgets
bind = Ctrl+Super, P, global, quickshell:panelFamilyCycle # Cycle panel family
##! Utilities
# Screenshot, Record, OCR, Color picker, Clipboard history
bindd = Super, V, Copy clipboard history entry, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || cliphist list | fuzzel --match-mode fzf --dmenu | cliphist decode | wl-copy # [hidden] Clipboard history >> clipboard (fallback)
bindd = Super, Period, Copy an emoji, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || ~/.config/hypr/hyprland/scripts/fuzzel-emoji.sh copy # [hidden] Emoji >> clipboard (fallback)
bind = Super+Shift, S, global, quickshell:regionScreenshot # Screen snip
bind = Super+Shift, S, exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || hyprshot --freeze --clipboard-only --mode region --silent # [hidden] Screen snip (fallback)
bind = Super+Shift, A, global, quickshell:regionSearch # Google Lens
bind = Super+Shift, A, exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || ~/.config/hypr/hyprland/scripts/snip_to_search.sh # [hidden] Google Lens (fallback)
# OCR
bind = Super+Shift, X, global, quickshell:regionOcr # Character recognition >> clipboard
bind = Super+Shift, T, global, quickshell:screenTranslate # Translate screen content
bind = Super+Shift, X,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\\n' '+' | sed 's/\\+$/\\n/') | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
# Color picker
bindd = Super+Shift, C, Color picker, exec, hyprpicker -a # Pick color (Hex) >> clipboard
# Recording stuff
bindl = Super+Shift, R, global, quickshell:regionRecord # Record region (no sound)
bindl = Super+Shift, R, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/videos/record.sh # [hidden] Record region (no sound) (fallback)
bindl = Super+Alt, R, global, quickshell:regionRecord # [hidden] Record region (no sound)
bindl = Super+Alt, R, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/videos/record.sh # [hidden] Record region (no sound) (fallback)
bindl = Ctrl+Alt, R, exec, ~/.config/quickshell/$qsConfig/scripts/videos/record.sh --fullscreen # [hidden] Record screen (no sound)
bindl = Super+Shift+Alt, R, exec, ~/.config/quickshell/$qsConfig/scripts/videos/record.sh --fullscreen --sound # Record screen (with sound)
# Fullscreen screenshot
bindl = ,Print,exec,grim -o "$(hyprctl activeworkspace -j | jq -r '.monitor')" - | wl-copy # Screenshot >> clipboard
bindln = Ctrl,Print, exec, mkdir -p $(xdg-user-dir PICTURES)/Screenshots && grim -o "$(hyprctl activeworkspace -j | jq -r '.monitor')" $(xdg-user-dir PICTURES)/Screenshots/Screenshot_"$(date '+%Y-%m-%d_%H.%M.%S')".png # Screenshot >> clipboard & file
bindln = Ctrl,Print,exec,grim -o "$(hyprctl activeworkspace -j | jq -r '.monitor')" - | wl-copy # [hidden] Screenshot >> clipboard & file (clipboard)
# AI
bindd = Super+Shift+Alt, mouse:273, Generate AI summary for selected text, exec, ~/.config/hypr/hyprland/scripts/ai/primary-buffer-query.sh # [hidden] AI summary for selected text (requires a running ollama model)
#!
##! Window
# Focusing
bindm = Super, mouse:272, movewindow # Move
bindm = Super, mouse:274, movewindow # [hidden]
bindm = Super, mouse:273, resizewindow # Resize
#/# bind = Super, ←/↑/→/↓,, # Focus in direction
bind = Super, Left, movefocus, l # [hidden]
bind = Super, Right, movefocus, r # [hidden]
bind = Super, Up, movefocus, u # [hidden]
bind = Super, Down, movefocus, d # [hidden]
bind = Super, BracketLeft, movefocus, l # [hidden]
bind = Super, BracketRight, movefocus, r # [hidden]
#/# bind = Super+Shift, ←/↑/→/↓,, # Move in direction
bind = Super+Shift, Left, movewindow, l # [hidden]
bind = Super+Shift, Right, movewindow, r # [hidden]
bind = Super+Shift, Up, movewindow, u # [hidden]
bind = Super+Shift, Down, movewindow, d # [hidden]
bind = Alt, F4, killactive, # [hidden] Close (Windows)
bind = Super, Q, killactive, # Close
bind = Super+Shift+Alt, Q, exec, hyprctl kill # Forcefully zap a window
# Window split ratio
#/# binde = Super, ;/',, # Adjust split ratio
binde = Super, Semicolon, layoutmsg, splitratio -0.1 # [hidden]
binde = Super, Apostrophe, layoutmsg, splitratio +0.1 # [hidden]
# Positioning mode
bind = Super+Alt, Space, togglefloating, # Float/Tile
bind = Super, D, fullscreen, 1 # Maximize
bind = Super, F, fullscreen, 0 # Fullscreen
bind = Super+Alt, F, fullscreenstate, 0 3 # Fullscreen spoof
bind = Super, P, pin # Pin
#/# bind = Super+Alt, Hash,, # Send to workspace # (1, 2, 3,...)
# We use raw keycodes because some keyboard layouts register number keys as different chars. The codes can be verified with `wev`
bind = Super+Alt, code:10, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 1 # [hidden]
bind = Super+Alt, code:11, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 2 # [hidden]
bind = Super+Alt, code:12, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 3 # [hidden]
bind = Super+Alt, code:13, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 4 # [hidden]
bind = Super+Alt, code:14, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 5 # [hidden]
bind = Super+Alt, code:15, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 6 # [hidden]
bind = Super+Alt, code:16, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 7 # [hidden]
bind = Super+Alt, code:17, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 8 # [hidden]
bind = Super+Alt, code:18, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 9 # [hidden]
bind = Super+Alt, code:19, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 10 # [hidden]
# keypad numbers
bind = Super+Alt, code:87, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 1 # [hidden]
bind = Super+Alt, code:88, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 2 # [hidden]
bind = Super+Alt, code:89, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 3 # [hidden]
bind = Super+Alt, code:83, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 4 # [hidden]
bind = Super+Alt, code:84, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 5 # [hidden]
bind = Super+Alt, code:85, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 6 # [hidden]
bind = Super+Alt, code:79, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 7 # [hidden]
bind = Super+Alt, code:80, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 8 # [hidden]
bind = Super+Alt, code:81, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 9 # [hidden]
bind = Super+Alt, code:90, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 10 # [hidden]
# #/# bind = Super+Shift, Scroll ↑/↓,, # Send to workspace left/right
bind = Super+Shift, mouse_down, movetoworkspace, r-1 # [hidden]
bind = Super+Shift, mouse_up, movetoworkspace, r+1 # [hidden]
bind = Super+Alt, mouse_down, movetoworkspace, -1 # [hidden]
bind = Super+Alt, mouse_up, movetoworkspace, +1 # [hidden]
#/# bind = Super+Shift, Page_↑/↓,, # Send to workspace left/right
bind = Super+Alt, Page_Down, movetoworkspace, +1 # [hidden]
bind = Super+Alt, Page_Up, movetoworkspace, -1 # [hidden]
bind = Super+Shift, Page_Down, movetoworkspace, r+1 # [hidden]
bind = Super+Shift, Page_Up, movetoworkspace, r-1 # [hidden]
bind = Ctrl+Super+Shift, Right, movetoworkspace, r+1 # [hidden]
bind = Ctrl+Super+Shift, Left, movetoworkspace, r-1 # [hidden]
bind = Super+Alt, S, movetoworkspacesilent, special # Send to scratchpad
bind = Ctrl+Super, S, togglespecialworkspace, # [hidden]
##! Workspace
# Switching
#/# bind = Super, Hash,, # Focus workspace # (1, 2, 3,...)
# We use raw keycodes because some keyboard layouts register number keys as different chars. The codes can be verified with `wev`
bind = Super, code:10, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 1 # [hidden]
bind = Super, code:11, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 2 # [hidden]
bind = Super, code:12, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 3 # [hidden]
bind = Super, code:13, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 4 # [hidden]
bind = Super, code:14, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 5 # [hidden]
bind = Super, code:15, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 6 # [hidden]
bind = Super, code:16, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 7 # [hidden]
bind = Super, code:17, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 8 # [hidden]
bind = Super, code:18, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 9 # [hidden]
bind = Super, code:19, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 10 # [hidden]
# keypad numbers
bindp = Super, code:87, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 1 # [hidden]
bindp = Super, code:88, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 2 # [hidden]
bindp = Super, code:89, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 3 # [hidden]
bindp = Super, code:83, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 4 # [hidden]
bindp = Super, code:84, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 5 # [hidden]
bindp = Super, code:85, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 6 # [hidden]
bindp = Super, code:79, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 7 # [hidden]
bindp = Super, code:80, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 8 # [hidden]
bindp = Super, code:81, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 9 # [hidden]
bindp = Super, code:90, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 10 # [hidden]
#/# bind = Ctrl+Super, ←/→,, # Focus left/right
bind = Ctrl+Super, Right, workspace, r+1 # [hidden]
bind = Ctrl+Super, Left, workspace, r-1 # [hidden]
#/# bind = Ctrl+Super+Alt, ←/→,, # [hidden] Focus busy left/right
bind = Ctrl+Super+Alt, Right, workspace, m+1 # [hidden]
bind = Ctrl+Super+Alt, Left, workspace, m-1 # [hidden]
#/# bind = Super, Page_↑/↓,, # Focus left/right
bind = Super, Page_Down, workspace, +1 # [hidden]
bind = Super, Page_Up, workspace, -1 # [hidden]
bind = Ctrl+Super, Page_Down, workspace, r+1 # [hidden]
bind = Ctrl+Super, Page_Up, workspace, r-1 # [hidden]
#/# bind = Super, Scroll ↑/↓,, # Focus left/right
bind = Super, mouse_up, workspace, +1 # [hidden]
bind = Super, mouse_down, workspace, -1 # [hidden]
bind = Ctrl+Super, mouse_up, workspace, r+1 # [hidden]
bind = Ctrl+Super, mouse_down, workspace, r-1 # [hidden]
## Special
bind = Super, S, togglespecialworkspace, # Toggle scratchpad
bind = Super, mouse:275, togglespecialworkspace, # [hidden]
bind = Ctrl+Super, BracketLeft, workspace, -1 # [hidden]
bind = Ctrl+Super, BracketRight, workspace, +1 # [hidden]
bind = Ctrl+Super, Up, workspace, r-5 # [hidden]
bind = Ctrl+Super, Down, workspace, r+5 # [hidden]
##! Virtual machines
bind = Super+Alt, F1, exec, notify-send 'Entered Virtual Machine submap' 'Keybinds disabled. Hit Super+Alt+F1 to escape' -a 'Hyprland' && hyprctl dispatch submap virtual-machine # Disable keybinds
submap = virtual-machine
bind = Super+Alt, F1, exec, notify-send 'Exited Virtual Machine submap' 'Keybinds re-enabled' -a 'Hyprland' && hyprctl dispatch submap global # [hidden]
submap = global
#!
# Testing
bind = Super+Alt, f11, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i "nipple" | grep -v -i "pussy" | shuf -n 1); ACTION=$(notify-send "Test notification with body image" "This notification should contain your user account <b>image</b> and <a href=\"https://discord.com/app\">Discord</a> <b>icon</b>. Oh and here is a random image in your Pictures folder: <img src=\"$RANDOM_IMAGE\" alt=\"Testing image\"/>" -a "Hyprland keybind" -p -h "string:image-path:/var/lib/AccountsService/icons/$USER" -t 6000 -i "discord" -A "openImage=Profile image" -A "action2=Open the random image" -A "action3=Useless button"); [[ $ACTION == *openImage ]] && xdg-open "/var/lib/AccountsService/icons/$USER"; [[ $ACTION == *action2 ]] && xdg-open \"$RANDOM_IMAGE\"' # [hidden]
bind = Super+Alt, f12, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i "nipple" | grep -v -i "pussy" | shuf -n 1); ACTION=$(notify-send "Test notification" "This notification should contain a random image in your <b>Pictures</b> folder and <a href=\"https://discord.com/app\">Discord</a> <b>icon</b>.\n<i>Flick right to dismiss!</i>" -a "Discord (fake)" -p -h "string:image-path:$RANDOM_IMAGE" -t 6000 -i "discord" -A "openImage=Profile image" -A "action2=Useless button"); [[ $ACTION == *openImage ]] && xdg-open "/var/lib/AccountsService/icons/$USER"' # [hidden]
bind = Super+Alt, Equal, exec, notify-send "Urgent notification" "Ah hell no" -u critical -a 'Hyprland keybind' # [hidden]
##! Session
bindd = Super, L, Lock, exec, loginctl lock-session # Lock
bindld = Super+Shift, L, Suspend system, exec, systemctl suspend || loginctl suspend # Sleep
# bindl=,switch:on:Lid Switch, exec, systemctl suspend || loginctl suspend # [hidden] Suspend when laptop lid is closed, uncomment if for whatever reason it's not the default behavior
bindd = Ctrl+Shift+Alt+Super, Delete, Shutdown, exec, systemctl poweroff || loginctl poweroff # [hidden] Power off
##! Screen
# Zoom
binde = Super, Minus, exec, ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.3 # Zoom out
binde = Super, Equal, exec, ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.3 # Zoom in
# Zoom with keypad
binde = Super, code:82, exec, qs -c $qsConfig ipc call zoom zoomOut # [hidden] Zoom out
binde = Super, code:86, exec, qs -c $qsConfig ipc call zoom zoomIn # [hidden] Zoom in
binde = Super, code:82, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # [hidden] Zoom out
binde = Super, code:86, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # [hidden] Zoom in
##! Media
bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # Next track
bindl= ,XF86AudioNext, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # [hidden]
bindl= ,XF86AudioPrev, exec, playerctl previous # [hidden]
bind = Super+Shift+Alt, mouse:275, exec, playerctl previous # [hidden]
bind = Super+Shift+Alt, mouse:276, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # [hidden]
bindl= Super+Shift, B, exec, playerctl previous # Previous track
bindl= Super+Shift, P, exec, playerctl play-pause # Play/pause media
bindl= ,XF86AudioPlay, exec, playerctl play-pause # [hidden]
bindl= ,XF86AudioPause, exec, playerctl play-pause # [hidden]
##! Apps
bind = Super, Return, exec, $terminal # Terminal
bind = Super, T, exec, $terminal # [hidden] (terminal) (alt)
bind = Ctrl+Alt, T, exec, $terminal # [hidden] (terminal) (for Ubuntu people)
bind = Super, E, exec, $fileManager # File manager
bind = Super, W, exec, $browser # Browser
bind = Super, C, exec, $codeEditor # Code editor
bind = Ctrl+Super+Shift+Alt, W, exec, $officeSoftware # Office software
bind = Super, X, exec, $textEditor # Text editor
bind = Ctrl+Super, V, exec, $volumeMixer # Volume mixer
bind = Super, I, exec, $settingsApp # Settings app
bind = Ctrl+Shift, Escape, exec, $taskManager # Task manager
# Cursed stuff
## Make window not amogus large
bind = Ctrl+Super, Backslash, resizeactive, exact 640 480 # [hidden]
+359
View File
@@ -0,0 +1,359 @@
require("hyprland.lib")
require("hyprland.variables")
if is_file_exists(HOME .. "/.config/hypr/custom/variables.lua") then
require("custom.variables")
end
local qsScripts = "$HOME/.config/quickshell/$qsConfig/scripts"
local hyprScripts = "$HOME/.config/hypr/hyprland/scripts"
local qsIpcCall = "qs -c $qsConfig ipc call"
local qsIsAlive = qsIpcCall .. " TEST_ALIVE"
hl.bind("SUPER + SUPER_L", hl.dsp.global("quickshell:searchToggleRelease"), { description = "Shell: Toggle search" })
hl.bind("SUPER + SUPER_R", hl.dsp.global("quickshell:searchToggleRelease"))
hl.bind("SUPER + SUPER_L", hl.dsp.exec_cmd(qsIsAlive .. " || pkill fuzzel || fuzzel"))
hl.bind("SUPER + SUPER_R", hl.dsp.exec_cmd(qsIsAlive .. " || pkill fuzzel || fuzzel"))
hl.bind("SUPER_L", hl.dsp.global("quickshell:workspaceNumber"), { ignore_mods = true, transparent = true })
hl.bind("SUPER_R", hl.dsp.global("quickshell:workspaceNumber"), { ignore_mods = true, transparent = true })
hl.bind("SUPER_L", hl.dsp.global("quickshell:workspaceNumber"),
{ ignore_mods = true, transparent = true, release = true })
hl.bind("SUPER_R", hl.dsp.global("quickshell:workspaceNumber"),
{ ignore_mods = true, transparent = true, release = true })
hl.bind("SUPER + Tab", hl.dsp.global("quickshell:overviewWorkspacesToggle"), { description = "Shell: Toggle overview" })
hl.bind("SUPER + V", hl.dsp.global("quickshell:overviewClipboardToggle"))
hl.bind("SUPER + Period", hl.dsp.global("quickshell:overviewEmojiToggle"))
hl.bind("SUPER + A", hl.dsp.global("quickshell:sidebarLeftToggle"), { description = "Shell: Toggle left sidebar" })
hl.bind("SUPER + ALT + A", hl.dsp.global("quickshell:sidebarLeftToggleDetach"))
hl.bind("SUPER + B", hl.dsp.global("quickshell:sidebarLeftToggle"))
hl.bind("SUPER + O", hl.dsp.global("quickshell:sidebarLeftToggle"))
hl.bind("SUPER + N", hl.dsp.global("quickshell:sidebarRightToggle"), { description = "Shell: Toggle right sidebar" })
hl.bind("SUPER + Slash", hl.dsp.global("quickshell:cheatsheetToggle"), { description = "Shell: Toggle cheatsheet" })
hl.bind("SUPER + K", hl.dsp.global("quickshell:oskToggle"), { description = "Shell: Toggle on-screen keyboard" })
hl.bind("SUPER + M", hl.dsp.global("quickshell:mediaControlsToggle"), { description = "Shell: Toggle media controls" })
hl.bind("SUPER + G", hl.dsp.global("quickshell:overlayToggle"), { description = "Shell: Toggle widget overlay" })
hl.bind("CTRL + ALT + Delete", hl.dsp.global("quickshell:sessionToggle"), { description = "Shell: Toggle session menu" })
hl.bind("SUPER + J", hl.dsp.global("quickshell:barToggle"), { description = "Shell: Toggle bar" })
hl.bind("CTRL + ALT + Delete", hl.dsp.exec_cmd(qsIsAlive .. " || pkill wlogout || wlogout -p layer-shell"))
hl.bind("SHIFT + SUPER + ALT + Slash", hl.dsp.exec_cmd("qs -p $HOME/.config/quickshell/$qsConfig/welcome.qml"))
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd(qsIpcCall .. " brightness increment || brightnessctl s 5%+"),
{ locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd(qsIpcCall .. " brightness decrement || brightnessctl s 5%-"),
{ locked = true, repeating = true })
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ -l 1.5"),
{ locked = true, repeating = true })
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"),
{ locked = true, repeating = true })
hl.bind("CTRL + SUPER + T", hl.dsp.global("quickshell:wallpaperSelectorToggle"),
{ description = "Shell: Change wallpaper" })
hl.bind("CTRL + SUPER + ALT + T", hl.dsp.global("quickshell:wallpaperSelectorRandom"),
{ description = "Shell: Random wallpaper" })
hl.bind("CTRL + SUPER + SHIFT + D", hl.dsp.global("quickshell:toggleLightDark"),
{ description = "Shell: Toggle light/dark mode" })
hl.bind("CTRL + SUPER + T", hl.dsp.exec_cmd(qsIsAlive .. " || " .. qsScripts .. "/colors/switchwall.sh"))
hl.bind("CTRL + SUPER + R", hl.dsp.exec_cmd("killall ydotool qs quickshell; qs -c $qsConfig &"),
{ description = "Shell: Restart widgets" })
hl.bind("CTRL + SUPER + P", hl.dsp.global("quickshell:panelFamilyCycle"), { description = "Shell: Cycle panel family" })
--##! Utilities
--# Screenshot, Record, OCR, Color picker, Clipboard history
hl.bind("SUPER + V", hl.dsp.exec_cmd(
qsIsAlive .. " || pkill fuzzel || cliphist list | fuzzel --match-mode fzf --dmenu | cliphist decode | wl-copy"),
{ description = "Utilities: Clipboard history >> clipboard" })
hl.bind("SUPER + Period", hl.dsp.exec_cmd(
qsIsAlive .. " || pkill fuzzel || " .. hyprScripts .. "/fuzzel-emoji.sh copy"),
{ description = "Utilities: Emoji >> clipboard" })
hl.bind("SUPER + SHIFT + S", hl.dsp.global("quickshell:regionScreenshot"), { description = "Utilities: Screen snip" })
hl.bind("SUPER + SHIFT + S",
hl.dsp.exec_cmd(qsIsAlive .. " || pidof slurp || hyprshot --freeze --clipboard-only --mode region --silent"))
hl.bind("SUPER + SHIFT + A", hl.dsp.global("quickshell:regionSearch"), { description = "Utilities: Google Lens" })
hl.bind("SUPER + SHIFT + A", hl.dsp.exec_cmd(qsIsAlive .. " || pidof slurp || " .. hyprScripts .. "/snip_to_search.sh"))
--# OCR
hl.bind("SUPER + SHIFT + X", hl.dsp.global("quickshell:regionOcr"),
{ description = "Utilities: Character recognition >> clipboard" })
hl.bind("SUPER + SHIFT + T", hl.dsp.global("quickshell:screenTranslate"),
{ description = "Utilities: Translate screen content" })
hl.bind("SUPER + SHIFT + X", hl.dsp.exec_cmd(
qsIsAlive ..
" || pidof slurp || grim -g \"$(slurp $SLURP_ARGS)\" \"/tmp/ocr_image.png\" && tesseract \"/tmp/ocr_image.png\" stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\\\\n' '+' | sed 's/\\\\+$/\\\\n/') | wl-copy && rm \"/tmp/ocr_image.png\""
))
--# Color picker
hl.bind("SUPER + SHIFT + C", hl.dsp.exec_cmd("hyprpicker -a"),
{ description = "Utilities: Pick color #RRGGBB >> clipboard" })
--# Recording stuff
hl.bind("SUPER + SHIFT + R", hl.dsp.global("quickshell:regionRecord"),
{ locked = true, description = "Utilities: Record region (no sound)" })
hl.bind("SUPER + SHIFT + R", hl.dsp.exec_cmd(qsIsAlive .. " || " .. qsScripts .. "/videos/record.sh"), { locked = true })
hl.bind("SUPER + ALT + R", hl.dsp.global("quickshell:regionRecord"), { locked = true })
hl.bind("SUPER + ALT + R", hl.dsp.exec_cmd(qsIsAlive .. " || " .. qsScripts .. "/videos/record.sh"), { locked = true })
hl.bind("CTRL + ALT + R", hl.dsp.exec_cmd(qsScripts .. "/videos/record.sh --fullscreen"), { locked = true })
hl.bind("SUPER + SHIFT + ALT + R", hl.dsp.exec_cmd(qsScripts .. "/videos/record.sh --fullscreen --sound"),
{ locked = true, description = "Utilities: Record screen (with sound)" })
--# Fullscreen screenshot
local grimhyprctl = "grim -o \"$(hyprctl activeworkspace -j | jq -r '.monitor')\""
hl.bind("Print", hl.dsp.exec_cmd(grimhyprctl .. " - | wl-copy"),
{ locked = true, description = "Utilities: Screenshot >> clipboard" })
hl.bind("CTRL + Print", hl.dsp.exec_cmd(
"mkdir -p $(xdg-user-dir PICTURES)/Screenshots && " ..
grimhyprctl .. " $(xdg-user-dir PICTURES)/Screenshots/Screenshot_\"$(date '+%Y-%m-%d_%H.%M.%S')\".png"
), { locked = true, non_consuming = true, description = "Utilities: Screenshot >> clipboard & file" })
hl.bind("CTRL + Print", hl.dsp.exec_cmd(grimhyprctl .. " - | wl-copy"), { locked = true, non_consuming = true })
--# AI
hl.bind("SUPER + SHIFT + ALT + mouse:273", hl.dsp.exec_cmd(hyprScripts .. "/ai/primary-buffer-query.sh"),
{ description = "Utilities: Generate AI summary for selected text" })
-- (requires a running ollama model)
--##! Screen
--# Zoom
local function zoomfunction(value)
local zoomvalue = hl.get_config("cursor:zoom_factor")
if (zoomvalue + value) > 3.0 then
hl.config({ cursor = { zoom_factor = 3.0 } })
elseif (zoomvalue + value) < 1.0 then
hl.config({ cursor = { zoom_factor = 1.0 } })
else
hl.config({ cursor = { zoom_factor = zoomvalue + value } })
end
end
hl.bind("SUPER + Minus", function() zoomfunction(-0.3) end, { repeating = true, description = "Screen: Zoom out" })
hl.bind("SUPER + Equal", function() zoomfunction(0.3) end, { repeating = true, description = "Screen: Zoom in" })
--# Zoom with keypad
hl.bind("SUPER + code:82", function() zoomfunction(-0.3) end, { repeating = true })
hl.bind("SUPER + code:86", function() zoomfunction(0.3) end, { repeating = true })
--##! Media
local mediaNextCommand =
"playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
hl.bind("SUPER + SHIFT + N", hl.dsp.exec_cmd(mediaNextCommand), { locked = true, description = "Media: Next track" })
hl.bind("XF86AudioNext", hl.dsp.exec_cmd(mediaNextCommand), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
hl.bind("SUPER + SHIFT + ALT + mouse:275", hl.dsp.exec_cmd("playerctl previous"))
hl.bind("SUPER + SHIFT + ALT + mouse:276", hl.dsp.exec_cmd(mediaNextCommand))
hl.bind("SUPER + SHIFT + B", hl.dsp.exec_cmd("playerctl previous"),
{ locked = true, description = "Media: Previous track" })
hl.bind("SUPER + SHIFT + P", hl.dsp.exec_cmd("playerctl play-pause"),
{ locked = true, description = "Media: Play/pause media" })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_SINK@ toggle"), { locked = true })
hl.bind("SUPER + SHIFT + M", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_SINK@ toggle"),
{ locked = true, description = "Media: Toggle mute" })
hl.bind("ALT + XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_SOURCE@ toggle"), { locked = true })
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_SOURCE@ toggle"), { locked = true })
hl.bind("SUPER + ALT + M", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_SOURCE@ toggle"),
{ locked = true, description = "Media: Toggle mic" })
--#!
--##! Window
--# Focusing
hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true, description = "Window: Move" })
hl.bind("SUPER + mouse:274", hl.dsp.window.drag(), { mouse = true })
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouse = true, description = "Window: Resize" })
--#/# bind = SUPER + ←/↑/→/↓,, -- Focus in direction
for i = 1, 4 do
local arrowkey = { "Left", "Right", "Up", "Down" }
local focusdir = { "l", "r", "u", "d" }
hl.bind("SUPER + " .. arrowkey[i], hl.dsp.focus({ direction = focusdir[i] }),
{ description = "Window: Focus " .. arrowkey[i] })
end
for i = 1, 2 do
local arrowkey = { "BracketLeft", "BracketRight" }
local focusdir = { "l", "r" }
hl.bind("SUPER + " .. arrowkey[i], hl.dsp.focus({ direction = focusdir[i] }))
end
--#/# bind = SUPER + SHIFT, ←/↑/→/↓,, -- Move in direction
for i = 1, 4 do
local arrowkey = { "Left", "Right", "Up", "Down" }
local focusdir = { "l", "r", "u", "d" }
hl.bind("SUPER + SHIFT + " .. arrowkey[i], hl.dsp.window.move({ direction = focusdir[i] }),
{ description = "Window: Move " .. arrowkey[i] })
end
hl.bind("ALT + F4",
function()
hl.exec_cmd(
"notify-send \"Wrong close keybind\" \"Super+Q to close. Use Alt+F4 for Windows VMs\" -a Hyprland")
end,
{ non_consuming = true })
hl.bind("SUPER + Q", hl.dsp.window.close(), { description = "Window: Close" })
hl.bind("SUPER + SHIFT + ALT + Q", hl.dsp.exec_cmd("hyprctl kill"), { description = "Window: Forcefully zap a window" })
--# Window split ratio
--#/# binde = SUPER, ;/',, -- Adjust split ratio
hl.bind("SUPER + Semicolon", hl.dsp.layout("splitratio -0.1"), { repeating = true })
hl.bind("SUPER + Apostrophe", hl.dsp.layout("splitratio +0.1"), { repeating = true })
--# Positioning mode
hl.bind("SUPER + ALT + Space", hl.dsp.window.float({ action = "toggle" }), { description = "Window: Float/Tile" })
hl.bind("SUPER + D", hl.dsp.window.fullscreen({ mode = "maximized", action = "toggle" }),
{ description = "Window: Maximize" })
hl.bind("SUPER + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }),
{ description = "Window: Fullscreen" })
hl.bind("SUPER + ALT + F", hl.dsp.window.fullscreen_state({ internal = 0, client = 3, action = "toggle" }),
{ description = "Window: Fullscreen spoof" })
hl.bind("SUPER + P", hl.dsp.window.pin(), { description = "Window: Pin" })
--#/# bind = SUPER+ALT, Hash,, -- Send to workspace -- (1, 2, 3,...)
for i = 1, 10 do
hl.bind("SUPER + ALT + " .. (i % 10), function()
hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = false }))
end, { description = "Window: Send to workspace " .. i })
end
--# We also use raw keycodes because some keyboard layouts register number keys as different chars. The codes can be verified with `wev`
-- for i = 1, 10 do
-- local numberkey = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }
-- hl.bind("SUPER + ALT + code:" .. numberkey[i], function()
-- hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = false }))
-- end)
-- end
--# keypad numbers
for i = 1, 10 do
local numpadkey = { 87, 88, 89, 83, 84, 85, 79, 80, 81, 90 }
hl.bind("SUPER + ALT + code:" .. numpadkey[i], function()
hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = false }))
end)
end
--# #/# bind = SUPER+SHIFT, Scroll ↑/↓,, -- Send to workspace left/right
for i = 1, 4 do
local key = { "SUPER + SHIFT + mouse_", "SUPER + ALT + mouse_" }
local keycombos = { key[1] .. "down", key[1] .. "up", key[2] .. "down", key[2] .. "up" }
local prefix = { "r-", "r+", "r-", "r+" }
hl.bind(keycombos[i], hl.dsp.window.move({ workspace = prefix[i] .. "1" }))
end
--#/# bind = SUPER+SHIFT, Page_↑/↓,, -- Send to workspace left/right
for i = 1, 2 do
local keydirs = { "Up", "Down" }
local prefix = { "r-", "r+" }
local descdir = { "left", "right" }
hl.bind("SUPER + SHIFT + Page_" .. keydirs[i], hl.dsp.window.move({ workspace = prefix[i] .. "1" }), {description = "Window: Send to workspace " .. descdir[i]})
end
for i = 1, 4 do
local key = { "SUPER + ALT + Page_", "CTRL + SUPER + SHIFT + " }
local keycombos = { key[1] .. "down", key[1] .. "up", key[2] .. "Right", key[2] .. "Left" }
local prefix = { "r+", "r-", "r+", "r-" }
hl.bind(keycombos[i], hl.dsp.window.move({ workspace = prefix[i] .. "1" })) -- # [hidden]
end
hl.bind("SUPER + ALT + S",
hl.dsp.window.move({ workspace = "special:special", follow = false }), { description = "Window: Send to scratchpad" })
hl.bind("CTRL + SUPER + S", hl.dsp.workspace.toggle_special("special"))
--##! Workspace
--# Switching
--#/# bind = SUPER, Hash,, -- Focus workspace -- (1, 2, 3,...)
for i = 1, 10 do
hl.bind("SUPER + " .. (i % 10), function()
hl.dispatch(hl.dsp.focus({ workspace = workspace_in_group(i) }))
end, { description = "Workspace: Focus " .. i })
end
--# We also use raw keycodes because some keyboard layouts register number keys as different chars. The codes can be verified with `wev`
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 = CTRL+SUPER, ←/→,, -- Focus left/right
--#/# bind = CTRL+SUPER+ALT, ←/→,, -- # [hidden] Focus busy left/right
for i = 1, 2 do
local keys = { "Left", "Right" }
local prefix = { "r-", "r+" }
local descdir = { "left", "right" }
hl.bind("CTRL + SUPER + " .. keys[i], hl.dsp.focus({ workspace = prefix[i] .. "1" }), {description = "Workspace: Focus " .. descdir[i]})
end
for i = 1, 2 do
local keys = { "Left", "Right" }
local prefix = { "m-", "m+" }
hl.bind("CTRL + SUPER + ALT + " .. keys[i], hl.dsp.focus({ workspace = prefix[i] .. "1" }))
end
--#/# bind = SUPER, Page_↑/↓,, -- Focus left/right
for i = 1, 4 do
local key = { "SUPER + Page_Down", "SUPER + Page_Up" }
local keycombos = { key[1], key[2], "CTRL + " .. key[1], "CTRL + " .. key[2] }
local prefix = { "r+", "r-", "r+", "r-" }
hl.bind(keycombos[i], hl.dsp.focus({ workspace = prefix[i] .. "1" }))
end
--#/# bind = SUPER, Scroll ↑/↓,, -- Focus left/right
for i = 1, 4 do
local key = { "SUPER + mouse_up", "SUPER + mouse_down" }
local keycombos = { key[1], key[2], "CTRL + " .. key[1], "CTRL + " .. key[2] }
local prefix = { "+", "-", "r+", "r-" }
hl.bind(keycombos[i], hl.dsp.focus({ workspace = prefix[i] .. "1" }))
end
--## Special
hl.bind("SUPER + S", hl.dsp.workspace.toggle_special("special"), { description = "Workspace: Toggle scratchpad" })
hl.bind("SUPER + mouse:275", hl.dsp.workspace.toggle_special("special"))
for i = 1, 4 do
local key = { "BracketLeft", "BracketRight", "Up", "Down" }
local prefix = { "-1", "+1", "r-5", "r+5" }
hl.bind("CTRL + SUPER + " .. key[i], hl.dsp.focus({ workspace = prefix[i] }))
end
--##! Virtual machines
hl.define_submap("virtual-machine", function()
hl.bind("SUPER + ALT + F1", function()
local currentsubmap = hl.get_current_submap()
if currentsubmap == "virtual-machine" then
hl.dispatch(hl.dsp.exec_cmd(
"notify-send 'Exited Virtual Machine submap' 'Keybinds re-enabled' -a 'Hyprland'"))
hl.dispatch(hl.dsp.submap("reset"))
elseif currentsubmap == "" then
hl.dispatch(hl.dsp.exec_cmd(
"notify-send 'Entered Virtual Machine submap' 'Keybinds disabled. hit SUPER+ALT+F1 to escape' -a 'Hyprland'"))
hl.dispatch(hl.dsp.submap("virtual-machine"))
end
end, { submap_universal = true })
end)
--#!
--# Testing
hl.bind("SUPER + ALT + F11",
hl.dsp.exec_cmd(
"bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | shuf -n 1); ACTION=$(notify-send \"Test notification with body image\" \"This notification should contain your user account <b>image</b> and <a href=\\\"https://discord.com/app\\\">Discord</a> <b>icon</b>. Oh and here is a random image in your Pictures folder: <img src=\\\"$RANDOM_IMAGE\\\" alt=\\\"Testing image\\\"/>\" -a \"Hyprland\" -p -h \"string:image-path:/var/lib/AccountsService/icons/$USER\" -t 6000 -i \"discord\" -A \"openImage=Profile image\" -A \"action2=Open the random image\" -A \"action3=Useless button\"); [[ $ACTION == *openImage ]] && xdg-open \"/var/lib/AccountsService/icons/$USER\"; [[ $ACTION == *action2 ]] && xdg-open \"$RANDOM_IMAGE\"'")
) -- # [hidden]
hl.bind("SUPER + ALT + F12",
hl.dsp.exec_cmd(
"bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | shuf -n 1); ACTION=$(notify-send \"Test notification\" \"This notification should contain a random image in your <b>Pictures</b> folder and <a href=\\\"https://discord.com/app\\\">Discord</a> <b>icon</b>.\n<i>Flick right to dismiss!</i>\" -a \"Discord (fake)\" -p -h \"string:image-path:$RANDOM_IMAGE\" -t 6000 -i \"discord\" -A \"openImage=Profile image\" -A \"action2=Useless button\"); [[ $ACTION == *openImage ]] && xdg-open \"/var/lib/AccountsService/icons/$USER\"'")
) -- # [hidden]
hl.bind("SUPER + ALT + Equal",
hl.dsp.exec_cmd("notify-send 'Urgent notification' 'Ah hell no' -u critical -a 'Hyprland keybind'")) -- # [hidden]
--##! Session
hl.bind("SUPER + L", hl.dsp.exec_cmd("loginctl lock-session"), { description = "Session: Lock" })
hl.bind("SUPER + SHIFT + L", hl.dsp.exec_cmd("systemctl suspend || loginctl suspend"),
{ locked = true, description = "Session: Sleep" }) -- Sleep
-- hl.bind("switch:on:Lid Switch", hl.dsp.exec_cmd("systemctl suspend || loginctl suspend"), {locked = true} ) -- # [hidden] Suspend when laptop lid is closed, uncomment if for whatever reason it's not the default behavior
hl.bind("CTRL + SHIFT + ALT + SUPER + Delete", hl.dsp.exec_cmd("systemctl poweroff || loginctl poweroff"),
{ description = "Session: Shut down" }) -- # [hidden] Power off
--##! Apps
hl.bind("SUPER + Return", hl.dsp.exec_cmd(terminal), { description = "App: Terminal" })
hl.bind("SUPER + T", hl.dsp.exec_cmd(terminal))
hl.bind("CTRL + ALT + T", hl.dsp.exec_cmd(terminal))
hl.bind("SUPER + E", hl.dsp.exec_cmd(fileManager), { description = "App: File manager" })
hl.bind("SUPER + W", hl.dsp.exec_cmd(browser), { description = "App: Browser" })
hl.bind("SUPER + C", hl.dsp.exec_cmd(codeEditor), { description = "App: Code editor" })
hl.bind("CTRL + SUPER + SHIFT + ALT + W", hl.dsp.exec_cmd(officeSoftware), { description = "App: Office software" })
hl.bind("SUPER + X", hl.dsp.exec_cmd(textEditor), { description = "App: Text editor" })
hl.bind("CTRL + SUPER + V", hl.dsp.exec_cmd(volumeMixer), { description = "App: Volume mixer" })
hl.bind("SUPER + I", hl.dsp.exec_cmd(settingsApp), { description = "App: Settings app" })
hl.bind("CTRL + SHIFT + Escape", hl.dsp.exec_cmd(taskManager), { description = "App: Task manager" })
--# Cursed stuff
--## Make window not amogus large
hl.bind("CTRL + SUPER + Backslash", hl.dsp.window.resize({ x = 640, y = 480, "exact" }))
+27
View File
@@ -0,0 +1,27 @@
HOME = os.getenv("HOME")
function is_file_exists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
function create_if_not_exists(path)
if not is_file_exists(path) then
os.execute("mkdir -p \"$(dirname \"" .. path .. "\")\"")
os.execute("echo '-- This file will not be overwritten across dots-hyprland updates.\n-- The file name is for the sake of organization and does not matter\n-- See the corresponding files in ~/.config/hypr/hyprland for examples' > \"" .. path .. "\"")
return true
end
return false
end
function workspace_in_group(i)
local curr = hl.get_active_workspace().id
local newVal = math.floor((curr - 1) / workspaceGroupSize) * workspaceGroupSize + i
-- hl.notification.create({ text = "curr " .. curr .. " floor " .. math.floor(curr / 10) .. " new " .. newVal, duration = 5000 })
return newVal
end
-173
View File
@@ -1,173 +0,0 @@
# ######## Window rules ########
# Disable blur for xwayland context menus
windowrule = match:class ^()$, match:title ^()$, no_blur on
# Disable blur for every window
windowrule = match:class .*, no_blur on
# Floating
windowrule = match:title ^(Open File)(.*)$, center on
windowrule = match:title ^(Open File)(.*)$, float on
windowrule = match:title ^(Select a File)(.*)$, center on
windowrule = match:title ^(Select a File)(.*)$, float on
windowrule = match:title ^(Choose wallpaper)(.*)$, center on
windowrule = match:title ^(Choose wallpaper)(.*)$, float on
windowrule = match:title ^(Choose wallpaper)(.*)$, size (monitor_w*.60) (monitor_h*.65)
windowrule = match:title ^(Open Folder)(.*)$, center on
windowrule = match:title ^(Open Folder)(.*)$, float on
windowrule = match:title ^(Save As)(.*)$, center on
windowrule = match:title ^(Save As)(.*)$, float on
windowrule = match:title ^(Library)(.*)$, center on
windowrule = match:title ^(Library)(.*)$, float on
windowrule = match:title ^(File Upload)(.*)$, center on
windowrule = match:title ^(File Upload)(.*)$, float on
windowrule = match:title ^(.*)(wants to save)$, center on
windowrule = match:title ^(.*)(wants to save)$, float on
windowrule = match:title ^(.*)(wants to open)$, center on
windowrule = match:title ^(.*)(wants to open)$, float on
windowrule = match:class ^(blueberry\.py)$, float on
windowrule = match:class ^(guifetch)$ , float on # FlafyDev/guifetch
windowrule = match:class ^(pavucontrol)$, float on
windowrule = match:class ^(pavucontrol)$, size (monitor_w*.45) (monitor_h*.45)
windowrule = match:class ^(pavucontrol)$, center on
windowrule = match:class ^(org.pulseaudio.pavucontrol)$, float on
windowrule = match:class ^(org.pulseaudio.pavucontrol)$, size (monitor_w*.45) (monitor_h*.45)
windowrule = match:class ^(org.pulseaudio.pavucontrol)$, center on
windowrule = match:class ^(nm-connection-editor)$, float on
windowrule = match:class ^(nm-connection-editor)$, size (monitor_w*.45) (monitor_h*.45)
windowrule = match:class ^(nm-connection-editor)$, center on
windowrule = match:class .*plasmawindowed.*, float on
windowrule = match:class kcm_.*, float on
windowrule = match:class .*bluedevilwizard, float on
windowrule = match:title .*Welcome, float on
windowrule = match:title ^(illogical-impulse Settings)$, float on
windowrule = match:title .*Shell conflicts.*, float on
windowrule = match:class org.freedesktop.impl.portal.desktop.kde, float on
windowrule = match:class org.freedesktop.impl.portal.desktop.kde, size (monitor_w*.60) (monitor_h*.65)
windowrule = match:class ^(Zotero)$, float on
windowrule = match:class ^(Zotero)$, size (monitor_w*.45) (monitor_h*.45)
# Move
# kde-material-you-colors spawns a window when changing dark/light theme. This is to make sure it doesn't interfere at all.
windowrule = match:class ^(plasma-changeicons)$, float on
windowrule = match:class ^(plasma-changeicons)$, no_initial_focus on
windowrule = match:class ^(plasma-changeicons)$, move 999999 999999
# stupid dolphin copy
windowrule = match:title ^(Copying — Dolphin)$, move 40 80
# Tiling
windowrule = match:class ^dev\.warp\.Warp$, tile on
# Picture-in-Picture
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, float on
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, keep_aspect_ratio on
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, move (monitor_w*.73) (monitor_h*.72)
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, size (monitor_w*.25) (monitor_h*.25)
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, float on
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, pin on
# Screen sharing
windowrule = match:title .*is sharing (a window|your screen).*, float on
windowrule = match:title .*is sharing (a window|your screen).*, pin on
windowrule = match:title .*is sharing (a window|your screen).*, move (monitor_w*.5-window_w*.5) (monitor_h-window_h-12)
# --- Tearing ---
windowrule = match:title .*\.exe, immediate on
windowrule = match:title .*minecraft.*, immediate on
windowrule = match:class ^(steam_app).*, immediate on
# Fix Jetbrain IDEs focus/rerendering problem
windowrule = match:class ^jetbrains-.*$, match:float 1, match:title ^$|^\s$|^win\d+$, no_initial_focus on
# No shadow for tiled windows (matches windows that are not floating).
windowrule = match:float 0, no_shadow on
# ######## Workspace rules ########
workspace = special:special, gapsout:30
# ######## Layer rules ########
layerrule = match:namespace .*, xray on
# layerrule = match:namespace .*, no_anim on
layerrule = match:namespace walker, no_anim on
layerrule = match:namespace selection, no_anim on
layerrule = match:namespace overview, no_anim on
layerrule = match:namespace anyrun, no_anim on
layerrule = match:namespace indicator.*, no_anim on
layerrule = match:namespace osk, no_anim on
layerrule = match:namespace hyprpicker, no_anim on
layerrule = match:namespace noanim, no_anim on
layerrule = match:namespace gtk-layer-shell, blur on
layerrule = match:namespace gtk-layer-shell, ignore_alpha 0
layerrule = match:namespace launcher, blur on
layerrule = match:namespace launcher, ignore_alpha 0.5
layerrule = match:namespace notifications, blur on
layerrule = match:namespace notifications, ignore_alpha 0.69
layerrule = match:namespace logout_dialog # wlogout, blur on
# ags
layerrule = match:namespace sideleft.*, animation slide left
layerrule = match:namespace sideright.*, animation slide right
layerrule = match:namespace session[0-9]*, blur on
layerrule = match:namespace bar[0-9]*, blur on
layerrule = match:namespace bar[0-9]*, ignore_alpha 0.6
layerrule = match:namespace barcorner.*, blur on
layerrule = match:namespace barcorner.*, ignore_alpha 0.6
layerrule = match:namespace dock[0-9]*, blur on
layerrule = match:namespace dock[0-9]*, ignore_alpha 0.6
layerrule = match:namespace indicator.*, blur on
layerrule = match:namespace indicator.*, ignore_alpha 0.6
layerrule = match:namespace overview[0-9]*, blur on
layerrule = match:namespace overview[0-9]*, ignore_alpha 0.6
layerrule = match:namespace cheatsheet[0-9]*, blur on
layerrule = match:namespace cheatsheet[0-9]*, ignore_alpha 0.6
layerrule = match:namespace sideright[0-9]*, blur on
layerrule = match:namespace sideright[0-9]*, ignore_alpha 0.6
layerrule = match:namespace sideleft[0-9]*, blur on
layerrule = match:namespace sideleft[0-9]*, ignore_alpha 0.6
layerrule = match:namespace indicator.*, blur on
layerrule = match:namespace indicator.*, ignore_alpha 0.6
layerrule = match:namespace osk[0-9]*, blur on
layerrule = match:namespace osk[0-9]*, ignore_alpha 0.6
# Quickshell
# Quickshell: illogical-impulse
layerrule = match:namespace quickshell:.*, blur_popups on
layerrule = match:namespace quickshell:.*, blur on
layerrule = match:namespace quickshell:.*, ignore_alpha 0.79
layerrule = match:namespace quickshell:bar, animation slide
layerrule = match:namespace quickshell:actionCenter, no_anim on
layerrule = match:namespace quickshell:cheatsheet, animation slide bottom
layerrule = match:namespace quickshell:dock, animation slide bottom
layerrule = match:namespace quickshell:screenCorners, animation popin 120%
layerrule = match:namespace quickshell:lockWindowPusher, no_anim on
layerrule = match:namespace quickshell:notificationPopup, animation fade
layerrule = match:namespace quickshell:overlay, no_anim on
layerrule = match:namespace quickshell:overlay, ignore_alpha 1
layerrule = match:namespace quickshell:overview, no_anim on
layerrule = match:namespace quickshell:osk, animation slide bottom
layerrule = match:namespace quickshell:polkit, no_anim on
layerrule = match:namespace quickshell:popup, xray off # No weird color for bar tooltips (this in theory should suffice)
layerrule = match:namespace quickshell:popup, ignore_alpha 1 # No weird color for bar tooltips (but somehow this is necessary)
layerrule = match:namespace quickshell:mediaControls, ignore_alpha 1 # Same as above
layerrule = match:namespace quickshell:reloadPopup, animation slide
layerrule = match:namespace quickshell:regionSelector, no_anim on
layerrule = match:namespace quickshell:screenshot, no_anim on
layerrule = match:namespace quickshell:session, blur on
layerrule = match:namespace quickshell:session, no_anim on
layerrule = match:namespace quickshell:session, ignore_alpha 0
layerrule = match:namespace quickshell:sidebarRight, animation slide right
layerrule = match:namespace quickshell:sidebarLeft, animation slide left
layerrule = match:namespace quickshell:verticalBar, animation slide
layerrule = match:namespace quickshell:osk, order -1
# Quickshell: waffles
layerrule = match:namespace quickshell:wallpaperSelector, animation slide top
layerrule = match:namespace quickshell:wNotificationCenter, no_anim on
layerrule = match:namespace quickshell:wOnScreenDisplay, no_anim on
layerrule = match:namespace quickshell:wStartMenu, no_anim on
layerrule = match:namespace quickshell:wTaskView, ignore_alpha 0
layerrule = match:namespace quickshell:wTaskView, no_anim on
# Launchers need to be FAST
layerrule = match:namespace gtk4-layer-shell, no_anim on
+169
View File
@@ -0,0 +1,169 @@
-- ######## Window rules ########
-- Disable blur for xwayland context menus
hl.window_rule({match = {class = "^()$", title = "^()$" }, no_blur = true })
-- Disable blur for every window
hl.window_rule({match = {class = ".*" }, no_blur = true })
-- Floating
hl.window_rule({match = {title = "^(Open File)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Open File)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Select a File)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Select a File)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, size = {"(monitor_w*0.60)", "(monitor_h*0.65)"} })
hl.window_rule({match = {title = "^(Open Folder)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Open Folder)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Save As)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Save As)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Library)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Library)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(File Upload)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(File Upload)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(.*)(wants to save)$" }, center = true})
hl.window_rule({match = {title = "^(.*)(wants to save)$" }, float = true})
hl.window_rule({match = {title = "^(.*)(wants to open)$" }, center = true})
hl.window_rule({match = {title = "^(.*)(wants to open)$" }, float = true})
hl.window_rule({match = {class = "^(blueberry\\.py)$" }, float = true})
hl.window_rule({match = {class = "^(guifetch)$" }, float = true}) -- FlafyDev/guifetch
hl.window_rule({match = {class = "^(pavucontrol)$" }, float = true})
hl.window_rule({match = {class = "^(pavucontrol)$" }, size = {"(monitor_w*0.45)", "(monitor_h*0.45)"} })
hl.window_rule({match = {class = "^(pavucontrol)$" }, center = true})
hl.window_rule({match = {class = "^(org.pulseaudio.pavucontrol)$" }, float = true})
hl.window_rule({match = {class = "^(org.pulseaudio.pavucontrol)$" }, size = {"(monitor_w*0.45)", "(monitor_h*0.45)"} })
hl.window_rule({match = {class = "^(org.pulseaudio.pavucontrol)$" }, center = true})
hl.window_rule({match = {class = "^(nm-connection-editor)$" }, float = true})
hl.window_rule({match = {class = "^(nm-connection-editor)$" }, size = {"(monitor_w*0.45)", "(monitor_h*0.45)"} })
hl.window_rule({match = {class = "^(nm-connection-editor)$" }, center = true})
hl.window_rule({match = {class = ".*plasmawindowed.*" }, float = true})
hl.window_rule({match = {class = "kcm_.*" }, float = true})
hl.window_rule({match = {class = ".*bluedevilwizard" }, float = true})
hl.window_rule({match = {title = ".*Welcome" }, float = true})
hl.window_rule({match = {title = "^(illogical-impulse Settings)$" }, float = true})
hl.window_rule({match = {title = ".*Shell conflicts.*" }, float = true})
hl.window_rule({match = {class = "org.freedesktop.impl.portal.desktop.kde" }, float = true})
hl.window_rule({match = {class = "org.freedesktop.impl.portal.desktop.kde" }, size = {"(monitor_w*0.60)", "(monitor_h*0.65)"} })
hl.window_rule({match = {class = "^(Zotero)$" }, float = true})
hl.window_rule({match = {class = "^(Zotero)$" }, size = {"(monitor_w*0.45)", "(monitor_h*0.45)"} })
-- Move
-- kde-material-you-colors spawns a window when changing dark/light theme. This is to make sure it doesn't interfere at all.
hl.window_rule({match = {class = "^(plasma-changeicons)$" }, float = true})
hl.window_rule({match = {class = "^(plasma-changeicons)$" }, no_initial_focus = true})
hl.window_rule({match = {class = "^(plasma-changeicons)$" }, move = {999999, 999999}})
-- stupid dolphin copy
hl.window_rule({match = {title = "^(Copying — Dolphin)$" }, move = {40, 80}})
-- Tiling
hl.window_rule({match = {class = "^dev\\.warp\\.Warp$" }, tile = true})
-- Picture-in-Picture
hl.window_rule({match = {title = "^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" }, float = true})
hl.window_rule({match = {title = "^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" }, keep_aspect_ratio = true})
hl.window_rule({match = {title = "^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" }, move = {"(monitor_w*0.73)", "(monitor_h*0.72)"} })
hl.window_rule({match = {title = "^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" }, size = {"(monitor_w*0.25)", "(monitor_h*0.25)"} })
hl.window_rule({match = {title = "^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" }, float = true})
hl.window_rule({match = {title = "^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$" }, pin = true})
-- Screen sharing
hl.window_rule({match = {title = ".*is sharing (a window|your screen).*" }, float = true})
hl.window_rule({match = {title = ".*is sharing (a window|your screen).*" }, pin = true})
hl.window_rule({match = {title = ".*is sharing (a window|your screen).*" }, move = {"(monitor_w*.5-window_w*.5)", "(monitor_h-window_h-12)"} })
-- --- Tearing ---
hl.window_rule({match = {title = ".*\\.exe" }, immediate = true})
hl.window_rule({match = {title = ".*minecraft.*" }, immediate = true})
hl.window_rule({match = {class = "^(steam_app).*" }, immediate = true})
-- No shadow for tiled windows
hl.window_rule({match = {float = 0 }, no_shadow = true})
-- ######## Workspace rules ########
hl.workspace_rule({ workspace = "special:special", gaps_out = 30 })
-- ######## Layer rules ########
hl.layer_rule({ match = { namespace = ".*" }, xray = true})
hl.layer_rule({ match = { namespace = "walker" }, no_anim = true})
hl.layer_rule({ match = { namespace = "selection" }, no_anim = true})
hl.layer_rule({ match = { namespace = "overview" }, no_anim = true})
hl.layer_rule({ match = { namespace = "anyrun" }, no_anim = true})
hl.layer_rule({ match = { namespace = "indicator.*" }, no_anim = true})
hl.layer_rule({ match = { namespace = "osk" }, no_anim = true})
hl.layer_rule({ match = { namespace = "hyprpicker" }, no_anim = true})
hl.layer_rule({ match = { namespace = "noanim" }, no_anim = true})
hl.layer_rule({ match = { namespace = "gtk-layer-shell" }, blur = true})
hl.layer_rule({ match = { namespace = "gtk-layer-shell" }, ignore_alpha = 0})
hl.layer_rule({ match = { namespace = "launcher" }, blur = true})
hl.layer_rule({ match = { namespace = "launcher" }, ignore_alpha = 0.5})
hl.layer_rule({ match = { namespace = "notifications" }, blur = true})
hl.layer_rule({ match = { namespace = "notifications" }, ignore_alpha = 0.69})
hl.layer_rule({ match = { namespace = "logout_dialog" }, blur = true}) -- wlogout
-- ags
hl.layer_rule({ match = { namespace = "sideleft.*" }, animation = "slide left"})
hl.layer_rule({ match = { namespace = "sideright.*" }, animation = "slide right"})
hl.layer_rule({ match = { namespace = "session[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "bar[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "bar[0-9]*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "barcorner.*" }, blur = true})
hl.layer_rule({ match = { namespace = "barcorner.*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "dock[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "dock[0-9]*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "indicator.*" }, blur = true})
hl.layer_rule({ match = { namespace = "indicator.*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "overview[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "overview[0-9]*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "cheatsheet[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "cheatsheet[0-9]*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "sideright[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "sideright[0-9]*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "sideleft[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "sideleft[0-9]*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "indicator.*" }, blur = true})
hl.layer_rule({ match = { namespace = "indicator.*" }, ignore_alpha = 0.6})
hl.layer_rule({ match = { namespace = "osk[0-9]*" }, blur = true})
hl.layer_rule({ match = { namespace = "osk[0-9]*" }, ignore_alpha = 0.6})
-- Quickshell
-- Quickshell: illogical-impulse
hl.layer_rule({ match = { namespace = "quickshell:.*" }, blur_popups = true})
hl.layer_rule({ match = { namespace = "quickshell:.*" }, blur = true})
hl.layer_rule({ match = { namespace = "quickshell:.*" }, ignore_alpha = 0.79})
hl.layer_rule({ match = { namespace = "quickshell:bar" }, animation = "slide"})
hl.layer_rule({ match = { namespace = "quickshell:actionCenter" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:cheatsheet" }, animation = "slide bottom"})
hl.layer_rule({ match = { namespace = "quickshell:dock" }, animation = "slide bottom"})
hl.layer_rule({ match = { namespace = "quickshell:screenCorners" }, animation = "popin 120%"})
hl.layer_rule({ match = { namespace = "quickshell:lockWindowPusher" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:notificationPopup" }, animation = "fade"})
hl.layer_rule({ match = { namespace = "quickshell:overlay" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:overlay" }, ignore_alpha = 1})
hl.layer_rule({ match = { namespace = "quickshell:overview" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:osk" }, animation = "slide bottom"})
hl.layer_rule({ match = { namespace = "quickshell:polkit" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:popup" }, xray = false}) -- No weird color for bar tooltips (this in theory should suffice)
hl.layer_rule({ match = { namespace = "quickshell:popup" }, ignore_alpha = 1}) -- No weird color for bar tooltips (but somehow this is necessary)
hl.layer_rule({ match = { namespace = "quickshell:mediaControls" }, ignore_alpha = 1}) -- Same as above
hl.layer_rule({ match = { namespace = "quickshell:reloadPopup" }, animation = "slide"})
hl.layer_rule({ match = { namespace = "quickshell:regionSelector" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:screenshot" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:session" }, blur = true})
hl.layer_rule({ match = { namespace = "quickshell:session" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:session" }, ignore_alpha = 0})
hl.layer_rule({ match = { namespace = "quickshell:sidebarRight" }, animation = "slide right"})
hl.layer_rule({ match = { namespace = "quickshell:sidebarLeft" }, animation = "slide left"})
hl.layer_rule({ match = { namespace = "quickshell:verticalBar" }, animation = "slide"})
hl.layer_rule({ match = { namespace = "quickshell:osk" }, order = -1})
-- Quickshell: waffles
hl.layer_rule({ match = { namespace = "quickshell:wallpaperSelector" }, animation = "slide top"})
hl.layer_rule({ match = { namespace = "quickshell:wNotificationCenter" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:wOnScreenDisplay" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:wStartMenu" }, no_anim = true})
hl.layer_rule({ match = { namespace = "quickshell:wTaskView" }, ignore_alpha = 0})
hl.layer_rule({ match = { namespace = "quickshell:wTaskView" }, no_anim = true})
-- Launchers need to be FAST
hl.layer_rule({ match = { namespace = "gtk4-layer-shell" }, no_anim = true})
@@ -1885,4 +1885,69 @@ AH↗️HA↘️HA↗️HA↘️ pekora arrows hahaha rabbit
↵ enter key return
𝕏 twitter x logo
👉👈 etou ughhhhhhh shy
👉👌 put it in imagination perv
👉👌 put it in imagination perv
🫨 shaking face tremble shake shocked
🩷 pink heart love
🩵 light blue heart love cyan
🩶 grey heart gray love
🫷 leftwards pushing hand stop halt left
🫸 rightwards pushing hand stop halt right
🫎 moose animal antlers
🫏 donkey animal mule ass
🪽 wing bird feather fly
🐦‍⬛ black bird crow raven rook
🪿 goose bird honk
🪼 jellyfish sea ocean sting
🪻 hyacinth flower spring
🫚 ginger root spice food
🫛 pea pod peas vegetable food
🪭 folding hand fan fan cool
🪮 hair pick afro comb
🪇 maracas instrument music shake
🪈 flute instrument music
🪯 khanda sikh religion symbol
🛜 wireless wifi wi-fi internet network
🙂‍↔️ head shaking horizontally no shake
🙂‍↕️ head shaking vertically yes nod
🚶‍➡️ person walking facing right walk
🚶‍♀️‍➡️ woman walking facing right walk
🚶‍♂️‍➡️ man walking facing right walk
🧎‍➡️ person kneeling facing right kneel
🧎‍♀️‍➡️ woman kneeling facing right kneel
🧎‍♂️‍➡️ man kneeling facing right kneel
🧑‍🦯‍➡️ person with white cane facing right accessibility blind
👨‍🦯‍➡️ man with white cane facing right accessibility blind
👩‍🦯‍➡️ woman with white cane facing right accessibility blind
🧑‍🦼‍➡️ person in motorized wheelchair facing right accessibility
👨‍🦼‍➡️ man in motorized wheelchair facing right accessibility
👩‍🦼‍➡️ woman in motorized wheelchair facing right accessibility
🧑‍🦽‍➡️ person in manual wheelchair facing right accessibility
👨‍🦽‍➡️ man in manual wheelchair facing right accessibility
👩‍🦽‍➡️ woman in manual wheelchair facing right accessibility
🏃‍➡️ person running facing right run
🏃‍♀️‍➡️ woman running facing right run
🏃‍♂️‍➡️ man running facing right run
🧑‍🧑‍🧒 family adult adult child parents
🧑‍🧑‍🧒‍🧒 family adult adult child child parents
🧑‍🧒 family adult child parent
🧑‍🧒‍🧒 family adult child child parent
🐦‍🔥 phoenix fire bird rebirth
🍋‍🟩 lime fruit citrus green
🍄‍🟫 brown mushroom fungi
⛓️‍💥 broken chain snap shatter
🫩 face with bags under eyes tired sleepy exhausted
🫆 fingerprint id biometric
🪾 leafless tree barren dead winter
🫜 root vegetable food turnip radish
🪉 harp instrument music
🪏 shovel dig tool
🫟 splatter splash stain mess
🇨🇶 flag sark
🫪 distorted face anxiety shocked panic
🫯 fight cloud comic brawl dust
🫈 hairy creature sasquatch bigfoot
🧑‍🩰 ballet dancer dance ballerina
🫍 orca killer whale
🛘 landslide rockfall disaster
🪊 trombone instrument music
🪎 treasure chest gold loot pirate
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
curr_workspace="$(hyprctl activeworkspace -j | jq -r ".id")"
dispatcher="$1"
shift ## The target is now in $1, not $2
if [[ -z "${dispatcher}" || "${dispatcher}" == "--help" || "${dispatcher}" == "-h" || -z "$1" ]]; then
echo "Usage: $0 <dispatcher> <target>"
exit 1
fi
if [[ "$1" == *"+"* || "$1" == *"-"* ]]; then ## Is this something like r+1 or -1?
hyprctl dispatch "${dispatcher}" "$1" ## $1 = workspace id since we shifted earlier.
elif [[ "$1" =~ ^[0-9]+$ ]]; then ## Is this just a number?
target_workspace=$((((curr_workspace - 1) / 10 ) * 10 + $1))
hyprctl dispatch "${dispatcher}" "${target_workspace}"
else
hyprctl dispatch "${dispatcher}" "$1" ## In case the target in a string, required for special workspaces.
exit 1
fi
@@ -1,54 +0,0 @@
#!/usr/bin/env bash
# Controls Hyprland's cursor zoom_factor, clamped between 1.0 and 3.0
# Get current zoom level
get_zoom() {
hyprctl getoption -j cursor:zoom_factor | jq '.float'
}
# Clamp a value between 1.0 and 3.0
clamp() {
local val="$1"
awk "BEGIN {
v = $val;
if (v < 1.0) v = 1.0;
if (v > 3.0) v = 3.0;
print v;
}"
}
# Set zoom level
set_zoom() {
local value="$1"
clamped=$(clamp "$value")
hyprctl keyword cursor:zoom_factor "$clamped"
}
case "$1" in
reset)
set_zoom 1.0
;;
increase)
if [[ -z "$2" ]]; then
echo "Usage: $0 increase STEP"
exit 1
fi
current=$(get_zoom)
new=$(awk "BEGIN { print $current + $2 }")
set_zoom "$new"
;;
decrease)
if [[ -z "$2" ]]; then
echo "Usage: $0 decrease STEP"
exit 1
fi
current=$(get_zoom)
new=$(awk "BEGIN { print $current - $2 }")
set_zoom "$new"
;;
*)
echo "Usage: $0 {reset|increase STEP|decrease STEP}"
exit 1
;;
esac
@@ -0,0 +1,29 @@
require("hyprland/lib")
hl.on("hyprland.start", function()
local homeDir = os.getenv("HOME")
if string.len(homeDir) == 0 then
return
end
local baseCustomDir = homeDir .. "/.config/hypr/custom"
local files = {
baseCustomDir .. "/env.lua",
baseCustomDir .. "/execs.lua",
baseCustomDir .. "/general.lua",
baseCustomDir .. "/keybinds.lua",
baseCustomDir .. "/rules.lua",
baseCustomDir .. "/variables.lua"
}
local createdFiles = 0
for _, file in ipairs(files) do
if not is_file_exists(file) then
create_if_not_exists(file)
createdFiles = createdFiles + 1
end
end
if createdFiles > 0 then
-- hl.exec_cmd("notify-send 'Hyprland config' 'Created " .. createdFiles .. " custom Hyprland config files in " .. baseCustomDir .. "' -a 'Hyprland'")
-- hl.exec_cmd("hyprctl reload")
end
end)
@@ -0,0 +1 @@
require("hyprland/services/create_custom_config")
@@ -0,0 +1,2 @@
-- DO NOT EDIT THIS FILE. IT IS MANAGED BY THE SHELL AND FOLLOWS STRICT RULES
-- In other words, I ain't writing a lua parser for this, so please be a good boi/girl/whatever
-23
View File
@@ -1,23 +0,0 @@
# Default variables
# Copy these to ~/.config/hypr/custom/variables.conf to make changes in a dotfiles-update-friendly manner
# Apps
# PULL REQUESTS ADDING MORE WILL NOT BE ACCEPTED, CONFIG FOR YOURSELF
$terminal = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm"
$fileManager = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" "kitty -1 fish -c yazi"
$browser = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "google-chrome-stable" "zen-browser" "firefox" "brave" "chromium" "microsoft-edge-stable" "opera" "librewolf"
$codeEditor = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "antigravity" "code" "codium" "cursor" "zed" "zedit" "zeditor" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" "command -v micro && kitty -1 micro"
$officeSoftware = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "wps" "onlyoffice-desktopeditors" "libreoffice"
$textEditor = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kate" "gnome-text-editor" "emacs"
$volumeMixer = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol"
$settingsApp = XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "qs -p ~/.config/quickshell/$qsConfig/settings.qml" "systemsettings" "gnome-control-center" "better-control"
$taskManager = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitor --page-name Processes" "command -v btop && kitty -1 fish -c btop"
# The folder within ~/.config/quickshell containing the config
$qsConfig = ii
# Leave blank like this to load default config. Set to anything to not.
$dontLoadDefaultExecs =
$dontLoadDefaultGeneral =
$dontLoadDefaultRules =
$dontLoadDefaultKeybinds =
+19
View File
@@ -0,0 +1,19 @@
-- Default variables
-- Copy these to ~/.config/hypr/custom/variables.lua to make changes in a dotfiles-update-friendly manner
-- The folder within ~/.config/quickshell containing the config
hl.env("qsConfig", "ii")
-- Apps
-- PULL REQUESTS ADDING MORE WILL NOT BE ACCEPTED, CONFIG FOR YOURSELF
terminal = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'foot' 'kitty -1' 'alacritty' 'wezterm' 'konsole' 'kgx' 'uxterm' 'xterm'"
fileManager = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'dolphin' 'nautilus' 'nemo' 'thunar' 'kitty -1 fish -c yazi'"
browser = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'google-chrome-stable' 'zen-browser' 'firefox' 'brave' 'chromium' 'microsoft-edge-stable' 'opera' 'librewolf'"
codeEditor = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'windsurf' 'antigravity' 'code' 'codium' 'cursor' 'zed' 'zedit' 'zeditor' 'kate' 'gnome-text-editor' 'emacs' 'command -v nvim && kitty -1 nvim' 'command -v micro && kitty -1 micro'"
officeSoftware = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'wps' 'onlyoffice-desktopeditors' 'libreoffice'"
textEditor = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'kate' 'gnome-text-editor' 'emacs'"
volumeMixer = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'pavucontrol-qt' 'pavucontrol'"
settingsApp = "XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh 'qs -p ~/.config/quickshell/$qsConfig/settings.qml' 'systemsettings' 'gnome-control-center' 'better-control'"
taskManager = "~/.config/hypr/hyprland/scripts/launch_first_available.sh 'gnome-system-monitor' 'plasma-systemmonitor --page-name Processes' 'command -v btop && kitty -1 fish -c btop'"
workspaceGroupSize = 10
-4
View File
@@ -1,4 +0,0 @@
# This file is to be overwritten by nwg-displays if you choose to use it.
# nwg-displays is a graphical tool for managing monitors.
# - Installation for Arch Linux: sudo pacman -S nwg-displays
# - Repo: https://github.com/nwg-piotr/nwg-displays
-4
View File
@@ -1,4 +0,0 @@
# This file is to be overwritten by nwg-displays if you choose to use it.
# nwg-displays is a graphical tool for managing monitors.
# - Installation for Arch Linux: sudo pacman -S nwg-displays
# - Repo: https://github.com/nwg-piotr/nwg-displays
+2 -2
View File
@@ -6,8 +6,8 @@ input_path = '~/.config/matugen/templates/colors.json'
output_path = '~/.local/state/quickshell/user/generated/colors.json'
[templates.hyprland]
input_path = '~/.config/matugen/templates/hyprland/colors.conf'
output_path = '~/.config/hypr/hyprland/colors.conf'
input_path = '~/.config/matugen/templates/hyprland/colors.lua'
output_path = '~/.config/hypr/hyprland/colors.lua'
[templates.hyprlock]
input_path = '~/.config/matugen/templates/hyprland/hyprlock-colors.conf'
@@ -1,32 +0,0 @@
general {
col.active_border = rgba({{colors.outline_variant.default.hex_stripped}}77)
col.inactive_border = rgba({{colors.surface_container_low.default.hex_stripped}}33)
}
misc {
background_color = rgba({{colors.surface.dark.hex_stripped}}FF)
}
plugin {
hyprbars {
# Honestly idk if it works like css, but well, why not
bar_text_font = Google Sans Flex Medium, Rubik, Geist, AR One Sans, Reddit Sans, Inter, Roboto, Ubuntu, Noto Sans, sans-serif
bar_height = 30
bar_padding = 10
bar_button_padding = 5
bar_precedence_over_border = true
bar_part_of_window = true
bar_color = rgba({{colors.background.default.hex_stripped}}FF)
col.text = rgba({{colors.on_background.default.hex_stripped}}FF)
# example buttons (R -> L)
# hyprbars-button = color, size, on-click
hyprbars-button = rgb({{colors.on_background.default.hex_stripped}}), 13, 󰖭, hyprctl dispatch killactive
hyprbars-button = rgb({{colors.on_background.default.hex_stripped}}), 13, 󰖯, hyprctl dispatch fullscreen 1
hyprbars-button = rgb({{colors.on_background.default.hex_stripped}}), 13, 󰖰, hyprctl dispatch movetoworkspacesilent special
}
}
windowrule = border_color rgba({{colors.primary.default.hex_stripped}}AA) rgba({{colors.primary.default.hex_stripped}}77), match:pin 1
@@ -0,0 +1,16 @@
hl.config({
general = {
col = {
active_border = "rgba({{colors.outline_variant.default.hex_stripped}}77)",
inactive_border = "rgba({{colors.surface_container_low.default.hex_stripped}}33)",
},
},
misc = {
background_color = "rgba({{colors.surface.dark.hex_stripped}}FF)",
},
})
hl.window_rule({
match = { pin = 1 },
border_color = "rgba({{colors.primary.default.hex_stripped}}AA) rgba({{colors.primary.default.hex_stripped}}77)",
})
@@ -399,6 +399,10 @@ Singleton {
property JsonObject notifications: JsonObject {
property int timeout: 7000
property JsonObject monitor: JsonObject {
property bool enable: false
property string name: "" // Name of the monitor to show notifications on, like "eDP-1". Find out with 'hyprctl monitors' command
}
}
property JsonObject osd: JsonObject {
@@ -5,13 +5,13 @@ import qs.modules.common.functions
import qs.modules.common.widgets
QuickToggleModel {
name: Translation.tr("Anti-flashbang")
tooltipText: Translation.tr("Anti-flashbang")
icon: "flash_off"
name: HyprlandAntiFlashbangShader.enabled ? (HyprlandAntiFlashbangShader.weak ? Translation.tr("Anti-flash: Weak") : Translation.tr("Anti-flash: Strong")) : Translation.tr("Anti-flashbang")
tooltipText: `${Translation.tr("Anti-flashbang")}: ${HyprlandAntiFlashbangShader.enabled ? (HyprlandAntiFlashbangShader.weak ? Translation.tr("Weak") : Translation.tr("Strong")) : Translation.tr("Off")}`
icon: HyprlandAntiFlashbangShader.enabled ? (!HyprlandAntiFlashbangShader.weak ? "flash_off" : "sunny_snowing") : "flash_on"
toggled: HyprlandAntiFlashbangShader.enabled
mainAction: () => {
HyprlandAntiFlashbangShader.toggle()
HyprlandAntiFlashbangShader.cycle()
}
hasMenu: true
}
@@ -74,9 +74,6 @@ Scope {
// Unlock the screen before exiting, or the compositor will display a
// fallback lock you can't interact with.
GlobalStates.screenLocked = false;
// Refocus last focused window on unlock (hack)
Quickshell.execDetached(["bash", "-c", `sleep 0.2; hyprctl --batch "dispatch togglespecialworkspace; dispatch togglespecialworkspace"`])
// Reset
lockContext.reset();
@@ -16,9 +16,20 @@ Process {
return StringUtils.shellSingleQuoteEscape(FileUtils.trimFileProtocol(filePath));
}
function processSourceUrl() {
return StringUtils.shellSingleQuoteEscape(sourceUrl);
}
function curlUserAgentArg() {
if (!downloadUserAgent) {
return "";
}
return ` -H 'User-Agent: ${StringUtils.shellSingleQuoteEscape(downloadUserAgent)}'`;
}
running: true
command: ["bash", "-c",
`mkdir -p $(dirname '${processFilePath()}'); [ -f '${processFilePath()}' ] || curl -sSL '${sourceUrl}' -o '${processFilePath()}' && file '${processFilePath()}'`
`mkdir -p $(dirname '${processFilePath()}'); [ -f '${processFilePath()}' ] || curl -sSL '${processSourceUrl()}'${curlUserAgentArg()} -o '${processFilePath()}' && file '${processFilePath()}'`
]
stdout: StdioCollector {
id: imageSizeOutputCollector
@@ -153,7 +153,7 @@ Item { // Notification item area
implicitHeight: summaryText.implicitHeight
StyledText {
id: summaryText
Layout.fillWidth: summaryTextMetrics.width >= summaryRow.implicitWidth * root.summaryElideRatio
Layout.fillWidth: summaryTextMetrics.width >= root.width * root.summaryElideRatio
visible: !root.onlyNotification
font.pixelSize: root.fontSize
color: Appearance.colors.colOnLayer3
@@ -107,9 +107,9 @@ Item {
Layout.alignment: Qt.AlignVCenter
onClicked: event => {
if (Appearance.m3colors.darkmode) {
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`);
Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`])
} else {
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`);
Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`])
}
}
MaterialSymbol {
@@ -88,9 +88,9 @@ Item {
WheelHandler {
onWheel: (event) => {
if (event.angleDelta.y < 0)
Hyprland.dispatch(`workspace r+1`);
Hyprland.dispatch(`hl.dsp.focus({workspace = "r+1"})`);
else if (event.angleDelta.y > 0)
Hyprland.dispatch(`workspace r-1`);
Hyprland.dispatch(`hl.dsp.focus({workspace = "r-1"})`);
}
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
}
@@ -100,7 +100,7 @@ Item {
acceptedButtons: Qt.BackButton
onPressed: (event) => {
if (event.button === Qt.BackButton) {
Hyprland.dispatch(`togglespecialworkspace`);
Hyprland.dispatch(`hl.dsp.workspace.toggle_special("special")`);
}
}
}
@@ -199,9 +199,9 @@ Item {
property int workspaceValue: workspaceGroup * root.workspacesShown + index + 1
implicitHeight: vertical ? Appearance.sizes.verticalBarWidth : Appearance.sizes.barHeight
implicitWidth: vertical ? Appearance.sizes.verticalBarWidth : Appearance.sizes.verticalBarWidth
onPressed: Hyprland.dispatch(`workspace ${workspaceValue}`)
width: vertical ? undefined : workspaceButtonWidth
height: vertical ? workspaceButtonWidth : undefined
onPressed: Hyprland.dispatch(`hl.dsp.focus({ workspace = ${workspaceValue}})`)
width: vertical ? undefined : root.workspaceButtonWidth
height: vertical ? root.workspaceButtonWidth : undefined
background: Item {
id: workspaceButtonBackground
@@ -46,8 +46,8 @@ Scope { // Scope
implicitWidth: cheatsheetBackground.width + Appearance.sizes.elevationMargin * 2
implicitHeight: cheatsheetBackground.height + Appearance.sizes.elevationMargin * 2
WlrLayershell.namespace: "quickshell:cheatsheet"
// Hyprland 0.49: Focus is always exclusive and setting this breaks mouse focus grab
// WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
// Setting this value makes it take its sweet time to open
// WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
color: "transparent"
mask: Region {
@@ -2,214 +2,43 @@ pragma ComponentBehavior: Bound
import qs.services
import qs.modules.common
import qs.modules.common.functions
import qs.modules.common.widgets
import QtQuick
import QtQuick.Layouts
import Quickshell
Item {
id: root
readonly property var keybinds: HyprlandKeybinds.keybinds
property real spacing: 20
property real titleSpacing: 7
property real padding: 4
implicitWidth: row.implicitWidth + padding * 2
implicitHeight: row.implicitHeight + padding * 2
// Excellent symbol explaination and source :
// http://xahlee.info/comp/unicode_computing_symbols.html
// https://www.nerdfonts.com/cheat-sheet
property var macSymbolMap: ({
"Ctrl": "󰘴",
"Alt": "󰘵",
"Shift": "󰘶",
"Space": "󱁐",
"Tab": "↹",
"Equal": "󰇼",
"Minus": "",
"Print": "",
"BackSpace": "󰭜",
"Delete": "⌦",
"Return": "󰌑",
"Period": ".",
"Escape": "⎋"
})
property var functionSymbolMap: ({
"F1": "󱊫",
"F2": "󱊬",
"F3": "󱊭",
"F4": "󱊮",
"F5": "󱊯",
"F6": "󱊰",
"F7": "󱊱",
"F8": "󱊲",
"F9": "󱊳",
"F10": "󱊴",
"F11": "󱊵",
"F12": "󱊶",
})
property var mouseSymbolMap: ({
"mouse_up": "󱕐",
"mouse_down": "󱕑",
"mouse:272": "L󰍽",
"mouse:273": "R󰍽",
"Scroll ↑/↓": "󱕒",
"Page_↑/↓": "⇞/⇟",
})
property var keyBlacklist: ["Super_L"]
property var keySubstitutions: Object.assign({
"Super": "",
"mouse_up": "Scroll ↓", // ikr, weird
"mouse_down": "Scroll ↑", // trust me bro
"mouse:272": "LMB",
"mouse:273": "RMB",
"mouse:275": "MouseBack",
"Slash": "/",
"Hash": "#",
"Return": "Enter",
// "Shift": "",
},
!!Config.options.cheatsheet.superKey ? {
"Super": Config.options.cheatsheet.superKey,
}: {},
Config.options.cheatsheet.useMacSymbol ? macSymbolMap : {},
Config.options.cheatsheet.useFnSymbol ? functionSymbolMap : {},
Config.options.cheatsheet.useMouseSymbol ? mouseSymbolMap : {},
)
Row { // Keybind columns
id: row
spacing: root.spacing
Repeater {
model: keybinds.children
delegate: Column { // Keybind sections
spacing: root.spacing
required property var modelData
anchors.top: row.top
Repeater {
model: modelData.children
delegate: Item { // Section with real keybinds
id: keybindSection
required property var modelData
implicitWidth: sectionColumn.implicitWidth
implicitHeight: sectionColumn.implicitHeight
Column {
id: sectionColumn
anchors.centerIn: parent
spacing: root.titleSpacing
StyledText {
id: sectionTitle
font {
family: Appearance.font.family.title
pixelSize: Appearance.font.pixelSize.title
variableAxes: Appearance.font.variableAxes.title
}
color: Appearance.colors.colOnLayer0
text: keybindSection.modelData.name
}
GridLayout {
id: keybindGrid
columns: 2
columnSpacing: 4
rowSpacing: 4
Repeater {
model: {
var result = [];
for (var i = 0; i < keybindSection.modelData.keybinds.length; i++) {
const keybind = keybindSection.modelData.keybinds[i];
if (!Config.options.cheatsheet.splitButtons) {
for (var j = 0; j < keybind.mods.length; j++) {
keybind.mods[j] = keySubstitutions[keybind.mods[j]] || keybind.mods[j];
}
keybind.mods = [keybind.mods.join(' ') ]
keybind.mods[0] += !keyBlacklist.includes(keybind.key) && keybind.mods[0].length ? ' ' : ''
keybind.mods[0] += !keyBlacklist.includes(keybind.key) ? (keySubstitutions[keybind.key] || keybind.key) : ''
}
result.push({
"type": "keys",
"mods": keybind.mods,
"key": keybind.key,
});
result.push({
"type": "comment",
"comment": keybind.comment,
});
}
return result;
}
delegate: Item {
required property var modelData
implicitWidth: keybindLoader.implicitWidth
implicitHeight: keybindLoader.implicitHeight
Loader {
id: keybindLoader
sourceComponent: (modelData.type === "keys") ? keysComponent : commentComponent
}
Component {
id: keysComponent
Row {
spacing: 4
Repeater {
model: modelData.mods
delegate: KeyboardKey {
required property var modelData
key: keySubstitutions[modelData] || modelData
pixelSize: Config.options.cheatsheet.fontSize.key
}
}
StyledText {
id: keybindPlus
visible: Config.options.cheatsheet.splitButtons && !keyBlacklist.includes(modelData.key) && modelData.mods.length > 0
text: "+"
}
KeyboardKey {
id: keybindKey
visible: Config.options.cheatsheet.splitButtons && !keyBlacklist.includes(modelData.key)
key: keySubstitutions[modelData.key] || modelData.key
pixelSize: Config.options.cheatsheet.fontSize.key
color: Appearance.colors.colOnLayer0
}
}
}
Component {
id: commentComponent
Item {
id: commentItem
implicitWidth: commentText.implicitWidth + 8 * 2
implicitHeight: commentText.implicitHeight
StyledText {
id: commentText
anchors.centerIn: parent
font.pixelSize: Config.options.cheatsheet.fontSize.comment || Appearance.font.pixelSize.smaller
text: modelData.comment
}
}
}
}
}
}
}
}
implicitWidth: QsWindow?.window?.screen.width * 0.7 ?? 0
implicitHeight: QsWindow?.window?.screen.height * 0.7 ?? 0
StyledFlickable {
id: flickable
clip: true
anchors.fill: parent
anchors.margins: Appearance.rounding.small
contentHeight: height
contentWidth: flow.implicitWidth
Flow {
id: flow
height: flickable.height
flow: Flow.TopToBottom
spacing: 10
Repeater {
model: [...HyprlandKeybinds.keybindCategories, ""]
delegate: CheatsheetKeybindsCategory {
required property var modelData
categoryName: modelData
}
}
}
}
ScrollEdgeFade {
target: flickable
vertical: false
color: Appearance.colors.colLayer0Base
}
}
@@ -0,0 +1,222 @@
pragma ComponentBehavior: Bound
import qs.services
import qs.modules.common
import qs.modules.common.functions
import qs.modules.common.widgets
import QtQuick
import QtQuick.Layouts
import Quickshell
// Notes:
// We deal with keybinds being numbered 1, 2, etc by discarding 2+, keeping 1 and replacing it with a generic "<Number>"
Column {
id: root
required property string categoryName
readonly property bool isCategorized: categoryName?.length > 0
property int maxBindWidth: 0
property real columnSpacing: 40
property real titleSpacing: 7
// Excellent symbol explaination and source :
// http://xahlee.info/comp/unicode_computing_symbols.html
// https://www.nerdfonts.com/cheat-sheet
property var macSymbolMap: ({
"Ctrl": "󰘴",
"Alt": "󰘵",
"Shift": "󰘶",
"Space": "󱁐",
"Tab": "↹",
"Equal": "󰇼",
"Minus": "",
"Print": "",
"BackSpace": "󰭜",
"Delete": "⌦",
"Return": "󰌑",
"Period": ".",
"Escape": "⎋"
})
property var functionSymbolMap: ({
"F1": "󱊫",
"F2": "󱊬",
"F3": "󱊭",
"F4": "󱊮",
"F5": "󱊯",
"F6": "󱊰",
"F7": "󱊱",
"F8": "󱊲",
"F9": "󱊳",
"F10": "󱊴",
"F11": "󱊵",
"F12": "󱊶",
})
property var mouseSymbolMap: ({
"mouse_up": "󱕐",
"mouse_down": "󱕑",
"mouse:272": "L󰍽",
"mouse:273": "R󰍽",
"Scroll ↑/↓": "󱕒",
"Page_↑/↓": "⇞/⇟",
})
property var keyBlacklist: ["SUPER_L", "SUPER_R"]
property var keySubstitutions: Object.assign({
"Super": "",
"mouse_up": "Scroll ↓", // ikr, weird
"mouse_down": "Scroll ↑", // trust me bro
"mouse:272": "LMB",
"mouse:273": "RMB",
"mouse:275": "MouseBack",
"Slash": "/",
"Hash": "#",
"Return": "Enter",
// "Shift": "",
},
!!Config.options.cheatsheet.superKey ? {
"Super": Config.options.cheatsheet.superKey,
}: {},
Config.options.cheatsheet.useMacSymbol ? macSymbolMap : {},
Config.options.cheatsheet.useFnSymbol ? functionSymbolMap : {},
Config.options.cheatsheet.useMouseSymbol ? mouseSymbolMap : {},
)
function modMaskToStringList(modMask: int): list<string> {
var list = [];
// Funny mathematical order but we wanna have this natural user-facing order
if (modMask & (1 << 2)) { list.push("Ctrl"); }
if (modMask & (1 << 6)) { list.push("Super"); }
if (modMask & (1 << 0)) { list.push("Shift"); }
if (modMask & (1 << 3)) { list.push("Alt"); }
if (modMask & (1 << 1)) { list.push("Caps"); }
if (modMask & (1 << 4)) { list.push("Mod2"); }
if (modMask & (1 << 5)) { list.push("Mod3"); }
if (modMask & (1 << 7)) { list.push("Mod5"); }
return list;
}
visible: repeater.model.length > 0
spacing: titleSpacing
StyledText {
text: root.isCategorized ? root.categoryName : "Uncategorized"
font.pixelSize: Appearance.font.pixelSize.title
}
function hasDescription(bind) {
return bind.description?.length > 0;
}
function isCategory(bind, categoryName) {
return bind.description.substring(0, bind.description.indexOf(":")) === categoryName;
}
function isUncategorized(bind) {
return bind.description.indexOf(":") === -1;
}
function containsNonFirstRepetitive(bind) {
const key = bind.key;
if (key.includes("mouse") || key.includes("page")) return false;
// Contains non-1 number
if (/\d/.test(key) && !key.includes("1")) return true;
// Contains non-left direction
if (/^(right|up|down)\b/i.test(key)) return true;
return false;
}
function containsFirstRepetitive(bind) {
const key = bind.key;
return key.includes("1") || /left/i.test(key);
}
function transformKey(key) {
const replaced = root.keySubstitutions[key] || key;
const denumbered = replaced.replace("1", "<Number>");
const dedirectioned = denumbered.replace("Left", "<Direction>");
return dedirectioned;
}
function transformDescription(bind, categoryName) {
const description = bind.description
const regex = new RegExp("\\s*" + categoryName + "\\s*:\\s*");
const decategorized = description.replace(regex, "");
if (!containsFirstRepetitive(bind)) return decategorized;
const denumbered = decategorized.replace("1", "<Number>");
const dedirectioned = denumbered.replace(/ \b(left|right|up|down)\b/i, " <Direction>");
return dedirectioned;
}
Column {
spacing: 4
Repeater {
id: repeater
model: {
if (!root.isCategorized) {
return HyprlandKeybinds.keybinds.filter(bind => root.hasDescription(bind) && root.isUncategorized(bind) && !root.containsNonFirstRepetitive(bind));
}
return HyprlandKeybinds.keybinds.filter(bind => root.hasDescription(bind) && root.isCategory(bind, root.categoryName) && !root.containsNonFirstRepetitive(bind));
}
delegate: BindLine {
required property var modelData
keyData: modelData
categoryName: root.categoryName
}
}
}
component BindLine: Row {
id: bindLine
required property var keyData
property string categoryName: ""
Row {
spacing: 16
Row {
id: modRow
Component.onCompleted: root.maxBindWidth = Math.max(root.maxBindWidth, implicitWidth)
width: root.maxBindWidth
spacing: 4
Repeater {
model: {
const modList = root.modMaskToStringList(bindLine.keyData.modmask).map(mod => root.keySubstitutions[mod] || mod)
if (modList.length == 0) return []
if (Config.options.cheatsheet.splitButtons) return modList;
return [modList.join(" ")]
}
delegate: KeyboardKey {
required property var modelData
key: root.transformKey(modelData)
pixelSize: Config.options.cheatsheet.fontSize.key
}
}
StyledText {
id: keybindPlus
anchors.verticalCenter: parent.verticalCenter
visible: !keyBlacklist.includes(bindLine.keyData.key) && bindLine.keyData.modmask > 0
text: "+"
}
KeyboardKey {
id: keybindKey
anchors.verticalCenter: parent.verticalCenter
visible: !keyBlacklist.includes(bindLine.keyData.key)
key: root.transformKey(bindLine.keyData.key)
pixelSize: Config.options.cheatsheet.fontSize.key
color: Appearance.colors.colOnLayer0
}
}
Item {
anchors.verticalCenter: parent.verticalCenter
implicitWidth: commentText.implicitWidth + root.columnSpacing
implicitHeight: commentText.implicitHeight
StyledText {
id: commentText
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
font.pixelSize: Config.options.cheatsheet.fontSize.comment || Appearance.font.pixelSize.smaller
text: root.transformDescription(bindLine.keyData, bindLine.categoryName)
}
}
}
}
}
@@ -24,11 +24,11 @@ LockScreen {
var monName = Quickshell.screens[j].name
var wsId = root.savedWorkspaces[monName]
if (wsId !== undefined) {
batch += "dispatch focusmonitor " + monName + "; dispatch workspace " + wsId + "; "
batch += `hyprctl dispatch 'hl.dsp.focus({monitor="${monName}"})'; hyprctl dispatch 'hl.dsp.focus({workspace=${wsId}})';`
}
}
if (batch.length > 0) {
Quickshell.execDetached(["hyprctl", "--batch", batch + "reload"])
Quickshell.execDetached(["bash", "-c", batch])
}
}
}
@@ -53,10 +53,10 @@ LockScreen {
}
var ws = (mData?.activeWorkspace?.id ?? 1)
next[mon] = ws
batch += "dispatch focusmonitor " + mon + "; dispatch workspace " + (2147483647 - ws) + "; "
batch += `hyprctl dispatch 'hl.dsp.focus({monitor="${mon}"})'; hyprctl dispatch 'hl.dsp.focus({workspace=${2147483647 - ws}})';`
}
root.savedWorkspaces = next
Quickshell.execDetached(["hyprctl", "--batch", batch + "reload"])
Quickshell.execDetached(["bash", "-c", batch])
} else {
restoreTimer.start()
}
@@ -14,7 +14,7 @@ Scope {
PanelWindow {
id: root
visible: (Notifications.popupList.length > 0) && !GlobalStates.screenLocked
screen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name) ?? null
screen: Quickshell.screens.find(s => Config.options.notifications.forceMonitor.enable ? s.name === Config.options.notifications.forceMonitor.name : s.name === Hyprland.focusedMonitor?.name) ?? null
WlrLayershell.namespace: "quickshell:notificationPopup"
WlrLayershell.layer: WlrLayer.Overlay
@@ -80,12 +80,6 @@ Scope {
Keys.onPressed: event => {
if (event.key === Qt.Key_Escape) {
GlobalStates.overviewOpen = false;
} else if (event.key === Qt.Key_Left) {
if (!panelWindow.searchingText)
Hyprland.dispatch("workspace r-1");
} else if (event.key === Qt.Key_Right) {
if (!panelWindow.searchingText)
Hyprland.dispatch("workspace r+1");
}
}
@@ -142,7 +142,7 @@ Item {
onPressed: {
if (root.draggingTargetWorkspace === -1) {
GlobalStates.overviewOpen = false
Hyprland.dispatch(`workspace ${workspace.workspaceValue}`)
Hyprland.dispatch(`hl.dsp.focus({ workspace = ${workspace.workspaceValue} })`)
}
}
}
@@ -266,7 +266,7 @@ Item {
window.Drag.active = false
root.draggingFromWorkspace = -1
if (targetWorkspace !== -1 && targetWorkspace !== windowData?.workspace.id) {
Hyprland.dispatch(`movetoworkspacesilent ${targetWorkspace}, address:${window.windowData?.address}`)
Hyprland.dispatch(`hl.dsp.window.move({ workspace = ${targetWorkspace}, follow = false, window = "address:${window.windowData?.address}" })`)
updateWindowPosition.restart()
}
else {
@@ -274,9 +274,9 @@ Item {
updateWindowPosition.restart()
return
}
const percentageX = Math.round((window.x - xOffset) / root.workspaceImplicitWidth * 100)
const percentageY = Math.round((window.y - yOffset) / root.workspaceImplicitHeight * 100)
Hyprland.dispatch(`movewindowpixel exact ${percentageX}% ${percentageY}%, address:${window.windowData?.address}`)
const percentageX = (window.x - xOffset) / root.workspaceImplicitWidth
const percentageY = (window.y - yOffset) / root.workspaceImplicitHeight
Hyprland.dispatch(`hl.dsp.window.move({ x = "${percentageX * root.screen.width}", y = "${percentageY * root.screen.height}", window = "address:${window.windowData?.address}" })`)
}
}
onClicked: (event) => {
@@ -284,10 +284,10 @@ Item {
if (event.button === Qt.LeftButton) {
GlobalStates.overviewOpen = false
Hyprland.dispatch(`focuswindow address:${windowData.address}`)
Hyprland.dispatch(`hl.dsp.focus({window = "address:${windowData.address}"})`)
event.accepted = true
} else if (event.button === Qt.MiddleButton) {
Hyprland.dispatch(`closewindow address:${windowData.address}`)
Hyprland.dispatch(`hl.dsp.window.close({window = "address:${windowData.address}"})`)
event.accepted = true
}
}
@@ -226,7 +226,7 @@ RippleButton {
color: root.colForeground
horizontalAlignment: Text.AlignLeft
elide: Text.ElideRight
text: root.selected ? root.itemName : root.displayContent
text: root.selected ? StringUtils.escapeHtml(root.itemName) : root.displayContent
}
}
Loader { // Clipboard image preview
@@ -21,7 +21,6 @@ Scope {
component CornerPanelWindow: PanelWindow {
id: cornerPanelWindow
property var screen: QsWindow.window?.screen
property var brightnessMonitor: Brightness.getMonitorForScreen(screen)
property bool fullscreen
visible: (Config.options.appearance.fakeScreenRounding === 1 || (Config.options.appearance.fakeScreenRounding === 2 && !fullscreen))
@@ -34,7 +34,7 @@ Scope { // Scope
running = true;
}
function doIt2(output) {
command = ["bash", "-c", "hyprctl dispatch movecursor 9999 9999"];
command = ["bash", "-c", "hyprctl dispatch 'hl.dsp.cursor.move({x=9999,y=9999})'"];
hook = () => {
doIt3();
}
@@ -42,7 +42,7 @@ Scope { // Scope
}
function doIt3(output) {
root.pin = !root.pin;
command = ["bash", "-c", `sleep 0.01; hyprctl dispatch movecursor ${cursorX} ${cursorY}`];
command = ["bash", "-c", `sleep 0.01; hyprctl dispatch 'hl.dsp.cursor.move({x=${cursorX},y=${cursorY}})'`];
hook = null
running = true;
}
@@ -147,9 +147,9 @@ Button {
buttonText: Translation.tr("Open file link")
onClicked: {
root.showActions = false
Hyprland.dispatch("keyword cursor:no_warps true")
Hyprland.dispatch("hl.config({cursor = {no_warps = true}})")
Qt.openUrlExternally(root.imageData.file_url)
Hyprland.dispatch("keyword cursor:no_warps false")
Hyprland.dispatch("hl.config({cursor = {no_warps = false}})")
}
}
MenuButton {
@@ -160,9 +160,9 @@ Button {
enabled: root.imageData.source && root.imageData.source.length > 0
onClicked: {
root.showActions = false
Hyprland.dispatch("keyword cursor:no_warps true")
Hyprland.dispatch("hl.config({cursor = {no_warps = true}})")
Qt.openUrlExternally(root.imageData.source)
Hyprland.dispatch("keyword cursor:no_warps false")
Hyprland.dispatch("hl.config({cursor = {no_warps = false}})")
}
}
MenuButton {
@@ -172,8 +172,10 @@ Button {
onClicked: {
root.showActions = false;
const targetPath = root.imageData.is_nsfw ? root.nsfwPath : root.downloadPath;
const userAgent = Config.options?.networking?.userAgent ?? ""
const userAgentHeader = userAgent ? ` -H 'User-Agent: ${StringUtils.shellSingleQuoteEscape(userAgent)}'` : ""
Quickshell.execDetached(["bash", "-c",
`mkdir -p '${targetPath}' && curl '${root.imageData.file_url}' -o '${targetPath}/${root.fileName}' && notify-send '${Translation.tr("Download complete")}' '${root.downloadPath}/${root.fileName}' -a 'Shell'`
`mkdir -p '${targetPath}' && curl '${StringUtils.shellSingleQuoteEscape(root.imageData.file_url)}'${userAgentHeader} -o '${targetPath}/${root.fileName}' && notify-send '${Translation.tr("Download complete")}' '${root.downloadPath}/${root.fileName}' -a 'Shell'`
])
}
}
@@ -230,7 +230,7 @@ Rectangle {
rowHeight: imageRow.rowHeight
imageRadius: imageRow.modelData.images.length == 1 ? 50 : Appearance.rounding.normal
// Download manually to reduce redundant requests or make sure downloading works
manualDownload: ["danbooru", "waifu.im", "t.alcy.cc"].includes(root.responseData.provider)
manualDownload: ["danbooru", "waifu.im", "t.alcy.cc", "konachan"].includes(root.responseData.provider)
previewDownloadPath: root.previewDownloadPath
downloadPath: root.downloadPath
nsfwPath: root.nsfwPath
@@ -268,7 +268,7 @@ Item {
toggled: false
buttonIcon: "restart_alt"
onClicked: {
Hyprland.dispatch("reload");
Quickshell.execDetached(["hyprctl", "reload"])
Quickshell.reload(true);
}
StyledToolTip {
@@ -24,7 +24,7 @@ GroupButton {
// Declared in specific toggles
property QuickToggleModel toggleModel
property string name: toggleModel?.name ?? ""
property string statusText: (toggleModel?.hasStatusText) ? (toggleModel?.statusText || (toggled ? Translation.tr("Active") : Translation.tr("Inactive"))) : ""
property string statusText: (toggleModel?.hasStatusText) ? (toggleModel?.statusText || (toggled ? Translation.tr("On") : Translation.tr("Off"))) : ""
property string tooltipText: toggleModel?.tooltipText ?? ""
property string buttonIcon: toggleModel?.icon ?? "close"
property bool available: toggleModel?.available ?? true
@@ -265,6 +265,31 @@ ContentPage {
Config.options.notifications.timeout = value;
}
}
ConfigSwitch {
buttonIcon: "monitor"
text: Translation.tr("Force specific monitor")
checked: Config.options.notifications.forceMonitor.enable
onCheckedChanged: {
Config.options.notifications.forceMonitor.enable = checked;
}
StyledToolTip {
text: Translation.tr("If you have multiple monitors and want notifications to only show on one of them, enable this and enter the monitor name below (e.g., eDP-1)")
}
}
ConfigRow {
enabled: Config.options.notifications.forceMonitor.enable
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Monitor name to show notifications on (e.g., eDP-1)")
text: Config.options.notifications.forceMonitor.name
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.notifications.forceMonitor.name = text;
}
}
}
}
ContentSection {
@@ -186,7 +186,7 @@ Rectangle {
} else {
root.draggingWindow = false;
if (root.hoveredWorkspace !== null && root.hoveredWorkspace.workspace !== windowItem.hyprlandClient.workspace.id) {
Hyprland.dispatch(`movetoworkspacesilent ${root.hoveredWorkspace.workspace}, address:${windowItem.hyprlandClient.address}`);
Hyprland.dispatch(`hl.dsp.window.move({ workspace = ${root.hoveredWorkspace.workspace}, follow = false, window = "address:${windowItem.hyprlandClient.address}" })`)
} else {
windowItem.openedX = 0;
windowItem.openedY = 0;
@@ -292,7 +292,7 @@ Rectangle {
onClicked: {
GlobalStates.overviewOpen = false;
root.closed(); // Close immediately to avoid weird animations
Hyprland.dispatch(`workspace ${workspaceItem.workspace}`);
Hyprland.dispatch(`hl.dsp.focus({workspace = ${workspaceItem.workspace}})`);
}
}
}
@@ -62,14 +62,14 @@ WMouseAreaButton {
}
function closeWindow() {
Hyprland.dispatch(`closewindow address:${root.hyprlandClient?.address}`);
Hyprland.dispatch(`hl.dsp.window.close({window = "address:${root.hyprlandClient?.address}"})`)
}
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
onClicked: event => {
if (event.button === Qt.LeftButton) {
GlobalStates.overviewOpen = false;
Hyprland.dispatch(`focuswindow address:${root.hyprlandClient?.address}`);
Hyprland.dispatch(`hl.dsp.focus({window = "address:${root.hyprlandClient?.address}"})`)
GlobalStates.overviewOpen = false;
} else if (event.button === Qt.MiddleButton) {
root.closeWindow();
@@ -143,7 +143,7 @@ WMouseAreaButton {
icon.name: isPinned ? "checkmark" : "empty"
text: Translation.tr("Show this window on all desktops")
onTriggered: {
Hyprland.dispatch(`pin address:${root.hyprlandClient?.address}`);
Hyprland.dispatch(`hl.dsp.window.pin({window = "address:${root.hyprlandClient?.address}"})`);
}
}
Action {
@@ -42,6 +42,9 @@ apply_kitty() {
done
# Reload
if ! pgrep -f kitty >/dev/null; then
return
fi
kill -SIGUSR1 $(pidof kitty)
}
@@ -71,13 +74,8 @@ apply_anyterm() {
}
apply_term() {
apply_kitty
apply_anyterm
}
apply_qt() {
sh "$CONFIG_DIR/scripts/kvantum/materialQT.sh" # generate kvantum theme
python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors
apply_anyterm &
apply_kitty &
}
# Check if terminal theming is enabled in config
@@ -9,6 +9,7 @@ settings_paths=(
"${XDG_CONFIG_HOME:-$HOME/.config}/Code - Insiders/User/settings.json"
"${XDG_CONFIG_HOME:-$HOME/.config}/Cursor/User/settings.json"
"${XDG_CONFIG_HOME:-$HOME/.config}/Antigravity/User/settings.json"
"${XDG_CONFIG_HOME:-$HOME/.config}/Windsurf/User/settings.json"
# Add more paths as needed for other forks
)
@@ -29,14 +29,15 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
mkdir -p "$PICTURES_DIR/Wallpapers"
page=$((1 + RANDOM % 1000));
response=$(curl "https://konachan.net/post.json?tags=rating%3Asafe&limit=1&page=$page")
illogicalImpulseConfigPath="$HOME/.config/illogical-impulse/config.json"
userAgent=$(jq -r '.networking.userAgent // empty' "$illogicalImpulseConfigPath" 2>/dev/null)
response=$(curl -A "$userAgent" "https://konachan.net/post.json?tags=rating%3Asafe&limit=1&page=$page")
link=$(echo "$response" | jq '.[0].file_url' -r);
ext=$(echo "$link" | awk -F. '{print $NF}')
downloadPath="$PICTURES_DIR/Wallpapers/random_wallpaper.$ext"
illogicalImpulseConfigPath="$HOME/.config/illogical-impulse/config.json"
currentWallpaperPath=$(jq -r '.background.wallpaperPath' $illogicalImpulseConfigPath)
currentWallpaperPath=$(jq -r '.background.wallpaperPath' "$illogicalImpulseConfigPath")
if [ "$downloadPath" == "$currentWallpaperPath" ]; then
downloadPath="$PICTURES_DIR/Wallpapers/random_wallpaper-1.$ext"
fi
curl "$link" -o "$downloadPath"
curl -A "$userAgent" "$link" -o "$downloadPath"
"$SCRIPT_DIR/../switchwall.sh" --image "$downloadPath"
@@ -307,8 +307,8 @@ switch() {
source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate"
python3 "$SCRIPT_DIR/generate_colors_material.py" "${generate_colors_material_args[@]}" \
> "$STATE_DIR"/user/generated/material_colors.scss
"$SCRIPT_DIR"/applycolor.sh
deactivate
"$SCRIPT_DIR"/applycolor.sh
# Pass screen width, height, and wallpaper path to post_process
max_width_desired="$(hyprctl monitors -j | jq '([.[].width] | min)' | xargs)"
@@ -444,6 +444,30 @@ main() {
fi
fi
# If mode_flag is dark or light, try to find a variant with that mode suffix
if [[ "$mode_flag" == "dark" || "$mode_flag" == "light" ]]; then
# Get directory, filename without extension, and extension
local imgdir="$(dirname "$imgpath")"
local imgbase="$(basename "$imgpath")"
local imgname="${imgbase%.*}"
local imgext="${imgbase##*.}"
# Strip existing -dark or -light suffix
local stripped_name="${imgname%-dark}"
stripped_name="${stripped_name%-light}"
# Construct the new path with the requested mode suffix
local new_imgpath="${imgdir}/${stripped_name}-${mode_flag}.${imgext}"
local new_stripped_imgpath="${imgdir}/${stripped_name}.${imgext}"
# If the variant exists, use it
if [[ -f "$new_imgpath" ]]; then
imgpath="$new_imgpath"
elif [[ -f "$new_stripped_imgpath" ]]; then
imgpath="$new_stripped_imgpath"
fi
fi
switch "$imgpath" "$mode_flag" "$type_flag" "$color_flag" "$color"
}
@@ -42,7 +42,8 @@ color236 #$onTertiary #
color237 #$onTertiaryContainer #
color238 #$onError #
color239 #$onErrorContainer #
color240 #$onPrimary # // Somehow 232 doesn't work so i gotta use another number
color240 #$onPrimary #
# Somehow 232 doesn't work so i gotta use another number
# Some stuff should specifically use the colors in the middle so they look acceptable in both unthemed light/dark
color243 #$primary #
@@ -1,222 +0,0 @@
#!/usr/bin/env -S\_/bin/sh\_-c\_"source\_\$(eval\_echo\_\$ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate&&exec\_python\_-E\_"\$0"\_"\$@""
import argparse
import re
import os
from os.path import expandvars as os_expandvars
from typing import Dict, List
TITLE_REGEX = "#+!"
HIDE_COMMENT = "[hidden]"
MOD_SEPARATORS = ['+', ' ']
COMMENT_BIND_PATTERN = "#/#"
parser = argparse.ArgumentParser(description='Hyprland keybind reader')
parser.add_argument('--path', type=str, default="$HOME/.config/hypr/hyprland.conf", help='path to keybind file (sourcing isn\'t supported)')
args = parser.parse_args()
content_lines = []
reading_line = 0
# Little Parser made for hyprland keybindings conf file
Variables: Dict[str, str] = {}
class KeyBinding(dict):
def __init__(self, mods, key, dispatcher, params, comment) -> None:
self["mods"] = mods
self["key"] = key
self["dispatcher"] = dispatcher
self["params"] = params
self["comment"] = comment
class Section(dict):
def __init__(self, children, keybinds, name) -> None:
self["children"] = children
self["keybinds"] = keybinds
self["name"] = name
def read_content(path: str) -> str:
if (not os.access(os.path.expanduser(os.path.expandvars(path)), os.R_OK)):
return ("error")
with open(os.path.expanduser(os.path.expandvars(path)), "r") as file:
return file.read()
def autogenerate_comment(dispatcher: str, params: str = "") -> str:
match dispatcher:
case "resizewindow":
return "Resize window"
case "movewindow":
if(params == ""):
return "Move window"
else:
return "Window: move in {} direction".format({
"l": "left",
"r": "right",
"u": "up",
"d": "down",
}.get(params, "null"))
case "pin":
return "Window: pin (show on all workspaces)"
case "splitratio":
return "Window split ratio {}".format(params)
case "togglefloating":
return "Float/unfloat window"
case "resizeactive":
return "Resize window by {}".format(params)
case "killactive":
return "Close window"
case "fullscreen":
return "Toggle {}".format(
{
"0": "fullscreen",
"1": "maximization",
"2": "fullscreen on Hyprland's side",
}.get(params, "null")
)
case "fakefullscreen":
return "Toggle fake fullscreen"
case "workspace":
if params == "+1":
return "Workspace: focus right"
elif params == "-1":
return "Workspace: focus left"
return "Focus workspace {}".format(params)
case "movefocus":
return "Window: move focus {}".format(
{
"l": "left",
"r": "right",
"u": "up",
"d": "down",
}.get(params, "null")
)
case "swapwindow":
return "Window: swap in {} direction".format(
{
"l": "left",
"r": "right",
"u": "up",
"d": "down",
}.get(params, "null")
)
case "movetoworkspace":
if params == "+1":
return "Window: move to right workspace (non-silent)"
elif params == "-1":
return "Window: move to left workspace (non-silent)"
return "Window: move to workspace {} (non-silent)".format(params)
case "movetoworkspacesilent":
if params == "+1":
return "Window: move to right workspace"
elif params == "-1":
return "Window: move to right workspace"
return "Window: move to workspace {}".format(params)
case "togglespecialworkspace":
return "Workspace: toggle special"
case "exec":
return "Execute: {}".format(params)
case _:
return ""
def get_keybind_at_line(line_number, line_start = 0):
global content_lines
line = content_lines[line_number]
_, keys = line.split("=", 1)
keys, *comment = keys.split("#", 1)
mods, key, dispatcher, *params = list(map(str.strip, keys.split(",", 4)))
params = "".join(map(str.strip, params))
# Remove empty spaces
comment = list(map(str.strip, comment))
# Add comment if it exists, else generate it
if comment:
comment = comment[0]
if comment.startswith("[hidden]"):
return None
else:
comment = autogenerate_comment(dispatcher, params)
if mods:
modstring = mods + MOD_SEPARATORS[0] # Add separator at end to ensure last mod is read
mods = []
p = 0
for index, char in enumerate(modstring):
if(char in MOD_SEPARATORS):
if(index - p > 1):
mods.append(modstring[p:index])
p = index+1
else:
mods = []
return KeyBinding(mods, key, dispatcher, params, comment)
def get_binds_recursive(current_content, scope):
global content_lines
global reading_line
# print("get_binds_recursive({0}, {1}) [@L{2}]".format(current_content, scope, reading_line + 1))
while reading_line < len(content_lines): # TODO: Adjust condition
line = content_lines[reading_line]
heading_search_result = re.search(TITLE_REGEX, line)
# print("Read line {0}: {1}\tisHeading: {2}".format(reading_line + 1, content_lines[reading_line], "[{0}, {1}, {2}]".format(heading_search_result.start(), heading_search_result.start() == 0, ((heading_search_result != None) and (heading_search_result.start() == 0))) if heading_search_result != None else "No"))
if ((heading_search_result != None) and (heading_search_result.start() == 0)): # Found title
# Determine scope
heading_scope = line.find('!')
# Lower? Return
if(heading_scope <= scope):
reading_line -= 1
return current_content
section_name = line[(heading_scope+1):].strip()
# print("[[ Found h{0} at line {1} ]] {2}".format(heading_scope, reading_line+1, content_lines[reading_line]))
reading_line += 1
current_content["children"].append(get_binds_recursive(Section([], [], section_name), heading_scope))
elif line.startswith(COMMENT_BIND_PATTERN):
keybind = get_keybind_at_line(reading_line, line_start=len(COMMENT_BIND_PATTERN))
if(keybind != None):
current_content["keybinds"].append(keybind)
elif line == "" or not line.lstrip().startswith("bind"): # Comment, ignore
pass
else: # Normal keybind
keybind = get_keybind_at_line(reading_line)
if(keybind != None):
current_content["keybinds"].append(keybind)
reading_line += 1
return current_content;
def parse_keys(path: str) -> Dict[str, List[KeyBinding]]:
global content_lines
content_lines = read_content(path).splitlines()
if content_lines[0] == "error":
return "error"
return get_binds_recursive(Section([], [], ""), 0)
if __name__ == "__main__":
import json
ParsedKeys = parse_keys(args.path)
print(json.dumps(ParsedKeys))
@@ -4,6 +4,29 @@ import re
import os
import tempfile
def format_value(value):
"""Format value: quote strings, leave numbers and booleans as-is"""
if value in ('true', 'false'):
return value
try:
float(value)
return value
except ValueError:
return f'"{value}"'
def build_nested_structure(key_parts, value):
"""Recursively build nested structure from key parts"""
if len(key_parts) == 1:
return f'{key_parts[0]}={format_value(value)}'
else:
return f'{key_parts[0]}={{{build_nested_structure(key_parts[1:], value)}}}'
def generate_config_line(key, value):
"""Generate hl.config line for given key and value"""
key_parts = key.split(':')
nested_structure = build_nested_structure(key_parts, value)
return f'hl.config({{{nested_structure}}})\n'
def edit_hyprland_config(file_path, set_args, reset_args):
if os.path.exists(file_path):
with open(file_path, 'r') as file:
@@ -19,7 +42,15 @@ def edit_hyprland_config(file_path, set_args, reset_args):
patterns = {}
for k in list(set_dict.keys()) + list(reset_set):
patterns[k] = re.compile(rf'^\s*{re.escape(k)}\s*=')
key_parts = k.split(':')
main_key = key_parts[0]
if len(key_parts) > 1:
# Build pattern to match nested structure
pattern_parts = [rf'\s*{re.escape(part)}\s*=' for part in key_parts]
nested_pattern = '\{'.join(pattern_parts)
patterns[k] = re.compile(rf'^\s*hl\.config\(\{{\s*{nested_pattern}')
else:
patterns[k] = re.compile(rf'^\s*hl\.config\(\{{\s*{re.escape(main_key)}\s*=')
for line in lines:
matched = False
@@ -36,7 +67,7 @@ def edit_hyprland_config(file_path, set_args, reset_args):
# Check if line matches a key to be set
for key, value in set_dict.items():
if patterns[key].match(line):
new_line = f"{key} = {value}\n"
new_line = generate_config_line(key, value)
new_lines.append(new_line)
found_keys.add(key)
matched = True
@@ -52,7 +83,7 @@ def edit_hyprland_config(file_path, set_args, reset_args):
if key not in found_keys:
if new_lines and not new_lines[-1].endswith('\n'):
new_lines[-1] += '\n'
new_lines.append(f"{key} = {value}\n")
new_lines.append(generate_config_line(key, value))
dir_name = os.path.dirname(os.path.abspath(file_path))
os.makedirs(dir_name, exist_ok=True)
@@ -77,10 +108,10 @@ def edit_hyprland_config(file_path, set_args, reset_args):
for key in reset_set:
print(f"Removed '{key}' from '{file_path}'")
for key, value in set_dict.items():
print(f"Updated '{file_path}' with {key} = {value}")
print(f"Updated '{file_path}' with {generate_config_line(key, value).strip()}")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Edit a Hyprland config file.")
parser = argparse.ArgumentParser(description="Edit a Hyprland config file. Subkeys use colon (:) for nesting.")
parser.add_argument("--file", default="~/.config/hypr/hyprland.conf", help="Path to the Hyprland config file (default: ~/.config/hypr/hyprland.conf).")
parser.add_argument("--set", nargs=2, action="append", metavar=("KEY", "VALUE"), help="Set a configuration key to a value.")
@@ -1,79 +0,0 @@
import re
import os
def read_scss(file_path):
"""Reads an SCSS file and returns a dictionary of color variables."""
colors = {}
with open(file_path, 'r') as file:
for line in file:
match = re.match(r'\$(\w+):\s*(#[0-9A-Fa-f]{6});', line.strip())
if match:
variable_name, color = match.groups()
colors[variable_name] = color
return colors
def update_svg_colors(svg_path, old_to_new_colors, output_path):
"""
Updates the colors in an SVG file based on the provided color map.
:param svg_path: Path to the SVG file.
:param old_to_new_colors: Dictionary mapping old colors to new colors.
:param output_path: Path to save the updated SVG file.
"""
# Read the SVG content
with open(svg_path, 'r') as file:
svg_content = file.read()
# Replace old colors with new colors
for old_color, new_color in old_to_new_colors.items():
svg_content = re.sub(old_color, new_color, svg_content, flags=re.IGNORECASE)
# Write the updated SVG content to the output file
with open(output_path, 'w') as file:
file.write(svg_content)
print(f"SVG colors have been updated and saved to {output_path}!")
def main():
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
scss_file = os.path.join(xdg_state_home, "quickshell", "user", "generated", "material_colors.scss")
svg_path = os.path.join(xdg_config_home, "Kvantum", "Colloid", "Colloid.svg")
output_path = os.path.join(xdg_config_home, "Kvantum", "MaterialAdw", "MaterialAdw.svg")
# Read colors from the SCSS file
color_data = read_scss(scss_file)
# Specify the old colors and map them to new colors from the SCSS file
old_to_new_colors = {
#'#cccccc': color_data['surfaceDim'], # Map old SVG color to new SCSS color
#'#666666': color_data['surfaceDim'],
'#3c84f7': color_data['primary'],
#'#5a5a5a': color_data['neutral_paletteKeyColor'],
'#000000': color_data['shadow'],
'#f04a50': color_data['error'],
'#4285f4': color_data['primaryFixedDim'],
'#f2f2f2': color_data['background'],
#'#dfdfdf': color_data['surfaceContainerLow'],
'#ffffff': color_data['background'],
'#1e1e1e': color_data['onPrimaryFixed'],
#'#b6b6b6': color_data['surfaceContainer'],
'#333': color_data['inverseSurface'],
'#212121': color_data['onSecondaryFixed'],
'#5b9bf8': color_data['secondaryContainer'],
'#26272a': color_data['term7'],
#'#b3b3b3': color_data['surfaceBright'],
#'#b74aff': color_data['tertiary'],
#'#989898': color_data['surfaceContainerHighest'],
#'#c1c1c1': color_data['surfaceContainerHigh'],
'#444444': color_data['onBackground'],
'#333333': color_data['onPrimaryFixed'],
}
# Update the SVG colors
update_svg_colors(svg_path, old_to_new_colors, output_path)
if __name__ == "__main__":
main()
@@ -1,87 +0,0 @@
import re
import os
def read_scss(file_path):
"""Reads an SCSS file and returns a dictionary of color variables."""
colors = {}
with open(file_path, 'r') as file:
for line in file:
match = re.match(r'\$(\w+):\s*(#[0-9A-Fa-f]{6});', line.strip())
if match:
variable_name, color = match.groups()
colors[variable_name] = color
return colors
def update_svg_colors(svg_path, old_to_new_colors, output_path):
"""
Updates the colors in an SVG file based on the provided color map.
:param svg_path: Path to the SVG file.
:param old_to_new_colors: Dictionary mapping old colors to new colors.
:param output_path: Path to save the updated SVG file.
"""
# Read the SVG content
with open(svg_path, 'r') as file:
svg_content = file.read()
# Replace old colors with new colors
for old_color, new_color in old_to_new_colors.items():
svg_content = re.sub(old_color, new_color, svg_content, flags=re.IGNORECASE)
# Write the updated SVG content to the output file
with open(output_path, 'w') as file:
file.write(svg_content)
print(f"SVG colors have been updated and saved to {output_path}!")
def main():
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
scss_file = os.path.join(xdg_state_home, "quickshell", "user", "generated", "material_colors.scss")
svg_path = os.path.join(xdg_config_home, "Kvantum", "Colloid", "ColloidDark.svg")
output_path = os.path.join(xdg_config_home, "Kvantum", "MaterialAdw", "MaterialAdw.svg")
# Read colors from the SCSS file
color_data = read_scss(scss_file)
# Specify the old colors and map them to new colors from the SCSS file
old_to_new_colors = {
#'#525252': color_data['surfaceDim'], # Map old SVG color to new SCSS color
#'#666666': color_data['surfaceDim'],
'#31363b': color_data['background'],
#'#eff0f1': color_data['neutral_paletteKeyColor'],
'#000000': color_data['shadow'],
'#5b9bf8': color_data['primary'],
'#93cee9': color_data['onSecondaryContainer'],
'#3daee9': color_data['secondary'],
#'#fff': color_data['term10'],
#'#5a5a5a': color_data['surfaceVariant'],
#'#acb1bc': color_data['onPrimaryFixed'],
'#ffffff': color_data['term11'],
'#5a616e': color_data['surfaceVariant'],
'#f04a50': color_data['error'],
'#4285f4': color_data['secondary'],
'#242424': color_data['background'],
'#2c2c2c': color_data['background'],
#'#dfdfdf': color_data['onSurfaceVariant'],
#'#646464': color_data['surfaceContainerHighest'],
#'#989898': color_data['surfaceContainerHigh'],
#'#c1c1c1': color_data['primaryFixedDim'],
'#1e1e1e': color_data['background'],
'#3c3c3c': color_data['background'],
'#26272a': color_data['surfaceBright'],
'#000000': color_data['shadow'],
'#b74aff': color_data['tertiary'],
#'#b6b6b6': color_data['onSurfaceVariant'],
'#1a1a1a': color_data['background'],
'#333': color_data['term0'],
'#212121': color_data['background'],
}
# Update the SVG colors
update_svg_colors(svg_path, old_to_new_colors, output_path)
if __name__ == "__main__":
main()
@@ -1,71 +0,0 @@
import re
import os
def get_colors_from_scss(scss_file):
colors = {}
with open(scss_file, 'r') as file:
for line in file:
match = re.match(r'\$(\w+):\s*(#[0-9A-Fa-f]{6});', line)
if match:
colors[match.group(1)] = match.group(2)
return colors
def update_config_colors(config_file, colors, mappings):
with open(config_file, 'r') as file:
config_content = file.read()
for key, variable in mappings.items():
if variable in colors:
color = colors[variable]
pattern = rf'({key}=)#?\w+\b'
new_line = f'\\1{color}'
if re.search(pattern, config_content):
config_content = re.sub(pattern, new_line, config_content)
else:
config_content += f"\n{key}={color}"
with open(config_file, 'w') as file:
file.write(config_content)
if __name__ == "__main__":
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
config_file = os.path.join(xdg_config_home, "Kvantum", "MaterialAdw", "MaterialAdw.kvconfig")
scss_file = os.path.join(xdg_state_home, "quickshell", "user", "generated", "material_colors.scss")
# Define your mappings here
mappings = {
'window.color': 'background',
'base.color': 'background',
'alt.base.color': 'background',
'button.color': 'surfaceContainer',
'light.color': 'surfaceContainerLow',
'mid.light.color': 'surfaceContainer',
'dark.color': 'surfaceContainerHighest',
'mid.color': 'surfaceContainerHigh',
'highlight.color': 'primary',
'inactive.highlight.color': 'primary',
'text.color': 'onBackground',
'window.text.color': 'onBackground',
'button.text.color': 'onBackground',
'disabled.text.color': 'onBackground',
'tooltip.text.color': 'onBackground',
'highlight.text.color': 'onSurface',
'link.color': 'tertiary',
'link.visited.color': 'tertiaryFixed',
'progress.indicator.text.color': 'onBackground',
'text.normal.color': 'onBackground',
'text.focus.color': 'onBackground',
'text.press.color': 'onsecondarycontainer',
'text.toggle.color': 'onsecondarycontainer',
'text.disabled.color': 'surfaceDim',
# Add more mappings as needed
}
colors = get_colors_from_scss(scss_file)
update_config_colors(config_file, colors, mappings)
print("Config colors updated successfully!")
@@ -1,44 +0,0 @@
#!/usr/bin/env bash
QUICKSHELL_CONFIG_NAME="ii"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
CONFIG_DIR="$XDG_CONFIG_HOME/quickshell/$QUICKSHELL_CONFIG_NAME"
CACHE_DIR="$XDG_CACHE_HOME/quickshell"
STATE_DIR="$XDG_STATE_HOME/quickshell"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
get_light_dark() {
current_mode=$(gsettings get org.gnome.desktop.interface color-scheme 2>/dev/null | tr -d "'")
if [[ "$current_mode" == "prefer-dark" ]]; then
echo "dark"
else
echo "light"
fi
}
apply_qt() {
# Check if the theme exists
FOLDER_PATH="$XDG_CONFIG_HOME/Kvantum/Colloid/"
if [ ! -d "$FOLDER_PATH" ]; then
# Send a notification
notify-send "Colloid-kde theme required" " The folder '$FOLDER_PATH' does not exist."
exit 1 # Exit the function if the folder does not exist
fi
lightdark=$(get_light_dark)
if [ "$lightdark" = "light" ]; then
# apply ligght colors
cp "$XDG_CONFIG_HOME/Kvantum/Colloid/Colloid.kvconfig" "$XDG_CONFIG_HOME/Kvantum/MaterialAdw/MaterialAdw.kvconfig"
python "$CONFIG_DIR/scripts/kvantum/adwsvg.py"
else
#apply dark colors
cp "$XDG_CONFIG_HOME/Kvantum/Colloid/ColloidDark.kvconfig" "$XDG_CONFIG_HOME/Kvantum/MaterialAdw/MaterialAdw.kvconfig"
python "$CONFIG_DIR/scripts/kvantum/adwsvgDark.py"
fi
}
apply_qt
+15 -16
View File
@@ -190,19 +190,19 @@ Singleton {
"waifu.im": {
"name": "waifu.im",
"url": "https://waifu.im",
"api": "https://api.waifu.im/search",
"api": "https://api.waifu.im/images",
"description": Translation.tr("Waifus only | Excellent quality, limited quantity"),
"mapFunc": (response) => {
response = response.images
response = response.items
return response.map(item => {
return {
"id": item.image_id,
"id": item.id,
"width": item.width,
"height": item.height,
"aspect_ratio": item.width / item.height,
"tags": item.tags.map(tag => {return tag.name}).join(" "),
"rating": item.is_nsfw ? "e" : "s",
"is_nsfw": item.is_nsfw,
"rating": item.isNsfw ? "e" : "s",
"is_nsfw": item.isNsfw,
"md5": item.md5,
"preview_url": item.sample_url ?? item.url, // preview_url just says access denied (maybe i fucked up and sent too many requests idk)
"sample_url": item.url,
@@ -212,10 +212,9 @@ Singleton {
}
})
},
"tagSearchTemplate": "https://api.waifu.im/tags",
"tagSearchTemplate": "https://api.waifu.im/tags?Name={{query}}",
"tagMapFunc": (response) => {
return [...response.versatile.map(item => {return {"name": item}}),
...response.nsfw.map(item => {return {"name": item}})]
return response.items.map(item => {return {"name": item.name}})
}
},
"t.alcy.cc": {
@@ -276,7 +275,7 @@ Singleton {
property var currentProvider: Persistent.states.booru.provider
function getWorkingImageSource(url) {
if (url.includes('pximg.net')) {
if (url?.includes('pximg.net')) {
return `https://www.pixiv.net/en/artworks/${url.substring(url.lastIndexOf('/') + 1).replace(/_p\d+\.(png|jpg|jpeg|gif)$/, '')}`;
}
return url;
@@ -330,10 +329,10 @@ Singleton {
else if (currentProvider === "waifu.im") {
var tagsArray = tagString.split(" ");
tagsArray.forEach(tag => {
params.push("included_tags=" + encodeURIComponent(tag));
params.push("IncludedTags=" + encodeURIComponent(tag.toLowerCase()));
});
params.push("limit=" + Math.min(limit, 30)) // Only admin can do > 30
params.push("is_nsfw=" + (nsfw ? "null" : "false")) // null is random
params.push("PageSize=" + Math.min(limit, 30)) // Only admin can do > 30
params.push("IsNsfw=" + (nsfw ? "All" : "False")) // null is random
}
else if (currentProvider === "t.alcy.cc") {
url += tagString
@@ -406,8 +405,8 @@ Singleton {
}
try {
// Required for danbooru
if (currentProvider == "danbooru") {
// Required for danbooru and konachan
if (["danbooru", "konachan"].includes(currentProvider)) {
xhr.setRequestHeader("User-Agent", defaultUserAgent)
}
else if (currentProvider == "zerochan") {
@@ -458,8 +457,8 @@ Singleton {
}
try {
// Required for danbooru
if (currentProvider == "danbooru") {
// Required for danbooru and konachan
if (["danbooru", "konachan"].includes(currentProvider)) {
xhr.setRequestHeader("User-Agent", defaultUserAgent)
}
xhr.send()
@@ -10,7 +10,9 @@ Singleton {
id: root
readonly property string shaderPath: Quickshell.shellPath("services/hyprlandAntiFlashbangShader/anti-flashbang.glsl")
property bool enabled: confOpt.value == shaderPath
readonly property string weakShaderPath: Quickshell.shellPath("services/hyprlandAntiFlashbangShader/anti-flashbang-weak.glsl")
property bool enabled: confOpt.value == shaderPath || weak
property bool weak: confOpt.value == weakShaderPath
function enable() {
HyprlandConfig.setMany({
@@ -19,6 +21,13 @@ Singleton {
});
}
function enableWeak() {
HyprlandConfig.setMany({
"decoration:screen_shader": root.weakShaderPath,
"debug:damage_tracking": 1,
});
}
function disable() {
HyprlandConfig.resetMany([
"decoration:screen_shader",
@@ -30,6 +39,16 @@ Singleton {
if (root.enabled) disable()
else enable()
}
function cycle() {
if (!enabled) {
enableWeak();
} else if (weak) {
enable();
} else {
disable();
}
}
HyprlandConfigOption {
id: confOpt
@@ -17,7 +17,7 @@ Singleton {
signal reloaded()
readonly property string configuratorScriptPath: Quickshell.shellPath("scripts/hyprland/hyprconfigurator.py")
readonly property string shellOverridesPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland/shellOverrides/main.conf`)
readonly property string shellOverridesPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland/shellOverrides/main.lua`)
function set(key: string, value: var) {
Quickshell.execDetached(["bash", "-c", //
@@ -14,54 +14,37 @@ import Quickshell.Hyprland
*/
Singleton {
id: root
property string keybindParserPath: FileUtils.trimFileProtocol(`${Directories.scriptPath}/hyprland/get_keybinds.py`)
property string defaultKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland/keybinds.conf`)
property string userKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/custom/keybinds.conf`)
property var defaultKeybinds: {"children": []}
property var userKeybinds: {"children": []}
property var keybinds: ({
children: [
...(defaultKeybinds.children ?? []),
...(userKeybinds.children ?? []),
]
})
property var keybinds: []
property var keybindCategories: []
Connections {
target: Hyprland
function onRawEvent(event) {
if (event.name == "configreloaded") {
getDefaultKeybinds.running = true
getUserKeybinds.running = true
getKeybinds.running = true
}
}
}
Process {
id: getDefaultKeybinds
id: getKeybinds
running: true
command: [root.keybindParserPath, "--path", root.defaultKeybindConfigPath]
command: ["hyprctl", "binds", "-j"]
stdout: SplitParser {
onRead: data => {
stdout: StdioCollector {
onStreamFinished: {
try {
root.defaultKeybinds = JSON.parse(data)
} catch (e) {
console.error("[CheatsheetKeybinds] Error parsing keybinds:", e)
}
}
}
}
Process {
id: getUserKeybinds
running: true
command: [root.keybindParserPath, "--path", root.userKeybindConfigPath]
stdout: SplitParser {
onRead: data => {
try {
root.userKeybinds = JSON.parse(data)
root.keybinds = JSON.parse(text)
var groups = []
for (var i = 0; i < root.keybinds.length; i++) {
var bind = root.keybinds[i].description
var group = bind.substring(0, bind.indexOf(":"))
if (!groups.includes(group) && group.length > 0) {
groups.push(group)
}
}
root.keybindCategories = groups
} catch (e) {
console.error("[CheatsheetKeybinds] Error parsing keybinds:", e)
}
@@ -21,6 +21,7 @@ Singleton {
property string to: Config.options?.light?.night?.to ?? "06:30"
property bool automatic: Config.options?.light?.night?.automatic && (Config?.ready ?? true)
property int colorTemperature: Config.options?.light?.night?.colorTemperature ?? 5000
property int defaultColorTemperature: 6000
property int gamma: 100
property bool shouldBeOn
property bool firstEvaluation: true
@@ -112,7 +113,7 @@ Singleton {
function disableTemperature() {
root.temperatureActive = false;
// console.log("[Hyprsunset] Disabling");
Quickshell.execDetached(["hyprctl", "hyprsunset", "identity"]);
Quickshell.execDetached(["bash", "-c", `hyprctl hyprsunset temperature ${root.defaultColorTemperature}`]);
}
function setGamma(gamma) {
@@ -139,7 +140,7 @@ Singleton {
if (output.length == 0 || output.startsWith("Couldn't"))
root.temperatureActive = false;
else
root.temperatureActive = (output != "6500"); // 6500 is the default when off
root.temperatureActive = (output != root.defaultColorTemperature); // 6000 is the default when off
// console.log("[Hyprsunset] Fetched state:", output, "->", root.temperatureActive);
}
}
@@ -165,7 +166,6 @@ Singleton {
target: Config.options.light.night
function onColorTemperatureChanged() {
if (!root.temperatureActive) return;
Hyprland.dispatch(`hyprctl hyprsunset temperature ${Config.options.light.night.colorTemperature}`);
Quickshell.execDetached(["hyprctl", "hyprsunset", "temperature", `${Config.options.light.night.colorTemperature}`]);
}
}
@@ -109,7 +109,7 @@ Singleton {
{
action: "wallpaper",
execute: () => {
Hyprland.dispatch("global quickshell:wallpaperSelectorToggle")
Hyprland.dispatch(`hl.dsp.global("quickshell:wallpaperSelectorToggle")`)
}
},
{
@@ -5,6 +5,7 @@ import qs.modules.common
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Hyprland
/**
* Automatically reloads generated material colors.
@@ -71,4 +72,26 @@ Singleton {
}
onLoadFailed: root.resetFilePathNextTime();
}
function toggleLightDark() {
const currentlyDark = Appearance.m3colors.darkmode;
Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", currentlyDark ? "light" : "dark", "--noswitch"]);
}
GlobalShortcut {
name: "toggleLightDark"
description: "Toggles between dark theme and light theme"
onPressed: {
root.toggleLightDark();
}
}
IpcHandler {
target: "theme"
function toggleLightDark(): void {
root.toggleLightDark();
}
}
}
@@ -34,11 +34,6 @@ Singleton {
signal thumbnailGeneratedFile(filePath: string)
function load () {} // For forcing initialization
// Executions
Process {
id: applyProc
}
function openFallbackPicker(darkMode = Appearance.m3colors.darkmode) {
Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", darkMode ? "dark" : "light"]);
@@ -0,0 +1,47 @@
#version 300 es
precision highp float;
in vec2 v_texcoord;
uniform sampler2D tex;
out vec4 fragColor;
float overlayOpacityForBrightness(float x) {
// Note: range 0 to 1
// Will a fancy curve help?... I'll have to experiment more at night
// float y = pow(x, 2.0) * 0.75;
// float y = (1.0 - exp(-x))*1.19;
// float y = (1.0 - exp(-pow((x-0.15), 0.6)))*1.18;
float y = x*0.42;
return min(max(y, 0.001), 1.0);
}
void main() {
// 1. Get the current pixel color
vec4 pixColor = texture(tex, v_texcoord);
// 2. Calculate average screen brightness
vec3 totalRGB = vec3(0.0);
float samples = 0.0;
// We use a nested loop to create a 10x10 grid (100 samples)
// This is dense enough to catch small icons/text but light enough to run fast.
for(float x = 0.05; x < 1.0; x += 0.1) {
for(float y = 0.05; y < 1.0; y += 0.1) {
totalRGB += texture(tex, vec2(x, y)).rgb;
samples++;
}
}
vec3 avgColor = totalRGB / samples;
float globalBrightness = dot(avgColor, vec3(0.2126, 0.7152, 0.0722));
// 3. Get the specific opacity for this brightness level
float opacity = overlayOpacityForBrightness(globalBrightness);
// 4. Apply the "black overlay" effect
vec3 outColor = mix(pixColor.rgb, vec3(0.0), opacity);
fragColor = vec4(outColor, pixColor.a);
}
@@ -12,8 +12,8 @@ float overlayOpacityForBrightness(float x) {
// float y = pow(x, 2.0) * 0.75;
// float y = (1.0 - exp(-x))*1.15;
// float y = (1.0 - exp(-pow((x-0.15), 0.6)))*1.18;
float y = x*0.75;
float y = x*0.75;
return min(max(y, 0.001), 1.0);
}
@@ -2,11 +2,12 @@ groups=(illogical-impulse)
pkgname=illogical-impulse-microtex-git
_pkgname=MicroTeX
pkgver=r494.0e3707f
pkgrel=3
pkgrel=4
pkgdesc='MicroTeX for illogical-impulse dotfiles.'
#pkgdesc="A dynamic, cross-platform, and embeddable LaTeX rendering library"
arch=("x86_64")
url="https://github.com/NanoMichael/${_pkgname}"
#url="https://github.com/NanoMichael/${_pkgname}"
url="https://github.com/end-4/${_pkgname}"
license=('MIT')
depends=(
tinyxml2
+2 -2
View File
@@ -54,7 +54,7 @@ v remove_deprecated_dependencies
# Issue #363
case $SKIP_SYSUPDATE in
true) sleep 0;;
true) true;;
*) v sudo pacman -Syu;;
esac
@@ -105,7 +105,7 @@ done
## Optional dependencies
if pacman -Qs ^plasma-browser-integration$ ;then SKIP_PLASMAINTG=true;fi
case $SKIP_PLASMAINTG in
true) sleep 0;;
true) true;;
*)
if $ask;then
echo -e "${STY_YELLOW}[$0]: NOTE: The size of \"plasma-browser-integration\" is ~600 KiB, but if you don't yet have KDE on your system it'll pull an extra ~600MiB of packages.${STY_RST}"
+1 -1
View File
@@ -50,7 +50,7 @@ fi
# Update System
case $SKIP_SYSUPDATE in
true) sleep 0 ;;
true) true ;;
*) v sudo dnf upgrade --refresh -y ;;
esac
+1 -1
View File
@@ -123,6 +123,6 @@ fi
# http://stackoverflow.com/questions/45125516
export MACHINE_ARCH=$(uname -m)
case "${MACHINE_ARCH}" in
"x86_64") sleep 0;;
"x86_64") true;;
*) print_os_group_id_functions+=(print_os_group_id_architecture);;
esac
+1 -1
View File
@@ -3,7 +3,7 @@
# shellcheck shell=bash
function try { "$@" || sleep 0; }
function try { "$@" || true; }
function v(){
echo -e "####################################################"
echo -e "${STY_BLUE}[$0]: Next command:${STY_RST}"
+1 -1
View File
@@ -31,7 +31,7 @@ printf "\n"
pause
case $ask in
false) sleep 0 ;;
false) true ;;
*)
printf "${STY_BLUE}"
printf "${STY_BOLD}Do you want to confirm every time before a command executes?${STY_RST}\n"
+1 -1
View File
@@ -96,7 +96,7 @@ elif [[ "$OS_GROUP_ID" =~ ^(arch|gentoo|fedora)$ ]]; then
printf "${STY_RED}Still proceed?${STY_RST}\n"
read -p "[y/N]: " p
case "$p" in
[yY])sleep 0;;
[yY])true;;
*)echo "Aborting...";exit 1;;
esac
fi
+1 -1
View File
@@ -154,7 +154,7 @@ get_next_backup_number() {
# Run user preference wizard
case "$ask" in
false) sleep 0 ;;
false) true ;;
*) wizard_update_preferences ;;
esac
+1 -1
View File
@@ -46,7 +46,7 @@ patterns:
- from: "dots/.config/hypr"
to: "$XDG_CONFIG_HOME/hypr"
mode: "sync"
excludes: ["custom", "hyprlock.conf", "hypridle.conf", "monitors.conf", "workspaces.conf"]
excludes: ["custom", "hyprlock.conf", "hypridle.conf"]
# Hyprland special files
- from: "dots/.config/hypr/hypridle.conf"
to: "$XDG_CONFIG_HOME/hypr/hypridle.conf"
+12 -8
View File
@@ -6,7 +6,7 @@
#####################################################################################
# MISC (For dots/.config/* but not quickshell, not fish, not Hyprland, not fontconfig)
case "${SKIP_MISCCONF}" in
true) sleep 0;;
true) true;;
*)
for i in $(find dots/.config/ -mindepth 1 -maxdepth 1 ! -name 'quickshell' ! -name 'fish' ! -name 'hypr' ! -name 'fontconfig' -exec basename {} \;); do
# i="dots/.config/$i"
@@ -20,7 +20,7 @@ case "${SKIP_MISCCONF}" in
esac
case "${SKIP_QUICKSHELL}" in
true) sleep 0;;
true) true;;
*)
# Should overwriting the whole directory not only ~/.config/quickshell/ii/ cuz https://github.com/end-4/dots-hyprland/issues/2294#issuecomment-3448671064
install_dir__sync dots/.config/quickshell "$XDG_CONFIG_HOME"/quickshell
@@ -28,14 +28,14 @@ case "${SKIP_QUICKSHELL}" in
esac
case "${SKIP_FISH}" in
true) sleep 0;;
true) true;;
*)
install_dir__sync_exclude dots/.config/fish "$XDG_CONFIG_HOME"/fish "conf.d"
;;
esac
case "${SKIP_FONTCONFIG}" in
true) sleep 0;;
true) true;;
*)
case "$FONTSET_DIR_NAME" in
"") install_dir__sync dots/.config/fontconfig "$XDG_CONFIG_HOME"/fontconfig ;;
@@ -45,15 +45,19 @@ esac
# For Hyprland
case "${SKIP_HYPRLAND}" in
true) sleep 0;;
true) true;;
*)
install_dir__sync dots/.config/hypr/hyprland "$XDG_CONFIG_HOME"/hypr/hyprland
for i in hyprlock.conf {monitors,workspaces}.conf ; do
if [ -f "${XDG_CONFIG_HOME}/hypr/hyprland.conf" ]; then
mv "${XDG_CONFIG_HOME}/hypr/hyprland.conf" "${XDG_CONFIG_HOME}/hypr/hyprland.conf.old" # disable old config
echo 'hyprland.conf has been renamed to hyprland.conf.old. This is to allow the new lua config to load.'
fi
for i in hyprlock.conf ; do
install_file__auto_backup "dots/.config/hypr/$i" "${XDG_CONFIG_HOME}/hypr/$i"
done
for i in hyprland.conf ; do
for i in hyprland.lua ; do
case "${SKIP_HYPRLAND_ENTRY}" in
true) sleep 0;;
true) true;;
*) install_file "dots/.config/hypr/$i" "${XDG_CONFIG_HOME}/hypr/$i" ;;
esac
done