feat(hyprland): remove the chud wm

This commit is contained in:
Kat Inskip 2024-08-28 14:15:49 -07:00
parent bcf7032ba3
commit e8b1f901e3
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
18 changed files with 2 additions and 1036 deletions

View file

@ -1,32 +0,0 @@
{pkgs, ...}: {
home.pointerCursor = {
gtk.enable = true;
# x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
gtk = {
enable = true;
iconTheme = {
name = "Numix-Square-Light";
package = pkgs.numix-icon-theme-square;
};
theme = {
name = "Arc";
package = pkgs.arc-theme;
};
cursorTheme = {
name = "Numix-Cursor";
package = pkgs.numix-cursor-theme;
};
font = {
name = "Monaspace Krypton";
size = 11;
};
};
}

View file

@ -1,29 +0,0 @@
{pkgs, ...}: {
services.hypridle = {
enable = true;
listeners = [
{
timeout = 150;
onTimeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 5";
onResume = "${pkgs.brightnessctl}/bin/brightnessctl -r";
}
{
timeout = 300;
onTimeout = "${pkgs.systemd}/bin/loginctl lock-session";
}
{
timeout = 330;
onTimeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off";
onResume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on";
}
{
timeout = 600;
onTimeout = "${pkgs.systemd}/bin/systemctl suspend";
}
];
beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session";
afterSleepCmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on";
lockCmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
unlockCmd = "${pkgs.psmisc}/bin/killall hyprlock";
};
}

View file

@ -1,173 +0,0 @@
{
std,
pkgs,
inputs,
...
}: let
inherit (std) list;
in {
home.packages = with pkgs; [
grimblast
wl-clipboard
wlr-randr
wl-screenrec
slurp
grim
swww
pavucontrol
hyprpicker
gnome.nautilus
brightnessctl
playerctl
inputs.hyprsome.packages.${pkgs.system}.default
];
home.sessionVariables = {
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";
};
wayland.windowManager.hyprland = {
enable = true;
systemd = {
enable = true;
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
};
xwayland.enable = true;
settings = {
"$mod" = "SUPER";
input = {
kb_options = "ctrl:nocaps";
};
workspace = let
commonOptions = "gapsin:0,gapsout:0,rounding:false";
in
["1,monitor:eDP-1,default:true,${commonOptions}"]
++ (list.map (
workspace: "${toString workspace},monitor:eDP-1${commonOptions}"
) (list.range 2 10));
/*
++ [ "11,monitor:DP-3,default:true"] ++ (list.map (workspace:
"${toString workspace},monitor:DP-3"
) (list.range 12 20));
/*list.concat (list.generate (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"${toString x},monitor:eDP-1"
"${toString (x + 10)},monitor:DP-3"
]
)
10);
*/
monitor = [
"eDP-1, 2256x1504, 0x0, 1"
];
exec-once = [
"${pkgs.swww}/bin/swww init"
"${pkgs.hypridle}/bin/hypridle"
"${pkgs.dbus}/bin/dbus-update-activation-environment --all"
"${pkgs.libsForQt5.polkit-kde-agent}/bin/polkit-kde-agent"
"${pkgs.networkmanagerapplet}/bin/nm-applet"
"${pkgs.mako}/bin/mako"
"${pkgs.udiskie}/bin/udiskie &"
"${pkgs.pasystray}/bin/pasystray"
"${pkgs.systemd}/bin/systemctl restart waybar --user"
"${pkgs.systemd}/bin/systemctl restart konawall-py --user"
];
exec = [
];
xwayland = {
force_zero_scaling = true;
};
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
binde = [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 5%+"
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 5%-"
];
bind =
[
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
", XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next"
", XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl prev"
"$mod, R, exec, wofi -t wezterm -IS drun"
"$mod SHIFT, R, exec, wofi -t wezterm -IS run"
"$mod, Return, exec, wezterm"
", Print, exec, grimblast copy area"
"$mod SHIFT, E, exec, pkill Hyprland"
"$mod, Q, killactive,"
"$mod, F, fullscreen,"
"$mod, G, togglegroup,"
"$mod SHIFT, N, changegroupactive, f"
"$mod SHIFT, P, changegroupactive, b"
"$mod, T, togglefloating,"
"$mod SHIFT, T, togglesplit,"
"$mod SHIFT, X, pseudo,"
"$mod ALT, ,resizeactive,"
"$mod, Escape, exec, wlogout -p layer-shell"
"$mod, L, exec, loginctl lock-session"
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, down, movewindow, d"
"$mod ALT, left, movewindoworgroup, l"
"$mod ALT, right, movewindoworgroup, r"
"$mod ALT, up, movewindoworgroup, u"
"$mod ALT, down, movewindoworgroup, d"
"$mod, P, exec, ${pkgs.hyprpicker}/bin/hyprpicker -na"
"CTRL, Print, exec, grimblast --notify --cursor copysave output"
"$mod SHIFT CTRL, R, exec, grimblast --notify --cursor copysave output"
"ALT, Print, exec, grimblast --notify --cursor copysave screen"
"$mod SHIFT ALT, R, exec, grimblast --notify --cursor copysave screen"
"$mod, bracketleft, workspace, m-1"
"$mod, bracketright, workspace, m+1"
"$mod SHIFT, bracketleft, focusmonitor, l"
"$mod SHIFT, bracketright, focusmonitor, r"
"$mod SHIFT ALT, bracketleft, movecurrentworkspacetomonitor, l"
"$mod SHIFT ALT, bracketright, movecurrentworkspacetomonitor, r"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
list.concat (list.generate (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, exec, hyprsome workspace ${toString (x + 1)}"
"$mod SHIFT, ${ws}, exec, hyprsome move ${toString (x + 1)}"
]
)
10)
);
};
};
}

