dotfiles

My PC Dotfiles & Website
commit a4a8e2027ef3517b2322e5226e193f31485a88a4
parent fadfd5032f381cbe66b749da3d36fa987b9aa59f
Author: maydayv7 <maydayv7@gmail.com>
Date:   Mon,  7 Apr 2025 03:09:32 +0530

feat: Lotsa stuff

- Hyprland: Waycorner, WLClock, Hyprcursors, GTK Theme, Shaders, Waybar & Dunst Styling
- Micro Editor

Diffstat:

MREADME.md | 2+-
Mfiles/flake.nix | 9++++++---
Mfiles/hyprland/kebihelp.json | 4----
Mfiles/hyprland/theme/hyprswitch.css | 2+-
Mfiles/hyprland/theme/waybar.css | 25++++++++++++++++++++++---
Afiles/hyprland/waycorner.toml | 11+++++++++++
Mflake.lock | 132++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mflake.nix | 12++++++------
Mlib/build.nix | 4++--
Mmodules/configuration.nix | 6+++---
Mmodules/gui/desktop/hyprland/apps/notify.nix | 24++++++++++++++++--------
Mmodules/gui/desktop/hyprland/apps/settings.nix | 35+++++++++++++++++++----------------
Mmodules/gui/desktop/hyprland/apps/utilities.nix | 38+++++++++++++++++++++++++++++++++++++-
Mmodules/gui/desktop/hyprland/settings/default.nix | 15++++++++-------
Mmodules/gui/desktop/hyprland/settings/keybindings.nix | 2++
Mmodules/gui/desktop/hyprland/settings/plugins.nix | 29+++++++++++++++++++++--------
Mmodules/gui/desktop/hyprland/theme.nix | 9+++++----
Mmodules/shell/default.nix | 44++++++++++++++++++++++++++++++++++++--------
Mmodules/user/default.nix | 2+-
Apackages/bibata-hyprcursor/configure.py | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Apackages/bibata-hyprcursor/default.nix | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apackages/bibata-hyprcursor/metadata.nix | 6++++++
Mpackages/flake.nix | 6+++---
Dpackages/hyprshaders/default.nix | 41-----------------------------------------
Dpackages/hyprshaders/dim.frag | 6------
Msite/content/anime.md | 1+
26 files changed, 407 insertions(+), 192 deletions(-)

diff --git a/README.md b/README.md @@ -108,7 +108,7 @@ This [repository](https://github.com/maydayv7/dotfiles) contains the configurati | Type | Programs | | :------------------- | :---------------------------------------------------------------------------------------------------------------------------------------: | -| Editors | [`nano`](https://www.nano-editor.org/), [VS Code](https://code.visualstudio.com/) | +| Editors | [`nano`](https://www.nano-editor.org/), [`micro`](https://micro-editor.github.io), [VS Code](https://code.visualstudio.com/) | | Shells | [`bash`](https://www.gnu.org/software/bash/), [`zsh`](https://www.zsh.org) | | Terminal | [Ghostty](https://ghostty.org/), [`xfce4` Terminal](https://docs.xfce.org/apps/terminal/start), [Kitty](https://sw.kovidgoyal.net/kitty/) | | Browser | [Firefox](https://www.mozilla.org/en-US/firefox/) | diff --git a/files/flake.nix b/files/flake.nix @@ -72,6 +72,9 @@ # Pyprland pypr = readFile ./hyprland/pypr.toml; + # Hot Corners + waycorner = readFile ./hyprland/waycorner.toml; + # Keybinds Viewer kebihelp = readFile ./hyprland/kebihelp.json; @@ -113,6 +116,9 @@ }; }; + # Nano Text Editor + nano = readFile ./nano/nanorc; + # Pantheon Desktop pantheon = { dconf = ./pantheon/dconf.nix; @@ -129,9 +135,6 @@ proprietary = inputs.proprietary.files; inherit (proprietary) wallpapers; - # Nano Text Editor - nano = readFile ./nano/nanorc; - # Interactive Nix Shell repl = ./repl.nix; diff --git a/files/hyprland/kebihelp.json b/files/hyprland/kebihelp.json @@ -233,10 +233,6 @@ "label": "Toggle Compositor Shader" }, { - "value": "$mod I", - "label": "Invert active window color" - }, - { "value": "$mod SHIFT S", "label": "Toggle window swallowing" }, diff --git a/files/hyprland/theme/hyprswitch.css b/files/hyprland/theme/hyprswitch.css @@ -1,5 +1,5 @@ :root { - --bg-color: rgba(@bg-r, @bg-g, @bg-b, 0.5); + --bg-color: alpha(#@base00, 0.5); --bg-color-active: rgba(255, 255, 255, 0.2); --bg-color-hover: rgba(255, 255, 255, 0.4); --border-radius: 10px; diff --git a/files/hyprland/theme/waybar.css b/files/hyprland/theme/waybar.css @@ -7,6 +7,13 @@ window#waybar { background-color: transparent; + border: 2px solid @base00; +} + +tooltip { + background: alpha(@base00, 0.9); + color: @base05; + border: 1px solid @base0D; } #custom-logo { @@ -94,6 +101,10 @@ window#waybar { opacity: 0.8; } +.modules-right #network.disconnected { + background-color: @base08; +} + #media .drawer box { margin-right: 3px; } @@ -158,10 +169,18 @@ window#waybar { #user, #window, #wireplumber { - padding: 3px 5px; - margin: 1px; + padding: 2px 5px; + margin: 5px 1px; +} + +#custom-power { + margin-right: 0; +} + +#power-profiles-daemon { + margin-right: 5px; } #workspaces { - margin: 0 3px; + margin: 4px 1px; } diff --git a/files/hyprland/waycorner.toml b/files/hyprland/waycorner.toml @@ -0,0 +1,11 @@ +[overview] +command = [ "hyprctl", "dispatch", "hyprexpo:expo" ] +locations = [ "top_left" ] +size = 10 +timeout_ms = 200 + +[workspace] +command = [ "hyprctl", "dispatch", "split:workspace", "empty" ] +locations = [ "top_right" ] +size = 10 +timeout_ms = 200 diff --git a/flake.lock b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1742213273, - "narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", + "lastModified": 1743265529, + "narHash": "sha256-QbjP15/2N+VJl0b5jxrrTc+VOt39aU4XrDvtP0Lz5ik=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", + "rev": "1d2dbd72c2bbaceab031c592d4810f744741d203", "type": "github" }, "original": { @@ -520,18 +520,18 @@ "type": "github" } }, - "home-manager": { + "home": { "inputs": { "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1743438213, - "narHash": "sha256-ZZDN+0v1r4I1xkQWlt8euOJv5S4EvElUCZMrDjTCEsY=", + "lastModified": 1743948087, + "narHash": "sha256-B6cIi2ScgVSROPPlTti6len+TdR0K25B9R3oKvbw3M8=", "owner": "nix-community", "repo": "home-manager", - "rev": "ccd7df836e1f42ea84806760f25b77b586370259", + "rev": "ef3b2a6b602c3f1a80c6897d6de3ee62339a3eb7", "type": "github" }, "original": { @@ -569,26 +569,26 @@ "type": "github" } }, - "hyprdark": { + "hyprcursors": { "inputs": { "hyprland": [ "hyprland" ], - "nix-filter": [ - "filters" + "nixpkgs": [ + "nixpkgs" ] }, "locked": { - "lastModified": 1743255810, - "narHash": "sha256-Kochs2yJlTCh4ntLxUXQZz1F379b3EHTm+mwV5u2VOk=", - "owner": "micha4w", - "repo": "Hypr-DarkWindow", - "rev": "fdc621bc6e3c00f6253a9f2ae8b565d684d78098", + "lastModified": 1743585507, + "narHash": "sha256-289lmhoXl+LjM2nZe0e/k+/5D7VMYzVajr7FWAs4DVw=", + "owner": "VirtCode", + "repo": "hypr-dynamic-cursors", + "rev": "b2f6819475970ff1b13e23cdb01416181b5f80b0", "type": "github" }, "original": { - "owner": "micha4w", - "repo": "Hypr-DarkWindow", + "owner": "VirtCode", + "repo": "hypr-dynamic-cursors", "type": "github" } }, @@ -641,11 +641,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1743463509, - "narHash": "sha256-JASYdXTJovrTgT04ATMGpRruvY4+lrdhAkoPhPPb+h4=", + "lastModified": 1743809433, + "narHash": "sha256-tCOlE2zMXfd+KNG5ETr2VxhbniDMD7jBbD0JQhYBrlc=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "d1a59ec39eb4c0d6a7d3d38a26f8924e6bca5cef", + "rev": "8ba20fcae124591718bddadd94c5e8c381d02097", "type": "github" }, "original": { @@ -654,36 +654,6 @@ "type": "github" } }, - "hyprland-plugins": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "nixpkgs": [ - "hyprland-plugins", - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland-plugins", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1743339740, - "narHash": "sha256-G6a7R/gb1xH0yI2uevTmDpxZf6rvMh1lOu0gYrqVu5U=", - "owner": "hyprwm", - "repo": "hyprland-plugins", - "rev": "6dca4ece21864e329394b81cfc767778089097e2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-plugins", - "type": "github" - } - }, "hyprland-protocols": { "inputs": { "nixpkgs": [ @@ -696,11 +666,11 @@ ] }, "locked": { - "lastModified": 1738422629, - "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", + "lastModified": 1743549251, + "narHash": "sha256-yf+AXt0RkAkCyF6iSnJt6EJAnNG/l6qv70CVzhRP6Bg=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", + "rev": "4ab17ccac08456cb5e00e8bd323de2efd30612be", "type": "github" }, "original": { @@ -806,6 +776,36 @@ "type": "github" } }, + "hyprplugins": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "hyprplugins", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprplugins", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1743950622, + "narHash": "sha256-8qjDapcQeDqxQUIm5gA0x6XZtowV/14bOs3K0tCSMoU=", + "owner": "hyprwm", + "repo": "hyprland-plugins", + "rev": "be6b9875dd5c586fb401d294bb98c31973849651", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-plugins", + "type": "github" + } + }, "hyprsplit": { "inputs": { "hyprland": [ @@ -838,11 +838,11 @@ ] }, "locked": { - "lastModified": 1741534688, - "narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", + "lastModified": 1742984269, + "narHash": "sha256-uz9FaCIbga/gQ5ZG1Hb4HVVjTWT1qjjCAFlCXiaefxg=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", + "rev": "7248194a2ce0106ae647b70d0526a96dc9d6ad60", "type": "github" }, "original": { @@ -1024,11 +1024,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1740688134, - "narHash": "sha256-AwhCfXhk27Y4V+kWYIqeu3dK9OIy8elwQbf+QS7asqc=", + "lastModified": 1743975352, + "narHash": "sha256-KWD0XUUsYzGDaAVPOJiEO8Cq5FyH2fMfOHVq7J5mKck=", "owner": "maydayv7", "repo": "proprietary", - "rev": "9c31d3a59216d57f69bd281e93536ecfb7204a86", + "rev": "f1652c9e3fe111538b5949b28d80101f92c832af", "type": "github" }, "original": { @@ -1048,10 +1048,10 @@ "gaming": "gaming", "generators": "generators", "hardware": "hardware", - "home-manager": "home-manager", - "hyprdark": "hyprdark", + "home": "home", + "hyprcursors": "hyprcursors", "hyprland": "hyprland", - "hyprland-plugins": "hyprland-plugins", + "hyprplugins": "hyprplugins", "hyprsplit": "hyprsplit", "impermanence": "impermanence", "index": "index", @@ -1164,7 +1164,7 @@ "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": [ - "home-manager" + "home" ], "nixpkgs": [ "nixpkgs" @@ -1350,11 +1350,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix @@ -87,7 +87,7 @@ ## Feature Modules # User Home Manager - home-manager = { + home = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -135,7 +135,7 @@ nixpkgs.follows = "nixpkgs"; systems.follows = "systems"; flake-utils.follows = "utils"; - home-manager.follows = "home-manager"; + home-manager.follows = "home"; }; }; @@ -183,7 +183,7 @@ }; # Plugins - hyprland-plugins = { + hyprplugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; @@ -193,11 +193,11 @@ inputs.hyprland.follows = "hyprland"; }; - hyprdark = { - url = "github:micha4w/Hypr-DarkWindow"; + hyprcursors = { + url = "github:VirtCode/hypr-dynamic-cursors"; inputs = { hyprland.follows = "hyprland"; - nix-filter.follows = "filters"; + nixpkgs.follows = "nixpkgs"; }; }; }; diff --git a/lib/build.nix b/lib/build.nix @@ -42,8 +42,8 @@ in { fonts ? null, file, }: let - color = ["@accent" "@white" "@bg-r" "@bg-g" "@bg-b" "@base00" "@base01" "@base02" "@base03" "@base04" "@base05" "@base06" "@base07" "@base08" "@base09" "@base0A" "@base0B" "@base0C" "@base0D" "@base0E" "@base0F"]; - color' = with colors; [colors."${accent}" "FFFFFF" base00-rgb-r base00-rgb-g base00-rgb-b base00 base01 base02 base03 base04 base05 base06 base07 base08 base09 base0A base0B base0C base0D base0E base0F]; + color = ["@accent" "@white" "@base00" "@base01" "@base02" "@base03" "@base04" "@base05" "@base06" "@base07" "@base08" "@base09" "@base0A" "@base0B" "@base0C" "@base0D" "@base0E" "@base0F"]; + color' = with colors; [colors."${accent}" "FFFFFF" base00 base01 base02 base03 base04 base05 base06 base07 base08 base09 base0A base0B base0C base0D base0E base0F]; font = ["@font" "@monospace"]; font' = with fonts; [sansSerif.name monospace.name]; in diff --git a/modules/configuration.nix b/modules/configuration.nix @@ -73,7 +73,7 @@ in inherit system; specialArgs = { inherit util inputs files; - lib = lib // {inherit (inputs.home-manager.lib) hm;}; + lib = lib // {inherit (inputs.home.lib) hm;}; }; modules = [ @@ -102,10 +102,10 @@ in user.homeConfig = lib.mkForce {}; sops.secrets = lib.mkForce {}; } - else {environment.systemPackages = [pkgs.custom.nixos];} + else {} ) ] - else [] + else [{environment.systemPackages = [pkgs.custom.nixos];}] ); inherit apps gui hardware nix shell; diff --git a/modules/gui/desktop/hyprland/apps/notify.nix b/modules/gui/desktop/hyprland/apps/notify.nix @@ -1,8 +1,13 @@ { config, + lib, theme, ... -}: { +}: let + inherit (lib) mkForce; + inherit (theme) icons; + inherit (config.lib.stylix) colors; +in { ## Notifications Configuration # Phone Connect user.persist.directories = [".config/kdeconnect"]; @@ -19,14 +24,14 @@ # Notifications Daemon stylix.targets.dunst.enable = true; services.dunst = let - ignore = { + system = { history_ignore = "yes"; fullscreen = "show"; - highlight = "#${config.lib.stylix.colors.base07}"; + highlight = "#${colors.base07}"; }; in { enable = true; - iconTheme = theme.icons; + iconTheme = icons; settings = { global = { alignment = "center"; @@ -37,7 +42,7 @@ horizontal_padding = 8; icon_corner_radius = 10; icon_position = "left"; - icon_theme = theme.icons.name; + icon_theme = icons.name; indicate_hidden = "yes"; markup = "yes"; max_icon_size = 64; @@ -54,14 +59,17 @@ word_wrap = "yes"; }; + urgency_low.frame_color = mkForce "#${colors.base0E}"; + urgency_normal.frame_color = mkForce "#${colors.base0D}"; fullscreen_delay.fullscreen = "delay"; - utility = {appname = "utility";} // ignore; + screenshot = {appname = "grimblast";} // system; + utility = {appname = "utility";} // system; upower = { appname = "poweralertd"; - new_icon = "/run/current-system/sw/share/icons/${theme.icons.name}/24x24/apps/preferences-system-power.svg"; + new_icon = "/run/current-system/sw/share/icons/${icons.name}/24x24/apps/preferences-system-power.svg"; } - // ignore; + // system; }; }; }; diff --git a/modules/gui/desktop/hyprland/apps/settings.nix b/modules/gui/desktop/hyprland/apps/settings.nix @@ -7,16 +7,16 @@ theme, ... }: let - inherit (lib) flatten; - inherit (builtins) map toFile; - inherit (util) build; - inherit (config.lib.stylix) colors; + inherit (builtins) map toString; + inherit (config.gui) cursors display; + cursor = "${cursors.name}-Hyprcursor"; in { ## App Environment xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk]; # Desktop Integration stylix.base16Scheme = files.colors.catppuccin; + environment.systemPackages = [pkgs.custom.bibata-hyprcursor]; gui = with theme; { fonts.enable = true; inherit (theme) icons; @@ -40,19 +40,27 @@ in { button-layout = "appmenu"; }; + # Cursor + xdg.dataFile."icons/${cursor}".source = "${cursors.package}/share/icons/${cursor}"; wayland.windowManager.hyprland.settings = { env = [ + "HYPRCURSOR_THEME, ${cursor}" + "HYPRCURSOR_SIZE, ${toString cursors.size}" + # QT Apps "QT_WAYLAND_DISABLE_WINDOWDECORATION, 1" - # Screengrab - "SLURP_ARGS, -dc ${colors.base0D}" + # Screenshot + "SLURP_ARGS, -dc ${config.lib.stylix.colors.base0D}" ]; ## Autostart exec-once = - ["uwsm finalize"] - ++ (map (app: "uwsm app -t service -u ${build.until " " app}.service -- " + app) [ + [ + "uwsm finalize" + "hyprctl setcursor ${cursor} ${toString cursors.size}" + ] + ++ (map (app: "uwsm app -t service -u ${util.build.until " " app}.service -- " + app) [ "hyprutils daemon" # Pyprland @@ -66,12 +74,6 @@ in { # Display Temperature "hyprsunset -i" - - # Window Switcher - "hyprswitch init --workspaces-per-row 3 --custom-css ${toFile "style.css" (build.theme { - inherit colors; - file = files.hyprland.hyprswitch; - })} &" ]); ## Shortcuts @@ -99,7 +101,7 @@ in { # Tools "$mod SHIFT, A, exec, hyprutils toggle service waybar" - "$mod SHIFT, D, exec, hyprutils toggle monitor ${config.gui.display}" + "$mod SHIFT, D, exec, hyprutils toggle monitor ${display}" "$mod, N, exec, dunstctl history-pop" "$mod, S, exec, hyprutils toggle shader" "$mod SHIFT, T, exec, pypr toggle term" @@ -117,10 +119,11 @@ in { "blur, ^(logout_dialog)$" "blur, ^(nwg-drawer)$" "blur, ^(waybar)$" + "blur, ^(wlclock)$" ]; ## Window Rules - windowrulev2 = flatten ( + windowrulev2 = lib.flatten ( [ # Settings "stayfocused, class:^(gnome-control-center)$" diff --git a/modules/gui/desktop/hyprland/apps/utilities.nix b/modules/gui/desktop/hyprland/apps/utilities.nix @@ -1,10 +1,13 @@ { config, + lib, util, pkgs, files, ... }: let + inherit (lib) getExe; + inherit (builtins) toFile; inherit (util.build) theme; inherit (config.lib.stylix) colors; in { @@ -34,7 +37,9 @@ in { pavucontrol pyprland slurp + waycorner wev + wlclock wl-clipboard wl-screenrec wlr-randr @@ -82,6 +87,34 @@ in { }; }; + systemd.user.services = let + run = about: command: { + Install.WantedBy = ["graphical-session.target"]; + Unit.Description = about; + Service = { + Type = "Simple"; + ExecStart = command; + }; + }; + in { + waycorner = run "Hot Corners" (getExe pkgs.waycorner); + wlclock = with colors; run "Desktop Clock" "${getExe pkgs.wlclock} --layer bottom --exclusive-zone true --position top-right --margin 10 --size 300 --corner-radius 10 --border-size 2 --hand-width 7 --marking-width 3 --background-colour #ffffff00 --clock-colour #${base0D} --border-colour #${base00}"; + hyprswitch = run "Window Switcher" "${getExe pkgs.hyprswitch} init --workspaces-per-row 3 --custom-css ${toFile "style.css" (theme { + inherit colors; + file = files.hyprland.hyprswitch; + })}"; + }; + + # Network Settings + xdg.desktopEntries."org.gnome.Settings" = { + name = "Network Settings"; + comment = "Gnome Control Center"; + icon = "org.gnome.Settings"; + exec = "env XDG_CURRENT_DESKTOP=gnome gnome-control-center"; + categories = ["X-Preferences"]; + terminal = false; + }; + home.file = with files.hyprland; { # Application Drawer ".config/nwg-drawer/drawer.css".text = drawer; @@ -89,9 +122,12 @@ in { # Pyprland ".config/hypr/pyprland.toml".text = pypr; + # Hot Corners + ".config/waycorner/config.toml".text = waycorner; + # Shaders ".config/hypr/shaders" = { - source = "${pkgs.custom.hyprshaders}/share/hypr/shaders"; + source = files.proprietary.shaders; recursive = true; }; diff --git a/modules/gui/desktop/hyprland/settings/default.nix b/modules/gui/desktop/hyprland/settings/default.nix @@ -6,7 +6,7 @@ }: let inherit (lib) mkForce mkIf; inherit (sys.gui) display fancy; - inherit (sys.lib.stylix.colors) base03 base0A base0D; + inherit (sys.lib.stylix.colors) base03 base07 base0D; in { ## Hyprland Settings imports = util.map.modules.list ./.; @@ -115,15 +115,15 @@ in { }; # Visuals - gaps_in = 5; - gaps_out = 5; + gaps_in = 3; + gaps_out = 3; border_size = 2; - "col.active_border" = mkForce "rgb(${base0D}) rgb(${base0A}) 90deg"; + "col.active_border" = mkForce "rgb(${base0D}) rgb(${base07}) 90deg"; }; group = let - active = "rgb(${base0A}) rgb(${base0D}) 90deg"; - inactive = "rgb(${base03}) rgb(${base0D}) 90deg"; + active = "rgb(${base07}) rgb(${base0D}) 90deg"; + inactive = "rgb(${base03}) rgb(${base07}) 90deg"; in { auto_group = true; insert_after_current = true; @@ -140,10 +140,11 @@ in { groupbar = { enabled = true; - render_titles = false; scrolling = true; gradients = true; height = 10; + render_titles = false; + keep_upper_gap = false; indicator_height = 0; gradient_rounding = 5; gradient_round_only_edges = false; diff --git a/modules/gui/desktop/hyprland/settings/keybindings.nix b/modules/gui/desktop/hyprland/settings/keybindings.nix @@ -137,8 +137,10 @@ _: { ## Submaps extraConfig = '' # Inhibit Keybinds + bind = $mod SHIFT, Escape, exec, hyprutils toggle service waycorner bind = $mod SHIFT, Escape, submap, Inhibit submap = Inhibit + bind = $mod SHIFT, Escape, exec, hyprutils toggle service waycorner bind = $mod SHIFT, Escape, submap, reset submap = reset diff --git a/modules/gui/desktop/hyprland/settings/plugins.nix b/modules/gui/desktop/hyprland/settings/plugins.nix @@ -9,7 +9,7 @@ plugins = with pkgs.hyprworld; [ hyprexpo hyprsplit - #!# Hypr-DarkWindow + hypr-dynamic-cursors ]; settings = { @@ -27,15 +27,28 @@ bg_col = "rgb(${sys.lib.stylix.colors.base00})"; gap_size = config.wayland.windowManager.hyprland.settings.general.gaps_in; }; - }; - bind = [ - # Overview - "$mod, grave, hyprexpo:expo, toggle" + # Cursor Effects + dynamic-cursors = { + enabled = true; + hyprcursor.enabled = true; + shake = { + enabled = true; + nearest = true; + effects = false; + ipc = false; + }; + + mode = + if (sys.gui.fancy) + then "tilt" + else "none"; + tilt.function = "negative_quadratic"; + }; + }; - # Color Inversion - #!# "$mod, I, invertactivewindow" - ]; + # Overview + bind = ["$mod, grave, hyprexpo:expo, toggle"]; }; }; } diff --git a/modules/gui/desktop/hyprland/theme.nix b/modules/gui/desktop/hyprland/theme.nix @@ -8,10 +8,11 @@ pkgs: rec { variant-alt = "Macchiato"; gtk = { - name = "${name}-${variant}-${accent}-standard"; - package = pkgs.catppuccin-gtk.override { - accents = [accent]; - inherit variant; + name = "${name-alt}-GTK-Dark-${variant-alt}"; + package = pkgs.magnetic-catppuccin-gtk.override { + shade = "dark"; + accent = ["default"]; + tweaks = [variant]; }; }; diff --git a/modules/shell/default.nix b/modules/shell/default.nix @@ -18,13 +18,12 @@ in { config = mkMerge [ { - # Environment Settings - environment = { - systemPackages = [pkgs.nano]; - - # Default Editor - variables."EDITOR" = "nano"; - etc.nanorc.text = files.nano; + # Text Editor + environment.variables."EDITOR" = "nano"; + programs.nano = { + enable = true; + syntaxHighlight = true; + nanorc = files.nano; }; } @@ -36,8 +35,10 @@ in { btop eza fd + hstr hyfetch lolcat + micro tree yazi ]; @@ -57,7 +58,10 @@ in { user = { persist = { files = [".hstr_favorites"]; - directories = [".local/share/direnv"]; + directories = [ + ".config/micro" + ".local/share/direnv" + ]; }; homeConfig = { @@ -95,6 +99,30 @@ in { git = true; extraOptions = ["--group-directories-first"]; }; + + # Micro Configuration + micro = { + enable = true; + settings = { + autoindent = true; + backup = true; + clipboard = "external"; + cursorline = true; + eofnewline = false; + helpsplit = "vsplit"; + hltrailingws = true; + infobar = true; + matchbrace = true; + keymenu = true; + mouse = true; + reload = "prompt"; + ruler = true; + saveundo = true; + smartpaste = true; + statusline = true; + syntax = true; + }; + }; }; # Fetch diff --git a/modules/user/default.nix b/modules/user/default.nix @@ -31,7 +31,7 @@ }; in { ## USER Configuration ## - imports = modules.list ./. ++ [inputs.home-manager.nixosModules.home-manager]; + imports = modules.list ./. ++ [inputs.home.nixosModules.home-manager]; options = { # Global Home Manager Configuration diff --git a/packages/bibata-hyprcursor/configure.py b/packages/bibata-hyprcursor/configure.py @@ -0,0 +1,52 @@ +from sys import argv +import os +from os import path +from pathlib import Path +import tomli +import tomli_w + + +def fallback_value(config, cursor, field): + return (config.get(cursor, None) or {}).get(field, None) or ( + config["fallback_settings"].get(field, None) + ) + + +def filter_none_dict(**kwargs): + return {k: v for k, v in kwargs.items() if v is not None} + + +def construct_meta(config, name, sizes): + meta = filter_none_dict( + define_size=";".join(sizes), + define_override=( + None + if (overrides := fallback_value(config, name, "x11_symlinks")) is None + else ";".join(overrides) + ), + hotspot_x=fallback_value(config, name, "x_hotspot") / 256, + hotspot_y=fallback_value(config, name, "y_hotspot") / 256, + ) + + with open(f"{name}/meta.toml", "wb") as file: + tomli_w.dump({"General": meta}, file) + + +with open(argv[1], "rb") as file: + config = tomli.load(file)["cursors"] + +os.chdir(argv[2]) + +for cursor in os.listdir("."): + if path.isfile(cursor): + name = Path(cursor).stem + + os.mkdir(name) + os.rename(cursor, f"{name}/{cursor}") + + construct_meta(config, name, [f"0,{cursor}"]) + else: + delay = fallback_value(config, cursor, "x11_delay") + construct_meta( + config, cursor, map(lambda c: f"0,{c},{delay}", os.listdir(cursor)) + ) diff --git a/packages/bibata-hyprcursor/default.nix b/packages/bibata-hyprcursor/default.nix @@ -0,0 +1,82 @@ +{ + lib, + pkgs, + variant ? "original", + baseColor ? "#000000", + outlineColor ? "#FFFFFF", + watchBackgroundColor ? "#000000", + colorName ? "classic", + ... +}: +with pkgs; let + metadata = import ./metadata.nix; + capital = str: let A = builtins.substring 0 1 str; in lib.toUpper A + (lib.removePrefix A str); + themeName = "Bibata-${capital variant}-${capital colorName}-Hyprcursor"; +in + assert builtins.elem variant ["modern" "modern-right" "original" "original-right"]; + stdenvNoCC.mkDerivation { + pname = "bibata-hyprcursor"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "ful1e5"; + repo = "Bibata_Cursor"; + inherit (metadata) rev sha256; + }; + + nativeBuildInputs = [ + python3 + python3Packages.tomli + python3Packages.tomli-w + hyprcursor + ]; + + phases = ["unpackPhase" "configurePhase" "buildPhase" "installPhase"]; + unpackPhase = '' + runHook preUnpack + cp $src/configs/${ + if lib.hasSuffix "right" variant + then "right" + else "normal" + }/x.build.toml config.toml + mkdir cursors + for cursor in $src/svg/${variant}/*; do + cp -r $src/svg/${variant}/$(readlink $cursor) cursors + done + chmod -R u+w . + runHook postUnpack + ''; + + configurePhase = '' + runHook preConfigure + cat << EOF > manifest.hl + name = ${themeName} + description = Bibata Cursor Theme packaged for Hyprcursor + version = ${metadata.rev} + cursors_directory = cursors + EOF + find cursors -type f -name '*.svg' | xargs sed -i -e 's/#00FF00/${baseColor}/g' -e 's/#0000FF/${outlineColor}/g' -e 's/#FF0000/${watchBackgroundColor}/g' + python ${./configure.py} config.toml cursors + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + hyprcursor-util --create . --output . + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/icons + cp -r theme_${themeName} $out/share/icons/${themeName} + runHook postInstall + ''; + + meta = with lib; { + description = "Open source, compact, and material designed cursor set in Hyprcursor format"; + homepage = "https://github.com/diniamo/niqspkgs/blob/544c3b2c69fd1b5ab3407e7b35c76060801a8bcf/pkgs/bibata-hyprcursor/default.nix"; + license = licenses.gpl3Only; + maintainers = ["diniamo"]; + }; + } diff --git a/packages/bibata-hyprcursor/metadata.nix b/packages/bibata-hyprcursor/metadata.nix @@ -0,0 +1,6 @@ +{ + repo = "https://github.com/ful1e5/Bibata_Cursor"; + release = true; + rev = "v2.0.7"; + sha256 = "sha256-kIKidw1vditpuxO1gVuZeUPdWBzkiksO/q2R/+DUdEc="; +} diff --git a/packages/flake.nix b/packages/flake.nix @@ -51,9 +51,9 @@ in { wine = windows.packages."${system}"; hyprworld = hyprland.packages."${system}" - // hyprland-plugins.packages."${system}" - // hyprdark.packages."${system}" - // hyprsplit.packages."${system}"; + // hyprplugins.packages."${system}" + // hyprsplit.packages."${system}" + // hyprcursors.packages."${system}"; }) ]; }; diff --git a/packages/hyprshaders/default.nix b/packages/hyprshaders/default.nix @@ -1,41 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; - stdenv.mkDerivation { - pname = "hyprshaders"; - version = "v2"; - - srcs = [ - ./dim.frag - (fetchFromGitHub { - owner = "hyprland-community"; - repo = "awesome-hyprland"; - rev = "9978013d307fd205c6d61296bda3dfdb7e8282f1"; - sha256 = "sha256-giMv5+1WfEFc5jfwPSNxu6V+puWOyTfVpNVrd2aQvKE="; - }) - ]; - - dontBuild = true; - unpackPhase = '' - for src in $srcs - do - cp -r $src $(stripHash $src) - done - ''; - - installPhase = '' - mkdir -p $out/share/hypr/shaders/ - find . -name '*.frag' ! -name 'blue*' ! -name 'vibrance*' \ - -exec cp {} $out/share/hypr/shaders/ \; - ''; - - meta = with lib; { - description = "Shaders for Hyprland"; - homepage = "https://github.com/hyprland-community/awesome-hyprland"; - license = licenses.cc0; - maintainers = ["maydayv7"]; - }; - } diff --git a/packages/hyprshaders/dim.frag b/packages/hyprshaders/dim.frag @@ -1,6 +0,0 @@ -precision highp float; -varying vec2 v_texcoord; -uniform sampler2D tex; -void main() { - gl_FragColor = texture2D(tex, v_texcoord) * 0.3; -} diff --git a/site/content/anime.md b/site/content/anime.md @@ -14,6 +14,7 @@ comments = true - 86 <sup>#</sup> <sup>\*</sup> - 100 Kanojo <sup>#</sup> <sup>\*</sup> - A Condition called Love +- A Galaxy Next Door <sup>\*</sup> - A Sign of Affection - A Silent Voice - Aharen-san wa Hakarenai