summaryrefslogtreecommitdiff
path: root/home/apps
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home/apps/astal.nix13
-rw-r--r--home/apps/caelestia/default.nix17
-rw-r--r--home/apps/caelestia/scheme.nix156
-rw-r--r--home/apps/caelestia/settings.nix393
-rw-r--r--home/apps/default.nix1
-rw-r--r--home/apps/hyprlock.nix40
-rw-r--r--home/apps/kanshi.nix53
7 files changed, 375 insertions, 298 deletions
diff --git a/home/apps/astal.nix b/home/apps/astal.nix
index 1dd8527..73e90f7 100644
--- a/home/apps/astal.nix
+++ b/home/apps/astal.nix
@@ -1,11 +1,12 @@
{
lib,
config,
- inputs,
- system,
+ pkgs,
...
}: let
- astal = inputs.self.packages.${system};
+ astal = pkgs.astal.override {
+ inherit (config.options) theme;
+ };
inherit (lib) mkIf;
cfg = config.apps.astal;
@@ -16,8 +17,8 @@ in {
default.appLauncher = lib.mkDefault "astal-launcher";
home.packages = [
- astal.astal.shell
- astal.astal.launcher
+ astal.shell
+ astal.launcher
];
systemd.user.services.astal = {
@@ -33,7 +34,7 @@ in {
};
Service = {
- ExecStart = "${astal.astal.shell}/bin/astal-shell";
+ ExecStart = "${astal.shell}/bin/astal-shell";
Restart = "always";
RestartSec = "10";
};
diff --git a/home/apps/caelestia/default.nix b/home/apps/caelestia/default.nix
index 4693f67..75dbb26 100644
--- a/home/apps/caelestia/default.nix
+++ b/home/apps/caelestia/default.nix
@@ -1,8 +1,11 @@
{
lib,
inputs,
+ config,
...
}: let
+ inherit (lib) mkIf;
+ cfg = config.apps.caelestia;
in {
imports = [
inputs.caelestia-shell.homeManagerModules.default
@@ -10,12 +13,14 @@ in {
./scheme.nix
];
- default.appLauncher = lib.mkOverride 600 "caelestia-shell ipc call drawers toggle launcher";
- default.lockScreen = lib.mkOverride 600 "caelestia-shell ipc call lock lock";
+ config = mkIf cfg.enable {
+ default.appLauncher = lib.mkOverride 600 "caelestia-shell ipc call drawers toggle launcher";
+ #default.lockScreen = "caelestia-shell ipc call lock lock";
- programs.caelestia = {
- enable = true;
- systemd.enable = true;
- cli.enable = true;
+ programs.caelestia = {
+ enable = true;
+ systemd.enable = true;
+ cli.enable = true;
+ };
};
}
diff --git a/home/apps/caelestia/scheme.nix b/home/apps/caelestia/scheme.nix
index ffb46c6..b454b78 100644
--- a/home/apps/caelestia/scheme.nix
+++ b/home/apps/caelestia/scheme.nix
@@ -3,84 +3,88 @@
config,
...
}: let
+ inherit (lib) mkIf;
+ cfg = config.apps.caelestia;
theme = config.theme.colors;
in {
- xdg.configFile."caelestia/scheme.json".text = lib.generators.toJSON {} {
- name = theme.name;
- flavour = "";
- mode = "dark";
- variant = "";
- colours = {
- primary_paletteKeyColor = theme.primary;
- secondary_paletteKeyColor = theme.secondary;
- tertiary_paletteKeyColor = theme.tertiary;
- neutral_paletteKeyColor = theme.overlay;
- neutral_variant_paletteKeyColor = "777680";
- background = theme.base;
- onBackground = theme.text;
- surface = theme.surface;
- surfaceDim = theme.base;
- surfaceBright = theme.overlay;
- surfaceContainerLowest = theme.base;
- surfaceContainerLow = theme.base;
- surfaceContainer = theme.base;
- surfaceContainerHigh = theme.surface;
- surfaceContainerHighest = theme.overlay;
- onSurface = theme.text;
- surfaceVariant = theme.text;
- onSurfaceVariant = theme.subtext;
- inverseSurface = theme.text;
- inverseOnSurface = theme.surface;
- outline = theme.primary;
- outlineVariant = theme.primary;
- shadow = "000000";
- scrim = "000000";
- surfaceTint = theme.primary;
- primary = theme.primary;
- onPrimary = theme.surface;
- primaryContainer = theme.primary;
- onPrimaryContainer = theme.surface;
- inversePrimary = theme.surface;
- secondary = theme.secondary;
- onSecondary = theme.surface;
- secondaryContainer = theme.secondary;
- onSecondaryContainer = theme.surface;
- tertiary = theme.tertiary;
- onTertiary = theme.surface;
- tertiaryContainer = theme.tertiary;
- onTertiaryContainer = theme.surface;
- error = theme.error;
- onError = theme.text;
- errorContainer = theme.error;
- onErrorContainer = theme.text;
- primaryFixed = theme.primary;
- primaryFixedDim = theme.primary;
- onPrimaryFixed = theme.primary;
- onPrimaryFixedVariant = theme.primary;
- secondaryFixed = theme.secondary;
- secondaryFixedDim = theme.primary;
- onSecondaryFixed = theme.secondary;
- onSecondaryFixedVariant = theme.secondary;
- tertiaryFixed = theme.tertiary;
- tertiaryFixedDim = theme.tertiary;
- onTertiaryFixed = theme.tertiary;
- onTertiaryFixedVariant = theme.tertiary;
- term0 = theme.normal.black;
- term1 = theme.normal.red;
- term2 = theme.normal.green;
- term3 = theme.normal.yellow;
- term4 = theme.normal.blue;
- term5 = theme.normal.magenta;
- term6 = theme.normal.cyan;
- term7 = theme.normal.white;
- term8 = theme.bright.black;
- term9 = theme.bright.red;
- term10 = theme.bright.green;
- term11 = theme.bright.yellow;
- term12 = theme.bright.blue;
- term13 = theme.bright.magenta;
- term14 = theme.bright.cyan;
- term15 = theme.bright.white;
+ config = mkIf cfg.enable {
+ xdg.configFile."caelestia/scheme.json".text = lib.generators.toJSON {} {
+ name = theme.name;
+ flavour = "";
+ mode = "dark";
+ variant = "";
+ colours = {
+ primary_paletteKeyColor = theme.primary;
+ secondary_paletteKeyColor = theme.secondary;
+ tertiary_paletteKeyColor = theme.tertiary;
+ neutral_paletteKeyColor = theme.overlay;
+ neutral_variant_paletteKeyColor = "777680";
+ background = theme.base;
+ onBackground = theme.text;
+ surface = theme.surface;
+ surfaceDim = theme.base;
+ surfaceBright = theme.overlay;
+ surfaceContainerLowest = theme.base;
+ surfaceContainerLow = theme.base;
+ surfaceContainer = theme.base;
+ surfaceContainerHigh = theme.surface;
+ surfaceContainerHighest = theme.overlay;
+ onSurface = theme.text;
+ surfaceVariant = theme.text;
+ onSurfaceVariant = theme.subtext;
+ inverseSurface = theme.text;
+ inverseOnSurface = theme.surface;
+ outline = theme.primary;
+ outlineVariant = theme.primary;
+ shadow = "000000";
+ scrim = "000000";
+ surfaceTint = theme.primary;
+ primary = theme.primary;
+ onPrimary = theme.surface;
+ primaryContainer = theme.primary;
+ onPrimaryContainer = theme.surface;
+ inversePrimary = theme.surface;
+ secondary = theme.secondary;
+ onSecondary = theme.surface;
+ secondaryContainer = theme.secondary;
+ onSecondaryContainer = theme.surface;
+ tertiary = theme.tertiary;
+ onTertiary = theme.surface;
+ tertiaryContainer = theme.tertiary;
+ onTertiaryContainer = theme.surface;
+ error = theme.error;
+ onError = theme.text;
+ errorContainer = theme.error;
+ onErrorContainer = theme.text;
+ primaryFixed = theme.primary;
+ primaryFixedDim = theme.primary;
+ onPrimaryFixed = theme.primary;
+ onPrimaryFixedVariant = theme.primary;
+ secondaryFixed = theme.secondary;
+ secondaryFixedDim = theme.primary;
+ onSecondaryFixed = theme.secondary;
+ onSecondaryFixedVariant = theme.secondary;
+ tertiaryFixed = theme.tertiary;
+ tertiaryFixedDim = theme.tertiary;
+ onTertiaryFixed = theme.tertiary;
+ onTertiaryFixedVariant = theme.tertiary;
+ term0 = theme.normal.black;
+ term1 = theme.normal.red;
+ term2 = theme.normal.green;
+ term3 = theme.normal.yellow;
+ term4 = theme.normal.blue;
+ term5 = theme.normal.magenta;
+ term6 = theme.normal.cyan;
+ term7 = theme.normal.white;
+ term8 = theme.bright.black;
+ term9 = theme.bright.red;
+ term10 = theme.bright.green;
+ term11 = theme.bright.yellow;
+ term12 = theme.bright.blue;
+ term13 = theme.bright.magenta;
+ term14 = theme.bright.cyan;
+ term15 = theme.bright.white;
+ };
};
};
}
diff --git a/home/apps/caelestia/settings.nix b/home/apps/caelestia/settings.nix
index d2b55a1..de81df7 100644
--- a/home/apps/caelestia/settings.nix
+++ b/home/apps/caelestia/settings.nix
@@ -1,215 +1,230 @@
-{config, ...}: {
- programs.caelestia = {
- settings = {
- # Look
- appearance = rec {
- # Rounding
- rounding = let
- inner = config.theme.innerRadius;
- outer = config.theme.outerRadius;
- in {
- small = inner;
- normal = outer;
- large = outer + outer;
- full = 1000;
- };
+{
+ config,
+ lib,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.apps.caelestia;
+in {
+ config = mkIf cfg.enable {
+ programs.caelestia = {
+ settings = {
+ # Look
+ appearance = rec {
+ # Rounding
+ rounding = let
+ inner = config.theme.innerRadius;
+ outer = config.theme.outerRadius;
+ in {
+ small = inner;
+ normal = outer;
+ large = outer + outer;
+ full = 1000;
+ };
- # Spacing
- spacing = let
- diff = 5;
- in {
- small = padding.small + diff;
- smaller = padding.smaller + diff;
- normal = padding.normal + diff;
- larger = padding.larger + diff;
- large = padding.large + diff;
- };
+ # Spacing
+ spacing = let
+ diff = 5;
+ in {
+ small = padding.small + diff;
+ smaller = padding.smaller + diff;
+ normal = padding.normal + diff;
+ larger = padding.larger + diff;
+ large = padding.large + diff;
+ };
- # Padding
- padding = let
- inner = config.theme.innerGap;
- outer = config.theme.outerGap;
- avg = builtins.div (outer + inner) 2;
- in {
- small = inner;
- smaller = avg;
- normal = outer;
- larger = outer + inner;
- large = outer + avg;
- };
+ # Padding
+ padding = let
+ inner = config.theme.innerGap;
+ outer = config.theme.outerGap;
+ avg = builtins.div (outer + inner) 2;
+ in {
+ small = inner;
+ smaller = avg;
+ normal = outer;
+ larger = outer + inner;
+ large = outer + avg;
+ };
- # Fontsize
- font.size = let
- base = config.theme.font.size;
- in {
- small = base - 2;
- smaller = base - 1;
- normal = base;
- larger = base + 2;
- large = base + 5;
- extraLarge = base + 15;
+ # Fontsize
+ font.size = let
+ base = config.theme.font.size;
+ in {
+ small = base - 2;
+ smaller = base - 1;
+ normal = base;
+ larger = base + 2;
+ large = base + 5;
+ extraLarge = base + 15;
+ };
+
+ # Animations
+ anim = {
+ durations = {
+ scale = 1;
+ };
+ };
+
+ # Transparency
+ transparency = {
+ enabled = true;
+ base = config.theme.opacity;
+ layers = 1;
+ };
};
- # Animations
- anim = {
- durations = {
- scale = 1;
+ # Settings
+ general = {
+ # What apps to launch
+ apps = {
+ terminal = config.default.terminal;
+ audio = ["pavucontrol"];
+ playback = ["mpv"];
};
};
- # Transparency
- transparency = {
+ # Launcher settings
+ launcher = {
enabled = true;
- base = config.theme.opacity;
- layers = 1;
+ useFuzzy = true;
};
- };
- # Settings
- general = {
- # What apps to launch
- apps = {
- terminal = config.default.terminal;
- audio = ["pavucontrol"];
- playback = ["mpv"];
+ # Background
+ background.enabled = true;
+ paths = {
+ wallpaper = config.theme.wallpaper;
};
- };
-
- # Background
- background.enabled = true;
- paths = {
- wallpaper = config.theme.wallpaper;
- };
- # Bar
- bar = {
- clock.showIcon = true;
- dragThreshold = 20;
- entries =
- map (id: {
- inherit id;
+ # Bar
+ bar = {
+ clock.showIcon = true;
+ dragThreshold = 20;
+ entries =
+ map (id: {
+ inherit id;
+ enabled = true;
+ }) [
+ "workspaces"
+ "spacer"
+ "activeWindow"
+ "spacer"
+ "tray"
+ "clock"
+ "statusIcons"
+ "power"
+ ];
+ persistent = true;
+ popouts = {
+ activeWindow = true;
+ statusIcons = true;
+ tray = true;
+ };
+ scrollActions = {
+ brightness = true;
+ workspaces = true;
+ volume = true;
+ };
+ showOnHover = true;
+ status = {
+ showAudio = false;
+ showBattery = true;
+ showBluetooth = true;
+ showKbLayout = false;
+ showMicrophone = false;
+ showNetwork = true;
+ showLockStatus = false;
+ };
+ tray = {
+ background = false;
+ compact = false;
+ iconSubs = [];
+ recolour = false;
+ };
+ workspaces = {
+ activeIndicator = true;
+ activeTrail = false;
+ perMonitorWorkspaces = false;
+ showWindows = false;
+ shown = 9;
+ label = "";
+ occupiedLabel = "";
+ activeLabel = "";
+ };
+ border = {
+ rounding = config.theme.outerRadius;
+ thickness = config.theme.outerGap;
+ };
+ dashboard = {
enabled = true;
- }) [
- "workspaces"
- "spacer"
- "activeWindow"
- "spacer"
- "tray"
- "clock"
- "statusIcons"
- "power"
- ];
- persistent = true;
- popouts = {
- activeWindow = true;
- statusIcons = true;
- tray = true;
- };
- scrollActions = {
- brightness = true;
- workspaces = true;
- volume = true;
- };
- showOnHover = true;
- status = {
- showAudio = false;
- showBattery = true;
- showBluetooth = true;
- showKbLayout = false;
- showMicrophone = false;
- showNetwork = true;
- showLockStatus = false;
- };
- tray = {
- background = false;
- compact = false;
- iconSubs = [];
- recolour = false;
- };
- workspaces = {
- activeIndicator = true;
- activeTrail = false;
- perMonitorWorkspaces = true;
- showWindows = false;
- shown = 9;
- label = "";
- occupiedLabel = "";
- activeLabel = "";
+ dragThreshold = 50;
+ mediaUpdateInterval = 500;
+ showOnHover = true;
+ };
};
- border = {
- rounding = config.theme.outerRadius;
- thickness = config.theme.outerGap;
+
+ # Notifications
+ notifs = {
+ actionOnClick = true;
+ clearThreshold = 0.3;
+ defaultExpireTimeout = 5000;
+ expandThreshold = 20;
+ openExpanded = false;
+ expire = true;
};
- dashboard = {
+
+ # On screen display
+ osd = {
enabled = true;
- dragThreshold = 50;
- mediaUpdateInterval = 500;
- showOnHover = true;
+ enableBrightness = true;
+ enableMicrophone = false;
+ hideDelay = 2000;
};
- };
- # Notifications
- notifs = {
- actionOnClick = true;
- clearThreshold = 0.3;
- defaultExpireTimeout = 5000;
- expandThreshold = 20;
- openExpanded = false;
- expire = true;
- };
-
- # On screen display
- osd = {
- enabled = true;
- enableBrightness = true;
- enableMicrophone = false;
- hideDelay = 2000;
- };
-
- # Services
- services = {
- audioIncrement = 0.1;
- brightnessIncrement = 0.1;
- maxVolume = 1.0;
- useFahrenheit = false;
- useTwelveHourClock = false;
- };
+ # Services
+ services = {
+ audioIncrement = 0.1;
+ brightnessIncrement = 0.1;
+ maxVolume = 1.0;
+ useFahrenheit = false;
+ useTwelveHourClock = false;
+ };
- # Logout / shutdown
- session = {
- dragThreshold = 30;
- enabled = true;
- vimKeybinds = false;
- commands = {
- logout = ["loginctl" "terminate-user" ""];
- shutdown = ["systemctl" "poweroff"];
- hibernate = ["systemctl" "hibernate"];
- reboot = ["systemctl" "reboot"];
+ # Logout / shutdown
+ session = {
+ dragThreshold = 30;
+ enabled = true;
+ vimKeybinds = false;
+ commands = {
+ logout = ["loginctl" "terminate-user" ""];
+ shutdown = ["systemctl" "poweroff"];
+ hibernate = ["systemctl" "hibernate"];
+ reboot = ["systemctl" "reboot"];
+ };
};
- };
- # Sidebar
- sidebar = {
- dragThreshold = 80;
- enabled = true;
- };
+ # Sidebar
+ sidebar = {
+ dragThreshold = 80;
+ enabled = true;
+ };
- # idk
- utilities = {
- enabled = true;
- maxToasts = 4;
- toasts = {
- audioInputChanged = true;
- audioOutputChanged = true;
- capsLockChanged = true;
- chargingChanged = true;
- configLoaded = true;
- dndChanged = true;
- gameModeChanged = true;
- kbLayoutChanged = true;
- numLockChanged = true;
- vpnChanged = true;
- nowPlaying = false;
+ # idk
+ utilities = {
+ enabled = true;
+ maxToasts = 4;
+ toasts = {
+ audioInputChanged = true;
+ audioOutputChanged = true;
+ capsLockChanged = true;
+ chargingChanged = true;
+ configLoaded = true;
+ dndChanged = true;
+ gameModeChanged = true;
+ kbLayoutChanged = true;
+ numLockChanged = true;
+ vpnChanged = true;
+ nowPlaying = false;
+ };
};
};
};
diff --git a/home/apps/default.nix b/home/apps/default.nix
index 1823b0d..baf9d82 100644
--- a/home/apps/default.nix
+++ b/home/apps/default.nix
@@ -7,6 +7,7 @@ _: {
./alacritty.nix
./astal.nix
./hyprlock.nix
+ ./kanshi.nix
./kitty.nix
./mako.nix
];
diff --git a/home/apps/hyprlock.nix b/home/apps/hyprlock.nix
index a0e5d84..237abb6 100644
--- a/home/apps/hyprlock.nix
+++ b/home/apps/hyprlock.nix
@@ -4,7 +4,6 @@
...
}: let
text = "rgb(${config.theme.colors.text})";
- base = "rgb(${config.theme.colors.base})";
error = "rgb(${config.theme.colors.error})";
trans = "rgba(0,0,0,0)";
@@ -25,30 +24,29 @@ in {
animations = {
enabled = true;
+ bezier = [
+ "linear, 1, 1, 1, 1"
+ ];
animation = [
- "fadeIn, 0"
- "fadeOut, 0"
+ "fade, 1, 3, linear"
];
};
background = {
path = config.theme.lockscreen;
- color = base;
- blur_passes = 0;
- blur_size = 2;
- noise = 0;
- contrast = 0;
- brightness = 0;
- vibrancy = 0;
+ blur_passes = 2;
+ contrast = 0.9;
+ brightness = 0.8;
+ vibrancy = 0.2;
vibrancy_darkness = 0.0;
};
# Password Input
input-field = {
- size = "300, 50";
- outline_thickness = 0;
- dots_size = 0.25;
- dots_spacing = 0.55;
+ size = "250, 60";
+ outline_thickness = 2;
+ dots_size = 0.2;
+ dots_spacing = 0.5;
dots_center = true;
dots_rounding = -1;
outer_color = trans;
@@ -81,21 +79,21 @@ in {
{
text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\"";
color = text;
- font_size = 20;
+ font_size = 30;
font_family = config.theme.font.header;
- position = "0, -100";
+ position = "0, -50";
halign = "center";
- valign = "top";
+ valign = "center";
}
# Clock
{
- text = "cmd[update:1000] echo \"$(date +\"%k:%M:%S\")\"";
+ text = "cmd[update:1000] echo \"$(date +\"%k:%M\")\"";
color = text;
- font_size = 90;
+ font_size = 130;
font_family = config.theme.font.header;
- position = "0, -130";
+ position = "0, 130";
halign = "center";
- valign = "top";
+ valign = "center";
}
];
};
diff --git a/home/apps/kanshi.nix b/home/apps/kanshi.nix
new file mode 100644
index 0000000..ed7622a
--- /dev/null
+++ b/home/apps/kanshi.nix
@@ -0,0 +1,53 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.apps.kanshi;
+
+ laptopMonitors = lib.lists.filter (mon: mon.laptop) config.monitors;
+ dockedMonitors = lib.lists.filter (mon: !mon.laptop) config.monitors;
+
+ mkOutput = mon: status:
+ lib.mkMerge [
+ {
+ criteria =
+ if mon.desc == ""
+ then mon.port
+ else mon.desc;
+ scale = mon.scale;
+ inherit status;
+ }
+ (lib.mkIf (mon.position.x != 0 || mon.position.y != 0) {
+ position = "${toString mon.position.x},${toString mon.position.y}";
+ })
+ (lib.mkIf (mon.size.x != 0 && mon.size.y != 0) {
+ mode = "${toString mon.size.x}x${toString mon.size.y}";
+ })
+ ];
+
+ mkEnabledOutput = mon: (mkOutput mon "enable");
+ mkDisabledOutput = mon: (mkOutput mon "disable");
+in {
+ config = mkIf cfg.enable {
+ services.kanshi = {
+ enable = true;
+
+ settings = [
+ {
+ profile = {
+ name = "laptop";
+ outputs = map mkEnabledOutput laptopMonitors;
+ };
+ }
+ {
+ profile = {
+ name = "docked";
+ outputs = (map mkEnabledOutput dockedMonitors) ++ (map mkDisabledOutput laptopMonitors);
+ };
+ }
+ ];
+ };
+ };
+}