nixfiles/modules/graphical/files.nix

92 lines
3.1 KiB
Nix

{ config, lib, pkgs, ... }: {
config.home-manager.users.emily = lib.mkIf config.kyouma.graphical.enable {
home.file.".local/bin/hypr/playerctl.sh" = let
playerctl = "${pkgs.playerctl}/bin/playerctl";
title = "$(${playerctl} metadata --format '{{markup_escape(title)}}')";
artist = "$(${playerctl} metadata --format '{{markup_escape(artist)}}')";
status = "$(${playerctl} status 2> /dev/null)";
in {
enable = true;
executable = true;
text = ''
#!${pkgs.bash}/bin/bash
if [ "${status}" = "Playing" ]; then
echo -e " ${title}\nPlaying: ${artist} - ${title}\nplaying"
elif [ "${status}" = "Paused" ]; then
echo -e " ${title}\nPaused: ${artist} - ${title}\npaused"
else
echo -e ""
fi
'';
};
home.file.".local/bin/hypr/colorpicker.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "colorpicker";
text = builtins.readFile ./files/scripts/colorpicker.sh;
runtimeInputs = with pkgs; [ coreutils grim slurp imagemagick_light wl-clipboard libnotify ];
};
};
home.file.".local/bin/hypr/rofi_powermenu.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "rofi-powermenu";
text = builtins.readFile ./files/scripts/rofi_powermenu.sh;
runtimeInputs = with pkgs; [ rofi hyprlock coreutils-full toybox xdg-user-dirs ];
};
};
home.file.".local/bin/hypr/rofi_screenshot.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "rofi-screenshot";
text = builtins.readFile ./files/scripts/rofi_screenshot.sh;
runtimeInputs = with pkgs; [ coreutils grim hyprland imv slurp wl-clipboard libnotify pulseaudio toybox rofi xdg-user-dirs ];
};
};
home.file.".local/bin/hypr/screenshot.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "screenshot";
text = builtins.readFile ./files/scripts/screenshot.sh;
runtimeInputs = with pkgs; [ coreutils grim imv slurp wl-clipboard libnotify pulseaudio ];
};
};
home.file."Pictures/wallpapers/sylviaritter/wallpaper.png" = {
enable = true;
source = config.stylix.image;
};
home.file."Pictures/wallpapers/lockscreen.png" = {
enable = true;
source = config.stylix.image;
};
xdg.configFile."mako-icons" = {
enable = true;
recursive = true;
source = ./files/icons;
};
xdg.configFile."rofi" = {
enable = true;
recursive = true;
source = ./files/rofi;
};
xdg.userDirs =
let
home = config.home-manager.users.emily.home.homeDirectory;
in {
enable = true;
desktop = null;
documents = "${home}/docs";
download = "${home}/Downloads";
music = "${home}/music";
pictures = "${home}/Pictures";
publicShare = null;
templates = null;
videos = "${home}/videos";
};
};
}