Compare commits
12 commits
50e15d3d38
...
e06b6ecf3d
Author | SHA1 | Date | |
---|---|---|---|
e06b6ecf3d | |||
74cc22f2e6 | |||
5b427b9a0f | |||
a4537ad656 | |||
a303abe6cd | |||
6d4395fd85 | |||
fa6c592faf | |||
49d20db7f3 | |||
a590e31e3e | |||
26763c3b67 | |||
17dd88d7ab | |||
4b7e21be29 |
9 changed files with 213 additions and 108 deletions
|
@ -1,7 +1,7 @@
|
||||||
# https://github.com/catppuccin/dunst/blob/main/src/mocha.conf
|
# https://github.com/catppuccin/dunst/blob/main/src/mocha.conf
|
||||||
[global]
|
[global]
|
||||||
frame_color = "#89B4FA"
|
frame_color = "#f5c2e7"
|
||||||
separator_color= frame
|
separator_color = frame
|
||||||
|
|
||||||
follow = "mouse"
|
follow = "mouse"
|
||||||
width = 300
|
width = 300
|
||||||
|
@ -25,41 +25,43 @@ progress_bar_max_width = 300
|
||||||
separator_height = 2
|
separator_height = 2
|
||||||
frame_width = 2
|
frame_width = 2
|
||||||
corner_radius = 8
|
corner_radius = 8
|
||||||
transparency = 0
|
transparency = 1
|
||||||
gap_size = 8
|
gap_size = 8
|
||||||
line_height = 0
|
line_height = 0
|
||||||
notification_limit = 0
|
|
||||||
idle_threshold = 120
|
|
||||||
history_length = 20
|
|
||||||
show_age_threshold = 60
|
|
||||||
markup = "full"
|
markup = "full"
|
||||||
format = "<b>%a</b>\n<b>%s</b>\n%b"
|
format = "<b>%a</b>\n<b>%s</b>\n%b"
|
||||||
font = "Atkinson Hyperlegible Pro 11"
|
font = "Atkinson Hyperlegible Pro 11"
|
||||||
word_wrap = "yes"
|
word_wrap = "yes"
|
||||||
sort = "yes"
|
|
||||||
shrink = "no"
|
|
||||||
indicate_hidden = "yes"
|
|
||||||
sticky_history = "yes"
|
|
||||||
ignore_newline = "no"
|
ignore_newline = "no"
|
||||||
show_indicators = "no"
|
|
||||||
stack_duplicates = true
|
|
||||||
always_run_script = true
|
|
||||||
hide_duplicate_count = false
|
|
||||||
ignore_dbusclose = false
|
ignore_dbusclose = false
|
||||||
mouse_left_click = "do_action"
|
mouse_left_click = "do_action, close_current"
|
||||||
mouse_middle_click = "close_all"
|
mouse_middle_click = "close_all"
|
||||||
mouse_right_click = "close_current"
|
mouse_right_click = "close_current"
|
||||||
|
|
||||||
|
sort = "update"
|
||||||
|
shrink = "no"
|
||||||
|
|
||||||
|
notification_limit = 4
|
||||||
|
indicate_hidden = "yes"
|
||||||
|
idle_threshold = 120
|
||||||
|
history_length = 20
|
||||||
|
show_age_threshold = 60
|
||||||
|
sticky_history = "yes"
|
||||||
|
show_indicators = "yes"
|
||||||
|
stack_duplicates = true
|
||||||
|
hide_duplicate_count = false
|
||||||
|
always_run_script = true
|
||||||
|
|
||||||
[urgency_low]
|
[urgency_low]
|
||||||
background = "#1E1E2E"
|
background = "#1E1E2E30"
|
||||||
foreground = "#CDD6F4"
|
foreground = "#CDD6F4"
|
||||||
|
|
||||||
[urgency_normal]
|
[urgency_normal]
|
||||||
background = "#1E1E2E"
|
background = "#1E1E2E30"
|
||||||
foreground = "#CDD6F4"
|
foreground = "#CDD6F4"
|
||||||
|
|
||||||
[urgency_critical]
|
[urgency_critical]
|
||||||
background = "#1E1E2E"
|
background = "#1E1E2E30"
|
||||||
foreground = "#CDD6F4"
|
foreground = "#CDD6F4"
|
||||||
frame_color = "#FAB387"
|
frame_color = "#FAB387"
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,16 @@ window {
|
||||||
/* search entry */
|
/* search entry */
|
||||||
entry {
|
entry {
|
||||||
background-color: alpha(@surface0, 0.5);
|
background-color: alpha(@surface0, 0.5);
|
||||||
|
color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
button, image {
|
button, box, widget, image {
|
||||||
background: none;
|
background: none;
|
||||||
border: none
|
border: none;
|
||||||
|
color: @text;
|
||||||
|
text-shadow: 0 1px alpha(@base, 0.75);
|
||||||
|
box-shadow: none;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
@ -22,6 +27,6 @@ button {
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover, button:active, box:hover, box:active {
|
||||||
background-color: alpha(@surface0, 0.5);
|
background: alpha(@surface0, 0.5);
|
||||||
}
|
}
|
|
@ -4,16 +4,23 @@
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button, button:hover {
|
||||||
|
box-shadow: none; /* undo default styles */
|
||||||
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
color: @text;
|
color: @text;
|
||||||
|
/*background: alpha(@base, 0.6);*/
|
||||||
background: @base;
|
background: @base;
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
font-family: CozetteVector, FontAwesome, Noto Sans CJK;
|
/*font-family: VictorMono, Iosevka Nerd Font, Noto Sans CJK;*/
|
||||||
|
/*font-family: 'Atkinson Hyperlegible', FontAwesome, Noto Sans CJK;*/
|
||||||
|
font-family: CozetteVector, monospace, FontAwesome, Noto Sans CJK;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
box.module, .modules-right box {
|
#workspaces, .modules-right box {
|
||||||
background-color: @surface0;
|
background-color: @surface0;
|
||||||
margin: 0 0.25em;
|
margin: 0 0.25em;
|
||||||
padding: 0.15em 0.25em;
|
padding: 0.15em 0.25em;
|
||||||
|
@ -39,6 +46,7 @@ box.module, .modules-right box {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: @text;
|
color: @text;
|
||||||
padding: 0 0.4em;
|
padding: 0 0.4em;
|
||||||
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button:nth-child(1) {
|
#workspaces button:nth-child(1) {
|
||||||
|
@ -58,10 +66,23 @@ box.module, .modules-right box {
|
||||||
background: @surface1;
|
background: @surface1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
background: @pink;
|
background: @pink;
|
||||||
color: @surface0;
|
color: @surface0;
|
||||||
}
|
}
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
color: @text;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
#workspaces button.active:hover {
|
||||||
|
background: @pink;
|
||||||
|
color: @surface0;
|
||||||
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
background: @red;
|
background: @red;
|
||||||
|
@ -115,8 +136,22 @@ window#waybar.floating #window {
|
||||||
color: @red;
|
color: @red;
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
#privacy {
|
||||||
color: @text;
|
margin: 0 0.25em;
|
||||||
background: @base;
|
padding: 0;
|
||||||
border: 1px solid @pink;
|
|
||||||
}
|
}
|
||||||
|
#privacy-item {
|
||||||
|
padding: 0 1px;
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
background: @base;
|
||||||
|
border: 1px solid @surface2;
|
||||||
|
}
|
||||||
|
tooltip * {
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
color: @text;
|
||||||
|
font-family: CozetteVector, monospace;
|
||||||
|
}
|
|
@ -49,11 +49,12 @@
|
||||||
hyprpaper.enable = true;
|
hyprpaper.enable = true;
|
||||||
|
|
||||||
gnome-keyring.enable = true;
|
gnome-keyring.enable = true;
|
||||||
polkit-gnome.enable = true;
|
|
||||||
dunst.enable = true;
|
dunst.enable = true;
|
||||||
rofi.enable = true;
|
rofi.enable = true;
|
||||||
nwg-drawer.enable = true;
|
nwg-drawer.enable = true;
|
||||||
waybar.enable = true;
|
waybar.enable = true;
|
||||||
|
batsignal.enable = true;
|
||||||
|
wob.enable = true;
|
||||||
|
|
||||||
# display manager
|
# display manager
|
||||||
sddm.enable = true;
|
sddm.enable = true;
|
||||||
|
|
23
modules/desktop/batsignal.nix
Normal file
23
modules/desktop/batsignal.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.desktop.batsignal;
|
||||||
|
in {
|
||||||
|
options.modules.desktop.batsignal = {
|
||||||
|
enable = mkEnableOption "Enable batsignal, a battery notification service";
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.batsignal;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
hm.wayland.windowManager.hyprland.settings.exec-once = [
|
||||||
|
# -w 20 -c 10 -d 5 -- set battery levels
|
||||||
|
# -p -- notify on plug/unplug
|
||||||
|
# -m 2 -- set interval to 2 seconds
|
||||||
|
"${lib.getExe cfg.package} -w 20 -c 10 -d 5 -p -m 2"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -47,7 +47,9 @@ in {
|
||||||
|
|
||||||
systemd.variables = [ "--all" ];
|
systemd.variables = [ "--all" ];
|
||||||
|
|
||||||
settings = {
|
settings = let
|
||||||
|
wobSock = config.modules.desktop.wob.sockPath;
|
||||||
|
in {
|
||||||
source = [];
|
source = [];
|
||||||
|
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
|
@ -56,22 +58,31 @@ in {
|
||||||
"$mod, mouse:272, movewindow"
|
"$mod, mouse:272, movewindow"
|
||||||
"$mod, mouse:273, resizewindow"
|
"$mod, mouse:273, resizewindow"
|
||||||
];
|
];
|
||||||
bindel = [ # "bind held & locked"
|
bindel = (if config.modules.desktop.wob.enable then [ # "bind held & locked"
|
||||||
|
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}"
|
||||||
|
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}"
|
||||||
|
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5% | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}"
|
||||||
|
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%- | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}"
|
||||||
|
] else [
|
||||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
|
||||||
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5%"
|
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5%"
|
||||||
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%-"
|
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%-"
|
||||||
];
|
]);
|
||||||
bindl = [ # "bind locked"
|
bindl = ([ # "bind locked"
|
||||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
",switch:Lid Switch,exec,${lib.getExe config.modules.desktop.hyprlock.package}"
|
||||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
|
||||||
|
|
||||||
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||||
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
|
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
|
||||||
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
|
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
|
||||||
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
|
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
|
||||||
];
|
|
||||||
|
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||||
|
] ++ (if config.modules.desktop.wob.enable then [
|
||||||
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && (wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q MUTED && echo 0 > ${wobSock}) || wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}"
|
||||||
|
] else [
|
||||||
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
]));
|
||||||
bindr = [ # "bind released"
|
bindr = [ # "bind released"
|
||||||
"SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}"
|
"SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}"
|
||||||
];
|
];
|
||||||
|
@ -97,16 +108,13 @@ in {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
grabPasswordScript = pkgs.writeScript "grab-password" ''
|
|
||||||
${lib.getExe pkgs.rbw} get $(${lib.getExe pkgs.zenity} --entry --text="Enter the name for your password entry to copy it to your clipboard" --title="Password") | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard
|
|
||||||
'';
|
|
||||||
in [
|
in [
|
||||||
"$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run"
|
"$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run"
|
||||||
", print, exec, ${screenshotScript}"
|
", print, exec, ${screenshotScript}"
|
||||||
"$mod, T, exec, ${lib.getExe pkgs.wezterm}"
|
"$mod, T, exec, ${lib.getExe pkgs.wezterm}"
|
||||||
|
|
||||||
"$mod, Q, killactive, "
|
"$mod, Q, killactive, "
|
||||||
"$mod, V, togglefloating, "
|
"$mod, F, togglefloating, "
|
||||||
"$mod, P, pseudo, " # dwindle
|
"$mod, P, pseudo, " # dwindle
|
||||||
"$mod, J, togglesplit, " # dwindle
|
"$mod, J, togglesplit, " # dwindle
|
||||||
|
|
||||||
|
@ -128,7 +136,9 @@ in {
|
||||||
"$mod, bracketright, workspace, e+1"
|
"$mod, bracketright, workspace, e+1"
|
||||||
|
|
||||||
", XF86LaunchA, exec, ${screenshotScript}"
|
", XF86LaunchA, exec, ${screenshotScript}"
|
||||||
", XF86LaunchB, exec, ${grabPasswordScript}"
|
", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20"
|
||||||
|
|
||||||
|
"ALT, Tab, exec, ${lib.getExe pkgs.rofi-wayland} -show window"
|
||||||
] ++ (
|
] ++ (
|
||||||
# workspaces
|
# workspaces
|
||||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||||
|
@ -161,7 +171,11 @@ in {
|
||||||
|
|
||||||
monitor=",highrr,auto,auto";
|
monitor=",highrr,auto,auto";
|
||||||
|
|
||||||
exec-once = [ "${lib.getExe pkgs.networkmanagerapplet}" ];
|
exec-once = [
|
||||||
|
"${lib.getExe pkgs.networkmanagerapplet}" # network applet
|
||||||
|
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # polkit agent
|
||||||
|
"${lib.getExe pkgs.wl-clip-persist} --clipboard primary" # to fix wl clipboards disappearing
|
||||||
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
"XCURSOR_THEME,${config.modules.desktop.themes.cursorTheme.name}"
|
"XCURSOR_THEME,${config.modules.desktop.themes.cursorTheme.name}"
|
||||||
|
@ -171,8 +185,8 @@ in {
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 6;
|
gaps_in = 6;
|
||||||
gaps_out = 6;
|
gaps_out = 6;
|
||||||
border_size = 2;
|
border_size = 1;
|
||||||
no_border_on_floating = true;
|
no_border_on_floating = false;
|
||||||
|
|
||||||
layout = "dwindle";
|
layout = "dwindle";
|
||||||
|
|
||||||
|
@ -214,14 +228,15 @@ in {
|
||||||
"workspace 4, class:vesktop"
|
"workspace 4, class:vesktop"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
blurls = [
|
||||||
|
"gtk-layer-shell"
|
||||||
|
];
|
||||||
|
|
||||||
layerrule = [
|
layerrule = [
|
||||||
"animation slide, notifications"
|
"animation slide, notifications"
|
||||||
"animation slide, waybar"
|
"animation slide, waybar"
|
||||||
];
|
"blur, notifications"
|
||||||
|
"blur, wob"
|
||||||
blurls = [
|
|
||||||
"gtk-layer-shell" # nwg-drawer
|
|
||||||
#"waybar"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
|
@ -253,6 +268,7 @@ in {
|
||||||
"border, 1, 2, outExpo"
|
"border, 1, 2, outExpo"
|
||||||
"fade, 1, 3, outCubic"
|
"fade, 1, 3, outCubic"
|
||||||
"workspaces, 1, 6, outExpo"
|
"workspaces, 1, 6, outExpo"
|
||||||
|
"specialWorkspace, 1, 2, outCubic, fade"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
{ lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.modules.desktop.polkit-gnome;
|
|
||||||
in {
|
|
||||||
options.modules.desktop.polkit-gnome = {
|
|
||||||
enable = mkEnableOption "Enable polkit-gnome, a simple polkit agent";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
|
||||||
description = "polkit-gnome-authentication-agent-1";
|
|
||||||
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
wants = [ "graphical-session.target" ];
|
|
||||||
after = [ "graphical-session.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 1;
|
|
||||||
TimeoutStopSec = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -55,45 +55,38 @@ in {
|
||||||
"memory"
|
"memory"
|
||||||
"power-profiles-daemon"
|
"power-profiles-daemon"
|
||||||
"battery"
|
"battery"
|
||||||
|
"privacy"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"group/power" = {
|
"group/power" = {
|
||||||
orientation = "inherit";
|
orientation = "inherit";
|
||||||
drawer = {
|
|
||||||
transition-duration = 200;
|
|
||||||
children-class = "not-power";
|
|
||||||
transition-left-to-right = false;
|
|
||||||
};
|
|
||||||
modules = [
|
modules = [
|
||||||
"custom/power"
|
"custom/power"
|
||||||
"custom/lock"
|
|
||||||
"custom/reboot"
|
|
||||||
"custom/quit"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"custom/quit" = {
|
"custom/power" = let
|
||||||
format = "";
|
powerSelect = pkgs.writeScript "power-menu" ''
|
||||||
tooltip = true;
|
cmd=$(echo 'shutdown|reboot|lock|exit Hyprland' | ${lib.getExe pkgs.rofi-wayland} -dmenu -sep '|' -i -p 'what to do ?' -theme-str 'window { height: 132px; }')
|
||||||
tooltip-format = "Exit Hyprland";
|
case "$cmd" in
|
||||||
on-click = "${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit";
|
shutdown)
|
||||||
};
|
shutdown now
|
||||||
"custom/lock" = {
|
;;
|
||||||
format = "";
|
reboot)
|
||||||
tooltip = true;
|
reboot
|
||||||
tooltip-format = "Lock the system";
|
;;
|
||||||
on-click = "${lib.getExe config.modules.desktop.hyprlock.package}";
|
lock)
|
||||||
};
|
${lib.getExe config.modules.desktop.hyprlock.package}
|
||||||
"custom/reboot" = {
|
;;
|
||||||
format = "↻";
|
"exit Hyprland")
|
||||||
tooltip = true;
|
${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit
|
||||||
tooltip-format = "Reboot";
|
;;
|
||||||
on-click = "reboot";
|
esac
|
||||||
};
|
'';
|
||||||
"custom/power" = {
|
in {
|
||||||
format = "⏻";
|
format = "⏻";
|
||||||
tooltip = true;
|
tooltip = true;
|
||||||
tooltip-format = "Power off";
|
tooltip-format = "Power menu";
|
||||||
on-click = "shutdown now";
|
on-click = "${powerSelect}";
|
||||||
};
|
};
|
||||||
"hyprland/workspaces" = {
|
"hyprland/workspaces" = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
|
@ -208,6 +201,15 @@ in {
|
||||||
tooltip-format = "{timeTo} ({power}W)";
|
tooltip-format = "{timeTo} ({power}W)";
|
||||||
format-charging = " {capacity}%";
|
format-charging = " {capacity}%";
|
||||||
};
|
};
|
||||||
|
privacy = {
|
||||||
|
icon-spacing = 0;
|
||||||
|
icon-size = 12;
|
||||||
|
transition-duration = 250;
|
||||||
|
modules = [
|
||||||
|
{ type = "screenshare"; }
|
||||||
|
{ type = "audio-in"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
clock = {
|
clock = {
|
||||||
format = "{:%H:%M}";
|
format = "{:%H:%M}";
|
||||||
format-alt = "{:%a %b %d %R}";
|
format-alt = "{:%a %b %d %R}";
|
||||||
|
|
49
modules/desktop/wob.nix
Normal file
49
modules/desktop/wob.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.desktop.wob;
|
||||||
|
in {
|
||||||
|
options.modules.desktop.wob = {
|
||||||
|
enable = mkEnableOption "Enable wob, a Wayland overlay bar";
|
||||||
|
sockPath = mkOption {
|
||||||
|
description = "Wob sock location";
|
||||||
|
type = types.str;
|
||||||
|
default = "$XDG_RUNTIME_DIR/wob.sock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
hm.wayland.windowManager.hyprland.settings.exec-once = let
|
||||||
|
path = cfg.sockPath;
|
||||||
|
script = pkgs.writeScript "launch-wob" ''
|
||||||
|
rm -f ${path} && mkfifo ${path} && tail -f ${path} | ${lib.getExe pkgs.wob}
|
||||||
|
'';
|
||||||
|
in [ script ];
|
||||||
|
hm.services.wob = {
|
||||||
|
enable = true;
|
||||||
|
settings = with config.colorScheme.palette; {
|
||||||
|
"" = {
|
||||||
|
timeout = 1000;
|
||||||
|
|
||||||
|
border_offset = 2;
|
||||||
|
border_size = 2;
|
||||||
|
bar_padding = 2;
|
||||||
|
|
||||||
|
anchor = "top";
|
||||||
|
width = 300;
|
||||||
|
height = 30;
|
||||||
|
|
||||||
|
margin = 12;
|
||||||
|
|
||||||
|
border_color = "${base04}FF";
|
||||||
|
background_color = "${base01}66";
|
||||||
|
bar_color = "${base05}FF";
|
||||||
|
|
||||||
|
overflow_mode = "nowrap";
|
||||||
|
output_mode = "focused";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue