Shift home config to enable by desktop, work out more details later

This commit is contained in:
Jimbo 2025-01-01 11:30:16 -05:00
parent d873588c59
commit 77168ba9c7
37 changed files with 120 additions and 127 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
./grimsnap
@ -9,7 +9,7 @@
./wpaperd
];
home.packages = with pkgs; [
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
brightnessctl
clipman
grim

View file

@ -1,6 +1,6 @@
{ pkgs, config, ... }:
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
(pkgs.writeScriptBin "grimsnap" ''
# Freeze the screen using hyprpicker
hyprpicker -r -z &

View file

@ -5,7 +5,7 @@
];
services.mako = {
enable = true;
enable = config.home.desktop.enable;
borderColor = "#${config.look.colors.accent}";
backgroundColor = "#${config.look.colors.dark}D9";
output = "${config.displays.d1}";

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
home.packages = with pkgs; lib.mkIf config.services.mako.enable [
(pkgs.writeScriptBin "makotoggle" ''
mode_output=$(makoctl mode)

View file

@ -1,6 +1,6 @@
{ pkgs, config, ... }:
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
(pkgs.writeScriptBin "wlpicker" ''
# Get color position
position=$(slurp -b 00000000 -p)

View file

@ -1,7 +1,7 @@
{ config, ... }:
{
programs.wpaperd = {
enable = true;
enable = config.home.desktop.enable;
settings = {
default.mode = "center";
any.path = "~/.assets/wallpapers/1.png";

View file

@ -1,6 +1,6 @@
{ pkgs, config, ... }:
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
home.packages = with pkgs; lib.mkIf config.wayland.windowManager.sway.enable [
(pkgs.writeScriptBin "prop-sway" ''
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | ${pkgs.slurp}/bin/slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000)
if [ -n "$selected_window" ]; then