Compare commits
5 Commits
cff46f39d6
...
f53e7a5864
Author | SHA1 | Date | |
---|---|---|---|
f53e7a5864
|
|||
c3ef9afb49
|
|||
1595327f30
|
|||
87dc485e1f
|
|||
a73a621227
|
@ -84,7 +84,7 @@
|
||||
hyprland = {
|
||||
enable = !headless;
|
||||
dunst.enable = !config.modules.hyprpanel.enable; # Disable for hyprpanel
|
||||
wallpaper = "Foggy-Lake";
|
||||
wallpaper = "City-Outlook";
|
||||
|
||||
keybindings = {
|
||||
main-mod = "SUPER";
|
||||
|
@ -43,9 +43,9 @@ def getRule(
|
||||
f"{value}": lambda line, name, value: line.replace(
|
||||
f"{value}", f"${{color.hex.{name}}}"
|
||||
),
|
||||
# "#${color.hex.white}" -> ${color.hexS.white}
|
||||
'"#${color.hex."': lambda line, name, value: line.replace(
|
||||
'"#${color.hex."', "${color.hexS.}"
|
||||
# #${color.hex.white} -> ${color.hexS.white}
|
||||
"#${color.hex.": lambda line, name, value: line.replace(
|
||||
"#${color.hex.", "${color.hexS."
|
||||
),
|
||||
# ff,ff,ff -> ${color.rgbS.white}
|
||||
f"{value[0:2]},{value[2:4]},{value[4:6]}": lambda line, name, value: line.replace(
|
||||
|
@ -36,7 +36,8 @@
|
||||
"_a7399979-5203-4489-9861-b168187b52e1_-browser-action",
|
||||
"addon_fastforward_team-browser-action",
|
||||
"firefox-extension_steamdb_info-browser-action",
|
||||
"_cb31ec5d-c49a-4e5a-b240-16c767444f62_-browser-action"
|
||||
"_cb31ec5d-c49a-4e5a-b240-16c767444f62_-browser-action",
|
||||
"_bbb880ce-43c9-47ae-b746-c3e0096c5b76_-browser-action"
|
||||
],
|
||||
"nav-bar": [
|
||||
"back-button",
|
||||
@ -59,6 +60,7 @@
|
||||
"clipper_obsidian_md-browser-action",
|
||||
"zotero_chnm_gmu_edu-browser-action",
|
||||
"vpn_proton_ch-browser-action",
|
||||
"jid1-qofqdk4qzufgwq_jetpack-browser-action",
|
||||
"unified-extensions-button"
|
||||
],
|
||||
"toolbar-menubar": [
|
||||
@ -124,7 +126,9 @@
|
||||
"zotero_chnm_gmu_edu-browser-action",
|
||||
"_b9db16a4-6edc-47ec-a1f4-b86292ed211d_-browser-action",
|
||||
"_cb31ec5d-c49a-4e5a-b240-16c767444f62_-browser-action",
|
||||
"screenshot-button"
|
||||
"screenshot-button",
|
||||
"_bbb880ce-43c9-47ae-b746-c3e0096c5b76_-browser-action",
|
||||
"jid1-qofqdk4qzufgwq_jetpack-browser-action"
|
||||
],
|
||||
"dirtyAreaCache": [
|
||||
"nav-bar",
|
||||
@ -136,5 +140,5 @@
|
||||
"vertical-tabs"
|
||||
],
|
||||
"currentVersion": 22,
|
||||
"newElementCount": 7
|
||||
"newElementCount": 8
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
# TODO: https://github.com/nix-community/home-manager/commit/69d19b9839638fc487b370e0600a03577a559081
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
@ -45,6 +44,7 @@ in {
|
||||
# firefox-unwrapped is the pure firefox browser, wrapFirefox adds configuration ontop
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
# About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled
|
||||
# TODO: To separate file
|
||||
extraPolicies = {
|
||||
CaptivePortal = false;
|
||||
DisableAppUpdate = true;
|
||||
@ -104,6 +104,7 @@ in {
|
||||
'')
|
||||
];
|
||||
|
||||
# TODO: To separate file
|
||||
search = {
|
||||
force = true; # Always override search engines
|
||||
default = "kagi";
|
||||
@ -153,7 +154,7 @@ in {
|
||||
definedAliases = ["@nw"];
|
||||
};
|
||||
|
||||
google.metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||
google.metaData.alias = "@g";
|
||||
|
||||
# Hide bullshit
|
||||
bing.metaData.hidden = true;
|
||||
@ -163,6 +164,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: To separate file
|
||||
extensions = {
|
||||
force = true; # Always override extensions
|
||||
|
||||
@ -174,7 +176,7 @@ in {
|
||||
# bypass-paywalls-clean
|
||||
# c-c-search-extension # Press cc in searchbar and profit
|
||||
catppuccin-mocha-mauve
|
||||
catppuccin-web-file-icons
|
||||
# catppuccin-web-file-icons
|
||||
clearurls
|
||||
cookie-autodelete
|
||||
display-_anchors # Easier linking to specific website parts
|
||||
@ -225,7 +227,8 @@ in {
|
||||
};
|
||||
|
||||
bookmarks = {
|
||||
force = true; # Always override bookmarks (so we don't forget to add them through here)
|
||||
# Always override bookmarks (so we don't forget to add them through here)
|
||||
force = true;
|
||||
settings = import ./bookmarks.nix;
|
||||
};
|
||||
|
||||
@ -240,21 +243,12 @@ in {
|
||||
}
|
||||
|
||||
(lib.optionalAttrs firefox.vaapi {
|
||||
# Firefox wayland hardware video acceleration
|
||||
# https://github.com/elFarto/nvidia-vaapi-driver/#firefox=
|
||||
# TODO: Disable and check if it works by default
|
||||
# "gfx.canvas.accelerated" = true; # Default value
|
||||
# "gfx.webrender.enabled" = true; # Does not exist?
|
||||
|
||||
"media.ffmpeg.vaapi.enabled" = true;
|
||||
"media.rdd-ffmpeg.enabled" = true; # Default value
|
||||
"media.av1.enabled" = true;
|
||||
"gfx.x11-egl.force-enabled" = true;
|
||||
"widget.dmabuf.force-enabled" = true;
|
||||
|
||||
# "layers.acceleration.force-enabled" = true;
|
||||
# "media.hardware-video-decoding.force-enabled" = true;
|
||||
# "widget.wayland-dmabuf-vaapi.enabled" = true; # Does not exist?
|
||||
})
|
||||
];
|
||||
};
|
||||
|
@ -227,7 +227,7 @@ in {
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "~/NixFlake/wallpapers/${hyprland.theme}.png";
|
||||
path = "${config.paths.nixflake}/wallpapers/${hyprland.wallpaper}.jpg";
|
||||
blur_passes = 3;
|
||||
blur_size = 10;
|
||||
monitor = "";
|
||||
@ -293,11 +293,15 @@ in {
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload = "${config.paths.nixflake}/wallpapers/${hyprland.theme}.png";
|
||||
# Wallpapers have to be preloaded to be displayed
|
||||
preload = let
|
||||
mkPreload = name: "${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||
in
|
||||
hyprland.wallpapers |> builtins.map mkPreload;
|
||||
wallpaper = let
|
||||
mkWallpaper = monitor:
|
||||
"${monitor}, "
|
||||
+ "${config.paths.nixflake}/wallpapers/${hyprland.theme}.png";
|
||||
+ "${config.paths.nixflake}/wallpapers/${hyprland.wallpaper}.jpg";
|
||||
in
|
||||
hyprland.monitors
|
||||
|> builtins.attrNames
|
||||
|
@ -2,7 +2,7 @@
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
}: rec {
|
||||
enable = lib.mkEnableOption "Hyprland Window Manager + Compositor";
|
||||
|
||||
kb-layout = lib.mkOption {
|
||||
@ -17,10 +17,32 @@
|
||||
description = "Keyboard layout variant";
|
||||
};
|
||||
|
||||
theme = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
# A bit dumb, but I want a single location where those are defined.
|
||||
# Only supposed to be set from here.
|
||||
wallpapers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Available wallpapers";
|
||||
|
||||
# Run eza -1 | sd ".png" "" | sd "^" "\"" | sd "\$" "\"" | sd "\"\"" "" | wl-copy
|
||||
# in ~/NixFlake/wallpapers/
|
||||
default = [
|
||||
"Blade-Runner-Atari"
|
||||
"Blade-Runner-Coca-Cola"
|
||||
"Blade-Runner-Downwards"
|
||||
"Blade-Runner-Upwards"
|
||||
"City-Outlook"
|
||||
"Cozy-Bedroom"
|
||||
"Everest-Fishing"
|
||||
"Foggy-Lake"
|
||||
"Three-Bears"
|
||||
];
|
||||
};
|
||||
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.enum wallpapers.default;
|
||||
example = "Three-Bears";
|
||||
description = "Wallpaper and colorscheme to use";
|
||||
description = "Wallpaper to use";
|
||||
default = "Foggy-Lake";
|
||||
};
|
||||
|
||||
dunst.enable = lib.mkEnableOption "Enable dunst notification daemon";
|
||||
|
@ -82,7 +82,7 @@ in {
|
||||
"theme.bar.margin_bottom" = "0px";
|
||||
"theme.bar.margin_sides" = "10px";
|
||||
"theme.bar.margin_top" = "10px";
|
||||
"theme.bar.opacity" = 80;
|
||||
"theme.bar.opacity" = 60;
|
||||
"theme.bar.outer_spacing" = "0px"; # NOTE: Left/Right bar padding
|
||||
"theme.bar.transparent" = false;
|
||||
|
||||
@ -90,7 +90,7 @@ in {
|
||||
"theme.bar.buttons.opacity" = 100;
|
||||
"theme.bar.buttons.padding_x" = "10px";
|
||||
"theme.bar.buttons.padding_y" = "2px";
|
||||
"theme.bar.buttons.radius" = "6px";
|
||||
"theme.bar.buttons.radius" = "3px";
|
||||
"theme.bar.buttons.spacing" = "2px"; # NOTE: Horizontal inter-button spacing
|
||||
"theme.bar.buttons.style" = "default";
|
||||
"theme.bar.buttons.text" = "#${color.hex.accentText}";
|
||||
|
@ -66,13 +66,13 @@ in {
|
||||
|
||||
"error-message" = {
|
||||
background-color = mkLiteral trans;
|
||||
margin = mkLiteral "0px 0px 20px 0px";
|
||||
margin = mkLiteral "0px 0px 10px 0px";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
padding = 6;
|
||||
margin = mkLiteral "20px 20px 0px 20px";
|
||||
margin = mkLiteral "10px 10px 0px 10px";
|
||||
border-radius = 3;
|
||||
};
|
||||
|
||||
@ -86,12 +86,12 @@ in {
|
||||
padding = 6;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
border-radius = 3;
|
||||
margin = mkLiteral "20px 0px 0px 20px";
|
||||
margin = mkLiteral "10px 0px 0px 10px";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
padding = 6;
|
||||
margin = mkLiteral "20px 20px 0px 10px";
|
||||
margin = mkLiteral "10px 10px 0px 5px";
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
@ -102,7 +102,7 @@ in {
|
||||
"listview" = {
|
||||
# border = mkLiteral "0px 0px 0px";
|
||||
padding = 0;
|
||||
margin = mkLiteral "10px 20px 20px 20px";
|
||||
margin = mkLiteral "5px 10px 10px 10px";
|
||||
columns = 1;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
@ -130,6 +130,21 @@ in {
|
||||
};
|
||||
|
||||
modules.hyprland.keybindings = let
|
||||
vpn-menu =
|
||||
pkgs.writeScript
|
||||
"rofi-menu-vpn"
|
||||
(builtins.readFile ./menus/vpn.fish);
|
||||
|
||||
keybinds-menu =
|
||||
pkgs.writeScript
|
||||
"rofi-menu-keybinds"
|
||||
(builtins.readFile ./menus/keybinds.fish);
|
||||
|
||||
lectures-menu =
|
||||
pkgs.writeScript
|
||||
"rofi-menu-lectures"
|
||||
(builtins.readFile ./menus/lectures.fish);
|
||||
|
||||
power-menu =
|
||||
mylib.rofi.mkSimpleMenu
|
||||
"power"
|
||||
@ -142,15 +157,32 @@ in {
|
||||
" Exit Hyprland" = "hyprctl dispatch exit";
|
||||
};
|
||||
|
||||
vpn-menu = pkgs.writeScript "rofi-menu-vpn" (builtins.readFile ./menus/vpn.fish);
|
||||
keybinds-menu = pkgs.writeScript "rofi-menu-keybinds" (builtins.readFile ./menus/keybinds.fish);
|
||||
lectures-menu = pkgs.writeScript "rofi-menu-lectures" (builtins.readFile ./menus/lectures.fish);
|
||||
wallpaper-menu = let
|
||||
setWallpaperOnMonitor = name: monitor:
|
||||
"hyprctl hyprpaper wallpaper "
|
||||
+ "${monitor},${config.paths.nixflake}/wallpapers/${name}.png";
|
||||
|
||||
setWallpaperOnMonitors = monitors: name: {
|
||||
${name} =
|
||||
monitors
|
||||
|> builtins.map (setWallpaperOnMonitor name)
|
||||
|> builtins.concatStringsSep " && ";
|
||||
};
|
||||
|
||||
monitors = builtins.attrNames config.modules.hyprland.monitors;
|
||||
in
|
||||
mylib.rofi.mkSimpleMenu
|
||||
"wall"
|
||||
(config.modules.hyprland.wallpapers
|
||||
|> builtins.map (setWallpaperOnMonitors monitors)
|
||||
|> lib.mergeAttrsList);
|
||||
in {
|
||||
bindings = lib.mergeAttrsList [
|
||||
{
|
||||
"$mainMod, escape" = ["exec, \"${power-menu}\""];
|
||||
"$mainMod, M" = ["exec, \"${keybinds-menu}\""];
|
||||
# "$mainMod, O" = ["exec, \"${lectures-menu}\""];
|
||||
"$mainMod, m" = ["exec, \"${keybinds-menu}\""];
|
||||
"$mainMod, w" = ["exec, \"${wallpaper-menu}\""];
|
||||
# "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
||||
}
|
||||
(lib.optionalAttrs (!nixosConfig.modules.network.useNetworkManager) {
|
||||
"$mainMod, U" = ["exec, \"${vpn-menu}\""];
|
||||
|
Before Width: | Height: | Size: 6.5 MiB |
BIN
wallpapers/Blade-Runner-Downwards.jpg
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
wallpapers/Blade-Runner-Upwards.jpg
Normal file
After Width: | Height: | Size: 2.8 MiB |
BIN
wallpapers/City-Outlook.jpg
Normal file
After Width: | Height: | Size: 4.9 MiB |
BIN
wallpapers/Everest-Fishing.jpg
Normal file
After Width: | Height: | Size: 697 KiB |
Before Width: | Height: | Size: 3.6 MiB |
BIN
wallpapers/Foggy-Lake.jpg
Normal file
After Width: | Height: | Size: 632 KiB |
Before Width: | Height: | Size: 8.3 MiB |
BIN
wallpapers/Three-Bears.jpg
Normal file
After Width: | Height: | Size: 720 KiB |
Before Width: | Height: | Size: 5.2 MiB |