mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-07-06 16:12:33 +02:00
It's moving
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
@@ -63,17 +64,17 @@ in {
|
||||
{
|
||||
key = "o";
|
||||
desc = "Obsidian";
|
||||
cmd = "${pkgs.obsidian}/bin/obsidian";
|
||||
cmd = "${pkgs-stable.obsidian}/bin/obsidian";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Signal";
|
||||
cmd = "${pkgs.signal-desktop}/bin/signal-desktop";
|
||||
cmd = "${pkgs-stable.signal-desktop}/bin/signal-desktop";
|
||||
}
|
||||
{
|
||||
key = "t";
|
||||
desc = "TickTick";
|
||||
cmd = "${pkgs.ticktick}/bin/ticktick";
|
||||
cmd = "${pkgs-stable.ticktick}/bin/ticktick";
|
||||
}
|
||||
{
|
||||
key = "b";
|
||||
@@ -124,7 +125,7 @@ in {
|
||||
|
||||
# Quick launch
|
||||
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
|
||||
"$mod,E, exec, uwsm app -- ${pkgs.thunar}/bin/thunar" # Thunar
|
||||
"$mod,E, exec, uwsm app -- ${pkgs-stable.thunar}/bin/thunar" # Thunar
|
||||
"$mod, SPACE, exec, rofi -show drun" # Launcher
|
||||
"$mod, N, exec, swaync-client -t" # Notification center
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
@@ -19,49 +20,43 @@ in {
|
||||
./animations.nix
|
||||
./bindings.nix
|
||||
./polkitagent.nix
|
||||
./keyboard-backlight.nix # CHANGEME: This is for omen laptop only
|
||||
./hyprpaper.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
libsForQt5.qt5ct
|
||||
qt6Packages.qt6ct
|
||||
xcb-util-cursor
|
||||
libxcb
|
||||
hyprland-qtutils
|
||||
adw-gtk3
|
||||
hyprshot
|
||||
hyprpicker
|
||||
swappy
|
||||
imv
|
||||
wf-recorder
|
||||
wlr-randr
|
||||
brightnessctl
|
||||
gnome-themes-extra
|
||||
dconf
|
||||
wayland-utils
|
||||
wayland-protocols
|
||||
];
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
libsForQt5.qt5ct
|
||||
qt6Packages.qt6ct
|
||||
hyprland-qtutils
|
||||
])
|
||||
++ (with pkgs-stable; [
|
||||
xcb-util-cursor
|
||||
libxcb
|
||||
adw-gtk3
|
||||
hyprshot
|
||||
hyprpicker
|
||||
swappy
|
||||
imv
|
||||
wf-recorder
|
||||
wlr-randr
|
||||
brightnessctl
|
||||
gnome-themes-extra
|
||||
dconf
|
||||
wayland-utils
|
||||
wayland-protocols
|
||||
]);
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
configType = "hyprlang";
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = false;
|
||||
variables = [
|
||||
"--all"
|
||||
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
|
||||
};
|
||||
systemd.enable = false;
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
settings = {
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --systemd --all &"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
",prefered,auto,1" # default
|
||||
];
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Hyprpaper is used to set the wallpaper on the system
|
||||
{pkgs-stable, lib, ...}: {
|
||||
# The wallpaper is set by stylix
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
package = pkgs-stable.hyprpaper;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
};
|
||||
};
|
||||
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"systemctl --user enable --now hyprpaper.service"
|
||||
];
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
# Turn the keyboard red/off when the battery is low
|
||||
# Include this one only if you have a omen laptop with RGB keyboard
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
alert-when-low-battery = false;
|
||||
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
|
||||
function set_keyboard_backlight {
|
||||
local color=$1
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone00
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone01
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone02
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone03
|
||||
}
|
||||
state="white"
|
||||
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
|
||||
if [ "${toString alert-when-low-battery}" = "false" ]; then
|
||||
exit 0
|
||||
fi
|
||||
while true; do
|
||||
BATTERY_LEVEL=$(cat /sys/class/power_supply/BAT*/capacity)
|
||||
IS_CHARGING=$(cat /sys/class/power_supply/BAT*/status)
|
||||
if [[ $BATTERY_LEVEL -le 10 && $IS_CHARGING != "Charging" ]]; then
|
||||
if [[ $state == "red" ]];then
|
||||
state="white"
|
||||
set_keyboard_backlight "000000"
|
||||
else
|
||||
state="red"
|
||||
set_keyboard_backlight "FF0000"
|
||||
fi
|
||||
else
|
||||
state="white"
|
||||
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
'';
|
||||
|
||||
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings.exec-once = [command];
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [hyprpolkitagent];
|
||||
{pkgs-stable, ...}: {
|
||||
home.packages = with pkgs-stable; [hyprpolkitagent];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user