1
Fork 0

Move a bunch of things around

This commit is contained in:
Matei Adriel 2023-12-02 00:46:56 +01:00
parent 28d21046ef
commit bfc89aff7f
No known key found for this signature in database
39 changed files with 435 additions and 244 deletions

View file

@ -1,5 +0,0 @@
{
services.dunst = {
enable = true;
};
}

View file

@ -1,18 +1,17 @@
# Common wayland stuff
{ lib, pkgs, ... }: {
{ lib, pkgs, inputs, ... }: {
imports = [
./dunst.nix
./wlsunset.nix
./wlogout.nix
./anyrun.nix
../desktop/wezterm # Default hyprland terminal
../desktop/batsignal.nix
../desktop
../desktop/eww
];
# TODO: set up
# - volume/backlight controls
# - eww bar
# - bar
# - configure hyprland colors using base16 stuff
# - look into swaylock or whatever people use
# - multiple keyboard layouts
@ -36,17 +35,10 @@
# }}}
in
with pkgs; [
# {{{ Utils
libnotify # Send notifications
wl-ocr # Custom ocr script
wl-clipboard # Clipboard manager
wlogout # Nice logout script
wlsunset # Day/night gamma display adjustments
hyprpicker # Color picker
# }}}
# {{{ Screenshot related tools
grim # Take screenshot
slurp # Area selector
# }}}
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
];
}

View file

@ -1,16 +1,13 @@
{ pkgs, lib, config, inputs, ... }:
let
enabledMonitors = lib.filter (m: m.enabled) config.satellite.monitors;
hyprland-monitors = lib.concatStringsSep "\n" (lib.forEach enabledMonitors (m: ''
hyprland-monitors = lib.concatStringsSep "\n" (lib.forEach config.satellite.monitors (m: ''
monitor=${m.name},${toString m.width}x${toString m.height}@${toString m.refreshRate},${toString m.x}x${toString m.y},1
${lib.optionalString (m.workspace != null) "workspace=${m.name},${m.workspace}"}
''));
in
{
imports = [ ../default.nix ../../desktop ];
home.packages = [ inputs.hyprland-contrib.packages.${pkgs.system}.grimblast pkgs.hyprpaper ];
imports = [ ../global.nix ./hyprpaper.nix ];
wayland.windowManager.hyprland = {
enable = true;
@ -21,16 +18,4 @@ in
${hyprland-monitors}
'';
};
services.hyprpaper = {
enable = true;
systemdTarget = "hyprland-session.target";
preload = [ config.stylix.image ];
wallpapers = [{ inherit (config.stylix) image; }] ++
lib.forEach enabledMonitors ({ name, ... }: {
monitor = name;
image = config.stylix.image;
});
};
}

View file

@ -0,0 +1,14 @@
{ config, pkgs, lib, ... }: {
home.packages = [ pkgs.hyprpaper ];
services.hyprpaper = {
enable = true;
systemdTarget = "hyprland-session.target";
preload = [ config.stylix.image ];
wallpapers = [{ inherit (config.stylix) image; }] ++
lib.forEach config.satellite.monitors ({ name, ... }: {
monitor = name;
image = config.stylix.image;
});
};
}

View file

@ -1,3 +1,4 @@
# Wlogout is a logout menu. In my setup, it can be triggered using mod-q
{ config
, pkgs
, ...
@ -9,6 +10,8 @@ let bgImageSection = name: ''
'';
in
{
home.packages = [ pkgs.wlogout ];
xdg.configFile."wlogout/style.css".text = ''
* {
background-image: none;

View file

@ -1,16 +1,15 @@
{ pkgs, lib, ... }:
{ pkgs, ... }:
let
libnotify = lib.getExe pkgs.libnotify;
systemctl = "${pkgs.systemd}/bin/systemctl";
wlsunset-toggle = pkgs.writeShellScriptBin "wlsunset-toggle" ''
if [ "active" = "$(systemctl --user is-active wlsunset.service)" ]
then
${systemctl} --user stop wlsunset.service
${libnotify} "Stopped wlsunset"
echo "Stopped wlsunset"
else
${systemctl} --user start wlsunset.service
${libnotify} "Started wlsunset"
echo "Started wlsunset"
fi
'';
in