feat: start new lua-based hyprland config

This commit is contained in:
2026-06-13 16:12:20 +02:00
parent d6d9a28161
commit a253ce56b7
22 changed files with 376 additions and 345 deletions
+10
View File
@@ -0,0 +1,10 @@
{
"workspace": {
"library": [
"/usr/share/hypr/stubs"
]
},
"diagnostics": {
"globals": ["hl"]
}
}
+5
View File
@@ -0,0 +1,5 @@
grub_theme = "/usr/share/grub/themes/monterey-grub-theme/theme.txt"
grub_os_prober = True
kernel_args_all = ""
kernel_args_debug_only = ""
kernel_args_normal_only = ""
+11
View File
@@ -0,0 +1,11 @@
-- TODO: Laptop vs desktop vs docked config
local swap_escape = false
require("hyprland.core.general")
require("hyprland.core.input")(swap_escape)
require("colors")
hl.device({
name = "pnp0c50:00-093a:0255-touchpad",
enabled = true,
})
+10
View File
@@ -0,0 +1,10 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("launch", function()
hl.bind("l", function()
hl.dispatch(hl.dsp.exec_cmd("librewolf"))
exit_submap()
end)
end)
+91
View File
@@ -0,0 +1,91 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("launch", function()
-- Librewolf
hl.bind("l", function()
hl.dispatch(hl.dsp.exec_cmd("librewolf"))
exit_submap()
end)
-- Steam
hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("steam"))
exit_submap()
end)
-- Discord
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("vesktop"))
exit_submap()
end)
-- Kitty
hl.bind("k", function()
hl.dispatch(hl.dsp.exec_cmd("kitty"))
exit_submap()
end)
hl.bind("Return", function()
hl.dispatch(hl.dsp.exec_cmd("kitty"))
exit_submap()
end)
-- Filezilla
hl.bind("f", function()
hl.dispatch(hl.dsp.exec_cmd("filezilla"))
exit_submap()
end)
-- Thunderbird
hl.bind("t", function()
hl.dispatch(hl.dsp.exec_cmd("thunderbird"))
exit_submap()
end)
-- Zathura
hl.bind("z", function()
hl.dispatch(hl.dsp.exec_cmd("zathura"))
exit_submap()
end)
-- Brave
hl.bind("Shift + B", function()
hl.dispatch(hl.dsp.exec_cmd("brave"))
exit_submap()
end)
-- bsmanager
hl.bind("b", function()
hl.dispatch(hl.dsp.exec_cmd("/opt/bs-manager/bs-manager"))
exit_submap()
end)
-- ALVR
hl.bind("p", function()
hl.dispatch(hl.dsp.exec_cmd("alvr_dashboard"))
exit_submap()
end)
-- Qalculate
hl.bind("c", function()
hl.dispatch(hl.dsp.exec_cmd("qalculate-qt"))
exit_submap()
end)
-- AirPlay
hl.bind("a", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'AirPlay server is starting...' --app-name='AirPlay Video'"))
hl.dispatch(
hl.dsp.exec_cmd(
"terminator -T 'hiddent'terminator' -e 'systemctl start avahi-daemon' && sleep 5 && uxplay -n LinuxVideoplay -nh"
)
)
exit_submap()
end)
-- Escape
hl.bind("Escape", function()
exit_submap()
end)
end)
+10
View File
@@ -0,0 +1,10 @@
hl.config({
general = {
gaps_in = 3,
gaps_out = 4,
border_size = 2,
no_focus_fallback = true,
layout = "dwindle",
},
})
+1
View File
@@ -0,0 +1 @@
-- TODO: Check out what this does (pretty sure as in i3)
+51
View File
@@ -0,0 +1,51 @@
--- @param swap_escape boolean
return function(swap_escape)
hl.config({
inputs = {
kb_options = swap_escape and "caps:swapescape" or "",
kb_layout = "us",
kb_variant = "altgr-intl",
natural_scroll = "true",
numlock_by_default = true,
repeat_delay = 400,
follow_mouse = 2,
mouse_refocus = true,
scroll_factor = 2,
accel_profile = "flat",
touchpad = {
disable_while_typing = true,
natural_scroll = true,
scroll_factor = 4,
},
focus_on_close = 1,
sensitivity = 0,
},
gestures = {
workspace_swipe_distance = 200,
workspace_swipe_cancel_ratio = 0.3,
workspace_swipe_forever = true,
workspace_swipe_direction_lock = false,
},
})
hl.gesture({
fingers = 3,
direction = "horizontal",
action = "workspace",
})
hl.gesture({
fingers = 3,
direction = "down",
action = "close",
})
hl.gesture({
fingers = 3,
direction = "up",
action = "fullscreen",
})
end
+23
View File
@@ -0,0 +1,23 @@
hl.config({
xwayland = {
force_zero_scaling = true,
},
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true,
vrr = 3,
allow_session_lock_restore = true,
},
dwindle = {
pseudotile = true,
force_split = 2,
preserve_split = true,
},
binds = {
workspace_back_and_forth = true,
},
cursor = {
no_warps = false,
inactive_timeout = 5,
},
})
+26
View File
@@ -0,0 +1,26 @@
hl.config({
decoration = {
inactive_opacity = 1,
rounding = 10,
shadow = {
enabled = true,
range = 4,
},
blur = {
enabled = true,
xray = true,
new_optimizations = true,
size = 1,
passes = 2,
},
dim_inactive = true,
dim_strength = 0.1,
-- TODO: Consider adding glow?
},
animations = {
enabled = true,
},
})
+6
View File
@@ -0,0 +1,6 @@
hl.on("hyprland.start", function()
-- hl.exec_cmd("~/.config/hypr/xdg-portal-hyprland")
-- hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY")
-- hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("systemctl --user start hyprpolkitagent")
end)
+44
View File
@@ -0,0 +1,44 @@
return function(is_laptop, is_docked)
if is_laptop then
hl.monitor({
output = "",
mode = "preferred",
position = "auto",
scale = 1,
})
if is_docked then
hl.monitor({
output = "eDP-1",
disabled = true,
})
else
hl.monitor({
output = "eDP-1",
mode = "2880x1800@240",
position = "0x0",
scale = 1.5,
})
end
elseif is_laptop and is_docked then
hl.monitor({
output = "DP-1",
mode = "1920x1080@144",
position = "0x0",
scale = 1,
})
else
hl.monitor({
output = "DP-1",
mode = "1920x1080@144",
position = "0x0",
scale = 1,
vrr = 2
})
hl.monitor({
output = "DP-2",
mode = "1920x1080@75",
position = "1920x0",
scale = 1,
})
end
end
+1 -1
View File
@@ -5,5 +5,5 @@ Shamelessly copied from [End-4's dotfiles](https://github.com/end-4/dots-hyprlan
# TODOs
- [ ] Custom yazi theme
- [ ] Qt theme
- [ ] Remove unneeded elements
- [X] Remove unneeded elements
- [ ] Quickshell stuff
-8
View File
@@ -20,11 +20,3 @@ output_path = '~/.config/gtk-3.0/gtk.css'
[templates.gtk4]
input_path = '~/.config/matugen/templates/gtk-4.0/gtk.css'
output_path = '~/.config/gtk-4.0/gtk.css'
[templates.kde_colors]
input_path = '~/.config/matugen/templates/kde/color.txt'
output_path = '~/.local/state/quickshell/user/generated/color.txt'
[templates.wallpaper]
input_path = '~/.config/matugen/templates/wallpaper.txt'
output_path = '~/.local/state/quickshell/user/generated/wallpaper/path.txt'
@@ -1,70 +0,0 @@
$darkmode: False;
$transparent: False;
$background: {{colors.background.default.hex}};
$onBackground: {{colors.on_background.default.hex}};
$surface: {{colors.surface.default.hex}};
$surfaceDim: {{colors.surface_dim.default.hex}};
$surfaceBright: {{colors.surface_bright.default.hex}};
$surfaceContainerLowest: {{colors.surface_container_lowest.default.hex}};
$surfaceContainerLow: {{colors.surface_container_low.default.hex}};
$surfaceContainer: {{colors.surface_container.default.hex}};
$surfaceContainerHigh: {{colors.surface_container_high.default.hex}};
$surfaceContainerHighest: {{colors.surface_container_highest.default.hex}};
$onSurface: {{colors.on_surface.default.hex}};
$surfaceVariant: {{colors.surface_variant.default.hex}};
$onSurfaceVariant: {{colors.on_surface_variant.default.hex}};
$inverseSurface: {{colors.inverse_surface.default.hex}};
$inverseOnSurface: {{colors.inverse_on_surface.default.hex}};
$outline: {{colors.outline.default.hex}};
$outlineVariant: {{colors.outline_variant.default.hex}};
$shadow: {{colors.shadow.default.hex}};
$scrim: {{colors.scrim.default.hex}};
$primary: {{colors.primary.default.hex}};
$onPrimary: {{colors.on_primary.default.hex}};
$primaryContainer: {{colors.primary_container.default.hex}};
$onPrimaryContainer: {{colors.on_primary_container.default.hex}};
$inversePrimary: {{colors.inverse_primary.default.hex}};
$secondary: {{colors.secondary.default.hex}};
$onSecondary: {{colors.on_secondary.default.hex}};
$secondaryContainer: {{colors.secondary_container.default.hex}};
$onSecondaryContainer: {{colors.on_secondary_container.default.hex}};
$tertiary: {{colors.tertiary.default.hex}};
$onTertiary: {{colors.on_tertiary.default.hex}};
$tertiaryContainer: {{colors.tertiary_container.default.hex}};
$onTertiaryContainer: {{colors.on_tertiary_container.default.hex}};
$error: {{colors.error.default.hex}};
$onError: {{colors.on_error.default.hex}};
$errorContainer: {{colors.error_container.default.hex}};
$onErrorContainer: {{colors.on_error_container.default.hex}};
$primaryFixed: {{colors.primary_fixed.default.hex}};
$primaryFixedDim: {{colors.primary_fixed_dim.default.hex}};
$onPrimaryFixed: {{colors.on_primary_fixed.default.hex}};
$onPrimaryFixedVariant: {{colors.on_primary_fixed_variant.default.hex}};
$secondaryFixed: {{colors.secondary_fixed.default.hex}};
$secondaryFixedDim: {{colors.secondary_fixed_dim.default.hex}};
$onSecondaryFixed: {{colors.on_secondary_fixed.default.hex}};
$onSecondaryFixedVariant: {{colors.on_secondary_fixed_variant.default.hex}};
$tertiaryFixed: {{colors.tertiary_fixed.default.hex}};
$tertiaryFixedDim: {{colors.tertiary_fixed_dim.default.hex}};
$onTertiaryFixed: {{colors.on_tertiary_fixed.default.hex}};
$onTertiaryFixedVariant: {{colors.on_tertiary_fixed_variant.default.hex}};
$success: #B5CCBA;
$onSuccess: #213528;
$successContainer: #374B3E;
$onSuccessContainer: #D1E9D6;
$term0: #0D1C20;
$term1: #8383FF;
$term2: #63DFD4;
$term3: #75FCDD;
$term4: #76B4BD;
$term5: #7AAEEA;
$term6: #81D8D7;
$term7: #CCDBD5;
$term8: #B1BCB5;
$term9: #BCB9FF;
$term10: #F6FFFD;
$term11: #FFFFFF;
$term12: #BEE3E5;
$term13: #C8DAFF;
$term14: #E5FFFE;
$term15: #ADEDF6;
@@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="custom-light" _name="Custom" version="1.0">
<author>end_4</author>
<_description>Catppuccin port but very random</_description>
<style name="bracket-match" background="{{ colors.secondary_container.default.hex }}" foreground="{{ colors.on_secondary_container.default.hex }}" bold="true"/>
<style name="bracket-mismatch" background="#E3E6EB" underline="true"/>
<style name="c:preprocessor" foreground="#DF8E1D"/>
<style name="css:at-rules" foreground="#8839EF"/>
<style name="css:color" foreground="#DF8E1D"/>
<style name="css:keyword" foreground="#256BF5"/>
<style name="current-line" background="{{ colors.surface_container_highest.default.hex }}"/>
<style name="cursor" foreground="#DC8A78"/>
<style name="def:base-n-integer" foreground="#DF8E1D"/>
<style name="def:boolean" foreground="#DF8E1D"/>
<style name="def:builtin" foreground="#DF8E1D"/>
<style name="def:character" foreground="#DF8E1D"/>
<style name="def:comment" foreground="#9DA1B1"/>
<style name="def:complex" foreground="#DF8E1D"/>
<style name="def:decimal" foreground="#DF8E1D"/>
<style name="def:doc-comment" foreground="#9DA1B1"/>
<style name="def:doc-comment-element" foreground="#9DA1B1"/>
<style name="def:error" foreground="#D53055" background="#EAEDF2"/>
<style name="def:floating-point" foreground="#DF8E1D"/>
<style name="def:function" foreground="#256BF5"/>
<style name="def:identifier" foreground="#000000"/>
<style name="def:keyword" foreground="#8839EF"/>
<style name="def:note" foreground="#9DA1B1"/>
<style name="def:number" foreground="#FE640B"/>
<style name="def:operator" foreground="#8839EF"/>
<style name="def:preprocessor" foreground="#256BF5"/>
<style name="def:reserved" foreground="#8839EF"/>
<style name="def:shebang" foreground="#9DA1B1"/>
<style name="def:special-char" foreground="#256BF5"/>
<style name="def:special-constant" foreground="#DF8E1D"/>
<style name="def:statement" foreground="#8839EF"/>
<style name="def:string" foreground="#4AA537"/>
<style name="def:type" foreground="#256BF5" italic="true"/>
<style name="diff:added-line" foreground="#282D32" background="#ACF2BD"/>
<style name="diff:changed-line" foreground="#282D32" background="#F1F2C3"/>
<style name="diff:location" foreground="#9DA1B1"/>
<style name="diff:removed-line" foreground="#282D32" background="#FFEEF0"/>
<style name="draw-spaces" foreground="#3b3a32"/>
<style name="html:dtd" foreground="#4AA537"/>
<style name="html:tag" foreground="#8839EF"/>
<style name="js:function" foreground="#256BF5"/>
<style name="line-numbers" foreground="#9699AA" background="#EAEDF2"/>
<style name="perl:builtin" foreground="#256BF5"/>
<style name="perl:include-statement" foreground="#8839EF"/>
<style name="perl:special-variable" foreground="#DF8E1D"/>
<style name="perl:variable" foreground="#000000"/>
<style name="php:string" foreground="#4AA537"/>
<style name="python:builtin-constant" foreground="#8839EF"/>
<style name="python:builtin-function" foreground="#256BF5"/>
<style name="python:module-handler" foreground="#8839EF"/>
<style name="python:special-variable" foreground="#8839EF"/>
<style name="ruby:attribute-definition" foreground="#8839EF"/>
<style name="ruby:builtin" foreground="#000000"/>
<style name="ruby:class-variable" foreground="#000000"/>
<style name="ruby:constant" foreground="#000000"/>
<style name="ruby:global-variable" foreground="#256BF5"/>
<style name="ruby:instance-variable" foreground="#000000"/>
<style name="ruby:module-handler" foreground="#8839EF"/>
<style name="ruby:predefined-variable" foreground="#DF8E1D"/>
<style name="ruby:regex" foreground="#f6aa11"/>
<style name="ruby:special-variable" foreground="#8839EF"/>
<style name="ruby:symbol" foreground="#DF8E1D"/>
<style name="rubyonrails:attribute-definition" foreground="#8839EF"/>
<style name="rubyonrails:block-parameter" foreground="#fd971f" italic="true"/>
<style name="rubyonrails:builtin" foreground="#000000"/>
<style name="rubyonrails:class-inherit" foreground="#256BF5" underline="true" italic="true"/>
<style name="rubyonrails:class-name" foreground="#256BF5"/>
<style name="rubyonrails:class-variable" foreground="#000000"/>
<style name="rubyonrails:complex-interpolation" foreground="#DF8E1D"/>
<style name="rubyonrails:constant" foreground="#000000"/>
<style name="rubyonrails:global-variable" foreground="#256BF5"/>
<style name="rubyonrails:instance-variable" foreground="#000000"/>
<style name="rubyonrails:module-handler" foreground="#8839EF"/>
<style name="rubyonrails:module-name" foreground="#256BF5"/>
<style name="rubyonrails:predefined-variable" foreground="#DF8E1D"/>
<style name="rubyonrails:rails" foreground="#000000"/>
<style name="rubyonrails:regex" foreground="#f6aa11"/>
<style name="rubyonrails:simple-interpolation" foreground="#DF8E1D"/>
<style name="rubyonrails:special-variable" foreground="#8839EF"/>
<style name="rubyonrails:symbol" foreground="#DF8E1D"/>
<style name="search-match" background="#E3E6EB" bold="true" underline="true"/>
<style name="selection" foreground="#f8f8f2" background="#444444"/>
<style name="text" foreground="#f8f8f2" background="#222222"/>
<style name="xml:attribute-name" foreground="#256BF5"/>
<style name="xml:element-name" foreground="#8839EF"/>
<style name="xml:entity" foreground="#c8cecc"/>
<style name="xml:namespace" foreground="#8839EF"/>
<style name="xml:tag" foreground="#8839EF"/>
</style-scheme>
@@ -1,121 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2014 Leo Iannacone <info@leoiannacone.com>
This file was generated from a textmate theme named Monokai Extended
with tm2gtksw2 tool. (Alexandre da Silva)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<!-- MODIFIED -->
<style-scheme id="custom" _name="Custom" version="1.0">
<author>Leo Iannacone</author>
<_description>Based on SublimeText Monokai Extended - Generated with tm2gtksw2</_description>
<style name="bracket-match" background="{{ colors.secondary_container.default.hex }}" foreground="{{ colors.on_secondary_container.default.hex }}" bold="true"/>
<style name="bracket-mismatch" background="#333333" underline="true"/>
<style name="c:preprocessor" foreground="#be84ff"/>
<style name="css:at-rules" foreground="#f92672"/>
<style name="css:color" foreground="#be84ff"/>
<style name="css:keyword" foreground="#66d9ef"/>
<style name="current-line" background="{{ colors.surface_container_highest.default.hex }}"/>
<style name="cursor" foreground="#f8f8f0"/>
<style name="def:base-n-integer" foreground="#be84ff"/>
<style name="def:boolean" foreground="#be84ff"/>
<style name="def:builtin" foreground="#be84ff"/>
<style name="def:character" foreground="#be84ff"/>
<style name="def:comment" foreground="#75715e"/>
<style name="def:complex" foreground="#be84ff"/>
<style name="def:decimal" foreground="#be84ff"/>
<style name="def:doc-comment" foreground="#75715e"/>
<style name="def:doc-comment-element" foreground="#75715e"/>
<style name="def:error" foreground="#f8f8f0" background="#f92672"/>
<style name="def:floating-point" foreground="#be84ff"/>
<style name="def:function" foreground="#a6e22e"/>
<style name="def:identifier" foreground="#ffffff"/>
<style name="def:keyword" foreground="#f92672"/>
<style name="def:note" foreground="#75715e"/>
<style name="def:number" foreground="#be84ff"/>
<style name="def:operator" foreground="#f92672"/>
<style name="def:preprocessor" foreground="#66d9ef"/>
<style name="def:reserved" foreground="#f92672"/>
<style name="def:shebang" foreground="#75715e"/>
<style name="def:special-char" foreground="#66d9ef"/>
<style name="def:special-constant" foreground="#be84ff"/>
<style name="def:statement" foreground="#f92672"/>
<style name="def:string" foreground="#e6db74"/>
<style name="def:type" foreground="#66d9ef" italic="true"/>
<style name="diff:added-line" foreground="#a6e22e"/>
<style name="diff:changed-line" foreground="#e6db74"/>
<style name="diff:location" foreground="#75715e"/>
<style name="diff:removed-line" foreground="#f92672"/>
<style name="draw-spaces" foreground="#3b3a32"/>
<style name="html:dtd" foreground="#e6db74"/>
<style name="html:tag" foreground="#f92672"/>
<style name="js:function" foreground="#66d9ef"/>
<style name="line-numbers" foreground="#bebeba" background="#333333"/>
<style name="perl:builtin" foreground="#a6e22e"/>
<style name="perl:include-statement" foreground="#f92672"/>
<style name="perl:special-variable" foreground="#be84ff"/>
<style name="perl:variable" foreground="#ffffff"/>
<style name="php:string" foreground="#e6db74"/>
<style name="python:builtin-constant" foreground="#f92672"/>
<style name="python:builtin-function" foreground="#a6e22e"/>
<style name="python:module-handler" foreground="#f92672"/>
<style name="python:special-variable" foreground="#f92672"/>
<style name="ruby:attribute-definition" foreground="#f92672"/>
<style name="ruby:builtin" foreground="#ffffff"/>
<style name="ruby:class-variable" foreground="#ffffff"/>
<style name="ruby:constant" foreground="#ffffff"/>
<style name="ruby:global-variable" foreground="#a6e22e"/>
<style name="ruby:instance-variable" foreground="#ffffff"/>
<style name="ruby:module-handler" foreground="#f92672"/>
<style name="ruby:predefined-variable" foreground="#be84ff"/>
<style name="ruby:regex" foreground="#f6aa11"/>
<style name="ruby:special-variable" foreground="#f92672"/>
<style name="ruby:symbol" foreground="#be84ff"/>
<style name="rubyonrails:attribute-definition" foreground="#f92672"/>
<style name="rubyonrails:block-parameter" foreground="#fd971f" italic="true"/>
<style name="rubyonrails:builtin" foreground="#ffffff"/>
<style name="rubyonrails:class-inherit" foreground="#a6e22e" underline="true" italic="true"/>
<style name="rubyonrails:class-name" foreground="#66d9ef"/>
<style name="rubyonrails:class-variable" foreground="#ffffff"/>
<style name="rubyonrails:complex-interpolation" foreground="#be84ff"/>
<style name="rubyonrails:constant" foreground="#ffffff"/>
<style name="rubyonrails:global-variable" foreground="#a6e22e"/>
<style name="rubyonrails:instance-variable" foreground="#ffffff"/>
<style name="rubyonrails:module-handler" foreground="#f92672"/>
<style name="rubyonrails:module-name" foreground="#66d9ef"/>
<style name="rubyonrails:predefined-variable" foreground="#be84ff"/>
<style name="rubyonrails:rails" foreground="#ffffff"/>
<style name="rubyonrails:regex" foreground="#f6aa11"/>
<style name="rubyonrails:simple-interpolation" foreground="#be84ff"/>
<style name="rubyonrails:special-variable" foreground="#f92672"/>
<style name="rubyonrails:symbol" foreground="#be84ff"/>
<style name="search-match" background="#333333" bold="true" underline="true"/>
<style name="selection" foreground="#f8f8f2" background="#444444"/>
<style name="text" foreground="#f8f8f2" background="#222222"/>
<style name="xml:attribute-name" foreground="#a6e22e"/>
<style name="xml:element-name" foreground="#f92672"/>
<style name="xml:entity" foreground="#c8cecc"/>
<style name="xml:namespace" foreground="#f92672"/>
<style name="xml:tag" foreground="#f92672"/>
</style-scheme>
-1
View File
@@ -1 +0,0 @@
{{colors.source_color.default.hex}}
@@ -1,48 +0,0 @@
#!/usr/bin/env bash
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
color=$(tr -d '\n' < "$XDG_STATE_HOME/quickshell/user/generated/color.txt")
current_mode=$(gsettings get org.gnome.desktop.interface color-scheme 2>/dev/null | tr -d "'")
if [[ "$current_mode" == "prefer-dark" ]]; then
mode_flag="-d"
else
mode_flag="-l"
fi
# Parse --scheme-variant flag
scheme_variant_str=""
while [[ $# -gt 0 ]]; do
case "$1" in
--scheme-variant)
scheme_variant_str="$2"
shift 2
;;
*)
shift
;;
esac
done
# Map string variant to integer
case "$scheme_variant_str" in
scheme-content) sv_num=0 ;;
scheme-expressive) sv_num=1 ;;
scheme-fidelity) sv_num=2 ;;
scheme-monochrome) sv_num=3 ;;
scheme-neutral) sv_num=4 ;;
scheme-tonal-spot) sv_num=5 ;;
scheme-vibrant) sv_num=6 ;;
scheme-rainbow) sv_num=7 ;;
scheme-fruit-salad) sv_num=8 ;;
"") sv_num=5 ;;
*)
echo "Unknown scheme variant: $scheme_variant_str" >&2
exit 1
;;
esac
source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate"
kde-material-you-colors "$mode_flag" --color "$color" -sv "$sv_num"
deactivate
-1
View File
@@ -1 +0,0 @@
{{image}}
+87
View File
@@ -0,0 +1,87 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"ignore-gtk-theme": true,
"positionX": "right",
"positionY": "top",
"layer": "overlay",
"control-center-layer": "top",
"layer-shell": true,
"layer-shell-cover-screen": true,
"cssPriority": "user",
"control-center-margin-top": 0,
"control-center-margin-bottom": 0,
"control-center-margin-right": 0,
"control-center-margin-left": 0,
"notification-2fa-action": true,
"notification-inline-replies": false,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"timeout": 10,
"timeout-low": 5,
"timeout-critical": 0,
"fit-to-screen": true,
"relative-timestamps": true,
"control-center-width": 500,
"control-center-height": 600,
"notification-window-width": 500,
"keyboard-shortcuts": true,
"notification-grouping": true,
"image-visibility": "when-available",
"transition-time": 200,
"hide-on-clear": false,
"hide-on-action": true,
"text-empty": "No Notifications",
"notification-visibility": {
"example-name": {
"state": "muted",
"urgency": "Normal",
"app-name": "example.app.id"
}
},
"widgets": [
"inhibitors",
"title",
"dnd",
"notifications"
],
"widget-config": {
"notifications": {
"vexpand": true
},
"inhibitors": {
"text": "Inhibitors",
"button-text": "Clear All",
"clear-all-button": true
},
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 5,
"text": "Label Text"
},
"mpris": {
"blacklist": [],
"autohide": false,
"show-album-art": "always",
"loop-carousel": false
},
"buttons-grid": {
"buttons-per-row": 7,
"actions": [
{
"label": "直",
"type": "toggle",
"active": true,
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'",
"update-command": "sh -c '[[ $(nmcli radio wifi) == \"enabled\" ]] && echo true || echo false'"
}
]
}
}
}