summaryrefslogtreecommitdiff
path: root/home-manager/features/gui/desktops/niri/parts
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/features/gui/desktops/niri/parts')
-rwxr-xr-xhome-manager/features/gui/desktops/niri/parts/fuzzel.nix30
-rwxr-xr-xhome-manager/features/gui/desktops/niri/parts/hyprlock.nix46
-rwxr-xr-xhome-manager/features/gui/desktops/niri/parts/mako.nix26
-rw-r--r--home-manager/features/gui/desktops/niri/parts/quickshell/.envrc1
-rw-r--r--home-manager/features/gui/desktops/niri/parts/quickshell/flake.lock64
-rw-r--r--home-manager/features/gui/desktops/niri/parts/quickshell/flake.nix29
-rw-r--r--home-manager/features/gui/desktops/niri/parts/selectors.nix123
-rwxr-xr-xhome-manager/features/gui/desktops/niri/parts/swww.nix8
-rwxr-xr-xhome-manager/features/gui/desktops/niri/parts/waybar.nix136
-rw-r--r--home-manager/features/gui/desktops/niri/parts/wl-kbptr.nix14
-rw-r--r--home-manager/features/gui/desktops/niri/parts/wluma.nix11
11 files changed, 488 insertions, 0 deletions
diff --git a/home-manager/features/gui/desktops/niri/parts/fuzzel.nix b/home-manager/features/gui/desktops/niri/parts/fuzzel.nix
new file mode 100755
index 0000000..e939f88
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/fuzzel.nix
@@ -0,0 +1,30 @@
+{ config, lib, ... }: let
+ cfg = config.features.gui.desktops.niri.parts.fuzzel;
+ aes = config.aesthetics;
+in {
+ options.features.gui.desktops.niri.parts.fuzzel.enable = lib.mkEnableOption "fuzzel";
+ config = lib.mkIf cfg.enable {
+ programs.fuzzel = {
+ enable = true;
+ settings = {
+ main = {
+ width = 20;
+ #terminal = config.custom.libraries.default-applications.terminal-emulator.command;
+ };
+ border = {
+ width = 3;
+ radius = 4;
+ };
+ colors = with aes.scheme; {
+ background = "${base00}ff";
+ selection = "${base00}ff";
+ selection-text = "${base0C}ff";
+ selection-match = "${base0E}ff";
+ match = "${base0E}ff";
+ border = "${base0C}ff";
+ text = "${base05}ff";
+ };
+ };
+ };
+ };
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/hyprlock.nix b/home-manager/features/gui/desktops/niri/parts/hyprlock.nix
new file mode 100755
index 0000000..f8a50e3
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/hyprlock.nix
@@ -0,0 +1,46 @@
+{ config, lib, pkgs, ... }: let
+ cfg = config.features.gui.desktops.niri.parts.hyprlock;
+in {
+ options.features.gui.desktops.niri.parts.hyprlock.enable = lib.mkEnableOption "hyprlock";
+ config = lib.mkIf cfg.enable {
+ home.packages = [(
+ pkgs.writers.writeNuBin "nirilock" /*nu*/ ''
+ niri msg action do-screen-transition --delay-ms 500
+ systemctl suspend
+ hyprlock
+ ''
+ )];
+ programs.niri.settings.window-rules = [
+ {
+ matches = [{ title = "hyprlock"; }];
+ draw-border-with-background = false;
+ }
+ ];
+ programs.hyprlock = {
+ enable = true;
+ settings = {
+ background = {
+ monitor = "";
+ path = "${config.aesthetics.wallpaper}";
+ blur_passes = 0;
+ blur_size = 5;
+ };
+ label = {
+ text = "$TIME";
+ font_size = 65;
+ font_family = "Cantarell Bold";
+
+ position = "0, 0";
+ halign = "center";
+ valign = "center";
+ };
+ input-field = {
+ size = "250, 50";
+ position = "0, -80";
+ outline_thickness = 0;
+ placeholder_text = "";
+ };
+ };
+ };
+ };
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/mako.nix b/home-manager/features/gui/desktops/niri/parts/mako.nix
new file mode 100755
index 0000000..e5bc3b8
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/mako.nix
@@ -0,0 +1,26 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.features.gui.desktops.niri.parts.mako;
+in {
+ options.features.gui.desktops.niri.parts.mako.enable = lib.mkEnableOption "mako";
+ config = lib.mkIf cfg.enable {
+ services.mako = {
+ enable = true;
+ settings = {
+ border-radius = 4;
+ border-size = 3;
+ # margin = "11";
+ margin = "31";
+ padding = "5";
+
+ anchor = "top-center";
+
+ ignore-timeout = true;
+ default-timeout = 10000;
+ };
+ };
+ };
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/quickshell/.envrc b/home-manager/features/gui/desktops/niri/parts/quickshell/.envrc
new file mode 100644
index 0000000..3550a30
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/quickshell/.envrc
@@ -0,0 +1 @@
+use flake
diff --git a/home-manager/features/gui/desktops/niri/parts/quickshell/flake.lock b/home-manager/features/gui/desktops/niri/parts/quickshell/flake.lock
new file mode 100644
index 0000000..29f5851
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/quickshell/flake.lock
@@ -0,0 +1,64 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": [
+ "systems"
+ ]
+ },
+ "locked": {
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1751498133,
+ "narHash": "sha256-QWJ+NQbMU+NcU2xiyo7SNox1fAuwksGlQhpzBl76g1I=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "d55716bb59b91ae9d1ced4b1ccdea7a442ecbfdb",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs",
+ "systems": "systems"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/quickshell/flake.nix b/home-manager/features/gui/desktops/niri/parts/quickshell/flake.nix
new file mode 100644
index 0000000..2122f1f
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/quickshell/flake.nix
@@ -0,0 +1,29 @@
+{
+ description = "Project flake";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
+ systems.url = "github:nix-systems/default";
+ flake-utils = {
+ url = "github:numtide/flake-utils";
+ inputs.systems.follows = "systems";
+ };
+ };
+
+ outputs = {
+ nixpkgs,
+ flake-utils,
+ ...
+ }:
+ flake-utils.lib.eachDefaultSystem (
+ system: let
+ pkgs = nixpkgs.legacyPackages.${system};
+ in {
+ devShells.default = pkgs.mkShell {
+ packages = with pkgs; [
+ quickshell
+ ];
+ };
+ }
+ );
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/selectors.nix b/home-manager/features/gui/desktops/niri/parts/selectors.nix
new file mode 100644
index 0000000..1adc917
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/selectors.nix
@@ -0,0 +1,123 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}: let
+ cfg = config.features.gui.desktops.niri.parts.selectors;
+ aes = config.aesthetics;
+in {
+ options.features.gui.desktops.niri.parts.selectors.enable = lib.mkEnableOption "selectors";
+ config = lib.mkIf cfg.enable {
+ home.packages = with pkgs; [
+ # Tool Selector
+ (
+ pkgs.writers.writeNuBin "tool-selector"
+ /*
+ nu
+ */
+ ''
+
+ # Tools
+ let tools = {
+ "rebuild nixos": {
+ # footclient -H sudo nixos-rebuild switch --flake ($"~/Sync/setup#(hostname)" | path expand)
+ foot -H nh os switch
+ }
+ "rebuild home": {
+ # foot -H home-manager switch --flake ($"~/Sync/setup#(whoami)@(hostname)" | path expand)
+ foot -H nh home switch
+ }
+ "update flake": {
+ foot -H nix flake update --flake ($"~/Sync/setup/" | path expand)
+ }
+ "manage wifi": {
+ foot ${pkgs.impala}/bin/impala
+ }
+ "manage bluetooth": {
+ foot ${lib.getExe pkgs.bluetui}
+ }
+ "create qr-code": {
+ let temp_file = mktemp
+ let qr_code_bin = ${lib.getExe pkgs.qrtool} encode (${pkgs.wl-clipboard}/bin/wl-paste)
+ $qr_code_bin | ${pkgs.wl-clipboard}/bin/wl-copy
+ $qr_code_bin | save -f $temp_file
+ ${lib.getExe pkgs.imv} $temp_file
+ }
+ "steam big-picture": {
+ rm -r ~/.steam
+ gamescope -f --backend sdl -- steam -bigpicture
+ }
+ }
+
+ # Logic
+ let user_tool_choice = $tools
+ | columns
+ | to text
+ | fuzzel -d --placeholder "Tools"
+ if ($user_tool_choice != "") {
+ do ($tools | get $user_tool_choice)
+ }
+
+ ''
+ )
+
+ # Wallpaper Selector
+ (
+ writers.writeNuBin "wallpaper-selector"
+ /*
+ nu
+ */
+ ''
+ def main [
+ --all-outputs # Change wallpaper for all outputs
+ --randomize
+ ] {
+ mut wallpapers = {}
+ for path in (ls ${aes.wallpapersDir}/**/* | where {|item| $item.type != dir} | get name) {
+ $wallpapers = $wallpapers | insert ($path | path basename | split row "." | get 0) $path
+ }
+ mut prompt = "Wallpaper (current)"
+ if $all_outputs {
+ $prompt = "Wallpaper (all)"
+ }
+ mut wallpaper_path = ""
+ if $randomize {
+ $wallpaper_path = $wallpapers | get (
+ $wallpapers
+ | columns
+ | shuffle
+ | get 0
+ )
+ } else {
+ $wallpaper_path = $wallpapers | get (
+ $wallpapers
+ | columns
+ | to text
+ | ${lib.getExe pkgs.fuzzel} -d --placeholder $prompt
+ )
+ }
+ if $all_outputs {
+ ${lib.getExe pkgs.swww} img $wallpaper_path -t wipe --transition-fps 60 --transition-angle 45
+ } else {
+ let focused_display = niri msg -j focused-output
+ | from json
+ | get name
+ ${lib.getExe pkgs.swww} img $wallpaper_path -t wipe --transition-fps 60 --transition-angle 45 --outputs $focused_display
+ }
+ }
+ ''
+ )
+
+ # Clipboard Selector
+ (
+ writers.writeNuBin "clipboard-selector" ''
+ ${lib.getExe pkgs.cliphist} list
+ | cut -f 2-
+ | ${lib.getExe pkgs.fuzzel} --dmenu
+ | ${pkgs.wl-clipboard}/bin/wl-copy
+ ''
+ )
+ ];
+ };
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/swww.nix b/home-manager/features/gui/desktops/niri/parts/swww.nix
new file mode 100755
index 0000000..dca163b
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/swww.nix
@@ -0,0 +1,8 @@
+{ config, pkgs, lib, ... }: let
+ cfg = config.features.gui.desktops.niri.parts.swww;
+in {
+ options.features.gui.desktops.niri.parts.swww.enable = lib.mkEnableOption "swww";
+ config = lib.mkIf cfg.enable {
+ home.packages = [pkgs.swww];
+ };
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/waybar.nix b/home-manager/features/gui/desktops/niri/parts/waybar.nix
new file mode 100755
index 0000000..7535b0c
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/waybar.nix
@@ -0,0 +1,136 @@
+{ config, pkgs, lib, ... }:
+let
+ cfg = config.features.gui.desktops.niri.parts.waybar;
+ aes = config.aesthetics;
+in {
+ options.features.gui.desktops.niri.parts.waybar.enable = lib.mkEnableOption "waybar";
+ config = lib.mkIf cfg.enable {
+ programs.waybar = {
+ enable = true;
+ settings = {
+ bar = {
+ layer = "top";
+ position = "bottom";
+ height = 32;
+ modules-left = [ "battery" "network" "backlight" "pulseaudio" ];
+ modules-center = [ "niri/workspaces" ];
+ modules-right = [ "clock#date" "clock#time" ];
+ "clock#date" = {
+ format = " {:%A, %B %d}";
+ };
+ "clock#time" = {
+ format = " {:%I:%M}";
+ };
+ pulseaudio = {
+ format = " {volume}%";
+ format-muted = " {volume}%";
+ };
+ network = {
+ format = "{essid}";
+ format-wifi = "{icon} {essid}";
+ format-ethernet = "󰈀 Ethernet";
+ format-disconnected = "󰤭 Disconnected";
+ format-icons = [ "󰤯" "󰤟" "󰤢" "󰤥" "󰤨" ];
+ };
+ battery = {
+ format = "{icon} {capacity}%";
+ format-charging = "󰂄 {capacity}%";
+ format-icons = [ "󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
+ };
+ backlight = {
+ format = " {percent}%";
+ };
+ "niri/workspaces" = {
+ format = "{icon}";
+ format-icons = {
+ default = "";
+ active = "";
+ /*
+ "1" = "1";
+ "2" = "2";
+ "3" = "3";
+ "4" = "4";
+ "5" = "5";
+ "6" = "6";
+ "7" = "7";
+ "8" = "8";
+ "9" = "9";
+ "10" = "10";
+ "11" = "11";
+ "12" = "12";
+ */
+ };
+ };
+ };
+ };
+ style = let
+ border-radius = "4";
+ padding = "12";
+ in /*css*/ ''
+ @define-color background-color #${aes.scheme.base00};
+ @define-color border-color #${aes.scheme.base0C};
+ @define-color text-color #${aes.scheme.base05};
+ * {
+ font-family: ${aes.font.name};
+ font-weight: 600;
+ font-size: ${aes.font.size.medium}px;
+ }
+ window#waybar {
+ background-color: transparent;
+ }
+ #clock.time, #clock.date, #backlight, #pulseaudio, #battery, #network {
+ background-color: @background-color;
+ color: @text-color;
+ border-radius: ${border-radius}px;
+ border-width: 0px;
+ border-color: @border-color;
+ padding: 0px ${padding}px;
+ }
+ #backlight, #pulseaudio, #battery, #network {
+ margin: 0px 0px ${padding} ${padding};
+ }
+ #workspaces {
+ background-color: @background-color;
+ color: @background-color;
+ border-radius: ${border-radius}px;
+ border-width: 0px;
+ border-color: @border-color;
+ padding: 0px 0px;
+ margin-bottom: ${padding}px;
+ }
+ #workspaces button {
+ font-weight: bold;
+ padding: 0px 4px;
+ margin: 4px 4px;
+ border-radius: ${border-radius}px;
+ color: @background-color;
+ background: @text-color;
+ opacity: 0.5;
+ transition: all 0.3s cubic-bezier(.25,.1,.25,1);
+ }
+ #workspaces button.active {
+ font-weight: bold;
+ padding: 0px 4px;
+ margin: 4px 4px;
+ border-radius: ${border-radius}px;
+ color: @background-color;
+ background: @text-color;
+ transition: all 0.3s cubic-bezier(.25,.1,.25,1);
+ opacity: 1.0;
+ min-width: 40px;
+ }
+ #workspaces button:hover {
+ font-weight: bold;
+ border-radius: ${border-radius}px;
+ color: @background-color;
+ background: @text-color;
+ opacity: 0.8;
+ transition: all 0.3s cubic-bezier(.25,.1,.25,1);
+ }
+ #clock.date, #clock.time {
+ margin: 0px ${padding} ${padding} 0px
+ }
+ '';
+ };
+ };
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/wl-kbptr.nix b/home-manager/features/gui/desktops/niri/parts/wl-kbptr.nix
new file mode 100644
index 0000000..6f6ed56
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/wl-kbptr.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, inputs, ... }: let
+ cfg = config.features.gui.desktops.niri.parts.wl-kbptr;
+in {
+ options.features.gui.desktops.niri.parts.wl-kbptr.enable = lib.mkEnableOption "wl-kbptr";
+ config = lib.mkIf cfg.enable {
+ home.packages = [ pkgs.wl-kbptr ];
+ home.file."wl-kbptr-config" = {
+ target = ".config/wl-kbptr/config";
+ text = ''
+
+ '';
+ };
+ };
+}
diff --git a/home-manager/features/gui/desktops/niri/parts/wluma.nix b/home-manager/features/gui/desktops/niri/parts/wluma.nix
new file mode 100644
index 0000000..21b9edc
--- /dev/null
+++ b/home-manager/features/gui/desktops/niri/parts/wluma.nix
@@ -0,0 +1,11 @@
+{ config, lib, ... }: let
+ cfg = config.features.gui.desktops.niri.parts.wluma;
+in {
+ options.features.gui.desktops.niri.parts.wluma.enable = lib.mkEnableOption "wluma";
+ config = lib.mkIf cfg.enable {
+ services.wluma = {
+ enable = true;
+ systemd.enable = true;
+ };
+ };
+}