Initial commit (after fork)

This commit is contained in:
Pedro Rey Anca 2024-07-08 18:00:42 +02:00
parent 5ebba8a939
commit 5fe3f69a17
111 changed files with 1428 additions and 1611 deletions

View file

@ -1,27 +1,27 @@
{ ... }:
{
{...}: {
wayland.windowManager.hyprland = {
settings = {
# autostart
exec-once = [
"systemctl --user import-environment &"
"hash dbus-update-activation-environment 2>/dev/null &"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
"dbus-update-activation-environment --systemd --all &"
"nm-applet &"
"wl-clip-persist --clipboard both"
"swaybg -m fill -i $(find ~/Pictures/wallpapers/ -maxdepth 1 -type f) &"
"hyprctl setcursor Nordzy-cursors 22 &"
"wl-clip-persist --clipboard both &"
"bash -c 'if [ ! -f ~/.config/hypr/wallpaper.png ]; then wall-change ~/.config/hypr/default_wallpaper.png; fi'"
"swaybg -m fill -i ~/.config/hypr/wallpaper.png &"
"poweralertd &"
"waybar &"
"swaync &"
"wl-paste --watch cliphist store &"
"hyprlock"
"wl-paste --type text --watch cliphist store &" #Stores only text data
"wl-paste --type image --watch cliphist store &" #Stores only image data
"ckb-next -b &"
"element-desktop --hidden &"
];
input = {
kb_layout = "us,fr";
kb_options ="grp:alt_caps_toggle";
kb_layout = "es,us";
kb_options = "grp:alt_caps_toggle";
numlock_by_default = true;
follow_mouse = 1;
sensitivity = 0;
@ -133,15 +133,16 @@
"$mainMod, Return, exec, kitty"
"ALT, Return, exec, kitty --title float_kitty"
"$mainMod SHIFT, Return, exec, kitty --start-as=fullscreen -o 'font_size=16'"
"$mainMod, B, exec, hyprctl dispatch exec '[workspace 1 silent] floorp'"
"$mainMod, Q, killactive,"
"$mainMod, B, exec, floorp"
"$mainMod, N, exec, swaync-client -t"
"$mainMod SHIFT, N, exec, swaync-client -d"
"$mainMod SHIFT, Q, killactive,"
"$mainMod, F, fullscreen, 0"
"$mainMod SHIFT, F, fullscreen, 1"
"$mainMod, Space, togglefloating,"
"$mainMod, D, exec, fuzzel"
"$mainMod SHIFT, D, exec, hyprctl dispatch exec '[workspace 4 silent] discord --enable-features=UseOzonePlatform --ozone-platform=wayland'"
"$mainMod SHIFT, S, exec, hyprctl dispatch exec '[workspace 5 silent] SoundWireServer'"
"$mainMod, Escape, exec, swaylock"
"$mainMod, M, exec, element-desktop"
"$mainMod, Escape, exec, loginctl lock-session"
"$mainMod SHIFT, Escape, exec, shutdown-script"
"$mainMod, P, pseudo,"
"$mainMod, J, togglesplit,"
@ -149,17 +150,16 @@
"$mainMod SHIFT, B, exec, pkill -SIGUSR1 .waybar-wrapped"
"$mainMod, C ,exec, hyprpicker -a"
"$mainMod, W,exec, wallpaper-picker"
"$mainMod SHIFT, W, exec, vm-start"
# screenshot
"$mainMod, Print, exec, grimblast --notify --cursor --freeze save area ~/Pictures/$(date +'%Y-%m-%d-At-%Ih%Mm%Ss').png"
"$mainMod, Print, exec, screenshot-menu"
",Print, exec, grimblast --notify --cursor --freeze copy area"
# switch focus
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod, H, movefocus, l"
"$mainMod, L, movefocus, r"
"$mainMod, K, movefocus, u"
"$mainMod, J, movefocus, d"
# switch workspace
"$mainMod, 1, workspace, 1"
@ -187,18 +187,18 @@
"$mainMod CTRL, c, movetoworkspace, empty"
# window control
"$mainMod SHIFT, left, movewindow, l"
"$mainMod SHIFT, right, movewindow, r"
"$mainMod SHIFT, up, movewindow, u"
"$mainMod SHIFT, down, movewindow, d"
"$mainMod CTRL, left, resizeactive, -80 0"
"$mainMod CTRL, right, resizeactive, 80 0"
"$mainMod CTRL, up, resizeactive, 0 -80"
"$mainMod CTRL, down, resizeactive, 0 80"
"$mainMod ALT, left, moveactive, -80 0"
"$mainMod ALT, right, moveactive, 80 0"
"$mainMod ALT, up, moveactive, 0 -80"
"$mainMod ALT, down, moveactive, 0 80"
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod CTRL, H, resizeactive, -80 0"
"$mainMod CTRL, L, resizeactive, 80 0"
"$mainMod CTRL, K, resizeactive, 0 -80"
"$mainMod CTRL, J, resizeactive, 0 80"
"$mainMod ALT, H, moveactive, -80 0"
"$mainMod ALT, L, moveactive, 80 0"
"$mainMod ALT, K, moveactive, 0 -80"
"$mainMod ALT, J, moveactive, 0 80"
# media and volume controls
",XF86AudioRaiseVolume,exec, pamixer -i 2"
@ -239,8 +239,6 @@
"float,title:^(float_kitty)$"
"center,title:^(float_kitty)$"
"size 950 600,title:^(float_kitty)$"
"float,audacious"
"workspace 8 silent, audacious"
# "pin,wofi"
# "float,wofi"
# "noborder,wofi"
@ -270,7 +268,6 @@
"center,class:^(zenity)$"
"size 850 500,class:^(zenity)$"
"float,class:^(pavucontrol)$"
"float,class:^(SoundWireServer)$"
"float,class:^(.sameboy-wrapped)$"
"float,class:^(file_progress)$"
"float,class:^(confirm)$"
@ -290,7 +287,6 @@
"maxsize 1 1,class:^(xwaylandvideobridge)$"
"noblur,class:^(xwaylandvideobridge)$"
];
};
extraConfig = "

View file

@ -1,8 +1,11 @@
{ inputs, ... }:
{
imports = [ (import ./hyprland.nix) ]
++ [ (import ./config.nix) ]
++ [ (import ./hyprlock.nix) ]
++ [ (import ./variables.nix) ]
++ [ inputs.hyprland.homeManagerModules.default ];
{inputs, ...}: {
imports =
[(import ./hyprland.nix)]
++ [(import ./config.nix)]
++ [(import ./hyprlock.nix)]
++ [(import ./hypridle.nix)]
++ [(import ./variables.nix)]
++ [inputs.hyprland.homeManagerModules.default];
xdg.configFile."hypr/default_wallpaper.png".source = ./default_wallpaper.png;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

View file

@ -0,0 +1,41 @@
{
pkgs,
host,
...
}: {
services.hypridle.enable = true;
xdg.configFile."hypr/hypridle.conf".text =
''
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
}
listener {
timeout = 300 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
''
+ (
if (host == "frues-pc")
then ''
listener {
timeout = 150 # 2.5min.
on-timeout = ckb-next --profile "Off" # turn off keyboard backlight.
on-resume = ckb-next --profile "Personal" # turn on keyboard backlight.
}
listener {
timeout = 330 # 5.5min
on-timeout = ddcmonitorctl off # screen off when timeout has passed
on-resume = ddcmonitorctl on # screen on when activity is detected after timeout has fired.
}
''
else ''
listener {
timeout = 330 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
}
''
);
}

View file

@ -1,5 +1,8 @@
{ inputs, pkgs, ...}:
{
inputs,
pkgs,
...
}: {
home.packages = with pkgs; [
# swww
swaybg
@ -13,7 +16,7 @@
wayland
direnv
];
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
systemd.user.targets.hyprland-session.Unit.Wants = ["xdg-desktop-autostart.target"];
wayland.windowManager.hyprland = {
enable = true;
xwayland = {

View file

@ -1,6 +1,5 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.hyprlock ];
{pkgs, ...}: {
programs.hyprlock.enable = true;
xdg.configFile."hypr/hyprlock.conf".text = ''
$red = rgb(f38ba8)
$yellow = rgb(f9e2af)
@ -27,9 +26,9 @@
# BACKGROUND
background {
monitor =
path = ~/Pictures/wallpapers/others/cat-leaves.png
path = ~/.config/hypr/wallpaper.png
color = $base
blur_passes = 0
blur_passes = 2
}
# TIME
@ -47,9 +46,9 @@
valign = top
}
# DATE
# DATE
label {
monitor =
monitor =
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
color = $text
font_size = 18
@ -62,8 +61,8 @@
# USER AVATAR
image {
monitor =
path = ~/Pictures/pp/pp.png
monitor =
path = ~/.face.png
size = 125
border_color = $accent
@ -95,4 +94,4 @@
valign = center
}
'';
}
}

View file

@ -1,7 +1,7 @@
{ ... }:
{
{...}: {
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
_JAVA_AWT_WM_NONEREPARENTING = "1";