View file

@ -1,12 +0,0 @@
_: {
programs.hyprlock = {
enable = true;
backgrounds = [
{
path = "screenshot";
blur_size = 8;
blur_passes = 1;
}
];
};
}

View file

@ -1,39 +0,0 @@
{
inputs,
pkgs,
config,
...
}: let
konawallConfig = {
interval = 60 * 5;
rotate = true;
source = "konachan";
tags = [
"rating:s"
"touhou"
"score:>=50"
"width:>=1500"
];
logging = {
file = "INFO";
console = "DEBUG";
};
};
in {
systemd.user.services.konawall-py-hyprland = {
Unit = {
Description = "konawall-py";
X-Restart-Triggers = [(toString config.xdg.configFile."konawall/config.toml".source)];
After = ["hyprland-session.target" "network-online.target"];
};
Service = {
ExecStart = "${inputs.konawall-py.packages.${pkgs.system}.konawall-py}/bin/konawall";
Restart = "on-failure";
RestartSec = "1s";
};
Install = {WantedBy = ["hyprland-session.target"];};
};
xdg.configFile = {
"konawall/config.toml".source = (pkgs.formats.toml {}).generate "konawall-config" konawallConfig;
};
}

View file

@ -1,11 +0,0 @@
{pkgs, ...}: {
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
clock = true;
font = "Iosevka";
indicator = true;
};
};
}

View file

@ -1,107 +0,0 @@
{
kittywitch,
config,
lib,
...
}: let
inherit (lib.modules) mkForce;
in {
systemd.user.services.waybar = {
Install.WantedBy = lib.mkForce ["hyprland-session.target"];
Service = {
RestartSec = "1s";
};
Unit = {
After = ["hyprland-session.target"];
X-Restart-Triggers = [
(builtins.hashString "md5" (builtins.toJSON config.programs.waybar.settings))
];
};
};
programs.waybar = {
enable = true;
systemd.enable = true;
style = let
template = kittywitch.sassTemplate {
name = "waybar-style";
src = ./waybar.sass;
};
in
template.source;
settings.main = {
layer = "top";
position = "top";
height = 24;
# Modules Placement
modules-left = [
"hyprland/workspaces"
"hyprland/submap"
"hyprland/window"
];
modules-right = [
"idle_inhibitor"
"power-profiles-daemon"
"tray"
"battery"
"clock"
];
# Modules Definition
"hyprland/workspaces" = {
format = "{icon}";
/*
format-icons = {
# https://fontawesome.com/v5/cheatsheet
"1" = ""; # chats
"2" = ""; # cloud (browser)
"3" = ""; # music
"4" = ""; # brain
"5" = ""; # terminal >_
};
*/
};
"hyprland/window" = {
format = "{}";
rewrite = {
"(.*) Mozilla Firefox" = "🌎 $1";
"(.*) - fish" = "> [$1]";
};
};
tray = {
show-passive-items = true;
icon-size = 24;
spacing = 2;
};
power-profiles-daemon = {
format = "{profile}";
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
tooltip = true;
};
mpris = {
format = "{player_icon} {dynamic}";
format-paused = "{status_icon} {dynamic}";
player-icons = {
default = "";
brave = "";
mpv = "";
spotify = "";
};
status-icons = {
paused = "";
};
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
clock = {
format = "{:%F %H:%M %Z}";
};
};
};
}

View file

@ -1,85 +0,0 @@
*
padding: 0
margin: 0
border: none
border-radius: 0
background: none
font-family: "Monaspace Krypton", "Font Awesome 6 Free", "Font Awesome 6 Brands"
font-size: $font_size
text-shadow: none
box-shadow: none
%widget_unpadded
transition: none
background: rgba($base01, 0.5)
color: $base07
margin: 0 4px
%widget
@extend %widget_unpadded
padding: 0 4px
padding-top: 2px
window#waybar
background: rgba($base00, 0.1)
border-bottom: 2px solid transparent
// sway/workspaces
#workspaces
@extend %widget_unpadded
button
color: $base06
&.focused
color: $base07
background: $base0D
&:hover
transition: none
box-shadow: inherit
text-shadow: inherit
background: $base06
color: $base0C
// widgets
#mode, window#waybar #window,
#custom-clock, #mpris,
#clock, #pulseaudio, #backlight, #network, #temperature, #battery, #idle_inhibitor, #tray, #tray menu
@extend %widget
// hide when empty
window#waybar.empty #window
opacity: 0
// tooltips
tooltip
background: rgba($base00, 0.9)
label
color: $base07
// mpris player and state
#mpris
&.spotify
background: #191414
color: #1DB954
&.paused
background: $base01
color: $base03
/*.modules-left
#window
widget
label
margin: 0
&:first-child
margin-left: 0
&:last-child
margin-right: 0*/
.modules-center
.modules-right

View file

@ -1,5 +0,0 @@
_: {
programs.wlogout = {
enable = true;
};
}

View file

@ -1,20 +0,0 @@
{kittywitch, ...}: {
programs.wofi = {
enable = true;
settings = {
style = let
template = kittywitch.sassTemplate {
name = "wofi-style";
src = ./wofi.sass;
};
in
template.source;
insensitive = true;
allow_images = true;
hide_scroll = true;
width = "25%";
mode = "dmenu";
prompt = "";
};
};
}

View file

@ -1,26 +0,0 @@
#scroll
background: $base01
border: 1px solid $base03
#input
background: $base01
border: 1px solid $base0C
margin: 1em
background: $base02
color: $base04
window
font-family: $font
background: rgba($base00, .9)
border-radius: 1em
font-size: $font_size
color: $base07
#outer-box
margin: 1em
#entry
border-bottom: 1px dashed $base04
padding: .75em
&:selected
background-color: $base0D