diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 17e5b40..24ab963 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -170,6 +170,8 @@ bind = $mainMod, mouse_up, workspace, e-1 bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow +env = MOZ_LEGACY_PROFILES,1 + env = GDK_BACKEND,wayland,x11 env = SDL_VIDEODRIVER,wayland,x11 env = CLUTTER_BACKEND,wayland diff --git a/.config/nix/files/floorp/userChrome.css b/.config/nix/files/floorp/userChrome.css new file mode 100644 index 0000000..97de426 --- /dev/null +++ b/.config/nix/files/floorp/userChrome.css @@ -0,0 +1,65 @@ +/** + * Better Floorp vertical tabs + * + * This makes Floorp's (expanded) vertical tabs not affecting sites' width, + * which can cause lag on heavy websites like Twitch and YouTube. + * + * This also fixed vertical tabs' width breaking when some preference related + * to browser's "head" is changed + * + * Based on my changes for Pulse, but Pulse is dead. + * REF: https://github.com/null2264/pulse/commit/fce966a110c2987b08d35bcd04c5992655b24b13 + */ +:root { + /* from Floorp source code, too big for me */ + /*--default-verticaltab-width: 45px;*/ + /*--hoverd-verticaltab-width: 20em;*/ + + --default-verticaltab-width: 35px !important; + --hoverd-verticaltab-width: 18em; +} + +@charset "UTF-8"; +@-moz-document url(chrome://browser/content/browser.xhtml) { +.browserContainer { + border-inline-width: 0 !important; +} + +/* >> Fix height being inconsistent on hover */ +.tab-icon-stack, +.tab-label-container { + height: 2.7em !important; +} + +.tab-icon-stack { + align-items: center; +} +/* << Fix height being inconsistent on hover */ + +#sidebar-select-box { + width: var(--default-verticaltab-width) !important; + min-width: var(--default-verticaltab-width) !important; + max-width: var(--default-verticaltab-width) !important; +} + +#TabsToolbar { + position: relative !important; + transition: all 300ms !important; + width: calc(var(--default-verticaltab-width) + 5px) !important; + min-width: calc(var(--default-verticaltab-width) + 5px) !important; + max-width: calc(var(--default-verticaltab-width) + 5px) !important; + z-index: 1; /* Probably not needed, since Floorp already handle this */ +} +#TabsToolbar:not(:hover) { + scrollbar-width: none !important; +} + +#TabsToolbar:hover { + transition: all 300ms !important; + width: var(--hoverd-verticaltab-width) !important; + min-width: var(--hoverd-verticaltab-width) !important; + max-width: var(--hoverd-verticaltab-width) !important; + z-index: 2; /* Probably not needed, since Floorp already handle this */ + margin-right: calc((var(--hoverd-verticaltab-width) - var(--default-verticaltab-width) - 5px) * -1) !important; +} +} diff --git a/.config/nix/flake.lock b/.config/nix/flake.lock index 2fea2e5..0f9b584 100644 --- a/.config/nix/flake.lock +++ b/.config/nix/flake.lock @@ -99,17 +99,17 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1728791962, + "narHash": "sha256-nr5QiXwQcZmf6/auC1UpX8iAtINMtdi2mH+OkqJQVmU=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "rev": "64c6325b28ebd708653dd41d88f306023f296184", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", "repo": "home-manager", + "rev": "64c6325b28ebd708653dd41d88f306023f296184", "type": "github" } }, @@ -156,17 +156,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729242558, - "narHash": "sha256-VgcLDu4igNT0eYua6OAl9pWCI0cYXhDbR+pWP44tte0=", + "lastModified": 1729265718, + "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a3f2d3195b60d07530574988df92e049372c10e", + "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-24.05", "repo": "nixpkgs", + "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", "type": "github" } }, diff --git a/.config/nix/flake.nix b/.config/nix/flake.nix index 098979c..b6c6701 100644 --- a/.config/nix/flake.nix +++ b/.config/nix/flake.nix @@ -31,7 +31,7 @@ }; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/release-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/ccc0c2126893dd20963580b6478d1a10a4512185"; nix-darwin = { url = "github:LnL7/nix-darwin"; @@ -39,7 +39,7 @@ }; home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/64c6325b28ebd708653dd41d88f306023f296184"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/.config/nix/modules/home-manager/floorp.nix b/.config/nix/modules/home-manager/floorp.nix index f7368d0..e2ef48b 100644 --- a/.config/nix/modules/home-manager/floorp.nix +++ b/.config/nix/modules/home-manager/floorp.nix @@ -4,76 +4,12 @@ programs = { floorp = { enable = true; - package = pkgs.emptyDirectory; # we only want the config - profiles.ziro = { - userChrome = - '' - /** - * Better Floorp vertical tabs - * - * This makes Floorp's (expanded) vertical tabs not affecting sites' width, - * which can cause lag on heavy websites like Twitch and YouTube. - * - * This also fixed vertical tabs' width breaking when some preference related - * to browser's "head" is changed - * - * Based on my changes for Pulse, but Pulse is dead. - * REF: https://github.com/null2264/pulse/commit/fce966a110c2987b08d35bcd04c5992655b24b13 - */ - :root { - /* from Floorp source code, too big for me */ - /*--default-verticaltab-width: 45px;*/ - /*--hoverd-verticaltab-width: 20em;*/ - - --default-verticaltab-width: 35px !important; - --hoverd-verticaltab-width: 18em; - } - - @charset "UTF-8"; - @-moz-document url(chrome://browser/content/browser.xhtml) { - .browserContainer { - border-inline-width: 0 !important; - } - - /* >> Fix height being inconsistent on hover */ - .tab-icon-stack, - .tab-label-container { - height: 2.7em !important; - } - - .tab-icon-stack { - align-items: center; - } - /* << Fix height being inconsistent on hover */ - - #sidebar-select-box { - width: var(--default-verticaltab-width) !important; - min-width: var(--default-verticaltab-width) !important; - max-width: var(--default-verticaltab-width) !important; - } - - #TabsToolbar { - position: relative !important; - transition: all 300ms !important; - width: calc(var(--default-verticaltab-width) + 5px) !important; - min-width: calc(var(--default-verticaltab-width) + 5px) !important; - max-width: calc(var(--default-verticaltab-width) + 5px) !important; - z-index: 1; /* Probably not needed, since Floorp already handle this */ - } - #TabsToolbar:not(:hover) { - scrollbar-width: none !important; - } - - #TabsToolbar:hover { - transition: all 300ms !important; - width: var(--hoverd-verticaltab-width) !important; - min-width: var(--hoverd-verticaltab-width) !important; - max-width: var(--hoverd-verticaltab-width) !important; - z-index: 2; /* Probably not needed, since Floorp already handle this */ - margin-right: calc((var(--hoverd-verticaltab-width) - var(--default-verticaltab-width) - 5px) * -1) !important; - } - } - ''; + # REF: https://github.com/nix-community/home-manager/blob/342a1d682386d3a1d74f9555cb327f2f311dda6e/modules/programs/firefox/mkFirefoxModule.nix#L264 + package = null; # we only want the config + profiles = { + ${vars.name} = { + userChrome = builtins.readFile ../../files/floorp/userChrome.css; + }; }; }; }; diff --git a/.config/nix/users/default.nix b/.config/nix/users/default.nix index d64450d..3af34e6 100644 --- a/.config/nix/users/default.nix +++ b/.config/nix/users/default.nix @@ -19,6 +19,7 @@ in "ziro@ThiccBook-Pro" = let inherit (mkSystem "x86_64-darwin" nixpkgs) system pkgs; + vars.name = "ziro"; in home-manager.lib.homeManagerConfiguration { inherit pkgs; @@ -32,6 +33,7 @@ in "ziro@potato" = let inherit (mkSystem "x86_64-linux" nixpkgs) system pkgs; + vars.name = "ziro"; in home-manager.lib.homeManagerConfiguration { inherit pkgs; @@ -39,7 +41,7 @@ in modules = [ ./ziro ./ziro/linux.nix - #../modules/home-manager/floorp.nix # FIXME: Added on 24.11 + ../modules/home-manager/floorp.nix ]; }; }