refactor some things, might have broken everything

This commit is contained in:
2026-06-15 02:21:03 +02:00
parent 73e25a00b6
commit 08a5db8508
61 changed files with 1013 additions and 1103 deletions

View File

@ -0,0 +1,27 @@
{ ... }:
{
home.shellAliases.noidle = "systemctl --user stop hypridle";
services.hypridle = {
enable = true;
settings = {
general.lock_cmd = "hyprlock";
general.before_sleep_cmd = "loginctl lock-session";
listener = [
{
timeout = 300;
on-timeout = "brightnessctl -s set 0";
on-resume = "brightnessctl -r";
}
{
timeout = 300;
on-timeout = "loginctl lock-session";
}
{
timeout = 1800;
on-timeout = "systemctl suspend";
}
];
};
};
}

View File

@ -0,0 +1,180 @@
{ ... }:
{
wayland.windowManager.hyprland.systemd.variables = [ "--all" ];
programs.hyprshot.enable = true;
catppuccin.hyprland.enable = false;
home.shellAliases.hl = "Hyprland";
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.configType = "hyprlang";
wayland.windowManager.hyprland.settings = {
"$mainMod" = "SUPER";
bind = [
" , Print, exec, hyprshot -m region -o ~/screenshots -f $(date +%Y-%m-%d_%H-%M-%S).png"
" SHIFT, Print, exec, hyprshot -m output -m active -o ~/screenshots -f $(date +%Y-%m-%d_%H-%M-%S).png"
"$mainMod, Return, exec, alacritty"
"CTRL_ALT, Q, killactive,"
"CTRL_ALT_SHIFT, Q, forcekillactive,"
"SUPER_ALT, Q, exit,"
"$mainMod, S, togglefloating,"
"$mainMod, I, pin,"
"$mainMod, D, exec, rofi -show drun -show-icons"
"$mainMod SHIFT, D, exec, rofi -show run -show-icons"
"$mainMod, M, fullscreen, 1"
"$mainMod, F, fullscreen, 0"
# Move focus
"$mainMod, h, movefocus, l"
"$mainMod, l, movefocus, r"
"$mainMod, k, movefocus, u"
"$mainMod, j, movefocus, d"
#swap windows
"$mainMod SHIFT, h, swapwindow, l"
"$mainMod SHIFT, l, swapwindow, r"
"$mainMod SHIFT, k, swapwindow, u"
"$mainMod SHIFT, j, swapwindow, d"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
bindm = [ #bind mouse
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bindel = [ #repeat and locked
" ,XF86AudioRaiseVolume, exec, wpctl set-volume @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%-"
" ,XF86KbdBrightnessUp, exec, asusctl -n"
" ,XF86KbdBrightnessDown, exec, asusctl -p"
];
bindl = [ #repeat
" , XF86AudioNext, exec, playerctl next"
" , XF86AudioPrev, exec, playerctl previous"
" , XF86AudioPause, exec, playerctl play-pause"
" , XF86AudioPlay, exec, playerctl play-pause"
"$mainMod, n, exec, playerctl next"
"$mainMod, p, exec, playerctl previous"
"$mainMod, o, exec, playerctl play-pause"
];
windowrulev2 = [
#ignore maximize requests
"suppressevent maximize, class:.*"
#fix dragging issues with xwayland
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
];
input = {
kb_layout = "fr";
kb_variant = "us";
follow_mouse = 2;
kb_options = "caps:none";
touchpad.natural_scroll = false;
};
misc = {
force_default_wallpaper = 1;
disable_hyprland_logo = true;
mouse_move_focuses_monitor = false;
};
dwindle = {
force_split = 2;
};
animations = {
enabled = true;
bezier = [
"easeInOut, 0.77, 0, 0.175, 1"
"easeOut, 0.24, 0.66, 0.04, 1"
];
animation = [
"windows, 1, 2, easeInOut"
"windowsIn, 1, 2, easeInOut, slide"
"windowsOut, 1, 2, easeInOut, slide"
"fade, 1, 2, easeInOut"
"workspaces, 1, 2, easeOut"
];
};
decoration = {
rounding = 10;
shadow = {
enabled = true;
range = 4;
render_power = 3;
color = "rgba(1a1a1aee)";
};
};
general = {
gaps_in = 2;
gaps_out = 5;
border_size = 1;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
resize_on_border = false;
allow_tearing = false;
layout = "dwindle";
};
layerrule = {
name = "no_anim_for_selection";
no_anim = "on";
"match:namespace" = "selection";
};
cursor.no_warps = true;
env = [
"HYPRCURSOR_SIZE,17"
"HYPRCURSOR_THEME,bibata-modern-classic"
];
exec-once = [
"swaybg -i ~/.config/wallpaper.png&"
"(sleep 2;activate-linux)&"
"waybar&"
"alacritty&"
];
};
}

View File

@ -0,0 +1,32 @@
{ ... }:
{
programs.hyprlock.enable = true;
catppuccin.hyprlock.enable = false;
programs.hyprlock.settings = {
general = {
no_fade_out = true;
ignore_empty_input = false;
};
background = {
monitor = "";
path = "~/.config/lock_screen.jpg";
};
input-field = {
monitor = "";
size = "300, 50";
dot_size = "0.2";
dots_fade_time = 100;
inner_color = "rgb(139,89,100)";
outer_color = "rgb(139,89,100)";
outline_thickness = 1;
fail_transition = "300";
fail_text = "learn to write, idiot";
};
};
}

View File

@ -0,0 +1,10 @@
{ pkgs, lib, config, ... }:
{
home.packages = with pkgs; [
grim
slurp
wl-clipboard
swaybg
];
}

View File

@ -0,0 +1,161 @@
{ ... }:
{
programs.waybar.enable = true;
programs.waybar.style = ''
* {
border: none;
border-radius: 0;
font-family: "Iosevka Nerd Font";
font-size: 15px;
min-height: 0;
}
window#waybar {
background: transparent;
color: white;
}
#window {
font-weight: bold;
}
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
border-top: 2px solid transparent;
}
#workspaces button.focused {
color: #c9545d;
border-top: 2px solid #c9545d;
}
#workspaces button.active {
color : #88ff88;
background-color : rgba(220,255, 220, 0.3)
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#network.disconnected {
color: #f53c3c;
font-weight:bold;
}
#temperature.critical {
color: #ff2222;
}
#battery.critical {
color: #ff2222;
}
#cpu.high {
color: #ff2222;
}
#disk.high {
color: #ff2222;
}
'';
programs.waybar.settings.mainBar = {
layer = "top";
position ="top";
height = 24;
margin-left = 5;
margin-right = 5;
modules-left = ["hyprland/workspaces" "custom/music"];
modules-center = ["hyprland/window"];
modules-right = ["disk" "pulseaudio" "network" "custom/pipe" "cpu" "custom/pipe" "temperature" "custom/pipe" "memory" "battery" "clock"];
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = false;
format = "{id}";
};
clock = {
interval = 1;
format-alt = " {:%Y-%m-%d}";
format = " {:%H:%M:%S}";
};
cpu = {
format = " {usage}% ";
states.high = 80;
interval = 5;
};
memory = {
format = " {}% |";
interval = 5;
};
battery = {
bat = "BAT0";
full-at = 79;
states = {
good = 20;
critical = 15;
};
format-time = " {H}:{m}";
format-discharging = " {icon} {capacity}%{time} |";
format-charging = " {capacity}%{time} |";
format-plugged = "";
format-icons = [" " " " " " " " " "];
interval = 10;
};
network = {
format-wifi = " {icon} {essid} ";
format-ethernet = " {ifname}: {ipaddr}/{cidr} ";
format-disconnected = " Disconnected ";
format-icons =["󰤟 " "󰤢 " "󰤥 " "󰤨 "];
};
pulseaudio = {
format = " {icon}{volume}% |";
format-bluetooth = " {icon} {volume}% |";
format-muted = "";
format-icons = {
headphones = " ";
handsfree = "󰋎 ";
headset = "󰋎 ";
phone = " ";
portable = " ";
car = " ";
default = [" " " " " "];
};
on-click = "pavucontrol";
};
temperature = {
thermal-zone = 0;
critical-threshold = 80;
interval = 5;
format =" {icon} {temperatureC}°C ";
format-icons = ["" "" "" "" ""];
};
disk = {
format =" 󰋊 {percentage_used}% |";
states.high = "5";
};
"custom/pipe" = {
format = "|";
};
"custom/music" = {
exec-if = "playerctl metadata 2>&1 >/dev/null";
exec = "playerctl metadata --format ' {{ artist }} - {{title}}'";
interval = 1;
interval-if = 5;
};
};
}