diff --git a/README.md b/README.md
index e306da4..ce84c39 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,12 @@
## Specs
- **Operating System:** [NixOS](https://nixos.org)
-- **Window Manager:** [Hyprland](https://hyprland.org/)
+- **Window Manager:** [Sway](https://swaywm.org/)
- **Overall Theme:** [Base16 Dracula](https://github.com/dracula/base16-dracula-scheme)
- **Shell:** [Zsh](https://www.zsh.org/)
- **Terminal:** [Foot](https://codeberg.org/dnkl/foot)
- **Editor:** [Helix](https://helix-editor.com)
-- **Notifications:** [Mako](https://github.com/emersion/mako)
+- **Notifications:** [swaync](https://github.com/ErikReider/SwayNotificationCenter)
- **Panel:** [Waybar](https://github.com/Alexays/Waybar)
- **File Manager:** [Vifm](https://vifm.info/)
diff --git a/flake.lock b/flake.lock
index 6871a0b..caf0e85 100644
--- a/flake.lock
+++ b/flake.lock
@@ -165,11 +165,11 @@
]
},
"locked": {
- "lastModified": 1685885003,
- "narHash": "sha256-+OB0EvZBfGvnlTGg6mtyUCqkMnUp9DkmRUU4d7BZBVE=",
+ "lastModified": 1685999310,
+ "narHash": "sha256-gaRMZhc7z4KeU/xS3IWv3kC+WhVcAXOLXXGKLe5zn1Y=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "607d8fad96436b134424b9935166a7cd0884003e",
+ "rev": "28614ed7a1e3ace824c122237bdc0e5e0b62c5c3",
"type": "github"
},
"original": {
@@ -177,48 +177,6 @@
"type": "indirect"
}
},
- "hyprland": {
- "inputs": {
- "hyprland-protocols": "hyprland-protocols",
- "nixpkgs": "nixpkgs",
- "wlroots": "wlroots",
- "xdph": "xdph"
- },
- "locked": {
- "lastModified": 1685951361,
- "narHash": "sha256-Hx9yVkyEjVf5ohiWW2HmSuGgxDaVOqGLMIGSz/HV6f8=",
- "owner": "hyprwm",
- "repo": "Hyprland",
- "rev": "1a4e6e6a4b3272118a51bebb4a45ecd642383209",
- "type": "github"
- },
- "original": {
- "owner": "hyprwm",
- "repo": "Hyprland",
- "type": "github"
- }
- },
- "hyprland-protocols": {
- "inputs": {
- "nixpkgs": [
- "hyprland",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1684265364,
- "narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=",
- "owner": "hyprwm",
- "repo": "hyprland-protocols",
- "rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530",
- "type": "github"
- },
- "original": {
- "owner": "hyprwm",
- "repo": "hyprland-protocols",
- "type": "github"
- }
- },
"images": {
"inputs": {
"nixpkgs": [
@@ -336,18 +294,17 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1685655444,
- "narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
+ "lastModified": 1685931219,
+ "narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
+ "rev": "7409480d5c8584a1a83c422530419efe4afb0d19",
"type": "github"
},
"original": {
- "owner": "NixOS",
+ "id": "nixpkgs",
"ref": "nixos-unstable",
- "repo": "nixpkgs",
- "type": "github"
+ "type": "indirect"
}
},
"nixpkgs-22_11": {
@@ -412,21 +369,6 @@
"type": "github"
}
},
- "nixpkgs_2": {
- "locked": {
- "lastModified": 1685931219,
- "narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "7409480d5c8584a1a83c422530419efe4afb0d19",
- "type": "github"
- },
- "original": {
- "id": "nixpkgs",
- "ref": "nixos-unstable",
- "type": "indirect"
- }
- },
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
@@ -481,13 +423,12 @@
"root": {
"inputs": {
"home-manager": "home-manager",
- "hyprland": "hyprland",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"nix-colors": "nix-colors",
"nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware",
- "nixpkgs": "nixpkgs_2",
+ "nixpkgs": "nixpkgs",
"purge": "purge",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix",
@@ -613,49 +554,6 @@
"repo": "flake-utils",
"type": "github"
}
- },
- "wlroots": {
- "flake": false,
- "locked": {
- "host": "gitlab.freedesktop.org",
- "lastModified": 1685803001,
- "narHash": "sha256-yxq/U9zL1ssFZtgT27A96UKteCiKb3zSmbA/dokK76U=",
- "owner": "wlroots",
- "repo": "wlroots",
- "rev": "b61d5922f1d0910a848deb100570ad8587aea38d",
- "type": "gitlab"
- },
- "original": {
- "host": "gitlab.freedesktop.org",
- "owner": "wlroots",
- "repo": "wlroots",
- "type": "gitlab"
- }
- },
- "xdph": {
- "inputs": {
- "hyprland-protocols": [
- "hyprland",
- "hyprland-protocols"
- ],
- "nixpkgs": [
- "hyprland",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1685385764,
- "narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=",
- "owner": "hyprwm",
- "repo": "xdg-desktop-portal-hyprland",
- "rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1",
- "type": "github"
- },
- "original": {
- "owner": "hyprwm",
- "repo": "xdg-desktop-portal-hyprland",
- "type": "github"
- }
}
},
"root": "root",
diff --git a/flake.nix b/flake.nix
index b6bb56a..4a25bb0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,7 +21,6 @@
};
nix-colors.url = "github:Misterio77/nix-colors";
- hyprland.url = "github:hyprwm/Hyprland";
purge = {
url = "github:therealr5/purge";
@@ -49,7 +48,6 @@
, nixpkgs
, home-manager
, nix-index-database
- , hyprland
, sops-nix
, impermanence
, nix-colors
@@ -87,7 +85,6 @@
home-manager.users.rouven = {
imports = [
nix-colors.homeManagerModules.default
- hyprland.homeManagerModules.default
sops-nix.homeManagerModules.sops
];
};
diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix
index 0e7a5d5..5e266d2 100755
--- a/hosts/thinkpad/default.nix
+++ b/hosts/thinkpad/default.nix
@@ -101,7 +101,7 @@
xdg.portal = {
enable = true;
extraPortals = [
- pkgs.xdg-desktop-portal-hyprland
+ pkgs.xdg-desktop-portal-wlr
];
};
diff --git a/hosts/thinkpad/modules/greetd/default.nix b/hosts/thinkpad/modules/greetd/default.nix
index f011f3d..bf0616a 100644
--- a/hosts/thinkpad/modules/greetd/default.nix
+++ b/hosts/thinkpad/modules/greetd/default.nix
@@ -4,7 +4,7 @@
enable = true;
settings = {
default_session = {
- command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland";
+ command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd sway";
};
};
};
diff --git a/shared/caches.nix b/shared/caches.nix
index c2fa87b..c39eefd 100644
--- a/shared/caches.nix
+++ b/shared/caches.nix
@@ -2,11 +2,9 @@
{
nix.settings = {
substituters = [
- "https://hyprland.cachix.org"
"https://cache.rfive.de"
];
trusted-public-keys = [
- "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.rfive.de:2E/yzJduGj4SJqYqDhpXO7aM2m5buMMUHN64EZdml3I="
];
};
diff --git a/users/rouven/modules/default.nix b/users/rouven/modules/default.nix
index 69ecf24..a37b127 100644
--- a/users/rouven/modules/default.nix
+++ b/users/rouven/modules/default.nix
@@ -6,7 +6,7 @@
./git
./gpg
./helix
- ./hyprland
+ ./sway
./mpv
./sops
./spotify
diff --git a/users/rouven/modules/foot/default.nix b/users/rouven/modules/foot/default.nix
index 9ce08f4..e6b1be9 100644
--- a/users/rouven/modules/foot/default.nix
+++ b/users/rouven/modules/foot/default.nix
@@ -22,7 +22,7 @@
colors = config.colorScheme.colors;
in
{
- alpha = if (config.colorScheme.kind == "dark") then 0.0 else 1.0;
+ # alpha = if (config.colorScheme.kind == "dark") then 0.0 else 1.0;
background = colors.base00;
foreground = colors.base05;
regular0 = colors.base02;
diff --git a/users/rouven/modules/hyprland/default.nix b/users/rouven/modules/hyprland/default.nix
deleted file mode 100644
index 680a1f7..0000000
--- a/users/rouven/modules/hyprland/default.nix
+++ /dev/null
@@ -1,77 +0,0 @@
-{ config, pkgs, ... }:
-{
- imports = [
- ./hyprpaper.nix
- ./session.nix
- ./waybar.nix
- ];
- wayland.windowManager.hyprland = {
- enable = true;
- extraConfig = builtins.readFile ./hyprland.conf; # todo nix config when available
- recommendedEnvironment = true;
- };
-
- home.sessionVariables = {
- GRIM_DEFAULT_DIR = "~/Pictures/Screenshots/";
- };
- home.packages = with pkgs; [
- pulseaudio # installed to have pactl
- jq
- libnotify
- fuzzel
- wl-clipboard
- grim
- slurp
- swappy
- ];
-
- xdg.configFile = {
- "fuzzel/fuzzel.ini".text = ''
- [main]
- icon-theme=${config.gtk.iconTheme.name}
- show-actions=yes
- width=80
- terminal=${pkgs.foot}/bin/foot
-
- [colors]
- background=${config.colorScheme.colors.base00}ff
- text=${config.colorScheme.colors.base05}ff
- match=${config.colorScheme.colors.base08}ff
- selection=${config.colorScheme.colors.base02}ff
- selection-text=${config.colorScheme.colors.base04}ff
- border=${config.colorScheme.colors.base01}ff
- '';
-
- "swappy/config".text = ''
- [Default]
- save_dir = ~/Pictures/Screenshots/
- early_exit = true
- '';
- "mako/do-not-disturb.sh".text = ''
- if [[ $(makoctl mode) = 'default' ]];then
- notify-send 'Enabled Do Not Disturb mode'
- sleep 3
- makoctl mode -s do-not-disturb
- else
- makoctl mode -s default
- notify-send 'Disabled Do Not Disturb mode'
- fi
- '';
- };
-
- services.mako = {
- enable = true;
- backgroundColor = "#${config.colorScheme.colors.base02}FF";
- borderRadius = 20;
- textColor = "#${config.colorScheme.colors.base05}FF";
- layer = "overlay";
- defaultTimeout = 10000;
- extraConfig = ''
- [urgency=high]
- background-color=#${config.colorScheme.colors.base08}
- default-timeout=0
- [mode=do-not-disturb]
- invisible=1
- '';
- };
-}
diff --git a/users/rouven/modules/hyprland/hyprland.conf b/users/rouven/modules/hyprland/hyprland.conf
deleted file mode 100644
index edda643..0000000
--- a/users/rouven/modules/hyprland/hyprland.conf
+++ /dev/null
@@ -1,142 +0,0 @@
-# See https://wiki.hyprland.org/Configuring/Monitors/
-monitor=eDP-1, 1920x1080, 0x0, 1
-# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
-input {
- kb_layout = us
- kb_variant = dvorak-alt-intl
-
- follow_mouse = 1
-
- touchpad {
- natural_scroll = no
- }
-
- sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
-}
-
-general {
- # See https://wiki.hyprland.org/Configuring/Variables/ for more
-
- gaps_in = 5
- gaps_out = 20
- border_size = 2
- col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
- col.inactive_border = rgba(595959aa)
-
- layout = dwindle
-}
-
-decoration {
- # See https://wiki.hyprland.org/Configuring/Variables/ for more
-
- rounding = 10
- blur = yes
- blur_size = 4
- blur_passes = 2
- blur_new_optimizations = on
-
- drop_shadow = yes
- shadow_range = 4
- shadow_render_power = 3
- col.shadow = rgba(1a1a1aee)
-}
-
-animations {
- enabled = yes
-
- # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
-
- bezier = myBezier, 0.05, 0.9, 0.1, 1.05
-
- animation = windows, 1, 7, myBezier
- animation = windowsOut, 1, 7, default, popin 80%
- animation = border, 1, 10, default
- animation = fade, 1, 7, default
- animation = workspaces, 1, 6, default
-}
-
-dwindle {
- # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
- pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
- preserve_split = yes # you probably want this
-}
-
-master {
- # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
- new_is_master = true
-}
-
-# See https://wiki.hyprland.org/Configuring/Keywords/ for more
-$mainMod = SUPER
-
-# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
-bind = $mainMod, Return, exec, footclient
-bind = $mainMod SHIFT, Q, killactive,
-bind = $mainMod, Space, togglefloating,
-bind = $mainMod, F, fullscreen, 0 # fullscreen
-bind = $mainMod, M, fullscreen, 1 # maximize
-bind = $mainMod SHIFT, F, fakefullscreen, 0
-bind = $mainMod, O, swapactiveworkspaces, 0 1
-bind = $mainMod, U, focusurgentorlast
-bind = ALT, Space, exec, fuzzel
-
-bind = $mainMod, S, togglesplit, # dwindlr
-
-# Move focus with mainMod + arrow keys
-bind = $mainMod, H, movefocus, l
-bind = $mainMod, L, movefocus, r
-bind = $mainMod, K, movefocus, u
-bind = $mainMod, J, movefocus, d
-
-# Switch workspaces with mainMod + [0-9]
-bind = $mainMod, 1, workspace, 1
-bind = $mainMod, 2, workspace, 2
-bind = $mainMod, 3, workspace, 3
-bind = $mainMod, 4, workspace, 4
-bind = $mainMod, 5, workspace, 5
-bind = $mainMod, 6, workspace, 6
-bind = $mainMod, 7, workspace, 7
-bind = $mainMod, 8, workspace, 8
-bind = $mainMod, 9, workspace, 9
-bind = $mainMod, 0, workspace, 10
-
-# Move active window to a workspace with mainMod + SHIFT + [0-9]
-bind = $mainMod SHIFT, 1, movetoworkspace, 1
-bind = $mainMod SHIFT, 2, movetoworkspace, 2
-bind = $mainMod SHIFT, 3, movetoworkspace, 3
-bind = $mainMod SHIFT, 4, movetoworkspace, 4
-bind = $mainMod SHIFT, 5, movetoworkspace, 5
-bind = $mainMod SHIFT, 6, movetoworkspace, 6
-bind = $mainMod SHIFT, 7, movetoworkspace, 7
-bind = $mainMod SHIFT, 8, movetoworkspace, 8
-bind = $mainMod SHIFT, 9, movetoworkspace, 9
-bind = $mainMod SHIFT, 0, movetoworkspace, 10
-
-# Scroll through existing workspaces wiswaylockth mainMod + scroll
-bind = $mainMod, mouse_down, workspace, e+1
-bind = $mainMod, mouse_up, workspace, e-1
-
-# Move/resize windows with mainMod + LMB/RMB and dragging
-bindm = $mainMod, mouse:272, movewindow
-bindm = $mainMod, mouse:273, resizewindow
-
-# All the fancy XF86 Keys
-bind = ,Print, exec, grim -g "$(slurp)" - | wl-copy -t image/png
-bind = ,XF86Launch2, exec, grim -g "$(slurp)" - | swappy -f -
-binde = ,XF86MonBrightnessUp, exec, light -A 10
-binde = ,XF86MonBrightnessDown, exec, light -U 10
-bind = ,XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
-bind = ,XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
-binde = ,XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
-binde = ,XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
-binde = SHIFT, XF86AudioRaiseVolume, exec, pactl set-source-volume @DEFAULT_SOURCE@ +5%
-binde = SHIFT, XF86AudioLowerVolume, exec, pactl set-source-volume @DEFAULT_SOURCE@ -5%
-
-# even more fancy stuff (aka abusing XF86 keys)
-bind = ,XF86Messenger, exec, makoctl dismiss
-bind = SHIFT ,XF86Messenger, exec, makoctl restore
-bind = ,XF86Go, exec, makoctl invoke
-bind = ,Cancel, exec, sh ~/.config/mako/do-not-disturb.sh
-bind = ,XF86Display, exec, hyprpaper
-bind = ,XF86Favorites, exec, loginctl lock-session
-bind = ,XF86PowerOff, exec, wlogout
diff --git a/users/rouven/modules/hyprland/hyprpaper.nix b/users/rouven/modules/hyprland/hyprpaper.nix
deleted file mode 100644
index f1d8a56..0000000
--- a/users/rouven/modules/hyprland/hyprpaper.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ pkgs, ... }:
-{
- home.packages = with pkgs; [
- hyprpaper
- ];
- xdg.configFile."hypr/hyprpaper.conf".text = ''
- preload = ${../../../../images/wallpaper.png}
- wallpaper =eDP-1, ${../../../../images/wallpaper.png}
- wallpaper =HDMI-A-1, ${../../../../images/wallpaper.png}
- '';
- systemd.user.services.hyprpaper = {
- Install.WantedBy = [ "graphical-session.target" ];
- Service = {
- ExecStart = "${pkgs.hyprpaper}/bin/hyprpaper";
- Restart = "on-failure";
- };
- Unit = {
- After = "graphical-session.target";
- Description = "Blazingly fast wayland wallpaper utility with IPC controls";
- Documentation = "https://github.com/hyprwm/hyprpaper";
- PartOf = "graphical-session.target";
- };
- };
-}
diff --git a/users/rouven/modules/sway/default.nix b/users/rouven/modules/sway/default.nix
index e69de29..1d745ee 100644
--- a/users/rouven/modules/sway/default.nix
+++ b/users/rouven/modules/sway/default.nix
@@ -0,0 +1,78 @@
+{ config, pkgs, lib, ... }:
+
+{
+ imports = [
+ # ./hyprpaper.nix
+ ./session.nix
+ ./waybar.nix
+ ];
+ wayland.windowManager.sway = {
+ enable = true;
+ config = rec {
+ startup = [
+ {
+ command = "${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png}";
+ }
+ ];
+ modifier = "Mod4";
+ menu = "${pkgs.fuzzel}/bin/fuzzel";
+ terminal = "${pkgs.foot}/bin/footclient";
+ bars = [ ];
+ gaps = {
+ outer = 5;
+ inner = 12;
+ };
+ input = {
+ "*" = {
+ xkb_layout = "us";
+ xkb_variant = "dvorak-alt-intl";
+ };
+ };
+ keybindings =
+ lib.mkOptionDefault {
+ "Mod1+space" = "exec ${menu}";
+ "Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
+ "XF86Launch2" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot save area - | ${pkgs.swappy}/bin/swappy -f -";
+ "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10";
+ "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 10";
+ # audio controls
+ "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
+ "XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
+ "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
+ "XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
+ "Shift+XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ +5%";
+ "Shift+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%";
+
+ "XF86Favorites" = "exec ${pkgs.systemd}/bin/loginctl lock-session";
+ "XF86PowerOff" = "exec ${pkgs.wlogout}/bin/wlogout";
+
+ "XF86Messenger" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel";
+ "Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest";
+ "Shift+Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --cloes-all";
+ };
+ };
+ };
+ xdg.configFile = {
+ "swaync".source = ./swaync;
+ "fuzzel/fuzzel.ini".text = ''
+ [main]
+ icon-theme=${config.gtk.iconTheme.name}
+ show-actions=yes
+ width=80
+ terminal=${pkgs.foot}/bin/foot
+
+ [colors]
+ background=${config.colorScheme.colors.base00}ff
+ text=${config.colorScheme.colors.base05}ff
+ match=${config.colorScheme.colors.base08}ff
+ selection=${config.colorScheme.colors.base02}ff
+ selection-text=${config.colorScheme.colors.base04}ff
+ border=${config.colorScheme.colors.base01}ff
+ '';
+ "swappy/config".text = ''
+ [Default]
+ save_dir = ~/Pictures/Screenshots/
+ early_exit = true
+ '';
+ };
+}
diff --git a/users/rouven/modules/hyprland/session.nix b/users/rouven/modules/sway/session.nix
similarity index 78%
rename from users/rouven/modules/hyprland/session.nix
rename to users/rouven/modules/sway/session.nix
index 87f30f8..1e4bdbc 100644
--- a/users/rouven/modules/hyprland/session.nix
+++ b/users/rouven/modules/sway/session.nix
@@ -2,12 +2,13 @@
{
home.packages = with pkgs; [
swaylock-effects
- wlogout
+ wl-clipboard
+ swaynotificationcenter
+ playerctl
];
services.swayidle = {
enable = true;
- systemdTarget = "hyprland-session.target";
events = [
{ event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
{ event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
@@ -16,6 +17,20 @@
{ timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
];
};
+ systemd.user.services.swaync = {
+ Install.WantedBy = [ "graphical-session.target" ];
+ Service = {
+ ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync";
+ Restart = "on-failure";
+ };
+ Unit = {
+ After = "graphical-session.target";
+ Description = "Simple notification daemon with a GUI built for Sway";
+ Documentation = "https://github.com/ErikReider/SwayNotificationCenter";
+ PartOf = "graphical-session.target";
+ };
+ environment.PATH = "${pkgs.coreutils}/bin";
+ };
xdg.configFile = {
"swaylock/config".text = ''
@@ -31,7 +46,7 @@
'';
"wlogout/style.css".text = ''
- * {
+ * {
background-image: none;
}
window {
diff --git a/users/rouven/modules/sway/swaync/config.json b/users/rouven/modules/sway/swaync/config.json
new file mode 100644
index 0000000..f938487
--- /dev/null
+++ b/users/rouven/modules/sway/swaync/config.json
@@ -0,0 +1,54 @@
+{
+ "$schema": "/etc/xdg/swaync/configSchema.json",
+
+ "positionX": "right",
+ "positionY": "top",
+ "control-center-margin-top": 20,
+ "control-center-margin-bottom": 0,
+ "control-center-margin-right": 20,
+ "control-center-margin-left": 0,
+ "control-center-width": 500,
+ "control-center-height": 600,
+ "fit-to-screen": false,
+
+ "layer": "top",
+ "cssPriority": "user",
+ "notification-icon-size": 64,
+ "notification-body-image-height": 100,
+ "notification-body-image-width": 200,
+ "timeout": 10,
+ "timeout-low": 5,
+ "timeout-critical": 0,
+ "notification-window-width": 500,
+ "keyboard-shortcuts": true,
+ "image-visibility": "when-available",
+ "transition-time": 200,
+ "hide-on-clear": true,
+ "hide-on-action": true,
+ "script-fail-notify": true,
+
+ "widgets": [
+ "title",
+ "dnd",
+ "mpris",
+ "notifications"
+ ],
+ "widget-config": {
+ "title": {
+ "text": "Notifications",
+ "clear-all-button": true,
+ "button-text": "Clear All"
+ },
+ "dnd": {
+ "text": "Do Not Disturb"
+ },
+ "label": {
+ "max-lines": 5,
+ "text": "Label Text"
+ },
+ "mpris": {
+ "image-size": 96,
+ "image-radius": 12
+ }
+ }
+}
\ No newline at end of file
diff --git a/users/rouven/modules/sway/swaync/style.css b/users/rouven/modules/sway/swaync/style.css
new file mode 100644
index 0000000..8311d61
--- /dev/null
+++ b/users/rouven/modules/sway/swaync/style.css
@@ -0,0 +1,297 @@
+/* Dracula Theme */
+@define-color foreground rgb(248, 248, 242);
+@define-color background rgb(40, 42, 54);
+@define-color background-alpha rgba(40, 42, 54, 0.8);
+@define-color accent rgba(189, 147, 249, 0.8);
+@define-color current-line rgb(68, 71, 90);
+@define-color comment rgb(98, 114, 164);
+
+.notification-row {
+ transition: all 200ms ease;
+ outline: none;
+ margin-bottom: 4px;
+ margin-right: 13px;
+ margin-top: 8px;
+ border-radius: 80px;
+}
+
+.control-center .notification-row:focus,
+.control-center .notification-row:hover {
+ opacity: 1;
+ background: transparent;
+}
+
+.notification-row:focus .notification,
+.notification-row:hover .notification {
+ box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5);
+ border: 0px solid @accent;
+ background: @current-line;
+}
+
+.control-center .notification {
+ box-shadow: none;
+}
+
+.control-center .notification-row {
+ opacity: 0.5;
+ margin: -5px;
+}
+
+.notification {
+ transition: all 200ms ease;
+ border-radius: 8px;
+ margin: 12px 7px 0px 7px;
+ box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5);
+ padding: 0;
+}
+
+/* Uncomment to enable specific urgency colors
+.low {
+ background: yellow;
+ padding: 6px;
+ border-radius: 12px;
+}
+
+.normal {
+ background: green;
+ padding: 6px;
+ border-radius: 12px;
+}
+
+.critical {
+ background: red;
+ padding: 6px;
+ border-radius: 12px;
+}
+*/
+
+.notification-content {
+ background: transparent;
+ padding: 6px;
+ border-radius: 8px;
+}
+
+.close-button {
+ background: @current-line;
+ color: @foreground;
+ text-shadow: none;
+ padding: 0;
+ border-radius: 100%;
+ margin-top: 17px;
+ margin-right: 10px;
+ box-shadow: none;
+ border: none;
+ min-width: 24px;
+ min-height: 24px;
+}
+
+.close-button:hover {
+ box-shadow: none;
+ background: @comment;
+ transition: all 0.15s ease-in-out;
+ border: none;
+}
+
+.notification-default-action,
+.notification-action {
+ padding: 4px;
+ margin: 0;
+ box-shadow: none;
+ background: @current-line;
+ border: 2px solid @accent;
+ color: @foreground;
+}
+
+.notification-default-action:hover,
+.notification-action:hover {
+ -gtk-icon-effect: none;
+ background: @current-line;
+}
+
+.notification-default-action {
+ border-radius: 8px;
+}
+
+/* When alternative actions are visible */
+.notification-default-action:not(:only-child) {
+ border-bottom-left-radius: 0px;
+ border-bottom-right-radius: 0px;
+}
+
+.notification-action {
+ border-radius: 0px;
+ border-top: none;
+ border-right: none;
+}
+
+/* add bottom border radius to eliminate clipping */
+.notification-action:first-child {
+ border-bottom-left-radius: 8px;
+}
+
+.notification-action:last-child {
+ border-bottom-right-radius: 8px;
+ border-right: 1px solid @accent;
+}
+
+.image {
+}
+
+.body-image {
+ margin-top: 6px;
+ background-color: @foreground;
+ border-radius: 8px;
+}
+
+.summary {
+ font-size: 16px;
+ font-weight: bold;
+ background: transparent;
+ color: @foreground;
+ text-shadow: none;
+}
+
+.time {
+ font-size: 16px;
+ font-weight: bold;
+ background: transparent;
+ color: @foreground;
+ text-shadow: none;
+ margin-right: 18px;
+}
+
+.body {
+ font-size: 15px;
+ font-weight: normal;
+ background: transparent;
+ color: @foreground;
+ text-shadow: none;
+}
+
+/* The "Notifications" and "Do Not Disturb" text widget */
+.top-action-title {
+ color: @foreground;
+ text-shadow: none;
+}
+
+.control-center-clear-all {
+ color: @foreground;
+ text-shadow: none;
+ background: @background;
+ border: 2px solid @accent;
+ box-shadow: none;
+ border-radius: 8px;
+}
+
+.control-center-clear-all:hover {
+ background: @background;
+}
+
+.control-center-dnd {
+ border-radius: 8px;
+ background: @background;
+ border: 1px solid @accent;
+ box-shadow: none;
+}
+
+.control-center-dnd:checked {
+ background: @accent;
+}
+
+.control-center-dnd slider {
+ background: @background;
+ border-radius: 8px;
+}
+
+.control-center {
+ background: @background-alpha;
+ border-radius: 10px;
+ background-clip: border-box;
+ padding: 4px;
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
+ 0 2px 6px 2px rgba(0, 0, 0, 0.3);
+ color: @foreground;
+ border: 2px solid @accent;
+}
+
+.control-center-list {
+ background: transparent;
+}
+
+.floating-notifications {
+ background: transparent;
+}
+
+/* Window behind control center and on all other monitors */
+.blank-window {
+ background: transparent;
+}
+
+/*** Widgets ***/
+
+/* Title widget */
+.widget-title {
+ margin: 8px;
+ font-size: 1.5rem;
+}
+.widget-title > button {
+ font-size: initial;
+ color: @foreground;
+ text-shadow: none;
+ background: @background;
+ border: 2px solid @accent;
+ box-shadow: none;
+ border-radius: 8px;
+}
+.widget-title > button:hover {
+ background: @background;
+}
+
+/* DND widget */
+.widget-dnd {
+ margin: 8px;
+ font-size: 1.1rem;
+}
+.widget-dnd > switch {
+ font-size: initial;
+ border-radius: 8px;
+ background: @background;
+ border: 1px solid @accent;
+ box-shadow: none;
+}
+.widget-dnd > switch:checked {
+ background: @accent;
+}
+.widget-dnd > switch slider {
+ background: @background;
+ border-radius: 8px;
+ border: 1px solid @foreground;
+}
+
+/* Label widget */
+.widget-label {
+ margin: 8px;
+}
+.widget-label > label {
+ font-size: 1.1rem;
+}
+
+/* Mpris widget */
+.widget-mpris {
+ /* The parent to all players */
+}
+.widget-mpris-player {
+ padding: 8px;
+ margin: 8px;
+ background-color: @background;
+ border-radius: 8px;
+ border: 2px solid @accent;
+ color: @foreground;
+}
+.widget-mpris-title {
+ font-weight: bold;
+ font-size: 1.25rem;
+}
+.widget-mpris-subtitle {
+ font-size: 1.1rem;
+}
\ No newline at end of file
diff --git a/users/rouven/modules/hyprland/waybar.nix b/users/rouven/modules/sway/waybar.nix
similarity index 79%
rename from users/rouven/modules/hyprland/waybar.nix
rename to users/rouven/modules/sway/waybar.nix
index 6534dc0..89fc1b9 100644
--- a/users/rouven/modules/hyprland/waybar.nix
+++ b/users/rouven/modules/sway/waybar.nix
@@ -1,17 +1,18 @@
-{ self, config, pkgs, hyprland, ... }:
+{ self, config, pkgs, ... }:
{
- systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin";
+ systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.swaynotificationcenter}/bin";
programs.waybar = {
enable = true;
systemd.enable = true;
- package = hyprland.packages.x86_64-linux.waybar-hyprland;
+ # package = hyprland.packages.x86_64-linux.waybar-hyprland;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 26;
- modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ];
- modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ];
+ # modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ];
+ modules-left = [ "sway/workspaces" "custom/spotifytitle" "sway/window" ];
+ modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "custom/notification" "clock" ];
network = {
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = " {ipaddr}/{cidr}";
@@ -20,13 +21,34 @@
format-disconnected = "Disconnected ⚠";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
- "wlr/workspaces" = {
+ "sway/workspaces" = {
format = "{icon}";
on-click = "activate";
};
- "hyprland/window" = {
+ "sway/window" = {
format = " {}";
- separate-outputs = true;
+ # separate-outputs = true;
+ };
+
+ "custom/notification" = {
+ tooltip = false;
+ format = "{icon} ";
+ format-icons = {
+ notification = "";
+ none = "";
+ dnd-notification = "";
+ dnd-none = "";
+ inhibited-notification = "";
+ inhibited-none = "";
+ dnd-inhibited-notification = "";
+ dnd-inhibited-none = "";
+ };
+ return-type = "json";
+ # exec-if = "which swaync-client";
+ exec = "swaync-client -swb";
+ on-click = "swaync-client -t -sw";
+ on-click-right = "swaync-client -d -sw";
+ escape = true;
};
"custom/spotifytitle" = {
@@ -108,6 +130,7 @@
}
#custom-spotifytitle,
+ #custom-notification,
#clock,
#battery,
#cpu,
@@ -193,6 +216,7 @@
color: #${config.colorScheme.colors.base01};
}
+ #custom-notification,
#tray {
background-color: #${config.colorScheme.colors.base01};
color: #${config.colorScheme.colors.base05};