home config migration
This commit is contained in:
parent
64f4c4f5b0
commit
4bba4871b4
25 changed files with 1296 additions and 16 deletions
8
modules/home/rice/cursor.nix
Normal file
8
modules/home/rice/cursor.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ctp-opt, ... }: {
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.catppuccin-cursors."${ctp-opt.flavor}Light";
|
||||
name = "catppuccin-${ctp-opt.flavor}-light-cursors";
|
||||
size = 24;
|
||||
};
|
||||
}
|
||||
21
modules/home/rice/dunst.nix
Normal file
21
modules/home/rice/dunst.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, rice, ... }: {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings.global = {
|
||||
font = "${rice.font} 8";
|
||||
width = 300;
|
||||
origin = "${if rice.bar.top then "top" else "bottom"}-right";
|
||||
offset = "${toString rice.gap.outer}x${toString rice.gap.outer}";
|
||||
corner_radius = rice.borders.rounded;
|
||||
frame_width = rice.borders.size;
|
||||
notification_limit = 0;
|
||||
mouse_left_click = "close_current";
|
||||
mouse_middle_click = "do_action";
|
||||
mouse_right_click = "context";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
dunst
|
||||
];
|
||||
}
|
||||
38
modules/home/rice/hypridle.nix
Normal file
38
modules/home/rice/hypridle.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ pkgs, ... }: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "hyprlock";
|
||||
unlock_cmd = "pkill -USR1 hyprlock";
|
||||
before_sleep_cmd = "hyprctl dispatch dpms off && hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on && pkill -USR2 hyprlock";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 120;
|
||||
on-timeout = "brightnessctl s 10%-";
|
||||
on-resume = "brightnessctl s +10%";
|
||||
}
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "hyprlock";
|
||||
on-resume = "pkill -USR2 hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 420;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hypridle
|
||||
];
|
||||
}
|
||||
163
modules/home/rice/hyprland.nix
Normal file
163
modules/home/rice/hyprland.nix
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
{ pkgs, rice, ctp-opt, ... }: {
|
||||
imports = [
|
||||
./keybinds.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
package = pkgs.hyprland; # inputs.hl.packages."${pkgs.system}".hyprland;
|
||||
xwayland.enable = true;
|
||||
settings = {
|
||||
debug = {
|
||||
error_position = 1;
|
||||
disable_logs = true;
|
||||
};
|
||||
|
||||
# monitor = [
|
||||
# "eDP-1,preferred,auto,1"
|
||||
# ",preferred,auto,1"
|
||||
# ];
|
||||
source = [
|
||||
"~/.config/hypr/monitors.conf"
|
||||
"~/.config/hypr/workspaces.conf"
|
||||
]; # nwg-displays
|
||||
|
||||
exec-once = [
|
||||
"hyprctl setcursor catppuccin-mocha-light-cursors 24"
|
||||
"wl-paste --type text --watch cliphist store"
|
||||
"wl-paste --type image --watch cliphist store"
|
||||
|
||||
#"dunst &"
|
||||
#"hypridle &"
|
||||
#"swww-daemon &"
|
||||
"uwsm app -s s -- waybar &"
|
||||
"uwsm app -s b -- sunshine &"
|
||||
|
||||
"uwsm app -s b -- blueman-applet &"
|
||||
"uwsm app -s b -- nm-applet &"
|
||||
"uwsm app -s b -- tailscale-systray &"
|
||||
#"keepassxc &"
|
||||
];
|
||||
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"XCURSOR_THEME,catppuccin-${ctp-opt.flavor}-light-cursors"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
"HYPRCURSOR_THEME,catppuccin-${ctp-opt.flavor}-light-cursors"
|
||||
|
||||
"CLIPHIST_MAX_ITEMS,36"
|
||||
|
||||
"GTK_APPLICATION_PREFER_DARK_THEME,1"
|
||||
"GTK_THEME,Adwaita:dark"
|
||||
"QT_QPA_PLATFORMTHEME,kvantum"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = rice.gap.inner;
|
||||
gaps_out = rice.gap.outer;
|
||||
border_size = rice.borders.size;
|
||||
resize_on_border = true;
|
||||
allow_tearing = false;
|
||||
layout = "dwindle";
|
||||
|
||||
"col.active_border" = if rice.borders.colored then "$accent" else "$overlay0";
|
||||
"col.inactive_border" = if rice.borders.colored then "$overlay2" else "$crust";
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
pseudotile = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = rice.borders.rounded;
|
||||
rounding_power = 2;
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 0.9;
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 6;
|
||||
render_power = 3;
|
||||
color_inactive = "rgba($crustAlpha99)";
|
||||
color = "rgba($crustAlphaee)";
|
||||
};
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
#first_launch_animation = false;
|
||||
|
||||
bezier = [
|
||||
"easeOutQuint,0.23,1,0.32,1"
|
||||
"quick,0.15,0,0.1,1"
|
||||
"overshot,0.05,0.9,0.1,1.1"
|
||||
"instant,0,0,1,1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"global, 1, 10, default"
|
||||
"fade, 1, 3, quick"
|
||||
"border, 1, 10, quick"
|
||||
"layers, 1, 5, easeOutQuint, slidevert"
|
||||
"windows, 1, 5, easeOutQuint, popin 87%"
|
||||
"workspaces, 1, 5, easeOutQuint, slidefade 20%"
|
||||
"specialWorkspace, 1, 5, easeOutQuint, slidefadevert ${if rice.bar.top then "" else "-"}20%"
|
||||
"zoomFactor, 1, 1, instant"
|
||||
];
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
focus_on_activate = true;
|
||||
middle_click_paste = false;
|
||||
exit_window_retains_fullscreen = true;
|
||||
on_focus_under_fullscreen = 1;
|
||||
background_color = "$base";
|
||||
vfr = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
kb_options = "caps:none";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
middle_button_emulation = 0;
|
||||
};
|
||||
};
|
||||
|
||||
layerrule = [
|
||||
"no_anim on, match:namespace selection" # hyprshot overlay
|
||||
"animation fade, match:namespace swww-daemon"
|
||||
"animation fade, match:namespace logout_dialog"
|
||||
"above_lock false, match:namespace waybar"
|
||||
"above_lock true, match:namespace notifications"
|
||||
"above_lock true, match:namespace selection"
|
||||
"above_lock true, match:namespace logout_dialog"
|
||||
];
|
||||
|
||||
windowrule = [
|
||||
"suppress_event minimize, match:class .*"
|
||||
"no_focus on, match:class ^$, match:title ^$, match:xwayland 1, match:float 1, match:fullscreen 0, match:pin 0"
|
||||
|
||||
"stay_focused on, suppress_event fullscreen maximize, dim_around on, float on, match:title ^(Hyprland Polkit Agent|Unlock Login Keyring|KeePassXC -.*)$"
|
||||
"keep_aspect_ratio on, pin on, match:title ^(Picture in picture)$"
|
||||
|
||||
"float on, match:title ^(Open|Print|Save|Rename|Move|Copy|Confirm).*"
|
||||
"float on, match:title ^(Preferences|Settings|Options|About|Passbolt).*"
|
||||
"float on, match:title ^(MainPicker|Volume Control|File Operation Progress|Network Connections|Choose an Application| )$"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
74
modules/home/rice/hyprlock.nix
Normal file
74
modules/home/rice/hyprlock.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{ rice, ... }: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
ignore_empty_input = true;
|
||||
hide_cursor = false;
|
||||
};
|
||||
|
||||
animation = {
|
||||
bezier = [
|
||||
"easeOutQuint,0.23,1,0.32,1"
|
||||
"quick,0.15,0,0.1,1"
|
||||
"overshot,0.05,0.9,0.1,1.1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"fade, 1, 3.5, easeOutQuint"
|
||||
];
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
brightness = 0.25;
|
||||
blur_passes = 3;
|
||||
blur_size = 1;
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
text = "<span> </span>";
|
||||
color = "$subtext1";
|
||||
font_size = 64;
|
||||
position = "0, 0";
|
||||
shadow_passes = 1;
|
||||
shadow_boost = 0.5;
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, ${builtins.toString (rice.gap.outer + (if rice.bar.top then 0 else 60))}";
|
||||
valign = "bottom";
|
||||
halign = "center";
|
||||
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
outline_thickness = rice.borders.size;
|
||||
shadow_passes = 8;
|
||||
rounding = rice.borders.rounded;
|
||||
|
||||
outer_color = if rice.borders.colored then "$accent" else "$overlay0";
|
||||
inner_color = "$crust";
|
||||
font_color = "$text";
|
||||
placeholder_text = "Type your password";
|
||||
font_family = rice.font;
|
||||
# font_family = "monospace";
|
||||
|
||||
capslock_color = "$yellow";
|
||||
check_color = "$green";
|
||||
fail_color = "$red";
|
||||
fail_text = " $FAIL ($ATTEMPTS)";
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
172
modules/home/rice/keybinds.nix
Normal file
172
modules/home/rice/keybinds.nix
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
{ pkgs, hostname, ... }: {
|
||||
services.fusuma = {
|
||||
extraPackages = with pkgs; [ systemd coreutils-full xorg.xprop ];
|
||||
enable = true;
|
||||
settings = {
|
||||
swipe = {
|
||||
"4".down.sendkey = "LEFTMETA+L";
|
||||
"4".up.sendkey = "LEFTMETA+M";
|
||||
"3".up.sendkey = "LEFTMETA+W";
|
||||
|
||||
"3".down.sendkey = "LEFTMETA+DOWN";
|
||||
"3".right.sendkey = "LEFTMETA+LEFT";
|
||||
"3".left.sendkey = "LEFTMETA+RIGHT";
|
||||
};
|
||||
hold = {
|
||||
"3".sendkey = "LEFTMETA+TAB";
|
||||
"4".sendkey = "LEFTMETA+SPACE";
|
||||
};
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
gestures = {
|
||||
#workspace_swipe = true;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
# gesture = [
|
||||
# "3, up, fullscreen, maximize"
|
||||
# "3, down, scale: 0.5, special, hidden"
|
||||
# "3, left, workspace, -1"
|
||||
# "3, right, workspace, +1"
|
||||
# ];
|
||||
|
||||
binde = [
|
||||
"ALT, TAB, cyclenext,"
|
||||
"ALT, TAB, bringactivetotop,"
|
||||
"ALT SHIFT, TAB, cyclenext, prev"
|
||||
"ALT SHIFT, TAB, bringactivetotop,"
|
||||
|
||||
"SUPER SHIFT, right, movetoworkspace, +1"
|
||||
"SUPER SHIFT, left, movetoworkspace, -1"
|
||||
"SUPER SHIFT, 1, movetoworkspace, 1"
|
||||
"SUPER SHIFT, 2, movetoworkspace, 2"
|
||||
"SUPER SHIFT, 3, movetoworkspace, 3"
|
||||
"SUPER SHIFT, 4, movetoworkspace, 4"
|
||||
|
||||
"SUPER, right, workspace, +1"
|
||||
"SUPER, left, workspace, -1"
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
"SUPER, 4, workspace, 4"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
bindc = [
|
||||
"SUPER, mouse:274, killactive"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", switch:on:Lid Switch, exec, systemctl suspend"
|
||||
", PRINT, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
"SUPER, SPACE, exec, playerctl play-pause"
|
||||
"SUPER, M, exec, wlogout"
|
||||
"SUPER, TAB, exec, pkill -SIGUSR1 waybar"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# ",XF86Tools, exec, "
|
||||
# ",XF86Bluetooth, exec, "
|
||||
# ",XF86Keyboard, exec, "
|
||||
# ",XF86Favorites, exec, "
|
||||
|
||||
",XF86Display, exec, [float; size 75%] uwsm app -- nwg-displays"
|
||||
"CTRL ALT, DELETE, exec, wlogout"
|
||||
"CTRL SHIFT, ESCAPE, exec, [float; size 75%] uwsm app -- kitty btop"
|
||||
"SUPER, Grave, exec, dunstctl set-paused toggle"
|
||||
|
||||
"SUPER, N, exec, uwsm app -- rofi-network-manager"
|
||||
|
||||
"SUPER, J, exec, notify-send -u critical ${hostname} 'Caffein Mode' && notify-send '(SUPER+X to reset)' && systemctl --user stop hypridle"
|
||||
"SUPER, K, exec, notify-send -u critical ${hostname} 'Focus Mode' && notify-send '(SUPER+X to reset)' && systemctl --user stop swww && pkill -SIGUSR1 waybar && hyprctl --batch 'keyword decoration:inactive_opacity 1.0; keyword decoration:blur:enabled 0; keyword general:gaps_in 0; keyword general:gaps_out 0; keyword general:border_size 1; keyword decoration:rounding 0; keyword decoration:shadow:enabled false'"
|
||||
"SUPER, B, submap, disabled-all-keybinds"
|
||||
"SUPER, H, exec, notify-send ${hostname} 'Animations Off' && hyprctl keyword animations:enabled 0"
|
||||
"SUPER, X, exec, dunstctl close-all && hyprctl reload && hyprctl dispatch submap reset && pkill -SIGUSR2 waybar && systemctl --user restart swww hypridle fusuma"
|
||||
"SUPER, Z, exec, dunstctl close-all"
|
||||
|
||||
"SUPER SHIFT, S, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
"ALT, PRINT, exec, hyprshot -m output -o ~/Pictures/Screenshots"
|
||||
|
||||
"SUPER, R, exec, rofi -show drun -show-icons -display-drun '' -run-command \"uwsm app -- {cmd}\""
|
||||
"SUPER, V, exec, rofi -modi clipboard:cliphist-rofi-img -show clipboard -show-icons"
|
||||
# "SUPER, B, exec, rofi -show calc -modi calc -no-show-match -no-sort"
|
||||
|
||||
"SUPER, A, exec, uwsm app -- zeditor"
|
||||
"SUPER, T, exec, uwsm app -- kitty"
|
||||
"SUPER, E, exec, uwsm app -- pcmanfm-qt ~" # kitty ranger ~"
|
||||
"SUPER, C, exec, [float; size 75%] uwsm app -- kitty btop"
|
||||
"SUPER SHIFT, C, exec, [float; size 75%] uwsm app -- kitty zsh -c 'fastfetch; exec zsh -i'"
|
||||
"SUPER, Y, exec, uwsm app -- brave --restore-last-session"
|
||||
"SUPER, D, exec, uwsm app -- steam steam://open/bigpicture"
|
||||
"SUPER SHIFT, D, exec, uwsm app -- steam"
|
||||
|
||||
"SUPER, Q, killactive,"
|
||||
"SUPER SHIFT, Q, forcekillactive,"
|
||||
"SUPER, W, fullscreen, 1"
|
||||
"SUPER, S, fullscreen, 0"
|
||||
"SUPER, F, togglefloating,"
|
||||
"SUPER, G, togglesplit,"
|
||||
"SUPER, L, exec, loginctl lock-session"
|
||||
|
||||
"SUPER, down, togglespecialworkspace, hidden"
|
||||
"SUPER SHIFT, down, movetoworkspace, special:hidden"
|
||||
"SUPER SHIFT, up, movetoworkspace, +0"
|
||||
|
||||
"SUPER, P, submap, move"
|
||||
"SUPER, O, submap, resize"
|
||||
"SUPER, I, submap, focus"
|
||||
"SUPER, U, submap, swap"
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
submap = move
|
||||
binde = , right, movewindow, r
|
||||
binde = , left, movewindow, l
|
||||
binde = , up, movewindow, u
|
||||
binde = , down, movewindow, d
|
||||
bind = , catchall, submap, reset
|
||||
|
||||
submap = resize
|
||||
binde = , right, resizeactive, 10 0
|
||||
binde = , left, resizeactive, -10 0
|
||||
binde = , up, resizeactive, 0 -10
|
||||
binde = , down, resizeactive, 0 10
|
||||
bind = , catchall, submap, reset
|
||||
|
||||
submap = swap
|
||||
bind = , right, swapwindow, r
|
||||
bind = , left, swapwindow, l
|
||||
bind = , up, swapwindow, u
|
||||
bind = , down, swapwindow, d
|
||||
bind = , catchall, submap, reset
|
||||
|
||||
submap = focus
|
||||
bind = , right, movefocus, r
|
||||
bind = , left, movefocus, l
|
||||
bind = , up, movefocus, u
|
||||
bind = , down, movefocus, d
|
||||
bind = , catchall, submap, reset
|
||||
|
||||
submap = disabled-all-keybinds
|
||||
bind = , ESCAPE, submap, reset
|
||||
|
||||
submap = reset
|
||||
''; # https://github.com/nix-community/home-manager/issues/6062
|
||||
};
|
||||
}
|
||||
42
modules/home/rice/rofi.nix
Normal file
42
modules/home/rice/rofi.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, rice, ctp-opt, ... }: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
# location = "top";
|
||||
# yoffset = 10;
|
||||
theme = let inherit (config.lib.formats.rasi) mkLiteral; in {
|
||||
"entry".placeholder = "Search...";
|
||||
"scrollbar".border-radius = rice.borders.rounded;
|
||||
# "element-icon".size = mkLiteral "2em";
|
||||
"*" = {
|
||||
font = "${rice.font} 12";
|
||||
normal-foreground = mkLiteral "@text";
|
||||
alternate-normal-foreground = mkLiteral "@text";
|
||||
foreground = mkLiteral "@${ctp-opt.accent}";
|
||||
border-color = mkLiteral (if rice.borders.colored then "@foreground" else "@overlay0");
|
||||
};
|
||||
"window" = {
|
||||
border-radius = rice.borders.rounded;
|
||||
border = rice.borders.size;
|
||||
# fullscreen = true;
|
||||
};
|
||||
"listview" = {
|
||||
columns = 2; # 3;
|
||||
lines = 9; # 3;
|
||||
fixed-columns = false;
|
||||
};
|
||||
"element" = {
|
||||
border-radius = rice.borders.rounded;
|
||||
padding = mkLiteral "4px";
|
||||
spacing = mkLiteral "8px";
|
||||
# orientation = mkLiteral "vertical";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
rofi-network-manager
|
||||
rofi-power-menu
|
||||
rofi
|
||||
];
|
||||
}
|
||||
42
modules/home/rice/theme.nix
Normal file
42
modules/home/rice/theme.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, pkgs, ctp-opt, ... }: {
|
||||
catppuccin = {
|
||||
hyprlock.useDefaultConfig = false;
|
||||
hyprland.accent = ctp-opt.primary;
|
||||
flavor = ctp-opt.flavor;
|
||||
accent = ctp-opt.accent;
|
||||
enable = true;
|
||||
};
|
||||
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings."org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
gtk-theme = "Adwaita-dark";
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = lib.mkForce pkgs.papirus-icon-theme;
|
||||
};
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "kvantum";
|
||||
style = {
|
||||
name = "kvantum";
|
||||
package = pkgs.catppuccin-kvantum.override {
|
||||
variant = ctp-opt.flavor;
|
||||
accent = ctp-opt.accent;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
266
modules/home/rice/waybar.nix
Normal file
266
modules/home/rice/waybar.nix
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
{ username, hostname, ctp-opt, rice, ... }: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = if rice.bar.top then "top" else "bottom";
|
||||
margin-top = if rice.bar.top then rice.gap.outer else 0;
|
||||
margin-bottom = if rice.bar.top then 0 else rice.gap.outer;
|
||||
margin-right = rice.gap.outer;
|
||||
margin-left = rice.gap.outer;
|
||||
|
||||
modules-left = [
|
||||
"custom/start"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
"mpris"
|
||||
];
|
||||
modules-center = if rice.bar.minimal then [] else [
|
||||
"custom/dunst"
|
||||
"clock"
|
||||
"tray"
|
||||
"hyprland/submap"
|
||||
];
|
||||
modules-right = if rice.bar.minimal then [
|
||||
"tray"
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"battery"
|
||||
"clock"
|
||||
"custom/dunst"
|
||||
] else [
|
||||
"temperature"
|
||||
"cpu"
|
||||
"memory"
|
||||
"disk"
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"battery"
|
||||
];
|
||||
"cpu" = {
|
||||
states = {
|
||||
critical = 85;
|
||||
};
|
||||
interval = 1;
|
||||
format = " {usage:2}% {avg_frequency}GHz";
|
||||
on-click = "auto-cpufreq-gtk";
|
||||
on-click-right = "pkexec systemctl restart thermald throttled && notify-send ${hostname} 'CPU Underclocking Restarted'";
|
||||
on-click-middle = "pkexec systemctl stop thermald throttled && notify-send ${hostname} 'CPU Underclocking Stopped'";
|
||||
};
|
||||
"memory" = {
|
||||
states = {
|
||||
critical = 85;
|
||||
};
|
||||
interval = 1;
|
||||
format = " {used:0.1f}GiB";
|
||||
on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop";
|
||||
};
|
||||
"disk" = {
|
||||
states = {
|
||||
critical = 85;
|
||||
};
|
||||
interval = 5;
|
||||
format = " {used}";
|
||||
on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop";
|
||||
on-click-right = "kitty sh -c 'sudo nix-collect-garbage -d; nix-collect-garbage -d; read'";
|
||||
};
|
||||
"network" = {
|
||||
interval = 1;
|
||||
format-ethernet = " {ifname}";
|
||||
format-wifi = " {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
format-disabled = "";
|
||||
tooltip = false;
|
||||
on-click = "nm-connection-editor";
|
||||
on-click-middle = "kitty sh -c 'ping 1.1 -c 3 && ping google.com -c 3; read'";
|
||||
on-click-right = "pkexec systemctl restart systemd-resolved NetworkManager tailscaled cloudflare-warp && notify-send ${hostname} 'Network Restarted'";
|
||||
};
|
||||
"temperature" = {
|
||||
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
critical-threshold = 80;
|
||||
format = " {temperatureC}°C";
|
||||
interval = 1;
|
||||
on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop";
|
||||
};
|
||||
"power-profiles-daemon" = {
|
||||
format = "{icon} {profile}";
|
||||
format-icons = {
|
||||
performance = "";
|
||||
power-saver = "";
|
||||
balanced = "";
|
||||
};
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-down = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-up = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"custom/dunst" = {
|
||||
format = "{}";
|
||||
exec = "echo \"$([ $(dunstctl is-paused) = 'false' ] && echo '' || echo '') $(dunstctl count history)\"";
|
||||
on-click = "dunstctl set-paused toggle";
|
||||
on-click-right = "dunstctl history-clear";
|
||||
on-scroll-up = "dunstctl history-pop";
|
||||
on-scroll-down = "dunstctl close";
|
||||
interval = 1;
|
||||
};
|
||||
"mpris" = {
|
||||
intelval = 1;
|
||||
format = " {title} - {artist}";
|
||||
max-length = 25;
|
||||
format-paused = " {title} - {artist}";
|
||||
on-click-middle = "playerctl play-pause";
|
||||
on-click-right = "playerctl next";
|
||||
on-click = "playerctl previous";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
icon = true;
|
||||
max-length = 35;
|
||||
separate-outputs = false;
|
||||
rewrite = {
|
||||
"" = "${username}@${hostname}";
|
||||
"~" = "${username}@${hostname}";
|
||||
"btop" = "${username}@${hostname}";
|
||||
};
|
||||
on-click-right = "hyprctl dispatch fullscreen 0";
|
||||
on-click-middle = "hyprctl dispatch killactive";
|
||||
on-click = "hyprctl dispatch fullscreen 1";
|
||||
on-scroll-up = "hyprctl dispatch cyclenext";
|
||||
on-scroll-down = "hyprctl dispatch cyclenext prev";
|
||||
};
|
||||
"hyprland/submap" = {
|
||||
format = " {}";
|
||||
on-click = "hyprctl dispatch submap reset";
|
||||
};
|
||||
"clock" = {
|
||||
format = "{:%b %d, %I:%M:%S %p}";
|
||||
interval = 1;
|
||||
on-click = "pkexec systemctl restart tzupdate && notify-send ${hostname} 'Timezone Updated'";
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"taskbar" = {
|
||||
icon-size = 10;
|
||||
icon-theme = "Papirus-Dark";
|
||||
on-click = "activate";
|
||||
on-click-right = "fullscreen";
|
||||
on-click-middle = "close";
|
||||
on-scroll-up = "maximize";
|
||||
on-scroll-down = "minimize";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = " {volume}%{format_source}";
|
||||
format-muted = " {volume}%{format_source_muted}";
|
||||
format-source = "";
|
||||
format-source-muted = " ";
|
||||
on-click = "pavucontrol";
|
||||
on-click-middle = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}% {power}W";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
interval = 1;
|
||||
on-click = "pkexec systemctl restart auto-cpufreq";
|
||||
};
|
||||
"custom/start" = {
|
||||
format = "";
|
||||
on-click-middle = "wlogout";
|
||||
on-click-right = "hyprctl dispatch togglespecialworkspace hidden";
|
||||
on-click = "rofi -show drun -show-icons -display-drun '' -run-command \"uwsm app -- {cmd}\"";
|
||||
};
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
* {
|
||||
font-size: 12px;
|
||||
font-family: Font Awesome, ${rice.font};
|
||||
font-weight: bold;
|
||||
color: @text;
|
||||
transition: none;
|
||||
transition: all, 0.25s ease-out;
|
||||
}
|
||||
|
||||
window#waybar, .modules-left, .modules-center, .modules-right { border-radius: ${toString rice.borders.rounded}px; }
|
||||
.modules-left, .modules-center, .modules-right { padding: 0 5px; }
|
||||
window#waybar${if rice.bar.fragmented then ":not(.empty):not(.floating)" else ""}, .modules-left, ${if rice.bar.minimal then "" else ".modules-center,"} .modules-right {
|
||||
background-color: @crust;
|
||||
border: ${toString rice.borders.size}px solid @surface0;
|
||||
}
|
||||
${if rice.bar.fragmented then "
|
||||
window#waybar:not(.empty):not(.floating) .modules-right, window#waybar:not(.empty):not(.floating) .modules-center{
|
||||
border-left: none;
|
||||
}
|
||||
window#waybar:not(.empty):not(.floating) .modules-left, window#waybar:not(.empty):not(.floating) .modules-center {
|
||||
border-right: none;
|
||||
}
|
||||
" else ""}
|
||||
window#waybar${if rice.bar.fragmented then ":not(.empty):not(.floating)" else ""} .modules-center {
|
||||
border-radius: 0px;
|
||||
}
|
||||
window#waybar${if rice.bar.fragmented then ":not(.empty):not(.floating)" else ""} .modules-left {
|
||||
border-radius: ${toString rice.borders.rounded}px 0px 0px ${toString rice.borders.rounded}px;
|
||||
}
|
||||
window#waybar${if rice.bar.fragmented then ":not(.empty):not(.floating)" else ""} .modules-right {
|
||||
border-radius: 0px ${toString rice.borders.rounded}px ${toString rice.borders.rounded}px 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: rgba(0,0,0,0);
|
||||
border: ${toString rice.borders.size}px solid transparent;
|
||||
}
|
||||
|
||||
#window, #submap { padding: 0px 5px; }
|
||||
#submap, #workspaces, #cpu, #memory, #disk, #clock, #window, #tray, #pulseaudio, #battery, #network, #temperature, #power-profiles-daemon, #custom-exit, #custom-start, #custom-dunst, #mpris { padding: 0px 5px; margin: 0px 5px; }
|
||||
|
||||
#workspaces button {
|
||||
border-radius: 0px;
|
||||
margin: 0px;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#workspaces button:hover, #custom-start:hover, #window:hover, #mpris:hover {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
color: @text;
|
||||
background-size: 300% 300%;
|
||||
background: @base;
|
||||
}
|
||||
|
||||
#workspaces button.active, #submap {
|
||||
background: @surface0;
|
||||
}
|
||||
|
||||
#custom-start {
|
||||
padding: 0px 5px;
|
||||
color: @${ctp-opt.primary};
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.critical, .muted, .performance { color: @red; }
|
||||
.warning, .urgent, .disabled, .disconnected, .paused { color: @yellow; }
|
||||
.charging, .plugged, .power-saver { color: @green; }
|
||||
'';
|
||||
};
|
||||
}
|
||||
51
modules/home/rice/wlogout.nix
Normal file
51
modules/home/rice/wlogout.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ rice, ... }: {
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "(S)hutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "(R)eboot";
|
||||
keybind = "r";
|
||||
}
|
||||
{
|
||||
label = "hibernate";
|
||||
action = "systemctl hibernate";
|
||||
text = "(H)ibernate";
|
||||
keybind = "h";
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Sus(p)end";
|
||||
keybind = "p";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "uwsm stop";
|
||||
text = "L(o)gout";
|
||||
keybind = "o";
|
||||
}
|
||||
{
|
||||
label = "lock";
|
||||
action = "loginctl lock-session";
|
||||
text = "(L)ock";
|
||||
keybind = "l";
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
button {
|
||||
border-width: ${toString rice.borders.size}px;
|
||||
border-radius: ${toString rice.borders.rounded}px;
|
||||
margin: ${toString rice.gap.inner}px;
|
||||
font-family: ${rice.font};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue