reorganise /homes
This commit is contained in:
parent
719bd1de6b
commit
85071855ec
32 changed files with 219 additions and 1031 deletions
26
homes/modules/wm/hyprland/default.nix
Executable file
26
homes/modules/wm/hyprland/default.nix
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
# NOTE: hyprland must be enabled in BOTH your host config (for running hyprland)
|
||||
# NOTE: and your home-manager config (for managing hyprland's config files)
|
||||
{...}: {
|
||||
imports = [
|
||||
./kanshi.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
xwayland.enable = true;
|
||||
|
||||
# systemd = {
|
||||
# enable = true;
|
||||
# # enable autostart of applications
|
||||
# # REF: `man 8 systemd-xdg-autostart-generator`
|
||||
# enableXdgAutostart = true;
|
||||
# };
|
||||
|
||||
# plugins = with inputs; [
|
||||
# split-monitor-workspaces.packages.${pkgs.system}.split
|
||||
# ];
|
||||
};
|
||||
}
|
||||
29
homes/modules/wm/hyprland/hypridle.nix
Executable file
29
homes/modules/wm/hyprland/hypridle.nix
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 660;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
118
homes/modules/wm/hyprland/hyprlock.nix
Executable file
118
homes/modules/wm/hyprland/hyprlock.nix
Executable file
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
monitor = "";
|
||||
path = "$HOME/downloads/wallpaper/kill-my-firstborn/astronaut-pink-blue.png"; # only png supported for now
|
||||
# color = $color1
|
||||
|
||||
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
|
||||
blur_size = 4;
|
||||
blur_passes = 3; # 0 disables blurring
|
||||
noise = 0.0117;
|
||||
contrast = 1.3000; # Vibrant!!!
|
||||
brightness = 0.8000;
|
||||
vibrancy = 0.2100;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
label = [
|
||||
{
|
||||
# Hours
|
||||
monitor = "";
|
||||
text = ''cmd[update:1000] echo "<b><big> $(date +"%H") </big></b>"'';
|
||||
color = "rgb(255, 255, 255, 1)";
|
||||
font_size = 112;
|
||||
font_family = "Geist Mono 10";
|
||||
shadow_passes = 3;
|
||||
shadow_size = 4;
|
||||
|
||||
position = "0, 240";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
|
||||
{
|
||||
# Minutes
|
||||
monitor = "";
|
||||
text = ''cmd[update:1000] echo "<b><big> $(date +"%M") </big></b>"'';
|
||||
color = "rgb(255, 255, 255, 1)";
|
||||
font_size = 112;
|
||||
font_family = "Geist Mono 10";
|
||||
shadow_passes = 3;
|
||||
shadow_size = 4;
|
||||
|
||||
position = "0, 120";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
|
||||
# Today
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:18000000] echo "<b><big> "$(date +'%A')" </big></b>"'';
|
||||
color = "rgb(255, 255, 255, 1)";
|
||||
font_size = 22;
|
||||
font_family = "JetBrainsMono Nerd Font 10";
|
||||
|
||||
position = "0, 30";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
|
||||
# Week
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:18000000] echo "<b> "$(date +'%d %b')" </b>"'';
|
||||
color = "rgb(255, 255, 255, 1)";
|
||||
font_size = 18;
|
||||
font_family = "JetBrainsMono Nerd Font 10";
|
||||
|
||||
position = "0, 6";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
|
||||
{
|
||||
# Degrees
|
||||
monitor = "";
|
||||
# get temperature in Brisbane
|
||||
text = ''cmd[update:18000000] echo "<b>Feels like $(curl -s 'wttr.in/bne?format=%t' | tr -d '+')</b>"'';
|
||||
color = "rgb(255, 255, 255, 1)";
|
||||
font_size = 18;
|
||||
font_family = "Geist Mono 10";
|
||||
|
||||
position = "0, 40";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
];
|
||||
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "300, 50";
|
||||
outline_thickness = 3;
|
||||
|
||||
dots_size = 0.26; # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true;
|
||||
dots_rouding = -1;
|
||||
|
||||
rounding = 22;
|
||||
outer_color = "rgb(0, 0, 0, 0)";
|
||||
inner_color = "rgb(100, 114, 125, 0.1)";
|
||||
font_color = "rgb(200, 200, 200)";
|
||||
fade_on_empty = true;
|
||||
placeholder_text = "<i>Password...</i>"; # Text rendered in the input box when it's empty.
|
||||
|
||||
position = "0, 120";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
56
homes/modules/wm/hyprland/kanshi.nix
Executable file
56
homes/modules/wm/hyprland/kanshi.nix
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
{...}: {
|
||||
# Change monitor positions
|
||||
# TODO: find a way to make this modular (ie put something different for my laptop)
|
||||
# my idea is to have a "monitors" module and use kanshi for wayland
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
# You can find your monitors in hyprland by using `hyprctl monitors all`
|
||||
settings = [
|
||||
{
|
||||
# 1920x1080@144 gaming monitor
|
||||
output.criteria = "HDMI-A-1";
|
||||
output.mode = "1920x1080@119.98Hz";
|
||||
output.scale = 1.0;
|
||||
output.adaptiveSync = false; # Variable Refresh Rate (this can be changed for gaming)
|
||||
}
|
||||
{
|
||||
# 4k side monitor
|
||||
output.criteria = "DP-2";
|
||||
output.mode = "3840x2160@60.00Hz";
|
||||
output.scale = 2.0;
|
||||
}
|
||||
{
|
||||
# laptop builtin screen
|
||||
output.criteria = "eDP-1";
|
||||
output.mode = "1920x1080@60.02Hz";
|
||||
output.scale = 1.0;
|
||||
}
|
||||
|
||||
{
|
||||
# This is my dual-monitor desktop setup
|
||||
profile.name = "myputer";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "DP-2";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "HDMI-A-1";
|
||||
position = "3840,0";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
# This is my laptop (lolcathost) :)
|
||||
profile.name = "lolcathost";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue