261 lines
9 KiB
Nix
261 lines
9 KiB
Nix
{ inputs, lib, pkgs, ... }:
|
|
let
|
|
assets = "${inputs.self}/assets";
|
|
upstream = "${inputs.arch-hyprland}/.config";
|
|
wallpaper = "${assets}/wallpaper/wallpaper5.png";
|
|
|
|
wallpaperPicker = pkgs.writeShellScript "ena-wallpaper-picker" ''
|
|
set -eu
|
|
wallpaper="$(${lib.getExe pkgs.rofi} -dmenu -p Wallpaper < <(find "$HOME/Pictures/wallpapers" -maxdepth 1 -type f))"
|
|
[ -n "$wallpaper" ] || exit 0
|
|
${pkgs.awww}/bin/awww img "$wallpaper" --transition-type any
|
|
ln -sfn "$wallpaper" "$HOME/.config/hypr/current_wallpaper"
|
|
'';
|
|
|
|
hyprlandConfig = ''
|
|
source = colors.conf
|
|
|
|
monitor = eDP-1, 1920x1080@60, 0x0, 1
|
|
|
|
$terminal = ${pkgs.ghostty}/bin/ghostty
|
|
$fileManager = ${pkgs.nautilus}/bin/nautilus
|
|
$menu = ${pkgs.vicinae}/bin/vicinae toggle
|
|
|
|
exec-once = ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
|
|
exec-once = ${pkgs.waybar}/bin/waybar
|
|
exec-once = ${pkgs.awww}/bin/awww-daemon
|
|
exec-once = ${pkgs.blueman}/bin/blueman-applet
|
|
exec-once = ${pkgs.swaynotificationcenter}/bin/swaync
|
|
exec-once = ${pkgs.hyprpolkitagent}/bin/hyprpolkitagent
|
|
exec-once = ln -sfn ${wallpaper} ~/.config/hypr/current_wallpaper
|
|
exec-once = sleep 1 && ${pkgs.awww}/bin/awww img ${wallpaper} --transition-type any
|
|
|
|
env = XCURSOR_SIZE,24
|
|
env = HYPRCURSOR_SIZE,24
|
|
env = XCURSOR_THEME,pjsk-cursor-n25-ena-ani
|
|
|
|
source = ~/.config/hypr/configs/tags.conf
|
|
source = ~/.config/hypr/configs/looknfeel.conf
|
|
source = ~/.config/hypr/configs/UserAnimations.conf
|
|
source = ~/.config/hypr/configs/windowrules.conf
|
|
source = ~/.config/hypr/configs/keybinds.conf
|
|
|
|
dwindle {
|
|
pseudotile = true
|
|
preserve_split = true
|
|
}
|
|
|
|
master {
|
|
new_status = master
|
|
}
|
|
|
|
misc {
|
|
force_default_wallpaper = 0
|
|
disable_hyprland_logo = true
|
|
vfr = true
|
|
}
|
|
|
|
render {
|
|
new_render_scheduling = true
|
|
}
|
|
|
|
source = ~/.config/hypr/configs/input.conf
|
|
source = hyprland-gui.conf
|
|
'';
|
|
|
|
keybinds = ''
|
|
$mainMod = SUPER
|
|
|
|
bind = $mainMod, Return, exec, $terminal
|
|
bind = $mainMod SHIFT, Return, exec, [float; size 800 550] $terminal
|
|
bind = $mainMod, Q, killactive
|
|
bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0
|
|
bind = $mainMod, E, exec, $fileManager
|
|
bind = $mainMod, Space, togglefloating
|
|
bind = $mainMod, D, exec, $menu
|
|
bind = $mainMod, P, pseudo
|
|
bind = $mainMod, J, togglesplit
|
|
bind = $mainMod, L, exec, ${pkgs.hyprlock}/bin/hyprlock
|
|
bind = $mainMod SHIFT, F, fullscreen
|
|
bind = $mainMod SHIFT, S, exec, mkdir -p "$HOME/Pictures/Screenshots" && ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" "$HOME/Pictures/Screenshots/$(date +%Y-%m-%d-%H%M%S).png"
|
|
bind = $mainMod, W, exec, ${wallpaperPicker}
|
|
bind = $mainMod, H, exec, pkill -SIGUSR1 waybar
|
|
bind = $mainMod SHIFT, E, exec, $terminal -e ${pkgs.yazi}/bin/yazi
|
|
bind = $mainMod CTRL, G, exec, ${inputs.hyprmod.packages.${pkgs.system}.default}/bin/hyprmod
|
|
|
|
bind = $mainMod, left, movefocus, l
|
|
bind = $mainMod, right, movefocus, r
|
|
bind = $mainMod, up, movefocus, u
|
|
bind = $mainMod, down, movefocus, d
|
|
|
|
bind = $mainMod CTRL, left, movewindow, l
|
|
bind = $mainMod CTRL, right, movewindow, r
|
|
bind = $mainMod CTRL, up, movewindow, u
|
|
bind = $mainMod CTRL, down, movewindow, d
|
|
|
|
binde = $mainMod SHIFT, left, resizeactive, -50 0
|
|
binde = $mainMod SHIFT, right, resizeactive, 50 0
|
|
binde = $mainMod SHIFT, up, resizeactive, 0 -50
|
|
binde = $mainMod SHIFT, down, resizeactive, 0 50
|
|
|
|
bind = $mainMod, 1, workspace, 1
|
|
bind = $mainMod, 2, workspace, 2
|
|
bind = $mainMod, 3, workspace, 3
|
|
bind = $mainMod, 4, workspace, 4
|
|
bind = $mainMod, 5, workspace, 5
|
|
bind = $mainMod, 6, workspace, 6
|
|
bind = $mainMod, 7, workspace, 7
|
|
bind = $mainMod, 8, workspace, 8
|
|
bind = $mainMod, 9, workspace, 9
|
|
bind = $mainMod, 0, workspace, 10
|
|
|
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
|
|
|
bind = $mainMod, mouse_down, workspace, e+1
|
|
bind = $mainMod, mouse_up, workspace, e-1
|
|
bindm = $mainMod, mouse:272, movewindow
|
|
bindm = $mainMod, mouse:273, resizewindow
|
|
|
|
bindel = , XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
|
|
bindel = , XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
|
bindel = , XF86AudioMute, exec, ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
|
bindel = , XF86AudioMicMute, exec, ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
|
bindel = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 10%+
|
|
bindel = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 10%-
|
|
|
|
bindl = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next
|
|
bindl = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl play-pause
|
|
bindl = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause
|
|
bindl = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous
|
|
'';
|
|
|
|
# ponytail: keep the upstream core rice only; add Matugen/extra Waybar modules when needed.
|
|
waybarConfig = builtins.toJSON {
|
|
layer = "top";
|
|
position = "top";
|
|
spacing = 3;
|
|
margin-top = 3;
|
|
margin-left = 8;
|
|
margin-right = 8;
|
|
modules-left = [ "clock" "tray" ];
|
|
modules-center = [ "hyprland/workspaces" ];
|
|
modules-right = [ "network" "pulseaudio" "battery" "custom/power" ];
|
|
clock = {
|
|
interval = 1;
|
|
format = " {:%I:%M %p}";
|
|
format-alt = " {:%H:%M %Y, %d %B, %A}";
|
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
|
};
|
|
network = {
|
|
format-wifi = " {essid}";
|
|
format-ethernet = " {ifname}";
|
|
format-disconnected = "";
|
|
tooltip-format = "{ifname}: {ipaddr}/{cidr}";
|
|
};
|
|
pulseaudio = {
|
|
format = "{icon} {volume}%";
|
|
format-muted = " muted";
|
|
format-icons = [ "" "" "" ];
|
|
on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
};
|
|
battery = {
|
|
states = { warning = 30; critical = 15; };
|
|
format = "{icon} {capacity}%";
|
|
format-charging = " {capacity}%";
|
|
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
|
};
|
|
"custom/power" = {
|
|
format = "⏻";
|
|
on-click = "${pkgs.wlogout}/bin/wlogout";
|
|
tooltip = true;
|
|
tooltip-format = "Logout Menu";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
home.packages = with pkgs; [
|
|
awww
|
|
blueman
|
|
brightnessctl
|
|
grim
|
|
hyprpolkitagent
|
|
libnotify
|
|
nautilus
|
|
networkmanagerapplet
|
|
playerctl
|
|
rofi
|
|
slurp
|
|
swaynotificationcenter
|
|
waybar
|
|
wireplumber
|
|
wlogout
|
|
yazi
|
|
];
|
|
|
|
home.file."Pictures/wallpapers" = {
|
|
source = "${assets}/wallpaper";
|
|
recursive = true;
|
|
};
|
|
|
|
xdg.configFile = {
|
|
"hypr/hyprland.conf".text = hyprlandConfig;
|
|
"hypr/colors.conf".source = "${upstream}/hypr/colors.conf";
|
|
"hypr/configs/tags.conf".source = "${upstream}/hypr/configs/tags.conf";
|
|
"hypr/configs/looknfeel.conf".source = "${upstream}/hypr/configs/looknfeel.conf";
|
|
"hypr/configs/UserAnimations.conf".source = "${upstream}/hypr/configs/UserAnimations.conf";
|
|
"hypr/configs/windowrules.conf".source = "${upstream}/hypr/configs/windowrules.conf";
|
|
"hypr/configs/input.conf".source = "${upstream}/hypr/configs/input.conf";
|
|
"hypr/configs/keybinds.conf".text = keybinds;
|
|
"hypr/hypridle.conf".source = "${upstream}/hypr/hypridle.conf";
|
|
"hypr/hyprlock.conf".source = "${upstream}/hypr/hyprlock.conf";
|
|
"waybar/config".text = waybarConfig;
|
|
"waybar/colors.css".source = "${upstream}/waybar/colors.css";
|
|
"waybar/style.css".source = "${upstream}/waybar/style/bintang default.css";
|
|
"wlogout/layout".text = ''
|
|
{
|
|
"label" : "lock",
|
|
"action" : "${pkgs.hyprlock}/bin/hyprlock",
|
|
"text" : "Lock",
|
|
"keybind" : "l"
|
|
}
|
|
{
|
|
"label" : "reboot",
|
|
"action" : "systemctl reboot",
|
|
"text" : "Reboot",
|
|
"keybind" : "r"
|
|
}
|
|
{
|
|
"label" : "shutdown",
|
|
"action" : "systemctl poweroff",
|
|
"text" : "Shutdown",
|
|
"keybind" : "s"
|
|
}
|
|
{
|
|
"label" : "logout",
|
|
"action" : "loginctl kill-session $XDG_SESSION_ID",
|
|
"text" : "Logout",
|
|
"keybind" : "e"
|
|
}
|
|
{
|
|
"label" : "suspend",
|
|
"action" : "systemctl suspend",
|
|
"text" : "Suspend",
|
|
"keybind" : "u"
|
|
}
|
|
'';
|
|
"wlogout/style.css".source = "${upstream}/wlogout/style.css";
|
|
"wlogout/icons" = {
|
|
source = "${upstream}/wlogout/icons";
|
|
recursive = true;
|
|
};
|
|
};
|
|
}
|