feat: add window manager options
This commit is contained in:
parent
b4b7997ac5
commit
601dfb9217
31 changed files with 2006 additions and 821 deletions
|
|
@ -4,5 +4,6 @@
|
|||
./hyprlock.nix
|
||||
./sunsetr.nix
|
||||
./noctalia.nix
|
||||
./wm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
455
home/options/wm.nix
Normal file
455
home/options/wm.nix
Normal file
|
|
@ -0,0 +1,455 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
concatStringsSep
|
||||
getExe
|
||||
dropEnd
|
||||
last
|
||||
mkEnableOption
|
||||
mapAttrs'
|
||||
nameValuePair
|
||||
splitString
|
||||
;
|
||||
|
||||
inherit (builtins) length;
|
||||
|
||||
cfg = config.wm;
|
||||
bindCfg = cfg.keybinds;
|
||||
|
||||
sep = bindCfg.separator;
|
||||
mod = bindCfg.mod;
|
||||
|
||||
main-color = "#EBDBB2";
|
||||
secondary-color = "#24273A";
|
||||
|
||||
mkHyprBind =
|
||||
keys:
|
||||
let
|
||||
len = length keys;
|
||||
prefix = if len > 1 then [ ] else [ "None" ];
|
||||
finalKeys = prefix ++ keys;
|
||||
in
|
||||
(concatStringsSep "+" (dropEnd 1 finalKeys)) + ",${last finalKeys}";
|
||||
|
||||
mkBindOption =
|
||||
keys:
|
||||
let
|
||||
hypr-key = mkHyprBind keys;
|
||||
in
|
||||
mkOption {
|
||||
type = types.str;
|
||||
default = if bindCfg.hypr-type then hypr-key else (concatStringsSep sep keys);
|
||||
};
|
||||
|
||||
mkGradientColorOption =
|
||||
{
|
||||
from ? main-color,
|
||||
to ? secondary-color,
|
||||
angle ? 45,
|
||||
}:
|
||||
{
|
||||
from = mkOption {
|
||||
type = types.str;
|
||||
default = from;
|
||||
};
|
||||
to = mkOption {
|
||||
type = types.str;
|
||||
default = to;
|
||||
};
|
||||
angle = mkOption {
|
||||
type = types.int;
|
||||
default = angle;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options.wm = {
|
||||
exec-once = mkOption {
|
||||
type = with types; nullOr lines;
|
||||
default = null;
|
||||
apply = v: if v != null then pkgs.writeShellScript "exec-once" v else null;
|
||||
};
|
||||
app = {
|
||||
browser = {
|
||||
package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = null;
|
||||
};
|
||||
name = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
terminal = {
|
||||
package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = null;
|
||||
};
|
||||
name = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
run = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = "${getExe cfg.terminal.package} -e ";
|
||||
};
|
||||
};
|
||||
file-browser = {
|
||||
package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = null;
|
||||
};
|
||||
name = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
window = {
|
||||
opacity = mkOption {
|
||||
type = types.float;
|
||||
default = 0.85;
|
||||
};
|
||||
};
|
||||
input = {
|
||||
keyboard = {
|
||||
repeat-delay = mkOption {
|
||||
type = types.int;
|
||||
default = 250;
|
||||
};
|
||||
repeat-rate = mkOption {
|
||||
type = types.int;
|
||||
default = 35;
|
||||
};
|
||||
};
|
||||
};
|
||||
border = {
|
||||
active = mkGradientColorOption { };
|
||||
inactive = mkGradientColorOption {
|
||||
from = secondary-color;
|
||||
to = secondary-color;
|
||||
};
|
||||
radius = mkOption {
|
||||
type = types.int;
|
||||
default = 12;
|
||||
};
|
||||
};
|
||||
keybinds = {
|
||||
mod = mkOption {
|
||||
type = types.str;
|
||||
default = "Mod";
|
||||
};
|
||||
separator = mkOption {
|
||||
type = types.str;
|
||||
default = "+";
|
||||
};
|
||||
hypr-type = mkEnableOption "hyprland-like bind syntax" // {
|
||||
default = false;
|
||||
};
|
||||
|
||||
spawn = mkOption {
|
||||
type = types.attrs;
|
||||
default = {
|
||||
"${mod}${sep}ENTER" = "${getExe cfg.app.terminal.package}";
|
||||
"${mod}${sep}F" = "${getExe cfg.app.browser.package}";
|
||||
};
|
||||
apply =
|
||||
binds:
|
||||
let
|
||||
hypr-binds = mapAttrs' (n: v: nameValuePair (mkHyprBind (splitString sep n)) v) binds;
|
||||
in
|
||||
if bindCfg.hypr-type then hypr-binds else binds;
|
||||
};
|
||||
|
||||
spawn-repeat = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
apply =
|
||||
binds:
|
||||
let
|
||||
hypr-binds = mapAttrs' (n: v: nameValuePair (mkHyprBind (splitString sep n)) v) binds;
|
||||
in
|
||||
if bindCfg.hypr-type then hypr-binds else binds;
|
||||
};
|
||||
|
||||
# ==== Movement ==== #
|
||||
switch-window-focus = mkBindOption [
|
||||
mod
|
||||
"TAB"
|
||||
];
|
||||
move-window-focus = {
|
||||
left = mkBindOption [
|
||||
mod
|
||||
"H"
|
||||
];
|
||||
right = mkBindOption [
|
||||
mod
|
||||
"L"
|
||||
];
|
||||
up = mkBindOption [
|
||||
mod
|
||||
"K"
|
||||
];
|
||||
down = mkBindOption [
|
||||
mod
|
||||
"J"
|
||||
];
|
||||
};
|
||||
move-monitor-focus = {
|
||||
left = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"H"
|
||||
];
|
||||
right = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"L"
|
||||
];
|
||||
};
|
||||
move-workspace-focus = {
|
||||
# Workspace Focus
|
||||
next = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"J"
|
||||
];
|
||||
prev = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"k"
|
||||
];
|
||||
};
|
||||
move-window = {
|
||||
left = mkBindOption [
|
||||
mod
|
||||
"SHIFT"
|
||||
"H"
|
||||
];
|
||||
right = mkBindOption [
|
||||
mod
|
||||
"SHIFT"
|
||||
"L"
|
||||
];
|
||||
up = mkBindOption [
|
||||
mod
|
||||
"SHIFT"
|
||||
"K"
|
||||
];
|
||||
down = mkBindOption [
|
||||
mod
|
||||
"SHIFT"
|
||||
"J"
|
||||
];
|
||||
};
|
||||
|
||||
consume-window = {
|
||||
left = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"SHIFT"
|
||||
"H"
|
||||
];
|
||||
right = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"SHIFT"
|
||||
"L"
|
||||
];
|
||||
};
|
||||
|
||||
switch-layout = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"ALT"
|
||||
"SPACE"
|
||||
];
|
||||
|
||||
# ==== Actions ==== #
|
||||
center-window = mkBindOption [
|
||||
mod
|
||||
"C"
|
||||
];
|
||||
toggle-overview = mkBindOption [
|
||||
mod
|
||||
"O"
|
||||
];
|
||||
close-window = mkBindOption [
|
||||
mod
|
||||
"Q"
|
||||
];
|
||||
toggle-fullscreen = mkBindOption [
|
||||
"F11"
|
||||
];
|
||||
|
||||
# ==== Scrolling ==== #
|
||||
move-workspace = {
|
||||
down = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"SHIFT"
|
||||
"J"
|
||||
];
|
||||
up = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"SHIFT"
|
||||
"K"
|
||||
];
|
||||
};
|
||||
|
||||
switch-preset-column-width = mkBindOption [
|
||||
mod
|
||||
"W"
|
||||
];
|
||||
switch-preset-window-height = mkBindOption [
|
||||
mod
|
||||
"S"
|
||||
];
|
||||
expand-column-to-available-width = mkBindOption [
|
||||
mod
|
||||
"P"
|
||||
];
|
||||
maximize-column = mkBindOption [
|
||||
mod
|
||||
"M"
|
||||
];
|
||||
reset-window-height = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"S"
|
||||
];
|
||||
|
||||
# ==== Float ==== #
|
||||
toggle-float = mkBindOption [
|
||||
mod
|
||||
"V"
|
||||
];
|
||||
switch-focus-between-floating-and-tiling = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"V"
|
||||
];
|
||||
|
||||
minimize = mkBindOption [
|
||||
mod
|
||||
"I"
|
||||
];
|
||||
|
||||
restore-minimize = mkBindOption [
|
||||
mod
|
||||
"SHIFT"
|
||||
"I"
|
||||
];
|
||||
|
||||
toggle-scratchpad = mkBindOption [
|
||||
mod
|
||||
"Z"
|
||||
];
|
||||
|
||||
# ==== Screenshot ==== #
|
||||
screenshot = {
|
||||
area = mkBindOption [
|
||||
mod
|
||||
"SHIFT"
|
||||
"S"
|
||||
];
|
||||
window = mkBindOption [
|
||||
"CTRL"
|
||||
"SHIFT"
|
||||
"S"
|
||||
];
|
||||
screen = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"SHIFT"
|
||||
"S"
|
||||
];
|
||||
};
|
||||
|
||||
toggle-control-center = mkBindOption [
|
||||
mod
|
||||
"SLASH"
|
||||
];
|
||||
|
||||
toggle-launcher = mkBindOption [
|
||||
"ALT"
|
||||
"SPACE"
|
||||
];
|
||||
|
||||
lock-screen = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"M"
|
||||
];
|
||||
|
||||
clipboard-history = mkBindOption [
|
||||
mod
|
||||
"COMMA"
|
||||
];
|
||||
|
||||
emoji = mkBindOption [
|
||||
mod
|
||||
"PERIOD"
|
||||
];
|
||||
|
||||
screen-recorder = mkBindOption [
|
||||
mod
|
||||
"F12"
|
||||
];
|
||||
|
||||
notification-center = mkBindOption [
|
||||
mod
|
||||
"N"
|
||||
];
|
||||
|
||||
toggle-dont-disturb = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"N"
|
||||
];
|
||||
|
||||
wallpaper-selector = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"W"
|
||||
];
|
||||
|
||||
wallpaper-random = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"SLASH"
|
||||
];
|
||||
|
||||
calculator = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"C"
|
||||
];
|
||||
|
||||
media = {
|
||||
prev = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"COMMA"
|
||||
];
|
||||
|
||||
next = mkBindOption [
|
||||
mod
|
||||
"CTRL"
|
||||
"PERIOD"
|
||||
];
|
||||
};
|
||||
|
||||
focus-workspace-prefix = mkBindOption [ mod ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -20,5 +20,6 @@
|
|||
../user/ghostty.nix
|
||||
../user/podman.nix
|
||||
../user/image-viewer.nix
|
||||
../user/wm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,118 +1,123 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
|
||||
terminal = "ghostty";
|
||||
|
||||
execOnceScript = pkgs.writeShellScript "hyprlandExecOnce" ''
|
||||
# Fix nemo open in terminal
|
||||
dconf write /org/cinnamon/desktop/applications/terminal/exec "''\'${terminal}''\'" &
|
||||
dconf write /org/cinnamon/desktop/applications/terminal/exec-arg "''\'''\'" &
|
||||
|
||||
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME &
|
||||
dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
|
||||
|
||||
# Hint dark theme
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||
'';
|
||||
|
||||
mainMod = "SUPER";
|
||||
wmCfg = config.wm;
|
||||
bindCfg = wmCfg.keybinds;
|
||||
mainMod = bindCfg.mod;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hyprcursor
|
||||
];
|
||||
|
||||
imports = [
|
||||
(import ./hypr/bind.nix { inherit mainMod; })
|
||||
./hypr/workspace.nix
|
||||
./hypr/window.nix
|
||||
./hypr/windowrule.nix
|
||||
./hypr/input.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
plugins = (
|
||||
with inputs.hyprland-plugins.packages.${system};
|
||||
[
|
||||
hyprwinwrap
|
||||
]
|
||||
);
|
||||
|
||||
settings = {
|
||||
"$mainMod" = mainMod;
|
||||
|
||||
debug = {
|
||||
disable_logs = true;
|
||||
config = mkIf osConfig.programs.hyprland.enable {
|
||||
wm = {
|
||||
exec-once = /* bash */ ''
|
||||
dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
|
||||
'';
|
||||
keybinds = {
|
||||
mod = "SUPER";
|
||||
separator = ",";
|
||||
hypr-type = true;
|
||||
};
|
||||
};
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
home.packages = with pkgs; [
|
||||
hyprcursor
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
''${mainMod}, mouse:272, movewindow''
|
||||
''${mainMod}, mouse:273, resizewindow''
|
||||
];
|
||||
imports = [
|
||||
(import ./hypr/bind.nix { inherit mainMod; })
|
||||
./hypr/workspace.nix
|
||||
./hypr/window.nix
|
||||
./hypr/windowrule.nix
|
||||
./hypr/input.nix
|
||||
];
|
||||
|
||||
binde =
|
||||
let
|
||||
resizeStep = builtins.toString 20;
|
||||
brightnessStep = builtins.toString 10;
|
||||
volumeStep = builtins.toString 4;
|
||||
in
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
plugins = (
|
||||
with inputs.hyprland-plugins.packages.${system};
|
||||
[
|
||||
'',XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%+''
|
||||
'',XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%-''
|
||||
'',XF86MonBrightnessDown, exec, brightnessctl set ${brightnessStep}%-''
|
||||
'',XF86MonBrightnessUp, exec, brightnessctl set ${brightnessStep}%+''
|
||||
''${mainMod} CTRL, l, resizeactive, ${resizeStep} 0''
|
||||
''${mainMod} CTRL, h, resizeactive, -${resizeStep} 0''
|
||||
''${mainMod} CTRL, k, resizeactive, 0 -${resizeStep}''
|
||||
''${mainMod} CTRL, j, resizeactive, 0 ${resizeStep}''
|
||||
hyprwinwrap
|
||||
]
|
||||
);
|
||||
|
||||
settings = {
|
||||
"$mainMod" = mainMod;
|
||||
|
||||
debug = {
|
||||
disable_logs = true;
|
||||
};
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
"${mainMod}, mouse:272, movewindow"
|
||||
"${mainMod}, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
plugin = {
|
||||
hyprwinrap = {
|
||||
class = "kitty-bg";
|
||||
binde =
|
||||
let
|
||||
resizeStep = toString 20;
|
||||
brightnessStep = toString 10;
|
||||
volumeStep = toString 4;
|
||||
in
|
||||
[
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%-"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl set ${brightnessStep}%-"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl set ${brightnessStep}%+"
|
||||
"${mainMod} CTRL, l, resizeactive, ${resizeStep} 0"
|
||||
"${mainMod} CTRL, h, resizeactive, -${resizeStep} 0"
|
||||
"${mainMod} CTRL, k, resizeactive, 0 -${resizeStep}"
|
||||
"${mainMod} CTRL, j, resizeactive, 0 ${resizeStep}"
|
||||
];
|
||||
|
||||
plugin = {
|
||||
hyprwinrap = {
|
||||
class = "kitty-bg";
|
||||
};
|
||||
|
||||
touch_gestures = {
|
||||
sensitivity = 4.0;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_edge = "d";
|
||||
long_press_delay = 400;
|
||||
resize_on_border_long_press = true;
|
||||
edge_margin = 10;
|
||||
emulate_touchpad_swipe = false;
|
||||
};
|
||||
};
|
||||
|
||||
touch_gestures = {
|
||||
sensitivity = 4.0;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_edge = "d";
|
||||
long_press_delay = 400;
|
||||
resize_on_border_long_press = true;
|
||||
edge_margin = 10;
|
||||
emulate_touchpad_swipe = false;
|
||||
exec-once = [ "${wmCfg.exec-once}" ];
|
||||
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP, Hyprland"
|
||||
"XDG_SESSION_DESKTOP, Hyprland"
|
||||
"GDK_PIXBUF_MODULE_FILE, ${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
||||
];
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
force_default_wallpaper = 0;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
};
|
||||
|
||||
exec-once = [ "${execOnceScript}" ];
|
||||
|
||||
env = [
|
||||
''XDG_CURRENT_DESKTOP, Hyprland''
|
||||
''XDG_SESSION_DESKTOP, Hyprland''
|
||||
''GDK_PIXBUF_MODULE_FILE, ${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache''
|
||||
];
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
force_default_wallpaper = 0;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
93
home/user/wm.nix
Normal file
93
home/user/wm.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) getExe getExe';
|
||||
|
||||
# ==== binary ==== #
|
||||
rofi = getExe pkgs.rofi;
|
||||
playerctl = getExe pkgs.playerctl;
|
||||
wpctl = getExe' pkgs.wireplumber "wpctl";
|
||||
brightnessctl = getExe pkgs.brightnessctl;
|
||||
|
||||
brightnessStep = toString 10;
|
||||
volumeStep = toString 4;
|
||||
|
||||
rofiWall = import ../../home/scripts/rofiwall.nix { inherit config pkgs; };
|
||||
rbwSelector = import ../../home/scripts/rbwSelector.nix { inherit pkgs; };
|
||||
toggleWlogout = pkgs.writeShellScript "toggleWlogout" ''
|
||||
if ${pkgs.busybox}/bin/pgrep wlogout > /dev/null; then
|
||||
${pkgs.busybox}/bin/pkill wlogout
|
||||
else
|
||||
${getExe config.programs.wlogout.package} --protocol layer-shell
|
||||
fi
|
||||
'';
|
||||
|
||||
cfg = config.wm;
|
||||
mod = cfg.keybinds.mod;
|
||||
sep = cfg.keybinds.separator;
|
||||
in
|
||||
{
|
||||
wm = {
|
||||
exec-once = /* bash */ ''
|
||||
# Fix nemo open in terminal
|
||||
dconf write /org/cinnamon/desktop/applications/terminal/exec "''\'${cfg.app.terminal.name}''\'" &
|
||||
dconf write /org/cinnamon/desktop/applications/terminal/exec-arg "''\'''\'" &
|
||||
|
||||
# Hint dark theme
|
||||
dconf write /org/gnome/desktop/interface/color-scheme '"prefer-dark"' &
|
||||
|
||||
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME &
|
||||
'';
|
||||
|
||||
app = {
|
||||
terminal = {
|
||||
package = config.programs.ghostty.package;
|
||||
name = "ghostty";
|
||||
run = "ghostty -e";
|
||||
};
|
||||
browser = {
|
||||
package = config.programs.zen-browser.package;
|
||||
name = "zen-twilight";
|
||||
};
|
||||
file-browser = {
|
||||
package = config.programs.yazi.pacakge;
|
||||
name = "yazi";
|
||||
};
|
||||
};
|
||||
keybinds = {
|
||||
spawn-repeat = {
|
||||
# ==== Media ==== #
|
||||
"XF86AudioPrev" = "${playerctl} previous";
|
||||
"XF86AudioNext" = "${playerctl} next";
|
||||
"${mod}${sep}CTRL${sep}COMMA" = "${playerctl} previous";
|
||||
"${mod}${sep}CTRL${sep}PERIOD" = "${playerctl} next";
|
||||
"XF86AudioPlay" = "${playerctl} play-pause";
|
||||
"XF86AudioStop" = "${playerctl} stop";
|
||||
"XF86AudioMute" = "${wpctl} set-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioRaiseVolume" =
|
||||
"${wpctl} set-mute @DEFAULT_SINK@ 0 && ${wpctl} set-volume @DEFAULT_SINK@ ${volumeStep}%+";
|
||||
"XF86AudioLowerVolume" =
|
||||
"${wpctl} set-mute @DEFAULT_SINK@ 0 && ${wpctl} set-volume @DEFAULT_SINK@ ${volumeStep}%-";
|
||||
"XF86MonBrightnessDown" = "${brightnessctl} set ${brightnessStep}%-";
|
||||
"XF86MonBrightnessUp" = "${brightnessctl} set ${brightnessStep}%+";
|
||||
};
|
||||
spawn = {
|
||||
"${mod}${sep}Return" = "${getExe cfg.app.terminal.package}";
|
||||
"${mod}${sep}F" = "${getExe cfg.app.browser.package}";
|
||||
"${mod}${sep}E" = "${cfg.app.terminal.run} ${cfg.app.file-browser.name}";
|
||||
"${mod}${sep}CTRL${sep}P" = "${rbwSelector}";
|
||||
"${mod}${sep}CTRL${sep}M" = "${toggleWlogout}";
|
||||
|
||||
# Launcher
|
||||
"${mod}${sep}CTRL${sep}W" = "${rofiWall}";
|
||||
"ALT${sep}SPACE" = "${rofi} -config config/rofi/apps.rasi -show drun";
|
||||
"${mod}${sep}PERIOD" = "${rofi} -modi emoji -show emoji";
|
||||
"${mod}${sep}CTRL${sep}C" = "${rofi} -modi calc -show calc -no-show-match -no-sort";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -3,10 +3,12 @@
|
|||
config,
|
||||
helper,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (osConfig.systemConf) username;
|
||||
inherit (lib) mkForce;
|
||||
inherit (helper) capitalize;
|
||||
inherit (pkgs) runCommand;
|
||||
|
||||
|
|
@ -14,7 +16,7 @@ let
|
|||
owner = "JustAdumbPrsn";
|
||||
repo = "zen-nebula";
|
||||
rev = "main";
|
||||
sha256 = "sha256-wtntRAkOGm6fr396kqzqk+GyPk+ytifXTqqOp0YIvlw=";
|
||||
sha256 = "sha256-Eg9HsN+yDA8OdVcE9clS+FyUhVBH3ooN/odkZIVR/p4=";
|
||||
};
|
||||
|
||||
patchedNebula =
|
||||
|
|
@ -143,6 +145,8 @@ in
|
|||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".zen/${profileName}/search.json.mozlz4".force = mkForce true;
|
||||
|
||||
xdg.mimeApps =
|
||||
let
|
||||
value =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue