mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat: firefox -> zen, avizo -> swayosd
This commit is contained in:
parent
4e2f3ecae5
commit
c8368a050e
16 changed files with 214 additions and 46 deletions
32
flake.lock
generated
32
flake.lock
generated
|
|
@ -466,6 +466,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"zen-browser",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753056897,
|
||||
"narHash": "sha256-AVVMBFcuOXqIgmShvRv9TED3fkiZhQ0ZvlhsPoFfkNE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "13a83d1b6545b7f0e8f7689bad62e7a3b1d63771",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"infrastructure": {
|
||||
"inputs": {
|
||||
"arcexprs": [
|
||||
|
|
@ -1601,20 +1622,21 @@
|
|||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727721329,
|
||||
"narHash": "sha256-QYlWZwUSwrM7BuO+dXclZIwoPvBIuJr6GpFKv9XKFPI=",
|
||||
"owner": "MarceColl",
|
||||
"lastModified": 1753069499,
|
||||
"narHash": "sha256-YtgY0ueqKNrBma4Euu8WH23BhUkBujirJDMDE1KujnU=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "e6ab73f405e9a2896cce5956c549a9cc359e5fcc",
|
||||
"rev": "c64b94235ae24e3b9e01a08f0331d8bb0e5b037a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "MarceColl",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
};
|
||||
};
|
||||
zen-browser = {
|
||||
url = "github:MarceColl/zen-browser-flake";
|
||||
url = "github:0xc000022070/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs-xr = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{config, ...}: {
|
||||
services.avizo = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
settings = {
|
||||
default = {
|
||||
block-count = 100;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
{
|
||||
config,
|
||||
parent,
|
||||
pkgs,
|
||||
lib,
|
||||
std,
|
||||
...
|
||||
}: let
|
||||
inherit (std) list;
|
||||
inherit (lib.modules) mkMerge;
|
||||
inherit (lib.meta) getExe getExe';
|
||||
inherit (lib.modules) mkMerge mkIf;
|
||||
in {
|
||||
programs.niri.settings.binds = let
|
||||
bindWorkspace = key: workspace: {
|
||||
|
|
@ -20,12 +22,32 @@ in {
|
|||
bindWorkspace "0" 10
|
||||
)
|
||||
];
|
||||
in
|
||||
mkMerge (workspaceBindings
|
||||
++ [
|
||||
{
|
||||
# Transcribed: https://github.com/sodiboo/niri-flake/issues/483
|
||||
# thank you Pacman99 you chad :3
|
||||
# See tip near https://github.com/sodiboo/niri-flake/blob/main/docs.md#user-content-programsnirisettingsbindsnameaction
|
||||
sh = config.lib.niri.actions.spawn "sh" "-c";
|
||||
# ▀▀█
|
||||
# ▄▄▄▄ ▄▄▄ ▄ ▄▄ ▄▄▄ ▄▄▄ ▄ ▄▄ ▄▄▄ █
|
||||
# █▀ ▀█ █▀ █ █▀ ▀ █ ▀ █▀ ▀█ █▀ █ ▀ █ █
|
||||
# █ █ █▀▀▀▀ █ ▀▀▀▄ █ █ █ █ ▄▀▀▀█ █
|
||||
# ██▄█▀ ▀█▄▄▀ █ ▀▄▄▄▀ ▀█▄█▀ █ █ ▀▄▄▀█ ▀▄▄
|
||||
# █
|
||||
# ▀
|
||||
#
|
||||
personalBindings = {
|
||||
"Mod+Return".action = sh ''${getExe config.programs.wezterm.package}'';
|
||||
"Mod+T".action.toggle-window-floating = {};
|
||||
"Mod+D".action = sh ''${getExe config.programs.fuzzel.package} -T "${getExe config.programs.wezterm.package} start"'';
|
||||
"Mod+Escape".action = sh ''${getExe config.programs.wlogout.package} -p layer-shell'';
|
||||
"Mod+Shift+Escape".action = sh ''${getExe config.programs.swaylock.package} -f'';
|
||||
};
|
||||
# ▄ █
|
||||
# ▄▄▄ ▄▄█▄▄ ▄▄▄ ▄▄▄ █ ▄
|
||||
# █ ▀ █ █▀ ▀█ █▀ ▀ █ ▄▀
|
||||
# ▀▀▀▄ █ █ █ █ █▀█
|
||||
# ▀▄▄▄▀ ▀▄▄ ▀█▄█▀ ▀█▄▄▀ █ ▀▄
|
||||
#
|
||||
stockBindings = {
|
||||
# Taken from https://github.com/sodiboo/niri-flake/issues/483
|
||||
|
||||
"Mod+Q".action.close-window = {};
|
||||
"Mod+O".action.toggle-overview = {};
|
||||
|
||||
|
|
@ -136,28 +158,69 @@ in {
|
|||
# Powers off the monitors. To turn them back on, do any input like
|
||||
# moving the mouse or pressing any other key.
|
||||
"Mod+Shift+P".action.power-off-monitors = {};
|
||||
|
||||
# Kat
|
||||
"XF86MonBrightnessUp".action.spawn = ["${config.services.avizo.package}/bin/lightctl" "up"];
|
||||
"XF86MonBrightnessDown".action.spawn = ["${config.services.avizo.package}/bin/lightctl" "down"];
|
||||
"XF86AudioRaiseVolume".action.spawn = ["${config.services.avizo.package}/bin/volumectl" "-u" "up"];
|
||||
"XF86AudioLowerVolume".action.spawn = ["${config.services.avizo.package}/bin/volumectl" "-u" "down"];
|
||||
"XF86AudioMute".action.spawn = ["${config.services.avizo.package}/bin/volumectl" "toggle-mute"];
|
||||
#"XF86MonBrightnessUp".action.spawn = ["${pkgs.brightnessctl}/bin/brightnessctl" "-c" "backlight" "set" "5%+"];
|
||||
#"XF86MonBrightnessDown".action.spawn = ["${pkgs.brightnessctl}/bin/brightnessctl" "-c" "backlight" "set" "5%-"];
|
||||
#"XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"];
|
||||
#"XF86AudioLowerVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"];
|
||||
#"XF86AudioMute".action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
|
||||
"XF86AudioPlay".action.spawn = ["${pkgs.playerctl}/bin/playerctl" "play-pause"];
|
||||
"XF86AudioNext".action.spawn = ["${pkgs.playerctl}/bin/playerctl" "next"];
|
||||
"XF86AudioPrev".action.spawn = ["${pkgs.playerctl}/bin/playerctl" "prev"];
|
||||
"Mod+Return".action.spawn = ["${config.programs.wezterm.package}/bin/wezterm"];
|
||||
"Mod+T".action.toggle-window-floating = {};
|
||||
"Mod+D".action.spawn = ["${config.programs.wofi.package}/bin/wofi" "-t" "wezterm" "-IS" "drun"];
|
||||
"Mod+Shift+D".action.spawn = ["${config.programs.wofi.package}/bin/wofi" "-t" "wezterm" "-IS" "run"];
|
||||
"Mod+Escape".action.spawn = ["${config.programs.wlogout.package}/bin/wlogout" "-p" "layer-shell"];
|
||||
"Mod+Shift+Escape".action.spawn = ["${config.programs.swaylock.package}/bin/swaylock" "-f"];
|
||||
#"Print".action.spawn = ["${pkgs.grimblast}/bin/grimblast" "copy" "area"];
|
||||
}
|
||||
};
|
||||
# █ ▀
|
||||
# ▄▄▄▄▄ ▄▄▄ ▄▄▄█ ▄▄▄ ▄▄▄
|
||||
# █ █ █ █▀ █ █▀ ▀█ █ ▀ █
|
||||
# █ █ █ █▀▀▀▀ █ █ █ ▄▀▀▀█
|
||||
# █ █ █ ▀█▄▄▀ ▀█▄██ ▄▄█▄▄ ▀▄▄▀█
|
||||
#
|
||||
mediaBindingsCommon = {
|
||||
"XF86AudioPlay".action = sh ''${getExe pkgs.playerctl} play-pause'';
|
||||
"XF86AudioNext".action = sh ''${getExe pkgs.playerctl} next'';
|
||||
"XF86AudioPrev".action = sh ''${getExe pkgs.playerctl} prev'';
|
||||
};
|
||||
mediaBindingsAvizo = let
|
||||
lightctl = getExe' config.services.avizo.package "lightctl";
|
||||
volumectl = getExe' config.services.avizo.package "volumectl";
|
||||
in mkIf config.services.avizo.enable {
|
||||
"XF86MonBrightnessUp".action = sh ''${lightctl} up'';
|
||||
"XF86MonBrightnessDown".action = sh ''${volumectl} down'';
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = sh ''${volumectl} -u up'';
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = sh ''${volumectl} -u down'';
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action = sh ''${volumectl} toggle-mute'';
|
||||
};
|
||||
};
|
||||
mediaBindingsSwayOSD = let
|
||||
swayosd-client = getExe' config.services.swayosd.package "swayosd-client";
|
||||
in mkIf config.services.swayosd.enable {
|
||||
"XF86MonBrightnessUp".action = sh ''${swayosd-client} --brightness raise'';
|
||||
"XF86MonBrightnessDown".action = sh ''${swayosd-client} --brightness lower'';
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = sh ''${swayosd-client} --output-volume 2'';
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = sh ''${swayosd-client} --output-volume -2'';
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action = sh ''${swayosd-client} --output-volume mute-toggle'';
|
||||
};
|
||||
};
|
||||
mediaBindingsAvizoless = mkIf (!(config.services.avizo.enable || config.services.swayosd.enable)) {
|
||||
"XF86MonBrightnessUp".action = sh ''${getExe pkgs.brightnessctl} -c backlight set 5%+'';
|
||||
"XF86MonBrightnessDown".action = sh ''${getExe pkgs.brightnessctl} -c backlight set 5%-'';
|
||||
"XF86AudioRaiseVolume".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+'';
|
||||
"XF86AudioLowerVolume".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-'';
|
||||
"XF86AudioMute".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'';
|
||||
};
|
||||
in
|
||||
mkMerge (workspaceBindings ++ [
|
||||
stockBindings
|
||||
personalBindings
|
||||
mediaBindingsCommon
|
||||
mediaBindingsAvizo
|
||||
mediaBindingsSwayOSD
|
||||
mediaBindingsAvizoless
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
6
home/environments/niri/fuzzel.nix
Normal file
6
home/environments/niri/fuzzel.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
catppuccin.fuzzel.enable = true;
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
60
home/environments/niri/swayosd.nix
Normal file
60
home/environments/niri/swayosd.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
theme = pkgs.writeTextFile {
|
||||
name = "swayosd-css";
|
||||
text = ''
|
||||
window#osd {
|
||||
padding: 12px 20px;
|
||||
border-radius: 999px;
|
||||
border: solid 2px ${config.palette.${config.catppuccin.accent}.hex};
|
||||
background: alpha(${config.palette.base.hex}, 0.99);
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
image,
|
||||
label {
|
||||
color: ${config.palette.text.hex};
|
||||
}
|
||||
|
||||
progressbar:disabled,
|
||||
image:disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
progressbar {
|
||||
min-height: 6px;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
trough {
|
||||
min-height: inherit;
|
||||
border-radius: inherit;
|
||||
border: none;
|
||||
background: alpha(${config.palette.${config.catppuccin.accent}.hex},0.3);
|
||||
}
|
||||
|
||||
progress {
|
||||
min-height: inherit;
|
||||
border-radius: inherit;
|
||||
border: none;
|
||||
background: ${config.palette.${config.catppuccin.accent}.hex};
|
||||
}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
services.swayosd = {
|
||||
enable = true;
|
||||
stylePath = theme;
|
||||
};
|
||||
}
|
||||
|
|
@ -178,7 +178,9 @@ _: {
|
|||
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
ignored-players = ["firefox"];
|
||||
};
|
||||
wireplumber = {
|
||||
format = "vol {volume}%";
|
||||
max-volume = 150;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
_: {
|
||||
programs.firefox.profiles.main.settings = {
|
||||
programs.zen-browser.profiles.main.settings = {
|
||||
"zen.welcome-screen.seen" = true;
|
||||
"zen.watermark.enabled" = false;
|
||||
|
||||
# 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;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
_: {
|
||||
programs.firefox.profiles.main = {
|
||||
programs.zen-browser.profiles.main = {
|
||||
containersForce = true;
|
||||
containers = {
|
||||
main = {
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
defaultFont = "Monaspace Krypton";
|
||||
in {
|
||||
home.sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
BROWSER = "zen";
|
||||
};
|
||||
|
||||
home.packages = [pkgs.ff2mpv-rust];
|
||||
programs.firefox = {
|
||||
programs.zen-browser = {
|
||||
nativeMessagingHosts = [
|
||||
pkgs.ff2mpv-rust
|
||||
];
|
||||
|
|
@ -22,6 +22,7 @@ in {
|
|||
containersForce = true;
|
||||
extensions = {
|
||||
packages = with nur.repos.rycee.firefox-addons; [
|
||||
display-_anchors
|
||||
pronoundb
|
||||
sponsorblock
|
||||
link-cleaner
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{nur, ...}: {
|
||||
programs.firefox.profiles.main.extensions = {
|
||||
programs.zen-browser.profiles.main.extensions = {
|
||||
packages = with nur.repos.rycee.firefox-addons; [
|
||||
mtab
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{nur, ...}: {
|
||||
programs.firefox.profiles.main = {
|
||||
programs.zen-browser.profiles.main = {
|
||||
extensions = {
|
||||
packages = with nur.repos.rycee.firefox-addons; [
|
||||
tree-style-tab
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{nur, ...}: {
|
||||
programs.firefox.profiles.main.extensions = {
|
||||
programs.zen-browser.profiles.main.extensions = {
|
||||
packages = with nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
];
|
||||
|
|
|
|||
5
home/profiles/graphical/obsidian.nix
Normal file
5
home/profiles/graphical/obsidian.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
5
home/profiles/graphical/zen.nix
Normal file
5
home/profiles/graphical/zen.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
1
tree.nix
1
tree.nix
|
|
@ -117,6 +117,7 @@
|
|||
spicetify-nix.homeManagerModules.spicetify
|
||||
inputs.moonlight.homeModules.default
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
inputs.zen-browser.homeModules.default
|
||||
]
|
||||
++ (with (import (inputs.arcexprs + "/modules")).home-manager; [
|
||||
i3gopher
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue