diff --git a/flake.lock b/flake.lock index 2b5ec673..a87fe6a3 100644 --- a/flake.lock +++ b/flake.lock @@ -161,6 +161,24 @@ "type": "github" } }, + "clipboard-sync": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1731355357, + "narHash": "sha256-kTXsO+hskCfX36+Ez1fHu9SO54uUY2lofkrbMKE3Vrk=", + "owner": "dnut", + "repo": "clipboard-sync", + "rev": "943e49e0a9a16b54bbab3704e99b6cf6ad4ea19f", + "type": "github" + }, + "original": { + "owner": "dnut", + "repo": "clipboard-sync", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1731098351, @@ -828,21 +846,24 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_4", + "nixpkgs": [ + "nixpkgs" + ], "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" }, "locked": { - "lastModified": 1750106438, - "narHash": "sha256-zaTFR6NLaXkveEGl2kdl4UlvT7eHm3cYSbgSkibCO+M=", + "lastModified": 1746735318, + "narHash": "sha256-iN0Ge4LaVT7rATqzIrAZFSdfYuIXbe4/HGcXle7qK1g=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "0ece4af36a988ad06b28ed666011d84372d9e4dc", + "rev": "9958d297641b5c84dcff93f9039d80a5ad37ab00", "type": "github" }, "original": { "owner": "hyprwm", + "ref": "v0.49.0", "repo": "Hyprland", "type": "github" } @@ -1610,15 +1631,15 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1749794982, - "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", - "owner": "NixOS", + "lastModified": 1717196966, + "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", + "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1892,6 +1913,7 @@ "catppuccin": "catppuccin", "chaotic": "chaotic", "ci": "ci", + "clipboard-sync": "clipboard-sync", "darwin": "darwin", "deploy-rs": "deploy-rs", "empty": "empty", diff --git a/flake.nix b/flake.nix index d7dda490..b667e546 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,12 @@ }; nix-gaming.url = "github:fufexan/nix-gaming"; - hyprland.url = "github:hyprwm/Hyprland"; + hyprland = { + url = "github:hyprwm/Hyprland/v0.49.0"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; split-monitor-workspaces = { url = "github:Duckonaut/split-monitor-workspaces"; inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended @@ -27,6 +32,7 @@ nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; }; + clipboard-sync.url = "github:dnut/clipboard-sync"; nixpkgs-xr.url = "github:nix-community/nixpkgs-xr"; infrastructure = { url = "github:gensokyo-zone/infrastructure/main"; diff --git a/home/environments/hyprland/hypridle.nix b/home/environments/hyprland/hypridle.nix new file mode 100644 index 00000000..0bff80c7 --- /dev/null +++ b/home/environments/hyprland/hypridle.nix @@ -0,0 +1,29 @@ +{pkgs, ...}: { + services.hypridle = { + enable = false; + listeners = [ + { + timeout = 150; + onTimeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 5"; + onResume = "${pkgs.brightnessctl}/bin/brightnessctl -r"; + } + { + timeout = 300; + onTimeout = "${pkgs.systemd}/bin/loginctl lock-session"; + } + { + timeout = 330; + onTimeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; + onResume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; + } + { + timeout = 600; + onTimeout = "${pkgs.systemd}/bin/systemctl suspend"; + } + ]; + beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session"; + afterSleepCmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; + lockCmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; + unlockCmd = "${pkgs.psmisc}/bin/killall hyprlock"; + }; +} diff --git a/home/environments/hyprland/hyprland.nix b/home/environments/hyprland/hyprland.nix index fcfb1377..c44a3b0e 100644 --- a/home/environments/hyprland/hyprland.nix +++ b/home/environments/hyprland/hyprland.nix @@ -42,6 +42,7 @@ ${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name" systemd = { enable = true; variables = ["--all"]; + enableXdgAutostart = true; extraCommands = [ "systemctl --user stop graphical-session.target" "systemctl --user start hyprland-session.target" @@ -85,9 +86,15 @@ ${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name" "ELECTRON_OZONE_PLATFORM_HINT,auto" "LIBVA_DRIVER_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia" - "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORM,wayland;xcb" + "MOZ_ENABLE_WAYLAND,1" + "NIXOS_OZONE_WL,1" + "XDG_CURRENT_DESKTOP,Hyprland" + "GDK_BACKEND,wayland,x11" + "CLUTTER_BACKEND,wayland" "__NV_DISABLE_EXPLICIT_SYNC,1" ]; + debug.disable_logs = false; exec-once = [ "${pkgs.swww}/bin/swww init" "${pkgs.hypridle}/bin/hypridle" diff --git a/home/environments/hyprland/hyprlock.nix b/home/environments/hyprland/hyprlock.nix index d2ace820..6ee012c8 100644 --- a/home/environments/hyprland/hyprlock.nix +++ b/home/environments/hyprland/hyprlock.nix @@ -1,5 +1,5 @@ _: { programs.hyprlock = { - enable = true; + enable = false; }; } diff --git a/home/environments/hyprland/waybar.nix b/home/environments/hyprland/waybar.nix index 739af1ff..ad57d8eb 100644 --- a/home/environments/hyprland/waybar.nix +++ b/home/environments/hyprland/waybar.nix @@ -12,9 +12,17 @@ _: { } window#waybar { - background: @theme_base_color; - border-bottom: 1px solid @unfocused_borders; - color: @theme_text_color; + all:unset; +} + + +.modules-left, .modules-right, .modules-center { + background: alpha(@base, 0.9); + box-shadow: 0px 0px 2px rgba(0,0,0,0.6); + color: @text; + padding: 5px; + margin: 2px 4px; + border: 1px solid @lavender; } tooltip { @@ -25,35 +33,80 @@ tooltip label { color: white; } +#workspaces { + border-right: 1px solid @surface2; +} + + #workspaces button.persistent { - background: shade(@insensitive_bg_color, 0.5); - color: shade(@insensitive_fg_color, 0.5); + background: @theme_unfocused_bg_color; + color: @subtext1; } #workspaces button { - padding: 0 5px; - background: @theme_unfocused_bg_color; + padding: 2px 5px; + background: @surface0; border-bottom: 3px solid transparent; } +#workspaces button.empty { + background: @crust; + color: @subtext1; +} + +#workspaces button.visible { + background: @pink; + color: @theme_selected_fg_color; + border-bottom: 3px solid @rosewater; +} + +#workspaces button.urgent { + background: @red; + color: @theme_selected_fg_color; +} + #workspaces button.active, #workspaces button.focused { background: @theme_selected_bg_color; color: @theme_selected_fg_color; border-bottom: 3px solid white; } -#mode, #clock, #battery, #idle_inhibitor, #tray, #window, #wireplumber, #bluetooth, #mpris { +#window { + padding: 0 10px; +} + +window#waybar.empty #window { + padding: 0px; + margin: 0px; +} + +#mode, #clock, #battery, #idle_inhibitor, #tray, #wireplumber, #bluetooth, #mpris { padding: 0 5px; margin: 0 5px; } +#mpris { + color: @mantle; +} + +#mpris.playing { + background-color: @lavender; +} + +#mpris.paused { + background-color: @mauve; +} + +#mpris.stopped { + background-color: @rosewater; +} + #mode { background: #64727D; border-bottom: 3px solid white; } -#clock, #mpris { - background-color: #64727D; +#clock { } #battery { @@ -84,9 +137,8 @@ tooltip label { } ''; settings.main = { - layer = "top"; - position = "top"; - height = 24; + layer = "top"; + position = "top"; modules-left = [ "hyprland/workspaces" "hyprland/submap" @@ -111,9 +163,22 @@ tooltip label { bluetooth = { on-click = "blueman-manager"; + format = " {status}"; + format-connected-battery = " {device_alias} {device_battery_percentage}%"; + format-connected = " {num_connections} connected"; + tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; + tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; + tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; + tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%"; }; + + tray = { + spacing = 4; + }; + clock = { format = "{:%F %H:%M %Z}"; + interval = 60; }; }; }; diff --git a/home/environments/i3/conky/conky.nix b/home/environments/i3/conky/conky.nix.old similarity index 100% rename from home/environments/i3/conky/conky.nix rename to home/environments/i3/conky/conky.nix.old diff --git a/home/environments/i3/picom.nix b/home/environments/i3/picom.nix index f6f252de..559a1c0b 100644 --- a/home/environments/i3/picom.nix +++ b/home/environments/i3/picom.nix @@ -1,6 +1,6 @@ _: { services.picom = { - enable = true; + enable = false; backend = "glx"; shadow = false; vSync = false; diff --git a/home/profiles/graphical/floorp/config.nix b/home/profiles/graphical/floorp/config.nix index 7fe694ac..1000650e 100644 --- a/home/profiles/graphical/floorp/config.nix +++ b/home/profiles/graphical/floorp/config.nix @@ -1,5 +1,5 @@ _: { - programs.floorp.profiles.main.settings = { + programs.firefox.profiles.main.settings = { # Derived from https://github.com/arcnmx/home/blob/9eb1cd4dd43883e1a0c6a2a55c00d7c3bede1776/cfg/firefox/default.nix#L7 # and https://git.ztn.sh/zotan/snowleopard/src/branch/dev/assets/prefs.js "services.sync.engine.prefs" = false; diff --git a/home/profiles/graphical/floorp/containers.nix b/home/profiles/graphical/floorp/containers.nix index 7ea4f468..52be7a3e 100644 --- a/home/profiles/graphical/floorp/containers.nix +++ b/home/profiles/graphical/floorp/containers.nix @@ -2,7 +2,7 @@ inherit (lib.attrsets) listToAttrs nameValuePair; inherit (lib.modules) mkMerge; in { - programs.floorp.profiles.main = { + programs.firefox.profiles.main = { containersForce = true; containers = { main = { diff --git a/home/profiles/graphical/floorp/main.nix b/home/profiles/graphical/floorp/main.nix index 18ed3e83..d94d1dfc 100644 --- a/home/profiles/graphical/floorp/main.nix +++ b/home/profiles/graphical/floorp/main.nix @@ -2,11 +2,11 @@ defaultFont = "Monaspace Krypton"; in { home.sessionVariables = { - BROWSER = "floorp"; + BROWSER = "firefox"; }; home.packages = [ pkgs.ff2mpv-rust ]; - programs.floorp = { + programs.firefox = { nativeMessagingHosts = [ pkgs.ff2mpv-rust ]; diff --git a/home/profiles/graphical/floorp/mtab.nix b/home/profiles/graphical/floorp/mtab.nix index dc616bc0..737e7050 100644 --- a/home/profiles/graphical/floorp/mtab.nix +++ b/home/profiles/graphical/floorp/mtab.nix @@ -1,5 +1,5 @@ { nur, ... }: { - programs.floorp.profiles.main.extensions = { + programs.firefox.profiles.main.extensions = { packages = with nur.repos.rycee.firefox-addons; [ mtab ]; diff --git a/home/profiles/graphical/floorp/tst.nix b/home/profiles/graphical/floorp/tst.nix index bdaeee38..dfb5211d 100644 --- a/home/profiles/graphical/floorp/tst.nix +++ b/home/profiles/graphical/floorp/tst.nix @@ -1,5 +1,5 @@ { nur, ... }: { - programs.floorp.profiles.main = { + programs.firefox.profiles.main = { extensions = { packages = with nur.repos.rycee.firefox-addons; [ tree-style-tab @@ -22,6 +22,7 @@ showExpertOptions = true; skipCollapsedTabsForTabSwitchingShortcuts = true; tabPreviewTooltip = true; + "__ConfigsMigration__userValeusSameToDefaultAreCleared" = true; }; }; }; diff --git a/home/profiles/graphical/floorp/ublock.nix b/home/profiles/graphical/floorp/ublock.nix index 924838e3..80fe8665 100644 --- a/home/profiles/graphical/floorp/ublock.nix +++ b/home/profiles/graphical/floorp/ublock.nix @@ -1,5 +1,5 @@ { nur, ... }: { - programs.floorp.profiles.main.extensions = { + programs.firefox.profiles.main.extensions = { packages = with nur.repos.rycee.firefox-addons; [ ublock-origin ]; diff --git a/nixos/environments/hyprland/hyprland.nix b/nixos/environments/hyprland/hyprland.nix index bd0ad515..a6965706 100644 --- a/nixos/environments/hyprland/hyprland.nix +++ b/nixos/environments/hyprland/hyprland.nix @@ -2,4 +2,5 @@ _: { programs.hyprland = { enable = true; }; + services.clipboard-sync.enable = true; } diff --git a/nixos/environments/hyprland/xdg-portals.nix b/nixos/environments/hyprland/xdg-portals.nix index 3988e9ac..20651ac9 100644 --- a/nixos/environments/hyprland/xdg-portals.nix +++ b/nixos/environments/hyprland/xdg-portals.nix @@ -4,7 +4,7 @@ enable = true; extraPortals = with pkgs; [ xdg-desktop-portal-wlr - xdg-desktop-portal-hyprland + xdg-desktop-portal-gtk ]; }; }; diff --git a/systems/goliath.nix b/systems/goliath.nix index 44c5d7ef..a6dd3e0a 100644 --- a/systems/goliath.nix +++ b/systems/goliath.nix @@ -45,7 +45,6 @@ _: let gaming ]) ++ (with tree.nixos.environments; [ - i3 hyprland ]); diff --git a/tree.nix b/tree.nix index f4c1cb76..19b93231 100644 --- a/tree.nix +++ b/tree.nix @@ -88,6 +88,7 @@ inputs.nix-gaming.nixosModules.ntsync inputs.nix-gaming.nixosModules.pipewireLowLatency inputs.nix-gaming.nixosModules.platformOptimizations + inputs.clipboard-sync.nixosModules.default ]; }; };