diff --git a/flake.lock b/flake.lock index 17976ee..ec661d8 100644 --- a/flake.lock +++ b/flake.lock @@ -68,11 +68,11 @@ ] }, "locked": { - "lastModified": 1765794845, - "narHash": "sha256-YD5QWlGnusNbZCqR3pxG8tRxx9yUXayLZfAJRWspq2s=", + "lastModified": 1766150702, + "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=", "owner": "nix-community", "repo": "disko", - "rev": "7194cfe5b7a3660726b0fe7296070eaef601cae9", + "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378", "type": "github" }, "original": { @@ -173,11 +173,11 @@ ] }, "locked": { - "lastModified": 1765860045, - "narHash": "sha256-7Lxp/PfOy4h3QIDtmWG/EgycaswqRSkDX4DGtet14NE=", + "lastModified": 1766387499, + "narHash": "sha256-AjK3/UKDzeXFeYNLVBaJ3+HLE9he1g5UrlNd4/BM3eA=", "owner": "nix-community", "repo": "home-manager", - "rev": "09de9577d47d8bffb11c449b6a3d24e32ac16c99", + "rev": "527ad07e6625302b648ed3b28c34b62a79bd103e", "type": "github" }, "original": { @@ -216,11 +216,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1764763336, - "narHash": "sha256-007DlZGjQ3ziQ5UMjt3GdjBAbgAtHgMwOxMY2v7/b7c=", + "lastModified": 1766321686, + "narHash": "sha256-icOWbnD977HXhveirqA10zoqvErczVs3NKx8Bj+ikHY=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "1ccd57f177539ed8c207b893c3f9798d88f87d2e", + "rev": "7d433bf89882f61621f95082e90a4ab91eb0bdd3", "type": "gitlab" }, "original": { @@ -295,11 +295,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1765687488, - "narHash": "sha256-7YAJ6xgBAQ/Nr+7MI13Tui1ULflgAdKh63m1tfYV7+M=", + "lastModified": 1766014764, + "narHash": "sha256-+73VffE5GP5fvbib6Hs1Su6LehG+9UV1Kzs90T2gBLA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d02bcc33948ca19b0aaa0213fe987ceec1f4ebe1", + "rev": "2b0d2b456e4e8452cf1c16d00118d145f31160f9", "type": "github" }, "original": { @@ -311,11 +311,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1765779637, - "narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=", + "lastModified": 1766309749, + "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1306659b587dc277866c7b69eb97e5f07864d8c4", + "rev": "a6531044f6d0bef691ea18d4d4ce44d0daa6e816", "type": "github" }, "original": { @@ -327,11 +327,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1765779637, - "narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=", + "lastModified": 1766309749, + "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1306659b587dc277866c7b69eb97e5f07864d8c4", + "rev": "a6531044f6d0bef691ea18d4d4ce44d0daa6e816", "type": "github" }, "original": { @@ -410,11 +410,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1765946036, - "narHash": "sha256-R/qaIkzqm00qBMr8onM6ZZFX49lvsQLZ79adVubqjts=", + "lastModified": 1766410104, + "narHash": "sha256-Eh+TUdb4CGscBLG3Q6QOQOjEdPCmHPClGyeHf4F67Mk=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "7db019a64483743a8d92319baafbbe71b687d0a1", + "rev": "eaff1bc54b9a8bd698c2dc47823400460e9f38a0", "type": "github" }, "original": { diff --git a/hosts/triforce/default.nix b/hosts/triforce/default.nix index 017b663..ab1a918 100644 --- a/hosts/triforce/default.nix +++ b/hosts/triforce/default.nix @@ -10,9 +10,9 @@ in { ../../modules ../../modules/desktop - ../../modules/gaming - ../../modules/gnome - ../../modules/sway + ../../modules/desktop/gaming + ../../modules/desktop/gnome + ../../modules/desktop/sway nix-flatpak.nixosModules.nix-flatpak agenix.nixosModules.default diff --git a/modules/desktop/packages.nix b/modules/desktop/packages.nix index d8369d2..fa3d481 100644 --- a/modules/desktop/packages.nix +++ b/modules/desktop/packages.nix @@ -44,8 +44,8 @@ unstable.adwaita-fonts twitter-color-emoji twemoji-color-font - # (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) nerd-fonts.jetbrains-mono + local.amy-mono ]; fontconfig = { diff --git a/modules/server/taf/default.nix b/modules/server/taf/default.nix index 63a6fa1..42bcea6 100644 --- a/modules/server/taf/default.nix +++ b/modules/server/taf/default.nix @@ -85,6 +85,7 @@ } # Crans Root elsif anyof ( + address :is :all "To" "root@crans.org", address :is :all "From" "root@crans.org", address :is :all "From" "www-data@crans.org" ) { diff --git a/pkgs/amy-mono/default.nix b/pkgs/amy-mono/default.nix new file mode 100644 index 0000000..3037ef7 --- /dev/null +++ b/pkgs/amy-mono/default.nix @@ -0,0 +1,37 @@ +{ + lib, + stdenvNoCC, + fetchurl, +}: + +stdenvNoCC.mkDerivation { + pname = "amy-mono"; + version = "0"; + + src = fetchurl { + name = "amy-mono"; + url = "https://www.ameliathe1st.gay/docs/AmyMono-Regular.otf"; + hash = "sha256-2P70KiyRZc2xYpjpdLBWgBVYIFa8XYG2YYnPhL/eBhI="; + recursiveHash = true; + downloadToTemp = true; + postFetch = '' + mkdir $out + mv $downloadedFile $out/AmyMono-Regular.otf + ''; + }; + + unpackPhase = ":"; + + installPhase = '' + runHook preInstall + install -Dm644 -t "$out/share/fonts/opentype/" "$src/AmyMono-Regular.otf" + runHook postInstall + ''; + + meta = { + description = "Amelia's Amy Mono font"; + homepage = "https://www.ameliathe1st.gay/"; + license = lib.licenses.ofl; # As per our personal messages + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 5aabb01..dc7caa9 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,4 +4,5 @@ quadcastrgb = pkgs.callPackage ./quadcastrgb { }; ens-intel-unite = pkgs.callPackage ./ens-intel-unite { }; KhinsiderDownloader = pkgs.callPackage ./KhinsiderDownloader { }; + amy-mono = pkgs.callPackage ./amy-mono { }; } diff --git a/users/lyes/desktop/home.nix b/users/lyes/desktop/home.nix index e18c574..9e86139 100644 --- a/users/lyes/desktop/home.nix +++ b/users/lyes/desktop/home.nix @@ -16,6 +16,7 @@ in { imports = [ ./dconf.nix + ./sway.nix ]; # Directories @@ -101,6 +102,21 @@ in extensions = map (x: { id = x.extensionUuid; package = x; }) extensions; }; + # Cursor + home.pointerCursor = { + enable = true; + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + size = 24; + x11 = { + enable = true; + defaultCursor = "Adwaita"; + }; + dotIcons.enable = true; + gtk.enable = true; + sway.enable = true; + }; + # Background xdg.configFile."background".source = ./background; @@ -123,4 +139,6 @@ in } ''; }; + + services.mpd-mpris.enable = true; } diff --git a/users/lyes/desktop/packages.nix b/users/lyes/desktop/packages.nix index a768f1c..042b77d 100644 --- a/users/lyes/desktop/packages.nix +++ b/users/lyes/desktop/packages.nix @@ -166,6 +166,9 @@ in { # Flatpaks services.flatpak = lib.mkIf (config?services.flatpak.packages) { packages = [ + # Internet + "net.waterfox.waterfox" + # Messaging "org.signal.Signal" diff --git a/users/lyes/desktop/sway.nix b/users/lyes/desktop/sway.nix new file mode 100644 index 0000000..c57adbc --- /dev/null +++ b/users/lyes/desktop/sway.nix @@ -0,0 +1,1092 @@ +{ pkgs, lib, config, ... }: + +let + cfg = config.wayland.windowManager.sway; + bg = "#150F19"; + fg = "#D099F5"; + bg-inactive = "#6b4c7f"; + bg-urgent = "#f47a99"; + laptop-screen-name = "eDP-2"; +in +{ + wayland.windowManager.sway = { + enable = true; + checkConfig = true; + wrapperFeatures = { + base = true; + gtk = true; + }; + systemd = { + enable = true; + xdgAutostart = true; + }; + swaynag.enable = true; + config = { + startup = [ + { command = "poweralertd"; } + { + command = '' + swayidle -w \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + before-sleep 'swaylock -f -c 000000' + ''; + } + ]; + + modifier = "Mod4"; + menu = "${pkgs.wofi}/bin/wofi --show drun"; + # Switch to ghostty ? + terminal = "${pkgs.gnome-console}/bin/kgx"; + + output = { + "*" = { + bg = "~/.config/background fill #2c6325"; + }; + + "${laptop-screen-name}" = { + scale = "1.25"; + mode = "2560x1600@165Hz"; + # pos = "1920 0 res 2880x1800"; + }; + }; + + input = { + "type:keyboard" = { + xkb_layout = "fr"; + xkb_variant = "oss"; + }; + + "type:touchpad" = { + dwt = "disabled"; + click_method = "button_areas"; + tap = "enabled"; + natural_scroll = "enabled"; + drag_lock = "disabled"; + }; + + # "2362:628:PIXA3854:00_093A:0274_Touchpad" = { + # dwt = "disabled"; + # click_method = "button_areas"; + # tap = "enabled"; + # natural_scroll = "enabled"; + # }; + + # "12972:24:Framework_Laptop_16_Keyboard_Module_-_ISO" = { + # xkb_layout = "fr"; + # xkb_variant = "oss"; + # }; + }; + + window = { + commands = [ + { + command = ''title_format "[XWayland] %title"''; + criteria = { + shell = "xwayland"; + }; + } + { + command = "inhibit_idle fullscreen"; + criteria = { + app_id = "^.*"; + }; + } + ]; + }; + + floating.modifier = "${cfg.config.modifier} normal"; + + keybindings = lib.mkOptionDefault { + "${cfg.config.modifier}+n" = "exec ${pkgs.nautilus}/bin/nautilus -w"; + "${cfg.config.modifier}+Shift+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; + + "${cfg.config.modifier}+e" = lib.mkForce "exec ${pkgs.wlogout}/bin/wlogout"; + + "${cfg.config.modifier}+ampersand" = "workspace 1"; + "${cfg.config.modifier}+eacute" = "workspace 2"; + "${cfg.config.modifier}+quotedbl" = "workspace 3"; + "${cfg.config.modifier}+apostrophe" = "workspace 4"; + "${cfg.config.modifier}+parenleft" = "workspace 5"; + "${cfg.config.modifier}+minus" = "workspace 6"; + "${cfg.config.modifier}+egrave" = "workspace 7"; + "${cfg.config.modifier}+underscore" = "workspace 8"; + "${cfg.config.modifier}+ccedilla" = "workspace 9"; + "${cfg.config.modifier}+agrave" = "workspace 10"; + + "${cfg.config.modifier}+Shift+ampersand" = "move container to workspace 1"; + "${cfg.config.modifier}+Shift+eacute" = "move container to workspace 2"; + "${cfg.config.modifier}+Shift+quotedbl" = "move container to workspace 3"; + "${cfg.config.modifier}+Shift+apostrophe" = "move container to workspace 4"; + "${cfg.config.modifier}+Shift+parenleft" = "move container to workspace 5"; + "${cfg.config.modifier}+Shift+minus" = "move container to workspace 6"; + "${cfg.config.modifier}+Shift+egrave" = "move container to workspace 7"; + "${cfg.config.modifier}+Shift+underscore" = "move container to workspace 8"; + "${cfg.config.modifier}+Shift+ccedilla" = "move container to workspace 9"; + "${cfg.config.modifier}+Shift+agrave" = "move container to workspace 10"; + + "${cfg.config.modifier}+Shift+equal" = "move scratchpad"; + "${cfg.config.modifier}+equal" = "scratchpad show"; + + "Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" "$HOME/Images/Captures d’écran/grim/$(date --iso-8601=seconds).png"''; + "Shift+Print" = ''exec ${pkgs.grim}/bin/grim -c -o ${laptop-screen-name} "$HOME/Images/Captures d’écran/grim/$(date --iso-8601=seconds).png"''; + }; + + # bindswitches = { + # "lid:on" = { + # reload = true; + # locked = true; + # action = "output ${laptop-screen-name} disable"; + # }; + # "lid:off" = { + # reload = true; + # locked = true; + # action = "output ${laptop-screen-name} enable"; + # }; + # }; + + bars = [ + { + command = "${pkgs.waybar}/bin/waybar"; + position = "bottom"; + } + ]; + + fonts = { + names = ["Amy Mono" "JetBrains Mono NFP" "Adwaita"]; + }; + + colors = { + background = bg; + unfocused = { + background = bg; + border = bg; + childBorder = bg; + indicator = bg; + text = fg; + }; + focused = { + background = fg; + border = fg; + childBorder = fg; + indicator = fg; + text = bg; + }; + focusedInactive = { + background = bg-inactive; + border = bg-inactive; + childBorder = bg-inactive; + indicator = bg-inactive; + text = bg; + }; + placeholder = { + background = bg; + border = bg; + childBorder = bg; + indicator = bg; + text = fg; + }; + urgent = { + background = bg-urgent; + border = bg-urgent; + childBorder = bg-urgent; + indicator = bg-urgent; + text = bg; + }; + }; + }; + + extraConfigEarly = '' + exec --no-startup-id lxpolkit + ''; + + extraConfig = '' + # Gestures + bindgesture swipe:right workspace prev + bindgesture swipe:left workspace next + bindgesture swipe:down workspace prev + bindgesture swipe:up workspace next + + # Special keys to adjust volume via PulseAudio + # bindsym --locked XF86AudioMute exec ${pkgs.wireplumber}/bin/wpctl set-mute \@DEFAULT_SINK@ toggle + # bindsym --locked XF86AudioLowerVolume exec ${pkgs.wireplumber}/bin/wpctl set-volume \@DEFAULT_SINK@ 5%- + # bindsym --locked XF86AudioRaiseVolume exec ${pkgs.wireplumber}/bin/wpctl set-volume \@DEFAULT_SINK@ 5%+ + # bindsym --locked XF86AudioMicMute exec ${pkgs.wireplumber}/bin/wpctl set-mute \@DEFAULT_SOURCE@ toggle + # bindsym --locked Shift+XF86AudioLowerVolume exec ${pkgs.wireplumber}/bin/wpctl set-volume \@DEFAULT_SOURCE@ 5%- + # bindsym --locked Shift+XF86AudioRaiseVolume exec ${pkgs.wireplumber}/bin/wpctl set-volume \@DEFAULT_SOURCE@ 5%+ + + bindsym --locked XF86AudioMute exec ${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle + bindsym --locked XF86AudioLowerVolume exec ${pkgs.swayosd}/bin/swayosd-client --output-volume lower --max-volume 120 + bindsym --locked XF86AudioRaiseVolume exec ${pkgs.swayosd}/bin/swayosd-client --output-volume raise --max-volume 120 + bindsym --locked Shift+XF86AudioMute exec ${pkgs.swayosd}/bin/swayosd-client --input-volume mute-toggle + bindsym --locked Shift+XF86AudioLowerVolume exec ${pkgs.swayosd}/bin/swayosd-client --input-volume lower --max-volume 100 + bindsym --locked Shift+XF86AudioRaiseVolume exec ${pkgs.swayosd}/bin/swayosd-client --input-volume raise --max-volume 100 + + # Special keys to adjust brightness via brightnessctl + # bindsym --locked XF86MonBrightnessDown exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%- + # bindsym --locked XF86MonBrightnessUp exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%+ + + bindsym --locked XF86MonBrightnessDown exec ${pkgs.swayosd}/bin/swayosd-client --brightness -5 + bindsym --locked XF86MonBrightnessUp exec ${pkgs.swayosd}/bin/swayosd-client --brightness +5 + + bindsym XF86AudioPlay exec ${pkgs.swayosd}/bin/swayosd-client --playerctl play-pause + bindsym XF86AudioNext exec ${pkgs.swayosd}/bin/swayosd-client --playerctl next + bindsym --release Caps_Lock exec ${pkgs.swayosd}/bin/swayosd-client --caps-lock + + # + # Status Bar: + # + # Read `man 5 sway-bar` for more information about this section. + # bar { + # swaybar_command waybar + + # position bottom + + # # When the status_command prints a new line to stdout, swaybar updates. + # # The default just shows the current date and time. + # status_command while date +'%Y-%m-%d %X'; do sleep 1; done + + # colors { + # statusline #ffffff + # background #323232 + # inactive_workspace #32323200 #32323200 #5c5c5c + # } + # } + ''; + }; + + # xdg.portal.wlr.enable = true; + + services = { + swayosd.enable = true; + swaync = { + enable = true; + + # From @shvedes on github + settings = { + # "$schema" = "/etc/xdg/swaync/configSchema.json"; + "positionX" = "left"; + "positionY" = "top"; + "layer" = "overlay"; + "control-center-margin-top" = 10; + "control-center-margin-bottom" = 10; + "control-center-margin-right" = 10; + "control-center-margin-left" = 10; + "notification-icon-size" = 64; + "notification-body-image-height" = 100; + "notification-body-image-width" = 200; + "timeout" = 10; + "timeout-low" = 5; + "timeout-critical" = 0; + "fit-to-screen" = false; + "control-center-width" = 500; + "control-center-height" = 1025; + "notification-window-width" = 440; + "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" + "notifications" + "mpris" + "volume" + "buttons-grid" + ]; + "widget-config" = { + "title" = { + "text" = "Notification Center"; + "clear-all-button" = true; + "button-text" = "󰆴 Clear All"; + }; + "dnd" = { + "text" = "Do Not Disturb"; + }; + "label" = { + "max-lines" = 1; + "text" = "Notification Center"; + }; + "mpris" = { + "image-size" = 96; + "image-radius" = 7; + }; + "volume" = { + "label" = "󰕾"; + "show-per-app" = true; + }; + "buttons-grid" = { + "actions" = [ + { + "label" = "󰐥"; + "command" = "systemctl poweroff"; + } + { + "label" = "󰜉"; + "command" = "systemctl reboot"; + } + { + "label" = "󰌾"; + "command" = "${pkgs.swaylock}/bin/swaylock -f -c 000000"; + } + { + "label" = "󰍃"; + "command" = "${pkgs.sway}/bin/swaymsg exit"; + } + { + "label" = "󰤄"; + "command" = "systemctl suspend"; + } + { + "label" = "󰖩"; + "command" = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; + } + { + "label" = "󰂯"; + "command" = "${pkgs.blueman}/bin/blueman-manager"; + } + ]; + }; + }; + }; + style = '' + /* + @define-color cc-bg #32302f; + @define-color noti-border-color #32302f; + @define-color noti-bg #3c3836; + @define-color noti-bg-darker #3c3836; + @define-color noti-bg-hover rgb(27, 27, 43); + @define-color noti-bg-focus rgba(27, 27, 27, 0.6); + @define-color text-color #f9f5d7; + @define-color text-color-disabled #bdae93; + @define-color bg-selected #fabd2f; + */ + + @define-color cc-bg ${bg}; + @define-color noti-border-color ${fg}; + @define-color noti-bg ${bg}; + @define-color noti-bg-darker ${bg}; + @define-color noti-bg-hover ${bg}; + @define-color noti-bg-focus ${bg}; + @define-color text-color ${fg}; + @define-color text-color-disabled ${fg}; + @define-color bg-selected ${bg}; + + * { + font-family: JetBrainsMono NFP; + font-weight: bold; + font-size: 14px; + } + + .notification-row *, + .control-center-list * { + background: transparent; + border-radius: 0; + } + + .control-center .notification-row:focus, + .control-center .notification-row:hover { + opacity: 1; + background: @noti-bg-darker; + } + + .notification-row { + outline: none; + margin: 20px; + padding: 0; + background: transparent; + } + + .notification { + background: transparent; + margin: 0px; + border: none; + } + + .notification-content { + background: @cc-bg; + padding: 7px; + border-radius: 0px; + border: 2px solid ${fg}; + margin: 0; + } + + .close-button { + background: ${fg}; + color: @cc-bg; + text-shadow: none; + padding: 0; + border-radius: 0px; + margin-top: 5px; + margin-right: 5px; + } + + .close-button:hover { + box-shadow: none; + background: ${fg}; + transition: all .15s ease-in-out; + border: none + } + + .notification-action { + color: ${fg}; + border: 2px solid ${fg}; + border-radius: 0px; + background: ${bg}; + } + + .notification-default-action, + color: ${bg}; + background: ${fg}; + border-radius: 0; + } + + .summary { + padding-top: 7px; + font-size: 13px; + color: ${fg}; + } + + .time { + font-size: 11px; + color: ${fg}; + margin-right: 24px + } + + .body { + font-size: 12px; + color: ${fg}; + } + + .control-center { + background: @cc-bg; + border: 2px solid ${fg}; + border-radius: 0px; + } + + .control-center-list { + background: transparent; + } + + .control-center-list-placeholder { + opacity: .5; + } + + .floating-notifications { + background: transparent; + } + + .blank-window { + background: alpha(black, 0.1); + } + + .widget-title { + color: ${fg}; + background: @noti-bg-darker; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + font-size: 1.5rem; + border-radius: 5px; + } + + .widget-title>button { + font-size: 1rem; + color: @text-color; + text-shadow: none; + background: @noti-bg; + box-shadow: none; + border-radius: 5px; + } + + .widget-title>button:hover { + background: ${fg}; + color: @cc-bg; + } + + .widget-dnd { + background: @noti-bg-darker; + padding: 5px 10px; + margin: 5px 10px 10px 10px; + border-radius: 5px; + font-size: large; + color: ${fg}; + } + + .widget-dnd>switch { + border-radius: 4px; + background: ${fg}; + } + + .widget-dnd>switch:checked { + background: ${fg}; + border: 1px solid ${fg}; + } + + .widget-dnd>switch slider { + background: @cc-bg; + border-radius: 5px; + } + + .widget-dnd>switch:checked slider { + background: @cc-bg; + border-radius: 5px; + } + + .widget-label { + margin: 10px 10px 5px 10px; + } + + .widget-label>label { + font-size: 1rem; + color: @text-color; + } + + .widget-mpris { + color: @text-color; + background: @noti-bg-darker; + padding: 5px 10px 0px 0px; + margin: 5px 10px 5px 10px; + border-radius: 0px; + } + + .widget-mpris > box > button { + border-radius: 5px; + } + + .widget-mpris-player { + padding: 5px 10px; + margin: 10px; + } + + .widget-mpris-title { + font-weight: 700; + font-size: 1.25rem; + } + + .widget-mpris-subtitle { + font-size: 1.1rem; + } + + .widget-buttons-grid { + font-size: x-large; + padding: 5px; + margin: 5px 10px 10px 10px; + border-radius: 5px; + background: @noti-bg-darker; + } + + .widget-buttons-grid>flowbox>flowboxchild>button { + margin: 3px; + background: @cc-bg; + border-radius: 5px; + color: @text-color; + } + + .widget-buttons-grid>flowbox>flowboxchild>button:hover { + background: ${fg}; + color: @cc-bg; + } + + .widget-menubar>box>.menu-button-bar>button { + border: none; + background: transparent; + } + + .topbar-buttons>button { + border: none; + background: transparent; + } + ''; + }; + + blueman-applet = { + enable = true; + systemdTargets = [ + "sway-session.target" + ]; + }; + }; + + programs = { + wofi = { + enable = true; + settings = {}; + style = '' + window { + margin: 5px; + border: 2px solid ${fg}; + background-color: ${fg}; + } + + #input { + margin: 5px; + border: 2px solid ${bg}; + background-color: ${bg}; + } + + #inner-box { + margin: 5px; + border: 2px solid ${bg}; + background-color: ${bg}; + } + + #outer-box { + margin: 1px; + border: 2px solid ${bg}; + background-color: ${bg}; + } + + #scroll { + margin: 5px; + border: 2px solid ${bg}; + background-color: ${bg}; + } + + #text { + margin: 5px; + border: 2px ${bg}; + color: ${fg}; + } + + #entry:selected { + background-color: ${fg}; + } + + #text:selected { + color: ${bg}; + } + ''; + }; + + waybar = { + enable = true; + # From https://github.com/saatvik333/niri-dotfiles + settings = { + mainBar = { + reload_style_on_change = true; + toggle = true; + layer = "top"; + position = "left"; + margin-top = 0; + margin-bottom = 0; + margin-left = 0; + margin-right = 0; + spacing = 0; + modules-left = ["custom/notification" "clock" "cpu"]; + modules-center = ["mpd" "sway/workspaces" "privacy"]; + modules-right = [ + "group/extras" + "network" + "bluetooth" + "pulseaudio#microphone" + "group/audio" + "group/brightness" + "battery" + ]; + + "custom/notification" = { + "tooltip" = true; + "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"; + # format = "󰂚"; + # tooltip = false; + on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; + on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw"; + escape = true; + }; + "group/extras" = { + "orientation" = "inherit"; + "drawer" = { + "transition-duration" = 400; + "children-class" = "extras"; + "transition-left-to-right" = false; + }; + "modules" = [ + "custom/menu" + "tray" + ]; + }; + "group/brightness" = { + "orientation" = "inherit"; + "drawer" = { + "transition-duration" = 400; + "children-class" = "brightness"; + "transition-left-to-right" = false; + }; + "modules" = [ + "backlight" + "backlight/slider" + ]; + }; + "group/audio" = { + "orientation" = "inherit"; + "drawer" = { + "transition-duration" = 400; + "children-class" = "audio"; + "transition-left-to-right" = false; + }; + "modules" = [ + "pulseaudio" + "pulseaudio/slider" + ]; + }; + "sway/workspaces" = { + "format" = "{icon}"; + "on-click" = "activate"; + "format-icons" = { + "1" = ""; + "2" = ""; + "3" = ""; + "4" = ""; + "5" = ""; + "default" = "󰄰"; + "active" = "󰄯"; + }; + "sort-by-number" = true; + }; + "cpu" = { + "format" = "{icon}"; + "format-icons" = [ + "" + "" + "" + "" + "" + "" + ]; + "interval" = 1; + "tooltip" = true; + "tooltip-format" = "CPU Frequency = {avg_frequency} GHz"; + "on-click" = "alacritty -e btm"; + }; + "clock" = { + "interval" = 1; + "format" = "{:%H\n%M\n%S}"; + "format-alt" = "{:%d\n%m\n%y}"; + "tooltip-format" = "{calendar}"; + }; + "mpd" = { + "format" = "󰏤"; + "format-paused" = "󰐊"; + "interval" = 1; + "on-click" = "${pkgs.mpc}/bin/mpc toggle"; + "on-click-right" = "${pkgs.mpc}/bin/mpc next"; + "on-click-middle" = "${pkgs.mpc}/bin/mpc previous"; + "tooltip" = true; + "tooltip-format" = "{title}"; + }; + "custom/menu" = { + "format" = "󰅃"; + "tooltip" = false; + }; + "tray" = { + "spacing" = 16; + "reverse-direction" = true; + "icon-size" = 16; + "show-passive-items" = false; + }; + "privacy" = { + "icon-size" = 14; + "transition-duration" = 250; + "modules" = [ + { + "type" = "screenshare"; + "tooltip" = false; + } + ]; + "ignore" = [ + { + "type" = "screenshare"; + "name" = "obs"; + } + ]; + }; + "network" = { + "format-icons" = { + "wifi" = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + "ethernet" = "󰈀"; + "disabled" = "󰤭"; + "disconnected" = "󰤩"; + }; + "format-wifi" = "{icon}"; + "format-ethernet" = "{icon}"; + "format-disconnected" = "{icon}"; + "format-disabled" = "{icon}"; + "interval" = 5; + "tooltip-format" = "{essid}\t{gwaddr}"; + "on-click" = "rfkill toggle wifi"; + "on-click-right" = "${pkgs.networkmanagerapplet}nm-connection-editor"; + "tooltip" = true; + "max-length" = 20; + }; + "bluetooth" = { + "interval" = 5; + "format-on" = "󰂯"; + "format-off" = "󰂲"; + "format-disabled" = "󰂲"; + "format-connected" = "󰂱"; + "format-no-controller" = "span size='14pt'>󰂯"; + "tooltip" = true; + "tooltip-format" = "{device_enumerate}"; + "tooltip-format-enumerate-connected" = "{device_address}"; + "tooltip-format-enumerate-connected-battery" = "{device_address} | Battery = {device_battery_percentage}%"; + "on-click" = "rfkill toggle bluetooth"; + "on-click-right" = "${pkgs.blueman}/bin/blueman-manager"; + }; + "pulseaudio#microphone" = { + "format" = "{format_source}"; + "format-source" = "󰍬"; + "format-source-muted" = "󰍭"; + "on-click" = "pactl set-source-mute @DEFAULT_SOURCE@ toggle"; + "on-click-right" = "pavucontrol -t 4"; + "tooltip" = false; + }; + "pulseaudio/slider" = { + "min" = 0; + "max" = 100; + "orientation" = "vertical"; + }; + "pulseaudio" = { + "interval" = 1; + "format" = "{icon}"; + "format-icons" = [ + "󰕿" + "󰖀" + "󰕾" + ]; + "format-muted" = "󰝟"; + "on-click-right" = "pavucontrol -t 3"; + "on-click" = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; + "reverse-scrolling" = true; + "tooltip" = true; + "tooltip-format" = "Volume = {volume}%\n{desc}"; + "ignored-sinks" = [ + "Easy Effects Sink" + ]; + }; + "backlight/slider" = { + "min" = 0; + "max" = 100; + "orientation" = "vertical"; + "device" = "intel_backlight"; + }; + "backlight" = { + "device" = "intel_backlight"; + "format" = "{icon}"; + "format-icons" = [ + "󰃚" + "󰃛" + "󰃜" + "󰃝" + "󰃞" + "󰃟" + "󰃠" + ]; + "reverse-scrolling" = true; + "smooth-scrolling-threshold" = 0.2; + "tooltip" = false; + }; + "battery" = { + "interval" = 5; + "states" = { + "critical" = 10; + }; + "format" = "{icon}"; + "format-icons" = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + "format-charging" = "󰂄"; + "format-plugged" = "󰚥"; + "format-critical" = "󰂃"; + "tooltip" = true; + "tooltip-format" = "Charge = {capacity}%"; + "tooltip-format-charging" = "Charging = {capacity}%"; + }; + "custom/powermenu" = { + "format" = "󰐥"; + "on-click" = "$HOME/.config/rofi/powermenu/powermenu.sh"; + "tooltip" = false; + }; + }; + }; + + style = '' + @define-color background ${bg}; + @define-color foreground ${fg}; + @define-color color1 #F38BA8; + @define-color color2 #A6E3A1; + @define-color color3 #F9E2AF; + @define-color color4 #89B4FA; + + * { + font-family: "JetBrainsMono NFP"; + font-size: 14pt; + border-radius: 0; + box-shadow: none; + } + + window#waybar { + background: @background; + } + + #custom-notification:hover, + #cpu:hover, + #network:hover, + #bluetooth:hover, + #pulseaudio:hover, + #pulseaudio.microphone:hover, + #pulseaudio.sink-muted:hover, + #brightness:hover, + #battery:hover, + #mpd:hover, + #custom-powermenu:hover { + opacity: 0.5; + } + + #custom-notification, + #cpu, + #clock, + #custom-menu, + #tray, + #privacy, + #network, + #bluetooth, + #pulseaudio, + #pulseaudio.microphone, + #backlight, + #battery, + #mpd, + #custom-powermenu { + color: @foreground; + padding: 6px 0; + } + + #workspaces button { + color: @foreground; + padding: 6px 0; + } + #workspaces button.active { + color: @color2; + } + #workspaces button.focused { + background: @foreground; + color: @background; + } + + #privacy { + margin: 4px; + color: @color3; + } + + #clock { + color: @foreground; + font-size: 16pt; + } + + #network { + padding-right: 6px; + } + + #network.disabled { + color: @color1; + } + #network.wifi { + color: @color2; + } + #network.ethernet { + color: @color3; + } + + #bluetooth.disabled { + color: @color1; + } + #bluetooth.connected { + color: @color4; + } + + #pulseaudio.sink-muted:not(.microphone) { + color: @color3; + } + #pulseaudio.microphone.source-muted { + color: @color1; + } + + #battery.plugged { + color: @color4; + } + #battery.charging { + color: @color2; + } + #battery.critical { + color: @color3; + } + + tooltip { + background: @background; + border: 1px solid @foreground; + } + tooltip * { + color: @foreground; + margin: 2px; + background: @background; + } + + #pulseaudio-slider, + #backlight-slider { + min-height: 80px; + } + + #pulseaudio-slider slider, + #backlight-slider slider { + background: transparent; + } + + #pulseaudio-slider trough, + #backlight-slider trough { + min-width: 8px; + } + + #pulseaudio-slider highlight { + background: @color4; + } + #backlight-slider highlight { + background: @color3; + } + ''; + }; + }; + + # services.network-manager-applet = { + # enable = true; + # }; +} diff --git a/users/lyes/home/editors/helix.nix b/users/lyes/home/editors/helix.nix index 5b502b0..e9fe010 100644 --- a/users/lyes/home/editors/helix.nix +++ b/users/lyes/home/editors/helix.nix @@ -6,7 +6,8 @@ defaultEditor = true; settings = { - theme = "gruvbox_dark_hard"; + # theme = "gruvbox_dark_hard"; + theme = "rose_pine_moon"; editor = { rulers = [ 80 ];