diff --git a/config/hypr/colors.lua b/config/hypr/colors.lua new file mode 100644 index 0000000..6dbf68f --- /dev/null +++ b/config/hypr/colors.lua @@ -0,0 +1,187 @@ +return { + + background = "rgb(121318)", + + blue = "rgb(b7c4ff)", + + blue_container = "rgb(364479)", + + blue_source = "rgb(0000ff)", + + blue_value = "rgb(0000ff)", + + cyan = "rgb(82d3e2)", + + cyan_container = "rgb(004e59)", + + cyan_source = "rgb(00ffff)", + + cyan_value = "rgb(00ffff)", + + error = "rgb(ffb4ab)", + + error_container = "rgb(93000a)", + + green = "rgb(95d5a7)", + + green_container = "rgb(10512f)", + + green_source = "rgb(00ff00)", + + green_value = "rgb(00ff00)", + + inverse_on_surface = "rgb(2f3036)", + + inverse_primary = "rgb(465d91)", + + inverse_surface = "rgb(e2e2e9)", + + magenta = "rgb(e4b7f3)", + + magenta_container = "rgb(5c386b)", + + magenta_source = "rgb(ff00ff)", + + magenta_value = "rgb(ff00ff)", + + on_background = "rgb(e2e2e9)", + + on_blue = "rgb(1e2d61)", + + on_blue_container = "rgb(dde1ff)", + + on_cyan = "rgb(00363e)", + + on_cyan_container = "rgb(9eefff)", + + on_error = "rgb(690005)", + + on_error_container = "rgb(ffdad6)", + + on_green = "rgb(00391d)", + + on_green_container = "rgb(b0f1c2)", + + on_magenta = "rgb(442253)", + + on_magenta_container = "rgb(f7d8ff)", + + on_primary = "rgb(142f60)", + + on_primary_container = "rgb(d9e2ff)", + + on_primary_fixed = "rgb(001944)", + + on_primary_fixed_variant = "rgb(2d4578)", + + on_red = "rgb(561d26)", + + on_red_container = "rgb(ffdadc)", + + on_secondary = "rgb(293042)", + + on_secondary_container = "rgb(dbe2f9)", + + on_secondary_fixed = "rgb(141b2c)", + + on_secondary_fixed_variant = "rgb(404659)", + + on_surface = "rgb(e2e2e9)", + + on_surface_variant = "rgb(c5c6d0)", + + on_tertiary = "rgb(412742)", + + on_tertiary_container = "rgb(fdd7fb)", + + on_tertiary_fixed = "rgb(2a132c)", + + on_tertiary_fixed_variant = "rgb(593e5a)", + + on_white = "rgb(00363d)", + + on_white_container = "rgb(9eeffd)", + + on_yellow = "rgb(263500)", + + on_yellow_container = "rgb(d4ec9d)", + + outline = "rgb(8f9099)", + + outline_variant = "rgb(44464f)", + + primary = "rgb(afc6ff)", + + primary_container = "rgb(2d4578)", + + primary_fixed = "rgb(d9e2ff)", + + primary_fixed_dim = "rgb(afc6ff)", + + red = "rgb(ffb2b9)", + + red_container = "rgb(72333b)", + + red_source = "rgb(ff0000)", + + red_value = "rgb(ff0000)", + + scrim = "rgb(000000)", + + secondary = "rgb(bfc6dc)", + + secondary_container = "rgb(404659)", + + secondary_fixed = "rgb(dbe2f9)", + + secondary_fixed_dim = "rgb(bfc6dc)", + + shadow = "rgb(000000)", + + source_color = "rgb(1a1c22)", + + surface = "rgb(121318)", + + surface_bright = "rgb(38393e)", + + surface_container = "rgb(1e1f25)", + + surface_container_high = "rgb(282a2f)", + + surface_container_highest = "rgb(33353a)", + + surface_container_low = "rgb(1a1b20)", + + surface_container_lowest = "rgb(0c0e13)", + + surface_dim = "rgb(121318)", + + surface_tint = "rgb(afc6ff)", + + surface_variant = "rgb(44464f)", + + tertiary = "rgb(dfbbde)", + + tertiary_container = "rgb(593e5a)", + + tertiary_fixed = "rgb(fdd7fb)", + + tertiary_fixed_dim = "rgb(dfbbde)", + + white = "rgb(82d3e0)", + + white_container = "rgb(004f58)", + + white_source = "rgb(ffffff)", + + white_value = "rgb(ffffff)", + + yellow = "rgb(b8cf84)", + + yellow_container = "rgb(3b4d0f)", + + yellow_source = "rgb(ffff00)", + + yellow_value = "rgb(ffff00)", + +} diff --git a/config/hypr/modus.conf b/config/hypr/modus.conf deleted file mode 100644 index f3a439e..0000000 --- a/config/hypr/modus.conf +++ /dev/null @@ -1,39 +0,0 @@ -# exec-once -exec-once = uwsm app -- uv run $HOME/.config/Modus/main.py -exec = pgrep -x "hypridle" > /dev/null || uwsm app -- hypridle -exec-once = uwsm app -- awww-daemon -exec-once = wl-paste --type text --watch cliphist store -exec-once = wl-paste --type image --watch cliphist store - - -# LAYER RULES FOR BLURS -layerrule = blur on, xray 0, blur_popups on, ignore_alpha 0, no_anim on, match:namespace ^modus-notifications$ -layerrule = animation popin, match:namespace ^lockscreen$ -layerrule = blur on, xray 0, blur_popups on, ignore_alpha 0, animation popin, match:namespace ^modus-launcher$ -layerrule = blur on, ignore_alpha 0, xray 0, blur_popups on, match:namespace ^fabric$ -layerrule = blur on, xray 0, blur_popups on, ignore_alpha 0, match:namespace ^modus$ -layerrule = animation slide right, match:namespace ^notification-center$ -# KEYBINDS - -# $fabricSend = fabric-cli exec modus1 -# # Reload Modus -# bind = SUPER ALT, B, exec, killall modus; uwsm-app $(python $HOME/.config/Modus/main.py) -# # Message -# bind = SUPER SHIFT, y, exec, $fabricSend 'app.set_css()' # Reload CSS -# # # Application Switcher -# bind = ALT, TAB, exec, $fabricSend 'switcher.show_switcher()' -# # App Launcher -# bind = SUPER, SPACE, exec, $fabricSend "launcher.show_launcher()" -# # Clipboard History -# bind = SUPER, V, exec, $fabricSend "launcher.show_launcher('clip')" -# # Wallpapers -# bind = SUPER, W, exec, $fabricSend "launcher.show_launcher('wall')" -# # Random Wallpaper -# bind = ALT SHIFT, W, exec, $fabricSend "launcher.show_launcher('wall random', external=True)" -# # Emoji Picker -# bind = SUPER, Period, exec, $fabricSend "launcher.show_launcher('em')" -# # Power Menu -# bind = SUPER, ESCAPE, exec, $fabricSend "launcher.show_launcher('power')" -# # Toggle Caffeine -# bind = SUPER SHIFT, M, exec, $fabricSend "launcher.show_launcher('caffeine on', external=True)" -# diff --git a/config/hypr/modus.lua b/config/hypr/modus.lua new file mode 100644 index 0000000..a9ba1e7 --- /dev/null +++ b/config/hypr/modus.lua @@ -0,0 +1,76 @@ +local modus = "/home/sankalp/.config/Modus" + +hl.on("hyprland.start", function() + local cmds = { + "uwsm app -- awww-daemon", + "wl-paste --type text --watch cliphist store", + "wl-paste --type image --watch cliphist store", + "pgrep -x hypridle >/dev/null || uwsm app -- hypridle", + "cd " .. modus .. " && uwsm app -- uv run start", + } + for i = 1, #cmds do + local cmd = cmds[i] + hl.exec_cmd(cmd) + end +end) + +-- Layer Rules for Blurs and Animations +local layer_rules = { + { + match = { namespace = "modus-notifications" }, + blur = true, + xray = 0, + blur_popups = true, + ignore_alpha = 0, + no_anim = true, + }, + { match = { namespace = "lockscreen" }, animation = "popin" }, + { + match = { namespace = "modus-launcher" }, + blur = true, + xray = 0, + blur_popups = true, + ignore_alpha = 0, + animation = "popin", + }, + { + match = { namespace = "fabric" }, + blur = true, + ignore_alpha = 0, + xray = 0, + blur_popups = true, + }, + { + match = { namespace = "modus" }, + blur = true, + xray = 0, + blur_popups = true, + ignore_alpha = 0, + }, + { match = { namespace = "notification-center" }, animation = "slide right" }, +} + +for _, rule in ipairs(layer_rules) do + hl.layer_rule(rule) +end + +-- Keybinds +local fabricSend = "fabric-cli exec modus1" + +-- Reload Modus +hl.bind("SUPER + ALT + B", hl.dsp.exec_cmd("killall modus; cd " .. modus .. " && uwsm app -- uv run start")) + +-- Fabric Launcher Binds +for key, method in pairs({ + ["SUPER + SHIFT + Y"] = "app.set_css()", -- Reload CSS + ["ALT + TAB"] = "switcher.show_switcher()", -- Application Switcher + ["SUPER + SPACE"] = "launcher.show_launcher()", -- App Launcher + ["SUPER + V"] = "launcher.show_launcher('clip')", -- Clipboard History + ["SUPER + W"] = "launcher.show_launcher('wall')", -- Wallpapers + ["ALT + SHIFT + W"] = "launcher.show_launcher('wall random', external=True)", -- Random Wallpaper + ["SUPER + Period"] = "launcher.show_launcher('em')", -- Emoji Picker + ["SUPER + ESCAPE"] = "launcher.show_launcher('power')", -- Power Menu + ["SUPER + SHIFT + M"] = "launcher.show_launcher('caffeine on', external=True)", -- Toggle Caffeine +}) do + hl.bind(key, hl.dsp.exec_cmd(fabricSend .. " '" .. method .. "'")) +end diff --git a/config/matugen/templates/hyprland-colors.conf b/config/matugen/templates/hyprland-colors.conf deleted file mode 100644 index 9aeb090..0000000 --- a/config/matugen/templates/hyprland-colors.conf +++ /dev/null @@ -1,27 +0,0 @@ -$wallpaper = {{image}} -$background = {{colors.background.default.hex_stripped}} -$foreground = {{colors.on_background.default.hex_stripped}} - -$primary = {{colors.primary.default.hex_stripped}} -$secondary = {{colors.secondary.default.hex_stripped}} -$tertiary = {{colors.tertiary.default.hex_stripped}} -$surface = {{colors.surface.default.hex_stripped}} -$surface_bright = {{colors.surface_bright.default.hex_stripped}} -$outline = {{colors.outline.default.hex_stripped}} -$error = {{colors.error.default.hex_stripped | set_lightness: -20.0}} - -$shadow = {{colors.shadow.default.hex_stripped}} - -$red = {{colors.red.default.hex_stripped}} -$green = {{colors.green.default.hex_stripped}} -$yellow = {{colors.yellow.default.hex_stripped}} -$blue = {{colors.blue.default.hex_stripped}} -$magenta = {{colors.magenta.default.hex_stripped}} -$cyan = {{colors.cyan.default.hex_stripped}} -$white = {{colors.white.default.hex_stripped}} -$red_dim = {{colors.red.default.hex_stripped | set_lightness: -20.0}} -$green_dim = {{colors.green.default.hex_stripped | set_lightness: -20.0}} -$yellow_dim = {{colors.yellow.default.hex_stripped | set_lightness: -20.0}} -$blue_dim = {{colors.blue.default.hex_stripped | set_lightness: -20.0}} -$magenta_dim = {{colors.magenta.default.hex_stripped | set_lightness: -20.0}} -$cyan_dim = {{colors.cyan.default.hex_stripped | set_lightness: -20.0}} diff --git a/config/matugen/templates/hyprland-colors.lua b/config/matugen/templates/hyprland-colors.lua new file mode 100644 index 0000000..fc096da --- /dev/null +++ b/config/matugen/templates/hyprland-colors.lua @@ -0,0 +1,5 @@ +return { +<* for name, value in colors *> + {{name}} = "rgb({{value.default.hex_stripped}})", +<* endfor *> +} diff --git a/install.sh b/install.sh index 49ac6ab..bbc0dbe 100755 --- a/install.sh +++ b/install.sh @@ -287,25 +287,29 @@ fi progress "Configuring Hyprland" -HYPR_CONFIG="$HOME/.config/hypr/hyprland.conf" -MODUS_CONF_LINE="source= ~/.config/Modus/config/hypr/modus.conf" +HYPR_CONFIG="$HOME/.config/hypr/hyprland.lua" +MODUS_MODULE_LINE='require("modus")' if [ -f "$HYPR_CONFIG" ]; then - step "Checking Hyprland configuration..." - if grep -qF "$MODUS_CONF_LINE" "$HYPR_CONFIG"; then - success "Modus configuration already sourced" + step "Checking Hyprland Lua configuration..." + + if grep -qF "$MODUS_MODULE_LINE" "$HYPR_CONFIG"; then + success "Modus module already loaded" else - step "Adding Modus configuration to Hyprland..." - echo "" >> "$HYPR_CONFIG" - echo "# Modus configuration" >> "$HYPR_CONFIG" - echo "$MODUS_CONF_LINE" >> "$HYPR_CONFIG" - success "Modus configuration added to Hyprland" + step "Adding Modus module to Hyprland Lua config..." + + { + echo "" + echo "-- Modus configuration" + echo "$MODUS_MODULE_LINE" + } >> "$HYPR_CONFIG" + + success "Modus configuration added" fi else - warn "Hyprland config not found at $HYPR_CONFIG" - info "You may need to manually add: $MODUS_CONF_LINE" + warn "Hyprland Lua config not found at $HYPR_CONFIG" + info "You may need to manually add: $MODUS_MODULE_LINE" fi - # Launch Modus progress "Launching Modus"