feat(nix): Configure floorp with nix
This commit is contained in:
parent
ec2f9e379a
commit
624f9da761
6 changed files with 86 additions and 81 deletions
|
@ -170,6 +170,8 @@ bind = $mainMod, mouse_up, workspace, e-1
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
bindm = $mainMod, mouse:273, resizewindow
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
env = MOZ_LEGACY_PROFILES,1
|
||||||
|
|
||||||
env = GDK_BACKEND,wayland,x11
|
env = GDK_BACKEND,wayland,x11
|
||||||
env = SDL_VIDEODRIVER,wayland,x11
|
env = SDL_VIDEODRIVER,wayland,x11
|
||||||
env = CLUTTER_BACKEND,wayland
|
env = CLUTTER_BACKEND,wayland
|
||||||
|
|
65
.config/nix/files/floorp/userChrome.css
Normal file
65
.config/nix/files/floorp/userChrome.css
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
16
.config/nix/flake.lock
generated
16
.config/nix/flake.lock
generated
|
@ -99,17 +99,17 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726989464,
|
"lastModified": 1728791962,
|
||||||
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
|
"narHash": "sha256-nr5QiXwQcZmf6/auC1UpX8iAtINMtdi2mH+OkqJQVmU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
|
"rev": "64c6325b28ebd708653dd41d88f306023f296184",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.05",
|
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
|
"rev": "64c6325b28ebd708653dd41d88f306023f296184",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -156,17 +156,17 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729242558,
|
"lastModified": 1729265718,
|
||||||
"narHash": "sha256-VgcLDu4igNT0eYua6OAl9pWCI0cYXhDbR+pWP44tte0=",
|
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4a3f2d3195b60d07530574988df92e049372c10e",
|
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "release-24.05",
|
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
|
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/ccc0c2126893dd20963580b6478d1a10a4512185";
|
||||||
|
|
||||||
nix-darwin = {
|
nix-darwin = {
|
||||||
url = "github:LnL7/nix-darwin";
|
url = "github:LnL7/nix-darwin";
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/64c6325b28ebd708653dd41d88f306023f296184";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,76 +4,12 @@
|
||||||
programs = {
|
programs = {
|
||||||
floorp = {
|
floorp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.emptyDirectory; # we only want the config
|
# REF: https://github.com/nix-community/home-manager/blob/342a1d682386d3a1d74f9555cb327f2f311dda6e/modules/programs/firefox/mkFirefoxModule.nix#L264
|
||||||
profiles.ziro = {
|
package = null; # we only want the config
|
||||||
userChrome =
|
profiles = {
|
||||||
''
|
${vars.name} = {
|
||||||
/**
|
userChrome = builtins.readFile ../../files/floorp/userChrome.css;
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,7 @@ in
|
||||||
"ziro@ThiccBook-Pro" =
|
"ziro@ThiccBook-Pro" =
|
||||||
let
|
let
|
||||||
inherit (mkSystem "x86_64-darwin" nixpkgs) system pkgs;
|
inherit (mkSystem "x86_64-darwin" nixpkgs) system pkgs;
|
||||||
|
vars.name = "ziro";
|
||||||
in
|
in
|
||||||
home-manager.lib.homeManagerConfiguration {
|
home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
@ -32,6 +33,7 @@ in
|
||||||
"ziro@potato" =
|
"ziro@potato" =
|
||||||
let
|
let
|
||||||
inherit (mkSystem "x86_64-linux" nixpkgs) system pkgs;
|
inherit (mkSystem "x86_64-linux" nixpkgs) system pkgs;
|
||||||
|
vars.name = "ziro";
|
||||||
in
|
in
|
||||||
home-manager.lib.homeManagerConfiguration {
|
home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
@ -39,7 +41,7 @@ in
|
||||||
modules = [
|
modules = [
|
||||||
./ziro
|
./ziro
|
||||||
./ziro/linux.nix
|
./ziro/linux.nix
|
||||||
#../modules/home-manager/floorp.nix # FIXME: Added on 24.11
|
../modules/home-manager/floorp.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue