1288 lines
40 KiB
Nix
1288 lines
40 KiB
Nix
{
|
||
perSystem,
|
||
osConfig,
|
||
config,
|
||
pkgs,
|
||
lib,
|
||
...
|
||
}: let
|
||
cfg = config.desktop.hyprland;
|
||
hostname = osConfig.networking.hostName;
|
||
cursor_size = config.stylix.cursor.size;
|
||
colors = config.lib.stylix.colors;
|
||
keyboard =
|
||
if hostname == "eldrid"
|
||
then "chromeos"
|
||
else "platform";
|
||
xdgPictures =
|
||
config.xdg.userDirs.pictures;
|
||
in {
|
||
options = {
|
||
desktop.hyprland.enable =
|
||
lib.mkEnableOption "enable hyprland desktop";
|
||
};
|
||
config = lib.mkIf cfg.enable {
|
||
stylix.targets.waybar.enable = false;
|
||
stylix.targets.hyprland.enable = false;
|
||
home.pointerCursor.hyprcursor.enable = true;
|
||
home.pointerCursor.hyprcursor.size = cursor_size;
|
||
wayland.windowManager.hyprland = {
|
||
enable = true;
|
||
systemd = {
|
||
enable = true;
|
||
variables = [
|
||
"--all"
|
||
];
|
||
};
|
||
package = perSystem.hyprland.hyprland;
|
||
portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland;
|
||
# plugins = with pkgs.hyprlandPlugins; [
|
||
# hyprspace
|
||
# hy3
|
||
# hyprscroller
|
||
# ];
|
||
settings = {
|
||
input = {
|
||
kb_layout = "us,ua";
|
||
resolve_binds_by_sym =
|
||
if hostname == "dunamis"
|
||
then 0
|
||
else 1;
|
||
repeat_rate = 50;
|
||
repeat_delay = 300;
|
||
# mouse
|
||
accel_profile = "flat";
|
||
sensitivity = 0;
|
||
};
|
||
device = [
|
||
{
|
||
name = "ite-tech.-inc.-ite-device(8910)-keyboard";
|
||
kb_variant = "colemak_dh,";
|
||
}
|
||
{
|
||
name = "at-translated-set-2-keyboard";
|
||
kb_variant = "colemak_dh,";
|
||
}
|
||
{
|
||
name = "keyd-virtual-keyboard";
|
||
kb_variant = "colemak_dh,";
|
||
}
|
||
];
|
||
xwayland.force_zero_scaling = true;
|
||
monitor = [
|
||
", preferred, auto, 1"
|
||
"desc:AOC 27V2G5 0x0000026C, addreserved, 0, 300, 0, 0"
|
||
"desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10, vrr, 1"
|
||
"desc:Philips Consumer Electronics Company 27M2N5500 UK02418033254, 2560x1440@180.00Hz, 0x0, 1.3333333, bitdepth, 10, vrr, 1"
|
||
"desc:BOE 0x08E8, preferred, 1920x0, 1.2, bitdepth, 10"
|
||
"desc:LG Display 0x068B, preferred, 1920x0, 1.2, bitdepth, 10"
|
||
"desc:Chimei Innolux Corporation 0x1406, preferred, 1920x0, 1.2"
|
||
];
|
||
env = [
|
||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||
"QT_QPA_PLATFORM,wayland"
|
||
"QT_QPA_PLATFORMTHEME,gtk3"
|
||
"XCURSOR_SIZE,${toString cursor_size}"
|
||
"GSK_RENDERER,ngl"
|
||
];
|
||
decoration = {
|
||
shadow.enabled = false;
|
||
# drop_shadow = false;
|
||
blur = {
|
||
size = 8;
|
||
passes = 3;
|
||
};
|
||
# shadow_offset = "0 5";
|
||
# "col.shadow" = "rgba(00000099)";
|
||
rounding = 12;
|
||
};
|
||
misc = {
|
||
font_family = "${config.stylix.fonts.sansSerif.name}";
|
||
disable_splash_rendering = true;
|
||
disable_hyprland_logo = true;
|
||
# vfr = true;
|
||
};
|
||
bezier = [
|
||
"easeOutQuad, 0.25, 0.46, 0.45, 0.94"
|
||
"easeOutExpo, 0.19, 1, 0.22, 1"
|
||
];
|
||
animation = [
|
||
"workspaces, 1, 3, easeOutExpo, slidefade 20%"
|
||
"windows, 1, 3, easeOutExpo, popin 80%"
|
||
"layers, 1, 2, easeOutExpo, fade"
|
||
];
|
||
plugin = [
|
||
{
|
||
overview = {
|
||
gapsIn = 12;
|
||
gapsOut = 24;
|
||
exitOnClick = true;
|
||
centerAligned = true;
|
||
showNewWorkspace = false;
|
||
showEmptyWorkspace = false;
|
||
affectStrut = false;
|
||
};
|
||
hyprexpo = {
|
||
columns = 3;
|
||
gap_size = 8;
|
||
#bg_col = "rgb(111111)";
|
||
workspace_method = "first 1"; # [center/first] [workspace] e.g. first 1 or center m+1
|
||
enable_gesture = true; # laptop touchpad
|
||
gesture_fingers = 3; # 3 or 4
|
||
gesture_distance = 400; # how far is the "max"
|
||
gesture_positive = false; # positive = swipe down. Negative = swipe up.;
|
||
};
|
||
}
|
||
{
|
||
hy3 = {
|
||
autotile = true;
|
||
tab_first_window = false;
|
||
tabs = {
|
||
render_text = true;
|
||
height = 24;
|
||
padding = 8;
|
||
rounding = 8;
|
||
text_height = 14;
|
||
text_center = true;
|
||
text_font = "${config.stylix.fonts.sansSerif.name}";
|
||
|
||
"col.active" = "0xff${colors.base00}";
|
||
"col.inactive" = "0xff${colors.base00}";
|
||
"col.urgent" = "0xff${colors.base00}";
|
||
"col.active.text" = "0xff${colors.base0D}";
|
||
"col.inactive.text" = "0xff${colors.base05}";
|
||
"col.urgent.text" = "0xff${colors.base09}";
|
||
"col.active.border" = "0xff${colors.base00}";
|
||
"col.inactive.border" = "0xff${colors.base00}";
|
||
"col.urgent.border" = "0xff${colors.base00}";
|
||
};
|
||
};
|
||
}
|
||
{
|
||
scroller = {
|
||
column_widths = "onethird onehalf twothirds one";
|
||
window_heights = "onethird onehalf twothirds one";
|
||
gesture_scroll_fingers = 3;
|
||
gesture_overview_fingers = 3;
|
||
jump_labels_font = "${config.stylix.fonts.sansSerif.name}";
|
||
jump_labels_color = "0xff${colors.base0A}";
|
||
};
|
||
}
|
||
];
|
||
|
||
dwindle = {
|
||
force_split = 2;
|
||
default_split_ratio = 1.2;
|
||
};
|
||
master = {
|
||
mfact = 0.6;
|
||
};
|
||
|
||
"$mod" = "SUPER";
|
||
"$modShift" = "$mod SHIFT";
|
||
"$modCtrl" = "$mod CTRL";
|
||
"$modShiftCtrl" = "$mod SHIFT CTRL";
|
||
|
||
"$left" = "N";
|
||
"$down" = "E";
|
||
"$up" = "I";
|
||
"$right" = "O";
|
||
|
||
"$terminal" = "ghostty";
|
||
"$dlauncher" = "tofi-drun";
|
||
"$launcher" = "tofi-run | xargs hyprctl dispatch exec --";
|
||
"$screenLocker" = "hyprlock";
|
||
"$webBrowser" = "io.github.zen_browser.zen";
|
||
"$clipboardManager" = "copyq menu";
|
||
|
||
general = {
|
||
"col.active_border" = "0xff${colors.base0D}";
|
||
"col.inactive_border" = "0xff${colors.base03}";
|
||
gaps_in = 4;
|
||
gaps_out = 8;
|
||
border_size = 3;
|
||
allow_tearing = true;
|
||
layout = "dwindle";
|
||
};
|
||
group = {
|
||
"col.border_active" = "0xff${colors.base0D}";
|
||
"col.border_inactive" = "0xff${colors.base03}";
|
||
"col.border_locked_active" = "0xff${colors.base0A}";
|
||
"col.border_locked_inactive" = "0xff${colors.base0F}";
|
||
groupbar = {
|
||
height = 24;
|
||
rounding = 6;
|
||
gradient_rounding = 8;
|
||
font_size = 24;
|
||
gradients = true;
|
||
font_family = "${config.stylix.fonts.sansSerif.name}";
|
||
"text_color" = "0xff${colors.base00}";
|
||
"col.active" = "0xff${colors.base0D}";
|
||
"col.inactive" = "0xff${colors.base03}";
|
||
};
|
||
};
|
||
|
||
# bindn = [", mouse:272, hy3:focustab, mouse"];
|
||
bind = [
|
||
"$mod, Return, exec, $terminal"
|
||
"$mod, Space, exec, $dlauncher"
|
||
"$modShift, Space, exec, $launcher"
|
||
"$modCtrl, Q, killactive"
|
||
"$modCtrl, M, fullscreen"
|
||
"$modCtrl, G, togglefloating"
|
||
"$mod, G, pin"
|
||
|
||
# "$mod, Z, scroller:setmode, row"
|
||
# "$mod, X, scroller:setmode, column"
|
||
# "$mod, M, scroller:fitwidth, active"
|
||
# "$mod, H, scroller:setwidth, 1"
|
||
# "$mod, C, scroller:cyclewidth, next"
|
||
# "$modShift, C, scroller:cycleheight, next"
|
||
# "$modShift, M, scroller:fitheight, active"
|
||
# "$modShift, H, scroller:setheight, onehalf"
|
||
# "$mod, comma, scroller:admitwindow, l"
|
||
# "$mod, period, scroller:admitwindow, r"
|
||
# "$modCtrl, comma, scroller:expelwindow, l"
|
||
# "$modCtrl, period, scroller:expelwindow, r"
|
||
# "$mod, backspace, scroller:toggleoverview"
|
||
# "$modCtrl, backspace, scroller:jump"
|
||
|
||
"$mod, T, togglegroup"
|
||
"$mod, period, changegroupactive, f"
|
||
"$mod, comma, changegroupactive, b"
|
||
"$modCtrl, period, movewindoworgroup, r"
|
||
"$modCtrl, comma, movewindoworgroup, l"
|
||
# "$mod, S, hy3:changegroup, opposite"
|
||
# "$mod, T, hy3:changegroup, toggletab"
|
||
# "$mod, S, hy3:changegroup, opposite"
|
||
# "$mod, period, hy3:focustab, r, wrap"
|
||
# "$mod, comma, hy3:focustab, l, wrap"
|
||
# "$modCtrl, period, hy3:changefocus, raise"
|
||
# "$modCtrl, comma, hy3:changefocus, lower"
|
||
|
||
# "$mod, Tab, overview:toggle"
|
||
# "$mod, Tab, hyprexpo:expo, toggle"
|
||
"$mod, Tab, cyclenext,"
|
||
"$modShift, Tab, cyclenext, prev"
|
||
"$mod, Tab, bringactivetotop,"
|
||
|
||
"$modShift, U, focusurgentorlast"
|
||
|
||
"$modCtrl, L, exec, $screenLocker"
|
||
"$modCtrl, B, exec, $webBrowser"
|
||
"$modCtrl, V, exec, $clipboardManager"
|
||
"$modCtrl, K, focuswindow, title:(Meet:.*)"
|
||
|
||
# ", Print, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -o -r -c '\#\#00000000')\" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ${xdgPictures}/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png"
|
||
", Print, exec, hyprshot -z -m region -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
|
||
"CTRL, Print, exec, hyprshot -z -m window -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
|
||
"SHIFT, Print, exec, hyprshot -z -m output -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
|
||
## navigation
|
||
"$mod, $left, movefocus, l"
|
||
"$mod, $down, movefocus, d"
|
||
"$mod, $up, movefocus, u"
|
||
"$mod, $right, movefocus, r"
|
||
"$modShift, $left, workspace, e-1"
|
||
"$modShift, $right, workspace, e+1"
|
||
"$mod, left, movefocus, l"
|
||
"$mod, up, movefocus, u"
|
||
"$mod, down, movefocus, d"
|
||
"$mod, right, movefocus, r"
|
||
"$modShift, W, focuscurrentorlast"
|
||
"$mod, mouse_down, workspace, e-1"
|
||
"$mod, mouse_up, workspace, e+1"
|
||
"$modShift, left, workspace, e-1"
|
||
"$modShift, right, workspace, e+1"
|
||
|
||
"$modCtrl, $left, movewindow, l"
|
||
"$modCtrl, $down, movewindow, d"
|
||
"$modCtrl, $up, movewindow, u"
|
||
"$modCtrl, $right, movewindow, r"
|
||
"$modCtrl, left, movewindow, l"
|
||
"$modCtrl, up, movewindow, u"
|
||
"$modCtrl, down, movewindow, d"
|
||
"$modCtrl, right, movewindow, r"
|
||
# workspaces
|
||
"$mod, 1, workspace, 1"
|
||
"$mod, 2, workspace, 2"
|
||
"$mod, 3, workspace, 3"
|
||
"$mod, 4, workspace, 4"
|
||
"$mod, 5, workspace, 5"
|
||
"$mod, 6, workspace, 6"
|
||
"$mod, 7, workspace, 7"
|
||
"$mod, 8, workspace, 8"
|
||
"$mod, 9, workspace, 9"
|
||
"$mod, 0, togglespecialworkspace"
|
||
|
||
"$modShiftCtrl, 1, movetoworkspace, 1"
|
||
"$modShiftCtrl, 2, movetoworkspace, 2"
|
||
"$modShiftCtrl, 3, movetoworkspace, 3"
|
||
"$modShiftCtrl, 4, movetoworkspace, 4"
|
||
"$modShiftCtrl, 5, movetoworkspace, 5"
|
||
"$modShiftCtrl, 6, movetoworkspace, 6"
|
||
"$modShiftCtrl, 7, movetoworkspace, 7"
|
||
"$modShiftCtrl, 8, movetoworkspace, 8"
|
||
"$modShiftCtrl, 9, movetoworkspace, 9"
|
||
"$modShiftCtrl, 0, movetoworkspace, special"
|
||
|
||
"$mod, Q, workspace, 1"
|
||
"$mod, W, workspace, 2"
|
||
"$mod, F, workspace, 3"
|
||
"$mod, P, workspace, 4"
|
||
"$mod, B, workspace, 5"
|
||
"$mod, J, workspace, 6"
|
||
"$mod, L, workspace, 7"
|
||
"$mod, U, workspace, 8"
|
||
"$mod, Y, workspace, 9"
|
||
"$mod, apostrophe, togglespecialworkspace"
|
||
|
||
"$modShiftCtrl, Q, movetoworkspace, 1"
|
||
"$modShiftCtrl, W, movetoworkspace, 2"
|
||
"$modShiftCtrl, F, movetoworkspace, 3"
|
||
"$modShiftCtrl, P, movetoworkspace, 4"
|
||
"$modShiftCtrl, B, movetoworkspace, 5"
|
||
"$modShiftCtrl, J, movetoworkspace, 6"
|
||
"$modShiftCtrl, L, movetoworkspace, 7"
|
||
"$modShiftCtrl, U, movetoworkspace, 8"
|
||
"$modShiftCtrl, Y, movetoworkspace, 9"
|
||
"$modShiftCtrl, apostrophe, movetoworkspace, special"
|
||
|
||
"$modShiftCtrl, $left, movetoworkspace, e-1"
|
||
"$modShiftCtrl, $right, movetoworkspace, e+1"
|
||
"$modShiftCtrl, left, movetoworkspace, e-1"
|
||
"$modShiftCtrl, right, movetoworkspace, e+1"
|
||
];
|
||
# binde = [
|
||
# "$mod, comma, resizeactive, -10 0"
|
||
# "$mod, period, resizeactive, 10 0"
|
||
# "$modShift, comma, resizeactive, 0 -10"
|
||
# "$modShift, period, resizeactive, 0 10"
|
||
# ];
|
||
bindl = [
|
||
"$mod, Escape, exec, hyprctl switchxkblayout all next"
|
||
", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'"
|
||
", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, preferred, 1920x0, 1.2'"
|
||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||
", XF86AudioPlay, exec, playerctl play-pause"
|
||
", XF86AudioPrev, exec, playerctl previous"
|
||
", XF86AudioNext, exec, playerctl next"
|
||
"$modShiftCtrl ALT, Q, exit"
|
||
];
|
||
binde = [
|
||
", XF86MonBrightnessUp, exec, brightnessctl s 5%+"
|
||
", XF86MonBrightnessDown, exec, brightnessctl s 5%-"
|
||
"ALT, XF86MonBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight"
|
||
"ALT, XF86MonBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight"
|
||
", XF86KbdBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight"
|
||
", XF86KbdBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight"
|
||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||
];
|
||
bindm = [
|
||
"$mod, mouse:272, movewindow"
|
||
"$mod, mouse:273, resizewindow"
|
||
"$mod ALT, mouse:272, resizewindow"
|
||
];
|
||
gestures = {
|
||
workspace_swipe = true;
|
||
workspace_swipe_fingers = 3;
|
||
workspace_swipe_distance = 300;
|
||
};
|
||
|
||
workspace = [
|
||
"1, defaultName:general"
|
||
"2, defaultName:web"
|
||
"3, defaultName:chat"
|
||
"4, defaultName:code"
|
||
"5, defaultName:uni"
|
||
"6, defaultName:games"
|
||
"7, defaultName:system"
|
||
"8, defaultName:media"
|
||
"9, defaultName:tray"
|
||
# "10, defaultName:"
|
||
];
|
||
windowrulev2 = [
|
||
## tray/misc utilities
|
||
# file picker
|
||
"float, class:xdg-desktop-portal-gtk"
|
||
"size <50% <90%, class:xdg-desktop-portal-gtk"
|
||
"center 1, class:xdg-desktop-portal-gtk"
|
||
# xdp-hyprland stream picker
|
||
"float, initialTitle:MainPicker"
|
||
# general apps
|
||
"float, class:(com.saivert.pwvucontrol)"
|
||
"float, class:(re.sonny.Junction)"
|
||
"float, class:(com.github.hluk.copyq)"
|
||
"float, class:(nm-connection-editor)"
|
||
"float, class:(.blueman-manager-wrapped)"
|
||
# telegram
|
||
"maximize, initialTitle:Медіапереглядач"
|
||
"noborder, title:TelegramDesktop"
|
||
"keepaspectratio, title:TelegramDesktop"
|
||
"noblur, title:TelegramDesktop"
|
||
"float, title:TelegramDesktop"
|
||
"pin, title:TelegramDesktop"
|
||
# any chromium-based
|
||
"noborder, title:Картинка в картинці"
|
||
"keepaspectratio, title:Картинка в картинці"
|
||
"noblur, title:Картинка в картинці"
|
||
"float, title:Картинка в картинці"
|
||
"pin, title:Картинка в картинці"
|
||
# and firefox
|
||
"noborder, title:Picture-in-Picture"
|
||
"keepaspectratio, title:Picture-in-Picture"
|
||
"noblur, title:Picture-in-Picture"
|
||
"float, title:Picture-in-Picture"
|
||
"pin, title:Picture-in-Picture"
|
||
# screenshot editor
|
||
"noanim, class:com.gabm.satty"
|
||
"float, class:com.gabm.satty"
|
||
"rounding 0, class:com.gabm.satty"
|
||
"size 100% 100%, class:com.gabm.satty"
|
||
"move 0 0, class:com.gabm.satty"
|
||
"pin, class:com.gabm.satty"
|
||
## games
|
||
"float, class:(com.mojang.minecraft.java-edition)"
|
||
"immediate, class:(com.mojang.minecraft.java-edition)"
|
||
# cs2
|
||
"immediate, class:(cs2)"
|
||
# deadlock
|
||
# "float, class:(steam_app_1422450)"
|
||
"fullscreen, class:(steam_app_1422450)"
|
||
"immediate, class:(steam_app_1422450)"
|
||
"immediate, initialTitle:(Ghostrunner)"
|
||
# dead by daylight
|
||
"immediate, class:deadbydaylight-egs-shipping.exe"
|
||
## workspace assignments
|
||
"workspace name:chat, class:org.telegram.desktop"
|
||
"workspace name:chat, class:org.signal.Signal"
|
||
"workspace name:chat, class:im.riot.Riot"
|
||
"workspace name:chat, class:WebCord"
|
||
|
||
"workspace name:games, class:com.heroicgameslauncher.hgl"
|
||
"workspace name:games, class:net.lutris.Lutris"
|
||
"workspace name:games, class:steam"
|
||
# "workspace name:game, class:"
|
||
];
|
||
};
|
||
extraConfig = ''
|
||
bind = $modShift, R, submap, resize
|
||
submap = resize
|
||
binde = , right, resizeactive, 10 0
|
||
binde = , left, resizeactive, -10 0
|
||
binde = , up, resizeactive, 0 -10
|
||
binde = , down, resizeactive, 0 10
|
||
binde = , $right, resizeactive, 10 0
|
||
binde = , $left, resizeactive, -10 0
|
||
binde = , $up, resizeactive, 0 -10
|
||
binde = , $down, resizeactive, 0 10
|
||
bind = , escape, submap, reset
|
||
submap = reset
|
||
'';
|
||
};
|
||
services = {
|
||
hyprpaper.enable = true;
|
||
hypridle = {
|
||
enable = true;
|
||
settings = {
|
||
general = {
|
||
before_sleep_cmd = "loginctl lock-session";
|
||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||
lock_cmd = "pidof hyprlock || hyprlock";
|
||
# unlock_cmd = "loginctl unlock-session";
|
||
};
|
||
listener = [
|
||
{
|
||
timeout = 600;
|
||
on-timeout = "pidof hyprlock || hyprlock";
|
||
}
|
||
{
|
||
timeout = 601;
|
||
on-timeout = "hyprctl dispatch dpms off";
|
||
on-resume = "hyprctl dispatch dpms on";
|
||
}
|
||
];
|
||
};
|
||
};
|
||
network-manager-applet.enable = true;
|
||
blueman-applet.enable = true;
|
||
playerctld.enable = true;
|
||
copyq.enable = true;
|
||
gnome-keyring = {
|
||
enable = true;
|
||
components = ["secrets" "ssh"];
|
||
};
|
||
};
|
||
gtk = {
|
||
enable = true;
|
||
iconTheme = {
|
||
name = "Papirus-Dark";
|
||
package = pkgs.papirus-icon-theme;
|
||
};
|
||
};
|
||
qt = {
|
||
enable = true;
|
||
platformTheme.name = lib.mkDefault "gtk3";
|
||
#style.name = "gtk2";
|
||
};
|
||
dconf.settings = {
|
||
"org/gnome/desktop/interface" = {
|
||
icon-theme = "${config.gtk.iconTheme.name}";
|
||
};
|
||
};
|
||
programs.waybar = {
|
||
enable = true;
|
||
systemd = {
|
||
enable = true;
|
||
target = "graphical-session.target";
|
||
};
|
||
settings = {
|
||
bar-0 = {
|
||
layer = "top";
|
||
position = "bottom";
|
||
height = 32;
|
||
spacing = 4;
|
||
margin-left = 11;
|
||
margin-right = 11;
|
||
# margin-bottom = 8;
|
||
reload_style_on_change = true;
|
||
modules-left = [
|
||
"hyprland/language"
|
||
"hyprland/workspaces"
|
||
"wlr/taskbar"
|
||
];
|
||
# modules-center = [];
|
||
modules-right = [
|
||
"wireplumber"
|
||
(lib.mkIf (hostname != "dunamis") "group/laptop")
|
||
"tray"
|
||
"privacy"
|
||
"power-profiles-daemon"
|
||
"idle_inhibitor"
|
||
"custom/notification"
|
||
"clock"
|
||
];
|
||
"hyprland/workspaces" = {
|
||
format = "{icon}";
|
||
format-icons = {
|
||
"1" = "I";
|
||
"2" = "II";
|
||
"3" = "III";
|
||
"4" = "IV";
|
||
"5" = "V";
|
||
"6" = "VI";
|
||
"7" = "VII";
|
||
"8" = "IIX";
|
||
"9" = "IX";
|
||
"10" = "X";
|
||
general = "";
|
||
web = "";
|
||
chat = "";
|
||
code = "";
|
||
uni = "";
|
||
games = "";
|
||
system = "";
|
||
media = "";
|
||
tray = "";
|
||
};
|
||
};
|
||
"hyprland/language" = {
|
||
format = "{}";
|
||
format-en = "🇺🇸";
|
||
format-uk = "🇺🇦";
|
||
};
|
||
"custom/separator" = {
|
||
format = "";
|
||
interval = "once";
|
||
tooltip = false;
|
||
};
|
||
"group/laptop" = {
|
||
orientation = "inherit";
|
||
modules = [
|
||
"battery"
|
||
"backlight"
|
||
];
|
||
};
|
||
"backlight" = {
|
||
format = "{percent}% {icon}";
|
||
format-icons = ["" ""];
|
||
};
|
||
"idle_inhibitor" = {
|
||
format = "{icon}";
|
||
format-icons = {
|
||
activated = "";
|
||
deactivated = "";
|
||
};
|
||
};
|
||
"tray" = {
|
||
icon-size = 24;
|
||
spacing = 2;
|
||
};
|
||
"clock" = {
|
||
interval = 1;
|
||
format = "{:%H:%M:%S}";
|
||
tooltip-format = "{:%d.%m.%Y}";
|
||
};
|
||
battery = {
|
||
states = {
|
||
good = 95;
|
||
warning = 30;
|
||
critical = 15;
|
||
};
|
||
format = "{capacity}% {icon}";
|
||
format-full = "{capacity}% ";
|
||
format-charging = "{capacity}% ";
|
||
format-plugged = "{capacity}% ";
|
||
format-alt = "{icon} {time}";
|
||
format-icons = ["" "" "" "" "" "" "" "" "" ""];
|
||
};
|
||
"upower" = {
|
||
icon-size = 16;
|
||
format = "{percentage}";
|
||
hide-if-empty = true;
|
||
tooltip = true;
|
||
tooltip-spacing = 20;
|
||
};
|
||
"power-profiles-daemon" = {
|
||
format = "{icon}";
|
||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||
tooltip = true;
|
||
format-icons = {
|
||
default = "";
|
||
performance = "";
|
||
balanced = "";
|
||
power-saver = "";
|
||
};
|
||
};
|
||
"wireplumber" = {
|
||
scroll-step = 3;
|
||
format = "{volume}% {icon}";
|
||
format-muted = "";
|
||
format-icons = ["" "" ""];
|
||
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
|
||
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
|
||
};
|
||
"custom/notification" = {
|
||
tooltip = false;
|
||
format = "{icon}";
|
||
format-icons = {
|
||
notification = "";
|
||
none = "";
|
||
dnd-notification = "";
|
||
dnd-none = "";
|
||
};
|
||
return-type = "json";
|
||
exec-if = "which swaync-client";
|
||
exec = "swaync-client -swb";
|
||
on-click = "swaync-client -t -sw";
|
||
on-click-right = "swaync-client -d -sw";
|
||
escape = true;
|
||
};
|
||
"privacy" = {
|
||
icon-spacing = 2;
|
||
icon-size = 16;
|
||
transition-duration = 250;
|
||
screenshare = {
|
||
type = "screenshare";
|
||
tooltip = true;
|
||
tooltip-icon-size = 24;
|
||
};
|
||
audio-in = {
|
||
type = "audio-in";
|
||
tooltip = true;
|
||
tooltip-icon-size = 24;
|
||
};
|
||
};
|
||
"wlr/taskbar" = {
|
||
format = "{icon}";
|
||
icon-size = 24;
|
||
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
|
||
tooltip-format = "{title}";
|
||
on-click = "activate";
|
||
};
|
||
};
|
||
};
|
||
style = ''
|
||
@define-color base00 #${colors.base00};
|
||
@define-color base01 #${colors.base01};
|
||
@define-color base02 #${colors.base02};
|
||
@define-color base03 #${colors.base03};
|
||
@define-color base04 #${colors.base04};
|
||
@define-color base05 #${colors.base05};
|
||
@define-color base06 #${colors.base06};
|
||
@define-color base07 #${colors.base07};
|
||
@define-color base08 #${colors.base08};
|
||
@define-color base09 #${colors.base09};
|
||
@define-color base0A #${colors.base0A};
|
||
@define-color base0B #${colors.base0B};
|
||
@define-color base0C #${colors.base0C};
|
||
@define-color base0D #${colors.base0D};
|
||
@define-color base0E #${colors.base0E};
|
||
@define-color base0F #${colors.base0F};
|
||
* {
|
||
font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome;
|
||
font-weight: 500;
|
||
font-size: 100%;
|
||
}
|
||
window#waybar {
|
||
background-color: transparent;
|
||
color: @base05;
|
||
transition-property: background-color;
|
||
transition-duration: 0.5s;
|
||
}
|
||
.modules-left,
|
||
.modules-right {
|
||
border-top-left-radius: 12px;
|
||
border-top-right-radius: 12px;
|
||
border-bottom-left-radius: 0px;
|
||
border-bottom-right-radius: 0px;
|
||
background-color: @base00;
|
||
color: @base05;
|
||
padding: 0 0.5em;
|
||
}
|
||
tooltip {
|
||
background: @base01;
|
||
border: 1px solid @base0E;
|
||
}
|
||
tooltip label {
|
||
color: @base05;
|
||
}
|
||
button {
|
||
box-shadow: inset 0 -3px transparent;
|
||
border-radius: 16px;
|
||
}
|
||
button:hover {
|
||
background: inherit;
|
||
box-shadow: inset 0 -3px transparent;
|
||
}
|
||
#mode {
|
||
background-color: rgba(0, 0, 0, 0.2);
|
||
box-shadow: inset 0 -3px @base05;
|
||
}
|
||
#battery,
|
||
#backlight,
|
||
#workspaces,
|
||
#power-profiles-daemon,
|
||
#taskbar,
|
||
#language,
|
||
#clock,
|
||
#battery,
|
||
#backlight,
|
||
#wireplumber,
|
||
#custom-separator {
|
||
padding: 0 0.3em;
|
||
}
|
||
#privacy,
|
||
#tray button,
|
||
#idle_inhibitor,
|
||
#workspaces button {
|
||
padding: 0 0.2em;
|
||
}
|
||
#taskbar button {
|
||
padding: 0 0.1em;
|
||
}
|
||
#workspaces button.active {
|
||
color: @base0D;
|
||
}
|
||
#taskbar button:hover {
|
||
box-shadow: transparent;
|
||
}
|
||
#taskbar.empty,
|
||
window#empty {
|
||
background-color: transparent;
|
||
}
|
||
#battery.critical:not(.charging) {
|
||
background-color: @base09;
|
||
color: @base00;
|
||
animation-name: blink;
|
||
animation-duration: 0.5s;
|
||
animation-timing-function: steps(12);
|
||
animation-iteration-count: infinite;
|
||
animation-direction: alternate;
|
||
}
|
||
#power-profiles-daemon.performance {
|
||
background-color: @base00;
|
||
color: @base0D;
|
||
}
|
||
#power-profiles-daemon.balanced {
|
||
background-color: @base00;
|
||
color: @base0B;
|
||
}
|
||
#power-profiles-daemon.power-saver {
|
||
background-color: @base00;
|
||
color: @base0A;
|
||
}
|
||
label:focus {
|
||
background-color: #000000;
|
||
}
|
||
#tray > .passive {
|
||
-gtk-icon-effect: dim;
|
||
}
|
||
#tray > .needs-attention {
|
||
-gtk-icon-effect: highlight;
|
||
background-color: @base08;
|
||
}
|
||
#privacy-item.screenshare {
|
||
background-color: @base00;
|
||
color: @base0C;
|
||
}
|
||
#privacy-item.audio-in {
|
||
background-color: @base00;
|
||
color: @base0E;
|
||
}
|
||
#privacy-item.audio-out {
|
||
background-color: @base;
|
||
}
|
||
'';
|
||
};
|
||
programs.tofi = {
|
||
enable = true;
|
||
settings = {
|
||
drun-launch = true;
|
||
anchor = "bottom";
|
||
width = "50%";
|
||
height = 30;
|
||
padding-right = 6;
|
||
padding-left = 6;
|
||
padding-bottom = 0;
|
||
padding-top = 0;
|
||
margin-bottom = 2;
|
||
border-width = 0;
|
||
corner-radius = 12;
|
||
outline-width = 0;
|
||
min-input-width = 128;
|
||
result-spacing = 12;
|
||
require-match = false;
|
||
horizontal = true;
|
||
prompt-text = "~>";
|
||
};
|
||
};
|
||
services.swaync = {
|
||
enable = true;
|
||
settings = {
|
||
cssPriority = "user";
|
||
image-visibility = "when-available";
|
||
keyboard-shortcut = true;
|
||
relative-timestamps = true;
|
||
timeout = 5;
|
||
timeout-low = 5;
|
||
timeout-critical = 0;
|
||
script-fail-notify = true;
|
||
transition-time = 200;
|
||
|
||
# Layer settings
|
||
layer-shell = true;
|
||
layer = "overlay";
|
||
control-center-layer = "overlay";
|
||
|
||
# Notification settings
|
||
positionX = "right";
|
||
positionY = "top";
|
||
notification-2fa-action = true;
|
||
notification-inline-replies = false;
|
||
notification-icon-size = 32;
|
||
notification-body-image-height = 100;
|
||
notification-body-image-width = 200;
|
||
notification-window-width = 400;
|
||
|
||
# Control center settings
|
||
control-center-positionX = "right";
|
||
control-center-positionY = "top";
|
||
control-center-width = 500;
|
||
control-center-exclusive-zone = true;
|
||
fit-to-screen = true;
|
||
hide-on-action = true;
|
||
hide-on-clear = false;
|
||
|
||
# Widget settings
|
||
widgets = [
|
||
"title"
|
||
"dnd"
|
||
"notifications"
|
||
"mpris"
|
||
];
|
||
|
||
widget-config = {
|
||
title = {
|
||
text = "Notifications";
|
||
clear-all-button = true;
|
||
button-text = "Clear All";
|
||
};
|
||
dnd = {
|
||
text = "Do Not Disturb";
|
||
};
|
||
mpris = {
|
||
image-size = 96;
|
||
image-radius = 12;
|
||
blur = true;
|
||
};
|
||
};
|
||
};
|
||
style = ''
|
||
/*** Global ***/
|
||
progress,
|
||
progressbar,
|
||
trough {
|
||
border-radius: 16px;
|
||
}
|
||
|
||
.app-icon,
|
||
.image {
|
||
-gtk-icon-effect: none;
|
||
}
|
||
|
||
.notification-action {
|
||
border-radius: 12px;
|
||
margin: 0.5rem;
|
||
}
|
||
|
||
.close-button {
|
||
margin: 24px;
|
||
padding: 0.2rem;
|
||
border-radius: 16px;
|
||
}
|
||
|
||
/*** Notifications ***/
|
||
.notification-group.collapsed
|
||
.notification-row:not(:last-child)
|
||
.notification-action,
|
||
.notification-group.collapsed
|
||
.notification-row:not(:last-child)
|
||
.notification-default-action {
|
||
opacity: 0;
|
||
}
|
||
|
||
.trough {
|
||
margin: 4px;
|
||
border-radius: 7px;
|
||
}
|
||
|
||
.notification,
|
||
.notification.low,
|
||
.notification.normal,
|
||
.notification.critical,
|
||
.control-center {
|
||
margin: 16px;
|
||
border-radius: 7px;
|
||
}
|
||
|
||
.floating-notifications,
|
||
.notification-content {
|
||
border-radius: 7px;
|
||
}
|
||
|
||
.control-center-list {
|
||
background: transparent;
|
||
}
|
||
|
||
/*** Widgets ***/
|
||
/* Title widget */
|
||
.widget-title {
|
||
margin: 0.5rem;
|
||
}
|
||
|
||
.widget-title > label {
|
||
font-weight: bold;
|
||
}
|
||
|
||
.widget-title > button {
|
||
border-radius: 16px;
|
||
padding: 0.5rem;
|
||
}
|
||
|
||
/* DND Widget */
|
||
.widget-dnd {
|
||
margin: 0.5rem;
|
||
}
|
||
|
||
.widget-dnd > label {
|
||
font-weight: bold;
|
||
}
|
||
|
||
.widget-dnd > switch {
|
||
border-radius: 16px;
|
||
}
|
||
|
||
.widget-dnd > switch slider {
|
||
border-radius: 16px;
|
||
padding: 0.25rem;
|
||
}
|
||
|
||
/* Mpris widget */
|
||
.widget-mpris .widget-mpris-player {
|
||
border-radius: 16px;
|
||
margin: 0.5rem;
|
||
padding: 0.5rem;
|
||
}
|
||
|
||
.widget-mpris .widget-mpris-player .widget-mpris-album-art {
|
||
border-radius: 16px;
|
||
}
|
||
|
||
.widget-mpris .widget-mpris-player .widget-mpris-title {
|
||
font-weight: bold;
|
||
}
|
||
|
||
.widget-mpris .widget-mpris-player .widget-mpris-subtitle {
|
||
font-weight: normal;
|
||
}
|
||
|
||
.widget-mpris .widget-mpris-player > box > button {
|
||
border: 1px solid transparent;
|
||
border-radius: 16px;
|
||
padding: 0.25rem;
|
||
}
|
||
'';
|
||
};
|
||
services.dunst = {
|
||
enable = false;
|
||
settings = {
|
||
global = {
|
||
width = 300;
|
||
height = 300;
|
||
icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
|
||
corner_radius = lib.mkDefault 9;
|
||
#corners = "top-right,bottom-left";
|
||
offset = "16x16";
|
||
origin = "bottom-right";
|
||
timeout = 15;
|
||
frame_width = 3;
|
||
notification_limit = 5;
|
||
};
|
||
rule-telegram = {
|
||
"desktop_entry" = "org.telegram.desktop";
|
||
"urgency" = "normal";
|
||
};
|
||
};
|
||
};
|
||
stylix.targets.hyprlock.enable = false;
|
||
programs.hyprlock = {
|
||
enable = true;
|
||
settings = {
|
||
general = {
|
||
disable_loading_bar = true;
|
||
#grace = 300;
|
||
hide_cursor = true;
|
||
no_fade_in = false;
|
||
};
|
||
|
||
background = [
|
||
{
|
||
path = "screenshot";
|
||
blur_passes = 4;
|
||
blur_size = 8;
|
||
}
|
||
];
|
||
|
||
input-field = [
|
||
{
|
||
size = "274, 50";
|
||
rounding = 12;
|
||
outline_thickness = 3;
|
||
position = "0, 0";
|
||
monitor = "";
|
||
dots_center = true;
|
||
fade_on_empty = false;
|
||
font_family = "${config.stylix.fonts.serif.name}";
|
||
font_color = "rgb(${colors.base05})";
|
||
inner_color = "rgb(${colors.base00})";
|
||
outer_color = "rgb(${colors.base0D})";
|
||
check_color = "rgb(${colors.base0A})";
|
||
fail_color = "rgb(${colors.base08})";
|
||
placeholder_text = "locked...";
|
||
fail_text = "wrong";
|
||
#placeholder_text = '\'<span foreground="##cad3f5">Password...</span>'\';
|
||
shadow_passes = 0;
|
||
}
|
||
];
|
||
shape = [
|
||
{
|
||
rounding = 12;
|
||
#border_size = 3;
|
||
size = "274, 50";
|
||
color = "rgb(${colors.base00})";
|
||
border_color = "rgb(${colors.base0D})";
|
||
position = "0, 60";
|
||
halign = "center";
|
||
valign = "center";
|
||
}
|
||
{
|
||
rounding = 12;
|
||
#border_size = 3;
|
||
size = "274, 50";
|
||
color = "rgb(${colors.base00})";
|
||
border_color = "rgb(${colors.base0D})";
|
||
position = "0, -60";
|
||
halign = "center";
|
||
valign = "center";
|
||
}
|
||
];
|
||
label = [
|
||
{
|
||
monitor = "";
|
||
text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)";
|
||
text_align = "center";
|
||
font_size = 16;
|
||
font_family = "${config.stylix.fonts.serif.name}";
|
||
outer_color = "rgb(${colors.base00})";
|
||
color = "rgb(${colors.base05})";
|
||
position = "0, 60";
|
||
halign = "center";
|
||
valign = "center";
|
||
}
|
||
{
|
||
monitor = "";
|
||
text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +'%m/%d %a %T')";
|
||
text_align = "center";
|
||
font_size = 16;
|
||
font_family = "${config.stylix.fonts.serif.name}";
|
||
outer_color = "rgb(${colors.base00})";
|
||
color = "rgb(${colors.base05})";
|
||
position = "0, -60";
|
||
halign = "center";
|
||
valign = "center";
|
||
}
|
||
];
|
||
};
|
||
};
|
||
services.gammastep = {
|
||
enable = true;
|
||
provider = "manual";
|
||
latitude = 49.6;
|
||
longitude = 36.1;
|
||
tray = true;
|
||
temperature = {
|
||
day = 6500;
|
||
night = 3000;
|
||
};
|
||
};
|
||
services.wlsunset = {
|
||
enable = false;
|
||
latitude = "49.6";
|
||
longitude = "36.1";
|
||
temperature = {
|
||
day = 6500;
|
||
night = 3000;
|
||
};
|
||
systemdTarget = "graphical-session.target";
|
||
};
|
||
services.udiskie = {
|
||
enable = true;
|
||
automount = false;
|
||
notify = true;
|
||
tray = "auto";
|
||
};
|
||
home.packages = with pkgs; [
|
||
brightnessctl
|
||
nautilus
|
||
helvum
|
||
loupe
|
||
evince
|
||
junction
|
||
celluloid
|
||
mission-center
|
||
dconf
|
||
hyprshot
|
||
grim
|
||
slurp
|
||
libnotify
|
||
playerctl
|
||
wdisplays
|
||
pwvucontrol
|
||
wl-clipboard-rs
|
||
libqalculate
|
||
];
|
||
xdg = {
|
||
mime.enable = true;
|
||
mimeApps = {
|
||
enable = true;
|
||
defaultApplications = let
|
||
file_manager = ["org.gnome.Nautilus.desktop"];
|
||
web_browser = ["re.sonny.Junction.desktop"];
|
||
image_viewer = ["org.gnome.Loupe.desktop"];
|
||
video_player = ["io.github.celluloid_player.Celluloid.desktop"];
|
||
pdf_reader = ["org.gnome.Evince.desktop"];
|
||
in {
|
||
"inode/directory" = file_manager;
|
||
"video/x-matroska" = video_player;
|
||
"video/mp4" = video_player;
|
||
"video/mpeg" = video_player;
|
||
"video/x-mpeg" = video_player;
|
||
"image/png" = image_viewer;
|
||
"image/jpeg" = image_viewer;
|
||
"application/pdf" = pdf_reader;
|
||
"text/html" = web_browser;
|
||
"x-scheme-handler/http" = web_browser;
|
||
"x-scheme-handler/https" = web_browser;
|
||
"x-scheme-handler/about" = web_browser;
|
||
"x-scheme-handler/unknown" = web_browser;
|
||
};
|
||
};
|
||
desktopEntries = {
|
||
zen-browser-profile = {
|
||
name = "Zen Browser (Choose profile)";
|
||
icon = "app.zen_browser.zen";
|
||
exec = "flatpak run --branch=stable --arch=x86_64 --command=launch-script.sh --file-forwarding app.zen_browser.zen --ProfileManager @@u %u @@";
|
||
};
|
||
logseq-wayland = {
|
||
name = "Logseq Desktop (Wayland)";
|
||
icon = "com.logseq.Logseq";
|
||
exec = "flatpak run --branch=stable --arch=x86_64 --command=run.sh --file-forwarding com.logseq.Logseq @@u %U @@ --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations";
|
||
};
|
||
};
|
||
};
|
||
systemd.user = {
|
||
settings.Manager.DefaultEnvironment = {
|
||
QT_QPA_PLATFORM = "wayland";
|
||
};
|
||
targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie
|
||
services = let
|
||
mkGraphicalService = config: graphicalService // config;
|
||
graphicalService = {
|
||
Install.WantedBy = ["hyprland-session.target"];
|
||
Unit = {
|
||
Requisite = ["graphical-session.target"];
|
||
PartOf = ["graphical-session.target"];
|
||
After = ["graphical-session.target"];
|
||
};
|
||
Service = {
|
||
Restart = "on-failure";
|
||
TimeoutStopSec = 10;
|
||
RestartSec = 1;
|
||
};
|
||
};
|
||
in {
|
||
copyq = mkGraphicalService {
|
||
Service =
|
||
graphicalService.Service
|
||
// {
|
||
Environment = lib.mkForce "QT_QPA_PLATFORM=wayland";
|
||
};
|
||
};
|
||
hyprpolkitagent = mkGraphicalService {
|
||
Service =
|
||
graphicalService.Service
|
||
// {
|
||
Type = "simple";
|
||
ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent";
|
||
};
|
||
};
|
||
hyprsunset = mkGraphicalService {
|
||
Unit =
|
||
graphicalService.Unit
|
||
// {
|
||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||
};
|
||
Service =
|
||
graphicalService.Service
|
||
// {
|
||
Type = "simple";
|
||
Slice = "session.slice";
|
||
ExecStart = "${lib.getExe perSystem.hyprsunset.hyprsunset} -t 6500";
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
}
|