commit 7ed1a8da457f0eaf748ada7cc3e6d1fa3291bb80
parent 454eef04898d0e3b340c3f4e59e9797906fe989c
Author: maydayv7 <maydayv7@gmail.com>
Date: Wed, 17 Jun 2026 00:37:36 +0530
feat(Hyprland): Use Noctalia Shell
Diffstat:
48 files changed, 416 insertions(+), 1967 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -2,6 +2,7 @@
### June
+- Use Noctalia Shell (v5) with Hyprland
- Per-user secrets
- Use `zellij` instead of `tmux`
- Add `auth`, `syncthing`, `mouse`
diff --git a/README.md b/README.md
@@ -4,9 +4,13 @@
<img alt="Banner" src="./files/images/banner-dark.png">
</picture>
-[](https://nixos.org)
-
-
+[](https://nixos.org)
+<picture><source media="(prefers-color-scheme: dark)" srcset="https://www.shieldcn.dev/github/license/maydayv7/dotfiles.svg?variant=ghost&size=sm&mode=dark&font=jetbrains-mono">
+<img alt="License" src="https://www.shieldcn.dev/github/license/maydayv7/dotfiles.svg?variant=ghost&size=sm&mode=light&font=jetbrains-mono">
+</picture>
+<picture><source media="(prefers-color-scheme: dark)" srcset="https://www.shieldcn.dev/github/last-commit/maydayv7/dotfiles.svg?variant=secondary&size=sm&mode=dark&font=jetbrains-mono">
+<img alt="Last commit" src="https://www.shieldcn.dev/github/last-commit/maydayv7/dotfiles.svg?variant=secondary&size=sm&mode=light&font=jetbrains-mono">
+</picture>
This directory contains the configuration and `dotfiles` for my continuously evolving multi-PC setup (using [Nix](https://nixos.org/)).
All the devices I own, controlled by code.
@@ -391,6 +395,4 @@ A `git` [hook](./files/git/hooks) is used to check the commit message to adhere
</details>
-> Last Updated: **June** 2026
-
If you like this project, consider leaving a [star](https://github.com/maydayv7/dotfiles)
diff --git a/files/_module.nix b/files/_module.nix
@@ -74,19 +74,13 @@ in {
};
# Hyprland WM
- hyprland =
- {
- shaders = ./hyprland/shaders;
- pypr = readFile ./hyprland/pypr.toml;
- waycorner = readFile ./hyprland/waycorner.toml;
- kebihelp = readFile ./hyprland/kebihelp.json;
- greeter = readFile ./hyprland/greeter.conf;
- }
- // map.files {
- directory = ./hyprland/theme;
- apply = readFile;
- extension = ".css";
- };
+ hyprland = {
+ shaders = ./hyprland/shaders;
+ pypr = readFile ./hyprland/pypr.toml;
+ waycorner = readFile ./hyprland/waycorner.toml;
+ kebihelp = readFile ./hyprland/kebihelp.json;
+ greeter = readFile ./hyprland/greeter.conf;
+ };
# Pictures
images = map.files {
@@ -117,12 +111,6 @@ in {
extension = ".sh";
};
- # Display Temperature Control
- sunsetr = ./sunsetr;
-
- # Notifications Daemon
- swaync = readFile ./swaync.css;
-
# Document Templates
templates = ./templates;
@@ -136,9 +124,6 @@ in {
# My Personal Website
website = ../site;
- # Logout Menu
- wlogout = readFile ./wlogout.css;
-
# YouTube
youtube = readFile ./ytmusic.json;
};
diff --git a/files/hyprland/kebihelp.json b/files/hyprland/kebihelp.json
@@ -147,11 +147,7 @@
"keybindings": [
{
"value": "$mod Tab",
- "label": "Application Launcher and Overview"
- },
- {
- "value": "$mod `",
- "label": "Show workspace overview"
+ "label": "Window Switcher / Overview"
},
{
"value": "ALT [SHIFT] Tab",
@@ -236,6 +232,10 @@
"label": "Toggle Compositor Shader"
},
{
+ "value": "$mod G",
+ "label": "Toggle Game Mode"
+ },
+ {
"value": "$mod SHIFT S",
"label": "Toggle window swallowing"
},
@@ -254,11 +254,11 @@
},
{
"value": "$mod A",
- "label": "Application Drawer"
+ "label": "Application Launcher"
},
{
"value": "$mod SHIFT A",
- "label": "Toggle top Panel"
+ "label": "Shell Settings"
},
{
"value": "$mod SHIFT C",
diff --git a/files/hyprland/pypr.toml b/files/hyprland/pypr.toml
@@ -1,10 +1,18 @@
[pyprland]
plugins = [
+ "gamemode",
"magnify",
"scratchpads",
"toggle_special"
]
+[gamemode]
+auto = true
+# Refine via: hyprctl clients -j | jq '.[].class'
+patterns = ["steam_app_*", "gamescope*", "*.exe"]
+border_size = 2
+hysteresis = 2.0
+
[scratchpads.top]
animation = "fromTop"
lazy = true
@@ -28,11 +36,6 @@ class = "kitty-dropterm"
use = "top"
unfocus = "hide"
-[scratchpads.clip]
-use = "bottom"
-command = "kitty --class kitty-clip 'clipse'"
-class = "kitty-clip"
-
[scratchpads.emoji]
use = "bottom"
command = "smile"
diff --git a/files/hyprland/theme/drawer.css b/files/hyprland/theme/drawer.css
@@ -1,26 +0,0 @@
-/* nwg-drawer Styling */
-
-window {
- background-color: transparent;
-}
-
-button,
-image {
- background: none;
- border: none;
-}
-
-button:hover {
- background-color: rgba (255, 255, 255, 0.1);
-}
-
-#pinned-box {
- padding-bottom: 5px;
- border-bottom: 1px dotted gray;
-}
-
-#files-box {
- padding: 5px;
- border: 1px dotted gray;
- border-radius: 10px;
-}
diff --git a/files/hyprland/theme/hyprshell.css b/files/hyprland/theme/hyprshell.css
@@ -1,49 +0,0 @@
-:root {
- --text-color: #@white;
- --bg-color: alpha(#@base00, 0.5);
- --bg-window-color: alpha(#@base00, 0.7);
- --bg-color-active: rgba(255, 255, 255, 0.2);
- --bg-color-hover: rgba(255, 255, 255, 0.4);
- --border-radius: 10px;
- --border-size: 2px;
- --border-color: #@base04;
- --border-color-active: #@base05;
- --border-style: solid;
- --border-style-secondary: dashed;
- --window-padding: 2px;
-}
-
-.workspace.active {
- border-color: var(--border-color-active);
-}
-
-.workspace.special {
- box-shadow: inset 0 0 9px #@base0D;
-}
-
-.client.active {
- background: var(--bg-color-active);
- border-color: var(--border-color-active);
-}
-
-.launch {
- animation: pulse 0.7s normal infinite;
-}
-
-@keyframes pulse {
- 0% {
- background: var(--bg-color);
- }
- 5% {
- background: alpha(var(--border-color-active), 0.4);
- }
- 15% {
- background: alpha(var(--border-color-active), 0.6);
- }
- 60% {
- background: alpha(var(--border-color-active), 0.9);
- }
- 100% {
- background: var(--bg-color);
- }
-}
diff --git a/files/hyprland/theme/waybar.css b/files/hyprland/theme/waybar.css
@@ -1,226 +0,0 @@
-* {
- font-size: 16px;
- font-weight: 500;
- border-radius: 10px;
- min-height: 0;
-}
-window#waybar {
- background-color: alpha(@base00, 0.3);
- border: 2px solid @base00;
-}
-tooltip {
- background: alpha(@base00, 0.9);
- color: @base05;
- border: 1px solid @base0D;
-}
-
-#custom-logo {
- color: #ffffff;
-}
-
-#user {
- background-color: @base0F;
- color: @base00;
-}
-#user > image {
- padding-right: 5px;
-}
-#users .drawer box {
- margin-left: 2px;
-}
-#custom-power {
- color: @base08;
-}
-
-#workspaces button {
- color: @base00;
- background-color: @base07;
- border: 2px solid @base00;
- padding: 4px 6px;
-}
-#workspaces button.active {
- background-color: @base05;
-}
-#workspaces button.empty {
- color: @base07;
- background-color: transparent;
-}
-#workspaces button.empty .workspace-label {
- padding-left: 4px;
-}
-#workspaces button.hosting-monitor.visible {
- border: 2px solid @base04;
-}
-#workspaces button.special {
- opacity: 0.8;
- padding-right: 8px;
- margin-left: 5px;
-}
-#workspaces .taskbar-window {
- padding-left: 4px;
-}
-
-#custom-dropdown {
- color: #ffffff;
-}
-
-#window {
- color: @base0C;
- background-color: transparent;
-}
-
-#submap {
- color: @base00;
- background-color: @base08;
-}
-
-#tray {
- color: #ffffff;
- margin: 0;
- padding: 0;
-}
-#tray * {
- margin-left: 8px;
-}
-#keyboard-state {
- color: @base05;
- opacity: 0.8;
- border: 2px solid @base04;
-}
-
-#bluetooth {
- color: #ffffff;
- background-color: transparent;
-}
-#bluetooth.disabled {
- background-color: transparent;
-}
-
-#network {
- background-color: @base0B;
- color: @base00;
-}
-#network.disconnected {
- background-color: @base06;
-}
-
-#wireplumber {
- background-color: @base09;
- color: @base00;
-}
-#wireplumber.muted {
- background-color: @base06;
-}
-#mpris {
- color: @base05;
-}
-
-#backlight {
- background-color: @base0E;
- color: @base00;
-}
-#custom-temperature {
- color: @base07;
-}
-
-#battery {
- background-color: @base0A;
- color: @base00;
-}
-@keyframes blink {
- to {
- background-color: #ffffff;
- }
-}
-#battery.critical:not(.charging) {
- background-color: @base08;
- animation-name: blink;
- animation-duration: 0.5s;
- animation-timing-function: linear;
- animation-iteration-count: infinite;
- animation-direction: alternate;
-}
-#power-profiles-daemon.performance {
- color: @base08;
-}
-#power-profiles-daemon.balanced {
- color: @base0A;
-}
-#power-profiles-daemon.power-saver {
- color: @base0B;
-}
-
-#custom-weather {
- color: @base00;
- background-color: @base05;
-}
-
-#clock {
- background-color: @base0D;
- color: @base00;
-}
-
-#custom-notify {
- color: @base0A;
-}
-
-#idle_inhibitor {
- color: @base09;
- background-color: transparent;
-}
-
-/* Area */
-#backlight,
-#battery,
-#bluetooth,
-#clock,
-#custom-dropdown,
-#custom-logo,
-#custom-notify,
-#custom-minimized,
-#custom-power,
-#custom-temperature,
-#custom-weather,
-#idle_inhibitor,
-#keyboard-state,
-#network,
-#power-profiles-daemon,
-#window,
-#wireplumber {
- padding: 0 5px;
- margin: 4px 2px;
-}
-
-#workspaces {
- margin: 3px 1px;
-}
-#user,
-#submap {
- padding: 0 5px;
- margin: 5px 2px;
-}
-
-#taskbar {
- margin: 4px 2px;
-}
-
-#mpris {
- padding: 0;
- margin: 0;
-}
-#mpris.playing {
- margin-left: 2px;
- margin-right: 6px;
-}
-#mpris.paused {
- margin-left: 2px;
- margin-right: 6px;
-}
-
-#custom-power {
- margin-right: 0;
-}
-
-#power-profiles-daemon {
- margin-right: 5px;
-}
diff --git a/files/sunsetr/presets/3000/sunsetr.toml b/files/sunsetr/presets/3000/sunsetr.toml
@@ -1,3 +0,0 @@
-transition_mode = "static"
-static_temp = 3000
-static_gamma = 100
diff --git a/files/sunsetr/presets/4000/sunsetr.toml b/files/sunsetr/presets/4000/sunsetr.toml
@@ -1,3 +0,0 @@
-transition_mode = "static"
-static_temp = 4000
-static_gamma = 100
diff --git a/files/sunsetr/presets/5000/sunsetr.toml b/files/sunsetr/presets/5000/sunsetr.toml
@@ -1,3 +0,0 @@
-transition_mode = "static"
-static_temp = 5000
-static_gamma = 100
diff --git a/files/sunsetr/presets/6000/sunsetr.toml b/files/sunsetr/presets/6000/sunsetr.toml
@@ -1,3 +0,0 @@
-transition_mode = "static"
-static_temp = 6000
-static_gamma = 100
diff --git a/files/sunsetr/presets/7000/sunsetr.toml b/files/sunsetr/presets/7000/sunsetr.toml
@@ -1,3 +0,0 @@
-transition_mode = "static"
-static_temp = 7000
-static_gamma = 100
diff --git a/files/sunsetr/presets/8000/sunsetr.toml b/files/sunsetr/presets/8000/sunsetr.toml
@@ -1,3 +0,0 @@
-transition_mode = "static"
-static_temp = 8000
-static_gamma = 100
diff --git a/files/sunsetr/sunsetr.toml b/files/sunsetr/sunsetr.toml
@@ -1,16 +0,0 @@
-backend = "auto"
-transition_mode = "start_at"
-
-smoothing = true
-startup_duration = 0.5
-shutdown_duration = 0.5
-adaptive_interval = 1
-
-sunset = "19:00:00"
-sunrise = "06:00:00"
-transition_duration = 15
-night_temp = 4000
-day_temp = 6500
-night_gamma = 90
-day_gamma = 100
-update_interval = 60
diff --git a/files/swaync.css b/files/swaync.css
@@ -1,251 +0,0 @@
-* {
- all: unset;
- transition: 200ms;
- font-family: @font;
- font-size: 16px;
- font-weight: 500;
-}
-
-/* -- Notification -- */
-.notification-background {
- background: alpha(#@base01, 0.9);
- color: #@base05;
- margin: 6px 12px;
- border-radius: 7px;
- border: solid 0.5px #@base05;
- padding: 0;
-}
-
-.notification {
- padding: 7px;
- border-radius: 7px;
-}
-
-.notification.critical {
- box-shadow: inset 0 0 7px #@base08;
-}
-
-.notification-content {
- margin: 7px;
-}
-
-/* Icon */
-.notification-content overlay {
- margin-right: 10px;
-}
-
-.notification-content image {
- -gtk-icon-size: 48px;
- min-width: 48px;
- min-height: 48px;
- margin-right: 6px;
-}
-
-.notification .app-icon {
- -gtk-icon-size: 24px;
- -gtk-icon-shadow: 0 1px 4px black;
-}
-
-/* Text */
-.notification-content .summary {
- color: #@base05;
- margin-bottom: 4px;
-}
-
-.notification-content .time {
- color: #@base04;
-}
-
-.notification-content .body {
- color: #@base05;
- font-size: 14px;
-}
-
-/* Buttons */
-.close-button {
- margin: 7px;
- padding: 4px;
- border-radius: 7px;
- background: #@base08;
- color: #@base00;
-}
-
-.close-button:hover {
- background: #@base09;
-}
-
-.notification-action {
- background: #@base02;
- color: #@base05;
- margin: 3px;
- padding: 6px;
- border-radius: 7px;
- box-shadow: inset 0 0 0 1px #@base03;
- font-size: 12px;
-}
-
-.notification-action:hover {
- background: #@base03;
-}
-
-/* Progress Bar */
-.notification progress,
-.notification trough,
-.notification progressbar {
- border-radius: 7px;
- padding: 3px 0;
-}
-
-.notification.low progress,
-.notification.normal progress {
- background: #@base0D;
-}
-
-.notification.critical progress {
- background: #@base08;
-}
-
-/* -- Control Center -- */
-.control-center {
- background: alpha(#@base00, 0.9);
- color: #@base05;
- padding: 14px;
- border-radius: 7px;
- box-shadow: inset 0 0 0 2px #@base02;
-}
-
-/* Title */
-.widget-title {
- margin-bottom: 10px;
-}
-
-.widget-title > label {
- font-size: 1.3em;
-}
-
-.widget-title button {
- background: #@base02;
- color: #@base05;
- padding: 7px;
- border-radius: 7px;
- box-shadow: inset 0 0 0 1px #@base03;
-}
-
-.widget-title button:hover {
- background: #@base03;
-}
-
-/* DND */
-.widget-dnd {
- padding: 10px;
-}
-
-.widget-dnd > switch {
- min-width: 30px;
- min-height: 15px;
- border-radius: 999px;
- background: #@base02;
-}
-
-.widget-dnd > switch:checked {
- background: #@base0D;
-}
-
-.widget-dnd > switch slider {
- min-width: 15px;
- min-height: 15px;
- margin: 2px;
- border-radius: 999px;
- background: #@base05;
-}
-
-/* Notifications */
-.widget-notifications {
- min-height: 400px;
-}
-
-.notification-group {
- margin-top: 12px;
- padding: 0 4px;
-}
-
-.notification-group-headers {
- margin-bottom: 5px;
-}
-
-.notification-group-icon {
- margin-left: 5px;
- margin-right: 12px;
-}
-
-.notification-group-header {
- margin-left: 4px;
-}
-
-.notification-group-buttons {
- margin-right: 7px;
-}
-
-/* Volume/Backlight */
-.widget-volume,
-.widget-backlight {
- padding: 10px;
-}
-
-.widget-volume trough highlight {
- background: #@base0C;
-}
-
-.widget-backlight trough highlight {
- background: #@base0A;
-}
-
-/* Sliders */
-scale {
- margin: 0 7px;
-}
-
-scale trough {
- margin: 0rem 1rem;
- min-height: 10px;
- min-width: 70px;
- border-radius: 7px;
-}
-
-trough {
- background-color: #@base02;
-}
-
-trough highlight {
- background: #@base0D;
-}
-
-trough slider {
- margin: -10px;
- border-radius: 7px;
- background-color: #@base0D;
- box-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
-}
-
-trough slider:hover {
- box-shadow:
- 0 0 2px rgba(0, 0, 0, 0.8),
- 0 0 8px #@base0D;
-}
-
-/* Scrollbar */
-scrollbar slider {
- min-width: 3px;
- margin: 0 1px;
- border-radius: 99px;
- background-color: #@base0D;
- opacity: 0.4;
- box-shadow: none;
- border: none;
-}
-
-scrollbar:hover slider {
- min-width: 5px;
- opacity: 0.8;
- box-shadow: none;
-}
diff --git a/files/wlogout.css b/files/wlogout.css
@@ -1,32 +0,0 @@
-* {
- background: none;
-}
-
-window {
- background-color: rgba(0, 0, 0, 0.7);
-}
-
-button {
- background: rgba(0, 0, 0, 0.05);
- border-radius: 8px;
- box-shadow:
- inset 0 0 0 1px rgba(255, 255, 255, 0.1),
- 0 0 rgba(0, 0, 0, 0.5);
- transition: background-color 0.2s ease-in-out;
- margin: 1rem;
-}
-
-button:focus,
-button:hover {
- background-color: rgba(255, 255, 255, 0.2);
-}
-
-button:active {
- background-color: rgba(255, 255, 255, 0.5);
-}
-
-label {
- font-size: 10rem;
- margin: 5rem;
- color: #@base05;
-}
diff --git a/flake.lock b/flake.lock
@@ -228,21 +228,6 @@
"type": "github"
}
},
- "crane_2": {
- "locked": {
- "lastModified": 1780099841,
- "narHash": "sha256-EVZd2RsbpreRUDSi9rBwPY+ZxoyMaiEBbZxxhljbaS4=",
- "owner": "ipetkov",
- "repo": "crane",
- "rev": "0532eb17955225173906d671fb36306bdeb1e2dc",
- "type": "github"
- },
- "original": {
- "owner": "ipetkov",
- "repo": "crane",
- "type": "github"
- }
- },
"filters": {
"locked": {
"lastModified": 1757882181,
@@ -1297,33 +1282,6 @@
"type": "github"
}
},
- "hyprshell": {
- "inputs": {
- "crane": "crane_2",
- "flake-parts": [
- "flake-parts"
- ],
- "home-manager": [
- "home-manager"
- ],
- "nixpkgs": [
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1781132855,
- "narHash": "sha256-GXegc0W2xiRuSCjMpVc5mmKP5YFCYn87M/POTalISCA=",
- "owner": "H3rmt",
- "repo": "hyprshell",
- "rev": "61ddaa30563c1f091ca5fbe5d7203c19f42b519c",
- "type": "github"
- },
- "original": {
- "owner": "H3rmt",
- "repo": "hyprshell",
- "type": "github"
- }
- },
"hyprshutdown": {
"inputs": {
"aquamarine": "aquamarine_3",
@@ -1764,6 +1722,26 @@
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
+ "noctalia": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1781625454,
+ "narHash": "sha256-5mGBvcA/BRdWpxOxqmtDvnQgr6Z3AiNiic1CaTDNTVM=",
+ "owner": "noctalia-dev",
+ "repo": "noctalia",
+ "rev": "2066693c9d7ef183557e2ba4a3ec586d6cff8bc4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "noctalia-dev",
+ "repo": "noctalia",
+ "type": "github"
+ }
+ },
"nur": {
"inputs": {
"flake-parts": [
@@ -1870,7 +1848,6 @@
"home-manager": "home-manager",
"hyprcursors": "hyprcursors",
"hyprland": "hyprland",
- "hyprshell": "hyprshell",
"hyprsplit": "hyprsplit",
"impermanence": "impermanence",
"import-tree": "import-tree",
@@ -1880,6 +1857,7 @@
"nixpkgs": [
"stable"
],
+ "noctalia": "noctalia",
"proprietary": "proprietary",
"sops": "sops",
"spicetify": "spicetify",
diff --git a/flake.nix b/flake.nix
@@ -217,21 +217,16 @@
};
};
- # Launcher
- hyprshell = {
- url = "github:H3rmt/hyprshell";
- inputs = {
- nixpkgs.follows = "nixpkgs";
- home-manager.follows = "home-manager";
- flake-parts.follows = "flake-parts";
- };
+ # Desktop Shell
+ noctalia = {
+ url = "github:noctalia-dev/noctalia";
+ inputs.nixpkgs.follows = "nixpkgs";
};
};
## Configuration ##
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;}
- # Auto-import all flake-parts modules from ./modules
{
imports = [
(inputs.import-tree ./modules)
diff --git a/modules/apps/discord.nix b/modules/apps/discord.nix
@@ -50,6 +50,7 @@
expressionCloner.enable = true;
favoriteEmojiFirst.enable = true;
favoriteGifSearch.enable = true;
+ fakeNitro.enable = true;
fixImagesQuality.enable = true;
fixSpotifyEmbeds.enable = true;
friendsSince.enable = true;
diff --git a/modules/apps/vscode/default.nix b/modules/apps/vscode/default.nix
@@ -89,7 +89,6 @@ in {
ritwickdey.liveserver
]
++ (with pkgs.vscode-marketplace; [
- kdl-org.kdl # KDL
kisstkondoros.vscode-gutter-preview # Image Preview
])
++ lib.optionals isGnome [pkgs.vscode-extensions.piousdeer.adwaita-theme]
diff --git a/modules/desktop/hyprland/_features/browser.nix b/modules/desktop/hyprland/_features/browser.nix
@@ -1,3 +1,4 @@
+# Web Browser
_: {
home = _: {
home.file.".config/mozilla/firefox/default/chrome/userChrome.css".text = ''
diff --git a/modules/desktop/hyprland/_features/files.nix b/modules/desktop/hyprland/_features/files.nix
@@ -1,3 +1,4 @@
+# File Manager
{
util ? null,
files ? null,
diff --git a/modules/desktop/hyprland/_features/hyprutils.nix b/modules/desktop/hyprland/_features/hyprutils.nix
@@ -1,3 +1,4 @@
+# Hyprland Utilities
{
util ? null,
files ? null,
@@ -16,7 +17,6 @@
hyprkeys
hyprshade
unstable.pyprland
- slurp
waycorner
];
};
@@ -26,18 +26,9 @@
pkgs,
...
}: let
- inherit (pkgs.lib) getExe mkForce;
+ inherit (pkgs.lib) getExe;
inherit (config.lib.stylix) colors;
in {
- # Wallpaper Daemon
- services.hyprpaper = {
- enable = true;
- settings = {
- ipc = false;
- splash = mkForce true;
- };
- };
-
# Hot Corners
systemd.user.services.waycorner = let
target = ["graphical-session.target"];
@@ -53,11 +44,8 @@
home = {
persist.directories = [".config/nwg-displays"];
file = with files.hyprland; {
- # Application Drawer
- ".config/nwg-drawer/drawer.css".text = drawer;
-
# Pyprland
- ".config/hypr/pyprland.toml".text = pypr;
+ ".config/pypr/config.toml".text = pypr;
# Hot Corners
".config/waycorner/config.toml".text = waycorner;
diff --git a/modules/desktop/hyprland/_features/idle.nix b/modules/desktop/hyprland/_features/idle.nix
@@ -1,33 +0,0 @@
-_: {
- home = {
- lib,
- pkgs,
- osConfig ? null,
- ...
- }:
- lib.mkIf (osConfig != null) (
- let
- inherit (lib) getExe getExe';
- idle = import ../_idle.nix lib pkgs;
- shader = getExe pkgs.hyprshade;
- dpms = "${getExe' osConfig.programs.hyprland.package "hyprctl"} dispatch dpms";
- in {
- services.swayidle.timeouts = with idle; [
- {
- timeout = 240; # Dim display
- command = audio "${shader} on dim";
- resumeCommand = "${shader} off";
- }
- {
- timeout = 300; # Turn off display
- command = audio "${dpms} off";
- resumeCommand = "${dpms} on";
- }
- {
- timeout = 500; # Suspend device
- command = audio "${dpms} on && ${lock "" ""} && ${getExe' pkgs.systemd "systemctl"} suspend";
- }
- ];
- }
- );
-}
diff --git a/modules/desktop/hyprland/_features/launcher.nix b/modules/desktop/hyprland/_features/launcher.nix
@@ -1,78 +0,0 @@
-{
- util ? null,
- files ? null,
- inputs ? null,
- ...
-}: {
- home = {config, ...}: {
- imports = [inputs.hyprshell.homeModules.default];
- home.persist.directories = [
- ".local/share/hyprshell"
- ".cache/hyprshell"
- ];
-
- programs.hyprshell = {
- enable = true;
- systemd.enable = true;
- styleFile = util.build.theme {
- inherit (config.lib.stylix) colors;
- file = files.hyprland.hyprshell;
- };
-
- settings.windows = {
- enable = true;
- scale = 9.0;
- items_per_row = 3;
-
- overview = {
- enable = true;
- modifier = "super";
- key = "tab";
-
- launcher = {
- launch_modifier = "alt";
- default_terminal = "kitty";
- width = 700;
- max_items = 4;
- show_when_empty = true;
- plugins = {
- applications = {
- run_cache_weeks = 4;
- show_execs = true;
- show_actions_submenu = true;
- };
- calc.enable = true;
- path.enable = true;
- terminal.enable = true;
- websearch.engines = [
- {
- url = "https://www.google.com/search?q={}";
- name = "Google";
- key = "g";
- }
- {
- url = "https://en.wikipedia.org/wiki/Special:Search?search={}";
- name = "Wikipedia";
- key = "w";
- }
- ];
- };
- };
- };
-
- switch = {
- enable = true;
- modifier = "alt";
- filter_by = ["current_workspace"];
- };
-
- switch_2 = {
- enable = true;
- modifier = "alt";
- key = "grave";
- filter_by = ["same_class"];
- };
- };
- };
- };
-}
diff --git a/modules/desktop/hyprland/_features/login.nix b/modules/desktop/hyprland/_features/login.nix
@@ -1,3 +1,4 @@
+# Login Greeter
_: {
nixos = {
config,
diff --git a/modules/desktop/hyprland/_features/main.nix b/modules/desktop/hyprland/_features/main.nix
@@ -1,3 +1,4 @@
+# Compositor
{
util ? null,
files ? null,
diff --git a/modules/desktop/hyprland/_features/media.nix b/modules/desktop/hyprland/_features/media.nix
@@ -1,3 +1,4 @@
+# Media
{util ? null, ...}: {
nixos = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
diff --git a/modules/desktop/hyprland/_features/notify.nix b/modules/desktop/hyprland/_features/notify.nix
@@ -1,92 +0,0 @@
-{
- util ? null,
- files ? null,
- ...
-}: {
- nixos = _: {
- # Phone Connect
- programs.kdeconnect.enable = true;
- };
-
- home = {
- config,
- lib,
- ...
- }: let
- inherit (lib) mkDefault;
- in {
- home.persist.directories = [".config/kdeconnect"];
- services.kdeconnect = {
- enable = true;
- indicator = true;
- };
-
- # Notifications Daemon
- stylix.targets.swaync.enable = false;
- services.swaync = {
- enable = true;
- style = util.build.theme {
- inherit (config.stylix) fonts;
- inherit (config.lib.stylix) colors;
- file = files.swaync;
- };
-
- settings = {
- # Notification
- positionX = mkDefault "right";
- positionY = mkDefault "top";
- layer = "overlay";
- layer-shell = true;
- cssPriority = "user";
-
- image-visibility = "when-available";
- timeout = 10;
- timeout-critical = 0;
- timeout-low = 5;
- notification-2fa-action = true;
- notification-grouping = true;
- notification-inline-replies = true;
-
- # Control Center
- control-center-layer = "top";
- fit-to-screen = false;
- control-center-height = -1;
- control-center-margin-top = 3;
- control-center-margin-left = 3;
- control-center-margin-bottom = 3;
- control-center-margin-right = 3;
-
- widgets = [
- "inhibitors"
- "title"
- "dnd"
- "notifications"
- ];
-
- widget-config = {
- title = {
- text = "Notifications";
- clear-all-button = true;
- button-text = "Clear";
- };
- dnd.text = "Do Not Disturb";
- };
-
- notification-visibility = {
- utility = {
- app-name = "utility";
- state = "transient";
- };
- upower = {
- app-name = "poweralertd";
- state = "transient";
- };
- hyprland = {
- app-name = "grimblast";
- state = "transient";
- };
- };
- };
- };
- };
-}
diff --git a/modules/desktop/hyprland/_features/panel.nix b/modules/desktop/hyprland/_features/panel.nix
@@ -1,426 +0,0 @@
-{files ? null, ...}: {
- home = {
- config,
- lib,
- pkgs,
- osConfig ? null,
- ...
- }: let
- inherit (lib) mkDefault mkIf mkMerge;
- in {
- stylix.targets.waybar = {
- enable = true;
- font = "sansSerif";
- addCss = false;
- };
-
- home.packages = [pkgs.wttrbar];
- programs.waybar = {
- enable = true;
- systemd.enable = true;
- package = pkgs.waybar;
- style = files.hyprland.waybar;
- settings = mkIf (osConfig != null) (let
- inherit (osConfig.gui) display;
- shared = {
- layer = "top";
- position = "top";
- height = 40;
- spacing = 3;
- margin-top = 2;
- margin-right = 5;
- margin-bottom = 1;
- margin-left = 5;
-
- "custom/logo" = {
- format = "";
- tooltip = false;
- on-click = "nwg-drawer";
- };
-
- "group/users" = {
- orientation = "horizontal";
- modules = [
- "user"
- "custom/power"
- ];
- drawer.transition-left-to-right = true;
- };
-
- user = {
- format = "{user}";
- open-on-click = true;
- icon = true;
- height = 22;
- width = 22;
- };
-
- "custom/user" = {
- exec = "sh -c 'getent passwd $USER | cut -d : -f 5'";
- format = "{}";
- rotate = 270;
- tooltip = false;
- on-click = "sh -c 'nemo ~'";
- };
-
- "custom/power" = {
- format = "⏻";
- tooltip = false;
- on-click = "wlogout -p layer-shell";
- };
-
- "hyprland/submap" = {
- always-on = false;
- tooltip = false;
- format = " {}";
- on-click = "hyprctl dispatch submap reset";
- };
-
- "hyprland/window" = {
- format = "{class}";
- icon = false;
- separate-outputs = true;
- };
-
- "hyprland/workspaces" = {
- all-outputs = false;
- show-special = true;
- format = "<small>{name}</small>{windows}";
- on-scroll-up = "hyprctl dispatch workspace m+1";
- on-scroll-down = "hyprctl dispatch workspace m-1";
- ignore-workspaces = [
- "special:S-.*"
- "special:minimized"
- ];
-
- workspace-taskbar = {
- enable = true;
- format = "{icon}";
- icon-size = 22;
- icon-theme = config.stylix.icons.dark;
- on-click-window = "hyprutils click {button} {address}";
- ignore-list = [
- "kitty-clip"
- "kitty-dropterm"
- ];
- };
- };
-
- "custom/minimized" = {
- format = "";
- on-click = "hyprutils toggle minimized";
- };
-
- "group/menu" = {
- modules = [
- "custom/hide"
- "keyboard-state"
- "tray"
- ];
- orientation = "horizontal";
- drawer = {
- click-to-reveal = true;
- transition-left-to-right = true;
- };
- };
-
- "custom/hide" = {
- format = mkDefault "";
- tooltip = false;
- };
-
- keyboard-state = {
- numlock = true;
- capslock = true;
- format = {
- numlock = mkDefault " N {icon}";
- capslock = mkDefault " {icon}";
- };
- format-icons = {
- locked = "";
- unlocked = "";
- };
- };
-
- bluetooth = {
- format = "";
- format-disabled = "";
- format-connected = " {num_connections}";
- tooltip-format = " {status}";
- tooltip-format-connected = "{device_enumerate}";
- tooltip-format-enumerate-connected = " {device_alias} {device_battery_percentage}%";
- on-click = "overskride";
- };
-
- network = let
- tooltip = "Strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\nFrequency: <b>{frequency}MHz</b>\nInterface: <b>{ifname}</b>\nIP: <b>{ipaddr}/{cidr}</b>\nGateway: <b>{gwaddr}</b>\nNetmask: <b>{netmask}</b>";
- in {
- format = "?";
- format-disconnected = "";
- format-wifi = "{icon}";
- format-ethernet = "";
- format-icons = [
- ""
- ""
- ""
- ""
- ""
- ];
- format-linked = "";
- tooltip-format-wifi = "Network: <big><b>{essid}</b></big>\n${tooltip}";
- tooltip-format-ethernet = "Network: <big><b>Wired</b></big>\n${tooltip}";
- tooltip-format-disconnected = " Disconnected";
- on-click = "sh -c 'env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi'";
- };
-
- "group/media" = {
- modules = [
- "wireplumber"
- "mpris"
- ];
- orientation = "horizontal";
- drawer = {
- click-to-reveal = true;
- transition-left-to-right = true;
- transition-duration = 1000;
- };
- };
-
- wireplumber = {
- max-volume = 150;
- scroll-step = 1;
- reverse-scrolling = 1;
- format = "{icon}";
- tooltip-format = "Volume: {volume}%\nDevice: {node_name}";
- format-icons = [
- ""
- ""
- ""
- ];
- format-muted = "";
- on-click = "pwvucontrol";
- };
-
- mpris = {
- dynamic-len = 20;
- dynamic-order = [
- "title"
- "artist"
- "length"
- ];
- dynamic-separator = " - ";
- format = mkDefault " {player}";
- format-paused = mkDefault " <i>{player}</i>";
- format-stopped = "";
- tooltip-format-stopped = "Not Playing";
- on-click = "sysutils media toggle";
- on-click-right = "sysutils media next";
- on-click-middle = "sysutils media previous";
- };
-
- "group/display" = {
- modules = [
- "backlight"
- "custom/temperature"
- ];
- orientation = "horizontal";
- drawer.transition-left-to-right = true;
- };
-
- backlight = {
- format = "{icon}";
- tooltip-format = "Backlight: {percent}%";
- format-icons = [
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ];
- on-scroll-up = "sysutils brightness down";
- on-scroll-down = "sysutils brightness up";
- on-click = "nwg-displays";
- };
-
- "custom/temperature" = {
- format = "";
- tooltip = false;
- on-click = "sysutils temperature";
- };
-
- "group/power" = {
- modules = [
- "battery"
- "power-profiles-daemon"
- ];
- orientation = "horizontal";
- drawer.transition-left-to-right = false;
- };
-
- battery = {
- interval = 5;
- align = 0;
- rotate = 0;
- format = "{icon}";
- on-click-right = "hyprutils toggle fancy";
- tooltip-format = "Battery: {capacity}%";
- format-charging = "";
- format-icons = [
- ""
- ""
- ""
- ""
- ""
- ];
- states = {
- good = 80;
- warning = 20;
- critical = 10;
- };
- };
-
- power-profiles-daemon = {
- format = "{icon}";
- tooltip = true;
- tooltip-format = "Power Profile: {profile}";
- format-icons = {
- default = "";
- performance = "";
- balanced = "";
- power-saver = "";
- };
- };
-
- "custom/weather" = {
- format = mkDefault "{}°";
- return-type = "json";
- exec = mkDefault "wttrbar --date-format %d/%m --nerd";
- tooltip = true;
- interval = 600;
- signal = 7;
- on-click = "pkill -RTMIN+7 waybar";
- };
-
- clock = {
- interval = 1;
- format = mkDefault " {:%H:%M:%S} ";
- format-alt = mkDefault " {:%I:%M %A, %d %B %Y} ";
- tooltip-format = "<tt><small>{calendar}</small></tt>";
- calendar = {
- mode = "year";
- mode-mon-col = 3;
- weeks-pos = "left";
- on-scroll = 1;
- format = with config.lib.stylix.colors; {
- months = "<span color='#${base06}'><b>{}</b></span>";
- days = "<span color='#${base05}'><b>{}</b></span>";
- weeks = "<span color='#${base0C}'><b>W{}</b></span>";
- weekdays = "<span color='#${base0A}'><b>{}</b></span>";
- today = "<span color='#${base08}'><b><u>{}</u></b></span>";
- };
- };
-
- actions = {
- on-click-right = "mode";
- on-click-forward = "tz_up";
- on-click-backward = "tz_down";
- on-scroll-up = "shift_down";
- on-scroll-down = "shift_up";
- };
- };
-
- "group/notify" = {
- modules = [
- "custom/notify"
- "idle_inhibitor"
- ];
- orientation = "horizontal";
- drawer.transition-left-to-right = false;
- };
-
- "custom/notify" = {
- exec = "swaync-client -swb";
- exec-if = "which swaync-client";
- on-click = "swaync-client -t -sw";
- on-click-right = "swaync-client -d -sw";
- return-type = "json";
- escape = true;
- tooltip = false;
- format = "{icon}";
- format-icons = {
- none = "";
- notification = "";
- dnd-none = "";
- dnd-notification = "";
- inhibited-none = "";
- inhibited-notification = "";
- dnd-inhibited-none = "";
- dnd-inhibited-notification = "";
- };
- };
-
- idle_inhibitor = {
- format = "{icon}";
- on-click = "sysutils toggle service swayidle";
- tooltip-format-activated = "Idle Inhibitor: On";
- tooltip-format-deactivated = "Idle Inhibitor: Off";
- format-icons = {
- activated = "";
- deactivated = "";
- };
- };
-
- modules-left = [
- "custom/logo"
- "group/users"
- "hyprland/workspaces"
- "custom/minimized"
- ];
-
- modules-center = [
- "hyprland/window"
- "hyprland/submap"
- ];
- };
- in [
- (mkMerge [
- shared
- {
- output = display;
- modules-right = [
- "group/menu"
- "bluetooth"
- "network"
- "group/media"
- "group/display"
- "group/power"
- "custom/weather"
- "clock"
- "group/notify"
- ];
- }
- ])
- (mkMerge [
- shared
- {
- output = "!" + display;
- modules-right = [
- "group/menu"
- "bluetooth"
- "network"
- "group/media"
- "group/power"
- "custom/weather"
- "clock"
- "group/notify"
- ];
- }
- ])
- ]);
- };
- };
-}
diff --git a/modules/desktop/hyprland/_features/security.nix b/modules/desktop/hyprland/_features/security.nix
@@ -1,103 +0,0 @@
-{
- util ? null,
- files ? null,
- ...
-}: {
- nixos = _: {
- # User Authentication
- security = {
- soteria.enable = true;
- pam.services.swaylock.text = "auth include login";
- };
- };
-
- home = {
- config,
- lib,
- pkgs,
- ...
- }: let
- idle = import ../_idle.nix lib pkgs;
- inherit (idle) locker;
- in {
- # Locker
- stylix.targets.swaylock = {
- enable = true;
- useWallpaper = true;
- };
-
- programs.swaylock = {
- enable = true;
- package = locker;
- settings = {
- clock = true;
- indicator = true;
- font = config.stylix.fonts.sansSerif.name;
- effect-vignette = "0.3:1";
- };
- };
-
- # Idle Daemon
- services.swayidle = with idle; {
- enable = true;
- extraArgs = ["-w"];
- events = {
- before-sleep = lock pause "";
- lock = lock pause "--fade-in 0.2 --grace 15 --grace-no-mouse";
- };
- };
-
- # Logout
- programs.wlogout = {
- enable = true;
- style = util.build.theme {
- inherit (config.lib.stylix) colors;
- file = files.wlogout;
- };
-
- layout = [
- {
- label = "lock";
- action = "loginctl lock-session";
- text = "";
- keybind = "l";
- }
- {
- label = "logout";
- action = "loginctl terminate-user $USER";
- text = "↶";
- keybind = "e";
- }
- {
- label = "shutdown";
- action = "systemctl poweroff";
- text = "⏻";
- keybind = "s";
- }
- {
- label = "reboot";
- action = "systemctl reboot";
- text = "↺";
- keybind = "r";
- }
- {
- label = "suspend";
- action = "systemctl suspend";
- text = "";
- keybind = "u";
- }
- {
- label = "hibernate";
- action = "systemctl hibernate";
- text = "";
- keybind = "h";
- }
- ];
- };
-
- home.file.".config/kwalletrc".text = ''
- [Wallet]
- Enabled=false
- '';
- };
-}
diff --git a/modules/desktop/hyprland/_features/shell.nix b/modules/desktop/hyprland/_features/shell.nix
@@ -0,0 +1,171 @@
+# Noctalia Shell
+{inputs ? null, ...}: {
+ home = {
+ config,
+ osConfig ? null,
+ ...
+ }: let
+ inherit (config.lib.stylix.colors) withHashtag;
+ inherit (config.stylix.fonts) sansSerif;
+ in {
+ imports = [inputs.noctalia.homeModules.default];
+ stylix.targets.noctalia-shell.enable = false;
+ home.persist.directories = [
+ ".cache/noctalia"
+ ".local/share/noctalia"
+ ".local/state/noctalia"
+ ];
+
+ programs.noctalia = {
+ enable = true;
+ systemd.enable = true;
+ settings = {
+ shell = {
+ font_family = sansSerif.name;
+ clipboard_enabled = true;
+ clipboard_history_max_entries = 150;
+ polkit_agent = true;
+ };
+
+ theme = {
+ source = "custom";
+ custom_palette = "stylix";
+ mode = "dark";
+ };
+
+ # Bar
+ bar.main = {
+ position = "top";
+ start = ["session" "control-center" "workspaces"];
+ center = ["launcher" "clock" "media"];
+ end = [
+ "tray"
+ "system_monitor"
+ "clipboard"
+ "bluetooth"
+ "network"
+ "volume"
+ "brightness"
+ "battery"
+ "notifications"
+ ];
+ };
+
+ # Notifications
+ notification.enable_daemon = true;
+ osd.kinds = {
+ volume = true;
+ brightness = true;
+ wifi = true;
+ bluetooth = true;
+ power_profile = true;
+ caffeine = true;
+ dnd = true;
+ keyboard_layout = true;
+ };
+
+ # Wallpaper
+ wallpaper = {
+ enabled = true;
+ fill_mode = "crop";
+ default.path = "${osConfig.stylix.image}";
+ };
+
+ # Lock Screen
+ lockscreen = {
+ enabled = true;
+ blurred_desktop = true;
+ blur_intensity = 0.5;
+ };
+
+ # Screen Idle
+ idle.behavior = {
+ lock = {
+ enabled = true;
+ timeout = 300;
+ command = "noctalia:session lock";
+ };
+ "screen-off" = {
+ enabled = true;
+ timeout = 360;
+ command = "noctalia:dpms-off";
+ resume_command = "noctalia:dpms-on";
+ };
+ };
+
+ # Screenshots
+ shell.screenshot = {
+ save_to_file = true;
+ copy_to_clipboard = true;
+ freeze_screen = true;
+ directory = "~/Pictures/Screenshots";
+ };
+
+ # Night Light
+ nightlight = {
+ enabled = true;
+ temperature_day = 6500;
+ temperature_night = 4000;
+ };
+
+ location = {
+ auto_locate = true;
+ sunset = "19:00";
+ sunrise = "06:00";
+ };
+
+ brightness.enable_ddcutil = false;
+ system.monitor.enabled = true;
+ weather.enabled = true;
+ };
+
+ # Color Palette
+ customPalettes.stylix.dark = with withHashtag; {
+ primary = base0D;
+ onPrimary = base00;
+ secondary = base0E;
+ onSecondary = base00;
+ tertiary = base0C;
+ onTertiary = base00;
+ error = base08;
+ onError = base00;
+ surface = base00;
+ onSurface = base05;
+ surfaceVariant = base01;
+ onSurfaceVariant = base04;
+ outline = base03;
+ shadow = base00;
+ hover = base0C;
+ onHover = base00;
+ terminal = with withHashtag; {
+ normal = {
+ black = base00;
+ red = base08;
+ green = base0B;
+ yellow = base0A;
+ blue = base0D;
+ magenta = base0E;
+ cyan = base0C;
+ white = base05;
+ };
+ bright = {
+ black = base03;
+ red = base08;
+ green = base0B;
+ yellow = base0A;
+ blue = base0D;
+ magenta = base0E;
+ cyan = base0C;
+ white = base07;
+ };
+ foreground = base05;
+ background = base00;
+ cursor = base05;
+ cursorText = base00;
+ selectionFg = base05;
+ selectionBg = base02;
+ };
+ };
+ };
+ };
+}
diff --git a/modules/desktop/hyprland/_features/sysutils.nix b/modules/desktop/hyprland/_features/sysutils.nix
@@ -1,99 +0,0 @@
-{
- util ? null,
- files ? null,
- ...
-}: {
- nixos = {pkgs, ...}: {
- environment.systemPackages = with pkgs; [
- # Apps
- clipse
- font-manager
- gnome-clocks
- gnome-disk-utility
- nwg-drawer
- overskride
- qalculate-gtk
- remmina
- resources
- smile
-
- # Utilities
- custom.sysutils
- hyprpicker
- pwvucontrol
- sunsetr
- wev
- wl-clipboard
- wl-screenrec
- wlclock
- wlr-randr
-
- # Network Settings
- (gnome-control-center.overrideAttrs (old: {
- postInstall =
- old.postInstall
- + ''
- dir=$out/share/applications
- for panel in $dir/*
- do
- [ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue
- [ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue
- [ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue
- [ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue
- [ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue
- rm "$panel"
- done
- '';
- }))
- ];
-
- ## Essential Utilities
- # Power
- services = {
- power-profiles-daemon.enable = true;
- upower.enable = true;
- };
-
- # Backlight
- hardware.brillo.enable = true;
- };
-
- home = {
- config,
- lib,
- pkgs,
- ...
- }: let
- inherit (lib) getExe;
- inherit (config.lib.stylix) colors;
- in {
- xdg.mimeApps.defaultApplications = util.build.mime {
- font = ["com.github.FontManager.FontViewer.desktop"];
- };
-
- # Display Temperature
- home.file.".config/sunsetr".source = files.sunsetr;
-
- # Desktop Clock
- systemd.user.services.wlclock = let
- target = ["graphical-session.target"];
- in {
- Install.WantedBy = target;
- Unit = {
- Description = "Desktop Clock";
- After = target;
- };
- Service.ExecStart = with colors; "${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 #${base00}4d --clock-colour #${base0D} --border-colour #${base00}";
- };
-
- # 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;
- };
- };
-}
diff --git a/modules/desktop/hyprland/_features/terminal.nix b/modules/desktop/hyprland/_features/terminal.nix
@@ -1,3 +1,4 @@
+# Terminal Emulator
_: {
home = {pkgs, ...}: {
programs.kitty = {
diff --git a/modules/desktop/hyprland/_features/text.nix b/modules/desktop/hyprland/_features/text.nix
@@ -1,3 +1,4 @@
+# Text Editor
{
util ? null,
files ? null,
@@ -7,52 +8,19 @@
environment.systemPackages = [pkgs.geany];
};
- home = {
- config,
- pkgs,
- ...
- }: {
- # Text Editor
+ home = {pkgs, ...}: {
xdg.mimeApps.defaultApplications = util.build.mime {
markdown = ["geany.desktop"];
text = ["geany.desktop"];
};
home = {
- persist.directories = [
- ".config/clipse"
- ".config/geany"
- ];
-
+ persist.directories = [".config/geany"];
file = with files.geany; {
".config/geany/geany.conf".text = settings;
".config/geany/keybindings.conf".text = keybindings;
".config/geany/colorschemes/theme.conf".source = "${pkgs.custom.geany-catppuccin}/share/geany/colorschemes/catppuccin-macchiato.conf";
};
};
-
- # Clipboard Manager
- services.clipse = {
- enable = true;
- allowDuplicates = false;
- historySize = 150;
- imageDisplay.type = "kitty";
- theme = with config.lib.stylix.colors; {
- useCustomTheme = true;
- DimmedDesc = "#${base07}";
- DimmedTitle = "#${base07}";
- FilteredMatch = "#${base08}";
- NormalTitle = "#${base08}";
- NormalDesc = "#${base0B}";
- SelectedDesc = "#${base0D}";
- SelectedTitle = "#${base0D}";
- SelectedBorder = "#${base0D}";
- SelectedDescBorder = "#${base0D}";
- TitleFore = "#${base05}";
- Titleback = "#${base01}";
- StatusMsg = "#${base0E}";
- PinIndicatorColor = "#${base0F}";
- };
- };
};
}
diff --git a/modules/desktop/hyprland/_features/utils.nix b/modules/desktop/hyprland/_features/utils.nix
@@ -0,0 +1,96 @@
+# Utilities
+{util ? null, ...}: {
+ nixos = {pkgs, ...}: {
+ environment.systemPackages = with pkgs; [
+ # Apps
+ font-manager
+ gnome-clocks
+ gnome-disk-utility
+ overskride
+ qalculate-gtk
+ remmina
+ resources
+ smile
+
+ # Utilities
+ hyprpicker
+ pwvucontrol
+ wev
+ wl-clipboard
+ wlr-randr
+
+ # Network Settings
+ (gnome-control-center.overrideAttrs (old: {
+ postInstall =
+ old.postInstall
+ + ''
+ dir=$out/share/applications
+ for panel in $dir/*
+ do
+ [ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue
+ [ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue
+ [ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue
+ [ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue
+ [ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue
+ rm "$panel"
+ done
+ '';
+ }))
+ ];
+
+ ## Essential Utilities
+ # Power
+ services = {
+ power-profiles-daemon.enable = true;
+ upower.enable = true;
+ };
+
+ # Backlight
+ hardware.brillo.enable = true;
+
+ programs = {
+ # Phone Connect
+ kdeconnect.enable = true;
+
+ # Screen Record
+ gpu-screen-recorder.enable = true;
+ };
+ };
+
+ home = _: {
+ home = {
+ persist.directories = [
+ ".config/kdeconnect"
+ ".config/gpu-screen-recorder"
+ ".local/share/gpu-screen-recorder"
+ ];
+
+ file.".config/kwalletrc".text = ''
+ [Wallet]
+ Enabled=false
+ '';
+ };
+
+ # Phone Connect
+ services.kdeconnect = {
+ enable = true;
+ indicator = true;
+ };
+
+ xdg = {
+ mimeApps.defaultApplications = util.build.mime {
+ font = ["com.github.FontManager.FontViewer.desktop"];
+ };
+
+ # Network Settings
+ 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;
+ };
+ };
+ };
+}
diff --git a/modules/desktop/hyprland/_idle.nix b/modules/desktop/hyprland/_idle.nix
@@ -1,15 +0,0 @@
-# Shared Idle scripts
-lib: pkgs: let
- inherit (lib) getExe getExe';
- locker = pkgs.swaylock-effects;
-in {
- inherit locker;
- lock = pre: flag: "sh -c 'if ! ${getExe' pkgs.procps "pgrep"} -x swaylock; then ${pre} ${getExe locker} -f ${flag}; fi'";
-
- # Check if audio is playing
- pause = "${getExe pkgs.playerctl} pause -a;";
- audio = command: "${pkgs.writeShellScript "audio" ''
- ${getExe pkgs.playerctl} status | ${getExe pkgs.gnugrep} Playing
- if [ $? == 1 ]; then ${command}; fi
- ''}";
-}
diff --git a/modules/desktop/hyprland/_settings/apps.nix b/modules/desktop/hyprland/_settings/apps.nix
@@ -26,9 +26,6 @@ lib.mkIf (osConfig != null) (
# QT Apps
"QT_WAYLAND_DISABLE_WINDOWDECORATION, 1"
-
- # Screenshot
- "SLURP_ARGS, -dc ${osConfig.lib.stylix.colors.base0D}"
];
# Window Swallowing
@@ -46,14 +43,8 @@ lib.mkIf (osConfig != null) (
# Pyprland
"pypr"
- # Application Drawer
- "nwg-drawer -r"
-
# Desktop Icons
"pcmanfm-qt --desktop"
-
- # Display Temperature
- "sunsetr -b"
]);
## Shortcuts
@@ -70,22 +61,26 @@ lib.mkIf (osConfig != null) (
", XF86Calculator, exec, qalculate-gtk"
# Utilities
- "$mod, A, exec, nwg-drawer"
+ "$mod, A, exec, noctalia msg panel-toggle launcher"
"$mod, slash, exec, ${toggle "kebihelp"} show -a"
"$mod SHIFT, C, exec, ${runOnce "hyprpicker"} -arf hex"
"$mod SHIFT, B, exec, ${runOnce "overskride"}"
"$mod, D, exec, ${runOnce "nwg-displays"}"
"$mod SHIFT, P, exec, pwvucontrol"
"$mod SHIFT, N, exec, sh -c 'env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi'"
- "$mod, Escape, exec, ${toggle "wlogout"} -p layer-shell"
+ "$mod, Escape, exec, noctalia msg panel-toggle session"
+
+ # Shell
+ "$mod SHIFT, A, exec, noctalia msg settings-toggle"
+ "$mod, Tab, exec, noctalia msg window-switcher"
+ "$mod, N, exec, noctalia msg panel-toggle notifications"
+ "$mod, V, exec, noctalia msg panel-toggle clipboard"
# Tools
- "$mod SHIFT, A, exec, sysutils toggle service waybar"
+ "$mod, G, exec, pypr gamemode"
"$mod SHIFT, D, exec, hyprutils toggle monitor ${display}"
- "$mod, N, exec, swaync-client -t -sw"
"$mod, S, exec, hyprutils toggle shader"
"$mod SHIFT, T, exec, pypr toggle term"
- "$mod, V, exec, pypr show clip"
"$mod, backslash, exec, pypr toggle emoji"
];
@@ -99,16 +94,7 @@ lib.mkIf (osConfig != null) (
## Layer Rules
layerrule = [
"no_anim on, match:namespace ^(hyprpicker)$"
- "dim_around on, match:namespace ^(hyprshell_overview)$"
-
- "blur on, animation fade, match:namespace ^(logout_dialog)$"
- "blur on, dim_around on, animation popin, match:namespace ^(nwg-drawer)$"
-
- "blur on, ignore_alpha 0, animation slide right, match:namespace ^(swaync-control-center)$"
- "blur on, ignore_alpha 0, animation slide right, match:namespace ^(swaync-notification-window)$"
-
- "blur on, ignore_alpha 0, match:namespace ^(waybar)$"
- "blur on, ignore_alpha 0, match:namespace ^(wlclock)$"
+ "blur on, ignore_alpha 0.6, match:namespace ^(noctalia-.*)$"
];
## Window Rules
@@ -139,7 +125,6 @@ lib.mkIf (osConfig != null) (
++ (map (class: ["pin on, dim_around on, stay_focused on, match:class ^(${class})$"]) [
# Authentication
"pinentry-"
- "gay.vaskel.Soteria"
"gcr-prompter"
])
++ (map (class: ["float on, pin on, persistent_size on, match:class ^(${class})$"]) [
diff --git a/modules/desktop/hyprland/_settings/keybinds.nix b/modules/desktop/hyprland/_settings/keybinds.nix
@@ -72,19 +72,19 @@ in {
"$mod SHIFT ALT, period, movewindow, mon:+1"
# Screen Lock
- "$mod, L, exec, loginctl lock-session"
+ "$mod, L, exec, noctalia msg session lock"
# Window Minimization
"ALT, Q, movetoworkspacesilent, special:minimized"
"ALT SHIFT, Q, exec, hyprutils toggle minimized"
# Screenshot
- '', Print, exec, sh -c "pgrep slurp || grimblast --notify --freeze copysave area"''
+ ", Print, exec, noctalia msg screenshot-region"
+ "SHIFT, Print, exec, noctalia msg screenshot-fullscreen pick"
"CTRL, Print, exec, grimblast --notify --cursor copysave active"
- "SHIFT, Print, exec, grimblast --notify --cursor copysave output"
# Submaps
- "$mod SHIFT, Escape, exec, sysutils toggle service waycorner"
+ "$mod SHIFT, Escape, exec, hyprutils toggle service waycorner"
"$mod SHIFT, Escape, submap, Inhibit"
"$mod, R, submap, Resize"
"$mod, M, submap, Move"
@@ -112,30 +112,33 @@ in {
# Ignore Locked State
bindl = [
# Media Controls
- ", XF86AudioPlay, exec, sysutils media toggle"
- ", XF86AudioPrev, exec, sysutils media previous"
- ", XF86AudioNext, exec, sysutils media next"
+ ", XF86AudioPlay, exec, noctalia msg media toggle"
+ ", XF86AudioPrev, exec, noctalia msg media previous"
+ ", XF86AudioNext, exec, noctalia msg media next"
# Volume
- ", XF86AudioMute, exec, sysutils volume mute"
+ ", XF86AudioMute, exec, noctalia msg volume-mute"
# Keyboard Backlight
- ", XF86KbdBrightnessUp, exec, sysutils backlight up"
- ", XF86KbdBrightnessDown, exec, sysutils backlight down"
+ ", XF86KbdBrightnessUp, exec, hyprutils backlight up"
+ ", XF86KbdBrightnessDown, exec, hyprutils backlight down"
# Touchpad
", XF86TouchpadToggle, exec, hyprutils toggle touchpad"
+
+ # Laptop Lid
+ ", switch:on:Lid Switch, exec, noctalia msg session lock"
];
# Repeat on Hold
bindle = [
# Volume
- ", XF86AudioRaiseVolume, exec, sysutils volume up"
- ", XF86AudioLowerVolume, exec, sysutils volume down"
+ ", XF86AudioRaiseVolume, exec, noctalia msg volume-up"
+ ", XF86AudioLowerVolume, exec, noctalia msg volume-down"
# Backlight
- ", XF86MonBrightnessUp, exec, sysutils brightness up"
- ", XF86MonBrightnessDown, exec, sysutils brightness down"
+ ", XF86MonBrightnessUp, exec, noctalia msg brightness-up"
+ ", XF86MonBrightnessDown, exec, noctalia msg brightness-down"
# Magnifier
"$mod, equal, exec, pypr zoom ++0.5"
@@ -148,7 +151,7 @@ in {
submaps = {
# Inhibit Keybinds
Inhibit.settings.bind = [
- "$mod SHIFT, Escape, exec, sysutils toggle service waycorner"
+ "$mod SHIFT, Escape, exec, hyprutils toggle service waycorner"
"$mod SHIFT, Escape, submap, reset"
];
diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix
@@ -71,7 +71,15 @@ in {
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
gtk4 = {
inherit (osConfig.gui.gtk) theme;
- extraConfig.gtk-application-prefer-dark-theme = 1;
+ extraConfig = {
+ gtk-application-prefer-dark-theme = 1;
+
+ # Font Render
+ gtk-hint-font-metrics = 1;
+ gtk-xft-hinting = 1;
+ gtk-xft-hintstyle = "hintslight";
+ gtk-xft-rgba = "rgb";
+ };
};
};
};
diff --git a/modules/gui/qt.nix b/modules/gui/qt.nix
@@ -116,10 +116,20 @@ _: {
];
};
- homeManager.qt = {config, ...}: let
+ homeManager.qt = {
+ config,
+ lib,
+ osConfig ? {},
+ ...
+ }: let
inherit (builtins) concatStringsSep map;
+ qt = osConfig.gui.qt or {};
in {
stylix.targets.qt.enable = false;
+ xdg.configFile."Kvantum" = lib.mkIf ((qt.style or null) == "kvantum") {
+ source = "${qt.theme.package}/share/Kvantum";
+ recursive = true;
+ };
# KDE Apps
home.file.".config/kdeglobals".text = with config.lib.stylix.colors;
diff --git a/modules/hosts/valkyrie/default.nix b/modules/hosts/valkyrie/default.nix
@@ -46,7 +46,7 @@
"latex"
#"wine"
"games"
- "gnome"
+ "hyprland"
];
hmImports =
@@ -112,7 +112,7 @@ in {
# GUI
gui = {
display = "eDP-1";
- wallpaper = "Bluewatch";
+ wallpaper = "Quasar";
fancy = true;
};
diff --git a/modules/hosts/vortex.nix b/modules/hosts/vortex.nix
@@ -9,6 +9,7 @@
hmModules =
util.map.array [
+ "secrets"
"shell-utils"
"filesystem"
"laptop"
diff --git a/modules/shell/shell-utils.nix b/modules/shell/shell-utils.nix
@@ -3,11 +3,7 @@
inherit (config.flake) files;
in {
flake.modules = {
- nixos.shell-utils = {
- config,
- pkgs,
- ...
- }: {
+ nixos.shell-utils = {pkgs, ...}: {
config = {
environment = {
# Utilities
diff --git a/scripts/hyprutils.nix b/scripts/hyprutils.nix
@@ -12,14 +12,14 @@
# Usage #
help - Show this information
- click [button] [address] - Opens [address] with [button] action
+ backlight [up,down] - Keyboard Backlight Controls
toggle
- fancy - Toggle Compositor Effects
float - Toggle window floating in current workspace
minimized - Show minimized windows
monitor 'name' - Toggle specified Monitor
shader - Toggle Compositor Shader
touchpad - Toggle touchpad
+ service 'name' - Toggle SYSTEMD Service
'';
daemon = builtins.toFile "daemon.sh" ''
@@ -59,10 +59,11 @@ in
gnugrep
socat
+ brightnessctl
custom.hyprshellevents
hyprland
hyprshade
- libnotify
+ systemd
zenity
];
@@ -70,10 +71,6 @@ in
set +eu
${files.scripts.commands}
- notify() {
- notify-send -a "utility" -t 1000 -h string:x-canonical-private-synchronous:"$1" "''${@:2}"
- }
-
hyprnotify() {
hyprctl notify "$1" 1500 0 " $2 "
}
@@ -89,53 +86,16 @@ in
info "Monitoring Hyprland Socket..."
socat -u UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock EXEC:"shellevents ${daemon}",nofork
;;
- "click")
- BUTTON="$2"
- ADDRESS="$3"
- if [ -z "$BUTTON" ] || [ -z "$ADDRESS" ]
- then
- fail "Expected GDK Button event and a window address"
- fi
-
- case "$BUTTON" in
- "1")
- # Left Click
- hyprctl keyword cursor:no_warps true
- hyprctl dispatch focuswindow address:"$ADDRESS"
- hyprctl dispatch bringactivetotop
- hyprctl keyword cursor:no_warps false
- ;;
- "2")
- # Middle Click
- hyprctl dispatch movetoworkspacesilent "special:minimized, address:$ADDRESS"
- ;;
- "3")
- # Right Click
- hyprctl dispatch closewindow address:"$ADDRESS"
- ;;
+ "backlight")
+ case "$2" in
+ "up") brightnessctl -d "*::kbd_backlight" set 33%+ ;;
+ "down") brightnessctl -d "*::kbd_backlight" set 33%- ;;
+ "") fail "Expected an Option" ;;
+ *) fail "Unexpected Option 'backlight $2'" ;;
esac
;;
"toggle")
case "$2" in
- "fancy")
- FANCY=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
- if [ "$FANCY" = 1 ]
- then
- hyprnotify 1 "Compositor Effects Disabled"
- hyprctl --batch "\
- keyword animations:enabled 0;\
- keyword decoration:shadow:enabled 0;\
- keyword decoration:blur:enabled 0;\
- keyword general:gaps_in 0;\
- keyword general:gaps_out 0;\
- keyword general:border_size 1;\
- keyword decoration:rounding 0;\
- keyword plugin:dynamic-cursors:enabled 0"
- exit
- fi
- hyprnotify 1 "Compositor Effects Enabled"
- hyprctl reload
- ;;
"float")
WORKSPACE=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}')
hyprnotify 1 "Toggled window floating on Workspace $WORKSPACE"
@@ -177,13 +137,13 @@ in
enable() {
hyprctl keyword "device[$touchpad]:enabled" true
printf "true" >"$STATUS"
- notify touchpad -i "touchpad" "Touchpad Enabled"
+ hyprnotify 1 "Touchpad Enabled"
}
disable() {
hyprctl keyword "device[$touchpad]:enabled" false
printf "false" >"$STATUS"
- notify touchpad -i "touchpad" "Touchpad Disabled"
+ hyprnotify 1 "Touchpad Disabled"
}
if ! [ -f "$STATUS" ]
@@ -199,6 +159,21 @@ in
fi
fi
;;
+ "service")
+ if [ -z "$3" ]
+ then
+ fail "Expected service name"
+ fi
+
+ if systemctl --user is-active "$3"
+ then
+ systemctl --user stop "$3"
+ hyprnotify 1 "Stopped $3"
+ else
+ systemctl --user start "$3"
+ hyprnotify 1 "Started $3"
+ fi
+ ;;
"") fail "Expected an Option" ;;
*) fail "Unexpected Option 'toggle $2'" ;;
esac
diff --git a/scripts/sysutils.nix b/scripts/sysutils.nix
@@ -1,257 +0,0 @@
-{
- lib,
- pkgs,
- files,
- ...
-}: let
- inherit (lib) licenses recursiveUpdate;
-
- help = ''
- # Legend #
- xxx - Command [action] - Description
-
- # Usage #
- help - Show this information
- brightness [up,down] - Screen Brightness Controls
- backlight [up,down] - Keyboard Backlight Controls
- temperature - Display Temperature Control
- volume [up,down,mute] - Volume Controls
- media [next,previous,toggle] - Media Controls
- toggle
- service ['name'] - Toggle SYSTEMD Service
- '';
-in
- recursiveUpdate
- {
- meta = {
- mainProgram = "sysutils";
- description = "System Utility Script";
- homepage = files.path.repo;
- license = licenses.gpl3Only;
- maintainers = ["maydayv7"];
- };
- }
- (
- pkgs.writeShellApplication {
- name = "sysutils";
- runtimeInputs = with pkgs; [
- coreutils
- gnugrep
- wget
-
- alsa-utils
- brightnessctl
- brillo
- libnotify
- playerctl
- sunsetr
- systemd
- ];
-
- text = ''
- set +eu
- ${files.scripts.commands}
- show_album_art=true
- show_music_in_volume_indicator=true
-
- notify() {
- notify-send -a "utility" -t 1000 -h string:x-canonical-private-synchronous:"$1" "''${@:2}"
- }
-
- fail() {
- error "$1" "Try 'sysutils help' for more information"
- }
-
- get_media_icon() {
- media_icon="audio-speakers"
- if $show_album_art
- then
- temp sysutils_media-icon 1
- url=$(playerctl -f "{{mpris:artUrl}}" metadata)
- if [[ "$url" == "file://"* ]]
- then
- media_icon="''${url/file:\/\//}"
- elif [[ "$url" == "http://"* ]] || [[ "$url" == "https://"* ]]
- then
- filename="$(echo "$url" | sed "s/.*\///")"
- if [ ! -f "$TEMP/$filename" ]; then wget -O "$TEMP/$filename" "$url"; fi
- media_icon="$TEMP/$filename"
- fi
- fi
- }
-
- case "$1" in
- "") error "Expected an Option" "${help}";;
- "help") echo -e "## System Utility Script ##\n${help}";;
- "brightness")
- brightness_notification() {
- brightness=$(brillo | grep -Po '[0-9]{1,3}' | head -n 1)
- notify brightness -i "display" -h int:value:"$brightness" "🔅 $brightness%"
- }
- case "$2" in
- "up")
- brillo -u 300000 -A 5
- brightness_notification
- ;;
- "down")
- brillo -u 300000 -U 5
- brightness_notification
- ;;
- "") fail "Expected an Option" ;;
- *) fail "Unexpected Option 'brightness $2'" ;;
- esac
- ;;
- "backlight")
- backlight_notification() {
- backlight="$(cat /sys/class/leds/*::kbd_backlight/brightness)"
- light=0; if [ "$backlight" -eq 1 ]; then light=33; fi
- if [ "$backlight" -eq 2 ]; then light=67; fi
- if [ "$backlight" -eq 3 ]; then light=100; fi
- notify backlight -i "keyboard" -h int:value:"$light" "🔅 $light%"
- }
- case "$2" in
- "up")
- brightnessctl -d "*::kbd_backlight" set 33%+
- backlight_notification
- ;;
- "down")
- brightnessctl -d "*::kbd_backlight" set 33%-
- backlight_notification
- ;;
- "") fail "Expected an Option" ;;
- *) fail "Unexpected Option 'brightness $2'" ;;
- esac
- ;;
- "temperature")
- readarray -t presets < <(sunsetr preset list)
- active_preset=$(sunsetr preset active)
- cur_ind=-1
- for i in "''${!presets[@]}"
- do
- if [ "''${presets[$i]}" = "$active_preset" ]
- then
- cur_ind=$i
- break
- fi
- done
-
- if [ "$cur_ind" -eq -1 ]
- then
- next_ind=0
- else
- next_ind=$(( (cur_ind + 1) % ''${#presets[@]} ))
- fi
-
- next_preset="''${presets[$next_ind]}"
- sunsetr preset "$next_preset"
- notify temperature -i "display" "🌡 Preset: $next_preset"
- ;;
- "volume")
- volume_notification() {
- volume=$(amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1)
- mute=$(amixer get Master | grep '%' | grep -oE '[^ ]+$' | grep off | head -n1)
- if [ "$volume" -eq 0 ] || [ "$mute" == "[off]" ]
- then
- volume_icon="🔇"
- elif [ "$volume" -lt 50 ]
- then
- volume_icon="🔉"
- else
- volume_icon="🔊"
- fi
-
- song_title=$(playerctl -f "{{title}}" metadata)
- get_media_icon
- if $show_music_in_volume_indicator && [ -n "$song_title" ]
- then
- song_artist=$(playerctl -f "{{artist}}" metadata)
- if [ -z "$song_artist" ]
- then
- notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" "$song_title"
- else
- notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" "$song_title\nBy $song_artist"
- fi
- else
- notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%"
- fi
- }
- case "$2" in
- "up")
- amixer set Master on
- amixer sset Master 5%+
- volume_notification
- ;;
- "down")
- amixer set Master on
- amixer sset Master 5%-
- volume_notification
- ;;
- "mute")
- amixer set Master 1+ toggle
- volume_notification
- ;;
- "") fail "Expected an Option" ;;
- *) fail "Unexpected Option 'volume $2'" ;;
- esac
- ;;
- "media")
- music_notification() {
- song_title=$(playerctl -f "{{title}}" metadata)
- song_artist=$(playerctl -f "{{artist}}" metadata)
- song_album=$(playerctl -f "{{album}}" metadata)
- get_media_icon
- if [ -z "$song_album" ]
- then
- if [ -z "$song_artist" ]
- then
- notify music -i "$media_icon" "$song_title"
- else
- notify music -i "$media_icon" "$song_title" "By $song_artist"
- fi
- else
- notify music -i "$media_icon" "$song_title" "By $song_artist from $song_album"
- fi
- }
- case "$2" in
- "next")
- playerctl next
- sleep 0.5 && music_notification
- ;;
- "previous")
- playerctl previous
- sleep 0.5 && music_notification
- ;;
- "toggle")
- playerctl play-pause
- music_notification
- ;;
- "") fail "Expected an Option" ;;
- *) fail "Unexpected Option 'media $2'" ;;
- esac
- ;;
- "toggle")
- case "$2" in
- "service")
- if [ -z "$3" ]
- then
- fail "Expected service name"
- fi
-
- if systemctl --user is-active "$3"
- then
- systemctl --user stop "$3"
- notify service -i "system-config-services" "Stopped $3"
- else
- systemctl --user start "$3"
- notify service -i "system-config-services" "Started $3"
- fi
- ;;
- "") fail "Expected an Option" ;;
- *) fail "Unexpected Option 'toggle $2'" ;;
- esac
- ;;
- *) fail "Unexpected Option '$1'" ;;
- esac
- '';
- }
- )
diff --git a/secrets/_module.nix b/secrets/_module.nix
@@ -46,11 +46,10 @@ in {
gnupg.home = "${config.home.homeDirectory}/.gnupg";
secrets = let
directory = ./user + "/${config.home.username}";
- in (
+ in
if (builtins.pathExists directory)
then util.map.secrets {inherit directory;}
- else {}
- );
+ else {};
};
};
};