diff options
Diffstat (limited to 'home/apps')
| -rw-r--r-- | home/apps/astal.nix | 13 | ||||
| -rw-r--r-- | home/apps/caelestia/default.nix | 26 | ||||
| -rw-r--r-- | home/apps/caelestia/scheme.nix | 90 | ||||
| -rw-r--r-- | home/apps/caelestia/settings.nix | 232 | ||||
| -rw-r--r-- | home/apps/default.nix | 3 | ||||
| -rw-r--r-- | home/apps/hyprlock.nix | 40 | ||||
| -rw-r--r-- | home/apps/kanshi.nix | 53 | ||||
| -rw-r--r-- | home/apps/rofi/config.rasi | 99 | ||||
| -rw-r--r-- | home/apps/rofi/default.nix | 23 | ||||
| -rw-r--r-- | home/apps/rofi/theme.nix | 27 | ||||
| -rw-r--r-- | home/apps/wofi/default.nix | 2 | ||||
| -rw-r--r-- | home/apps/wofi/style.nix | 2 |
12 files changed, 581 insertions, 29 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 new file mode 100644 index 0000000..75dbb26 --- /dev/null +++ b/home/apps/caelestia/default.nix @@ -0,0 +1,26 @@ +{ + lib, + inputs, + config, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.caelestia; +in { + imports = [ + inputs.caelestia-shell.homeManagerModules.default + ./settings.nix + ./scheme.nix + ]; + + 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; + }; + }; +} diff --git a/home/apps/caelestia/scheme.nix b/home/apps/caelestia/scheme.nix new file mode 100644 index 0000000..b454b78 --- /dev/null +++ b/home/apps/caelestia/scheme.nix @@ -0,0 +1,90 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.caelestia; + theme = config.theme.colors; +in { + 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 new file mode 100644 index 0000000..de81df7 --- /dev/null +++ b/home/apps/caelestia/settings.nix @@ -0,0 +1,232 @@ +{ + 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; + }; + + # 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; + }; + + # Animations + anim = { + durations = { + scale = 1; + }; + }; + + # Transparency + transparency = { + enabled = true; + base = config.theme.opacity; + layers = 1; + }; + }; + + # Settings + general = { + # What apps to launch + apps = { + terminal = config.default.terminal; + audio = ["pavucontrol"]; + playback = ["mpv"]; + }; + }; + + # Launcher settings + launcher = { + enabled = true; + useFuzzy = true; + }; + + # Background + background.enabled = true; + paths = { + wallpaper = config.theme.wallpaper; + }; + + # 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; + dragThreshold = 50; + mediaUpdateInterval = 500; + showOnHover = true; + }; + }; + + # 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; + }; + + # 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; + }; + + # 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 58cd117..baf9d82 100644 --- a/home/apps/default.nix +++ b/home/apps/default.nix @@ -1,10 +1,13 @@ _: { imports = [ + ./caelestia + ./rofi ./waybar ./wofi ./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); + }; + } + ]; + }; + }; +} diff --git a/home/apps/rofi/config.rasi b/home/apps/rofi/config.rasi new file mode 100644 index 0000000..8d8b1a4 --- /dev/null +++ b/home/apps/rofi/config.rasi @@ -0,0 +1,99 @@ +configuration { + modi: "drun"; + drun-match-fields: "name"; + matching: "glob"; + sort: true; + show-icons: true; + font: "JetBrainsMono Nerd Font 10"; +} + +@theme "~/.config/rofi/theme.rasi" + +window { + height: 30em; + width: 57em; + padding: @border-width; + background-color: @primary; + border-color: @primary; + border-radius: @outer-radius; +} + +mainbox { + orientation: horizontal; + children: [ "inputbar" , "listbox" ]; + background-color: @base; + border-radius: @outer-radius; +} + +inputbar { + width: 27em; + children: [ "entry" ]; + background-image: @background; +} + +entry { + enabled: false; +} + +listbox { + margin: 1em; + children: [ "dummy" , "listview" , "dummy" ]; + background-color: transparent; +} + +listview { + columns: 1; + lines: 7; + scrollbar: false; + expand: false; + fixed-height: true; + fixed-columns: true; + text-color: @text; + background-color: transparent; +} + +dummy { + background-color: transparent; +} + +element { + spacing: 1em; + padding: 0.5em 0.5em 0.5em 1.5em; + cursor: pointer; + text-color: @text; + background-color: transparent; + border-radius: @inner-radius; +} + +element selected.normal { + text-color: @surface; + background-color: @primary; +} + +element-icon { + size: 2.7em; + cursor: inherit; + text-color: inherit; + background-color: transparent; +} + +element-text { + vertical-align: 0.5; + horizontal-align: 0.0; + text-color: inherit; + background-color: transparent; +} + +error-message { + text-color: @text; + background-color: @base; + text-transform: capitalize; + children: [ "textbox" ]; +} + +textbox { + text-color: @error; + background-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} diff --git a/home/apps/rofi/default.nix b/home/apps/rofi/default.nix new file mode 100644 index 0000000..80c88a2 --- /dev/null +++ b/home/apps/rofi/default.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkIf; + theme = config.theme; + cfg = config.apps.rofi; +in { + config = mkIf cfg.enable { + default.appLauncher = lib.mkOverride 700 "rofi -show drun"; + + home.packages = [ + pkgs.rofi + ]; + + home.file = { + ".config/rofi/config.rasi".source = ./config.rasi; + ".config/rofi/theme.rasi".text = import ./theme.nix {inherit theme;}; + }; + }; +} diff --git a/home/apps/rofi/theme.nix b/home/apps/rofi/theme.nix new file mode 100644 index 0000000..891b5a3 --- /dev/null +++ b/home/apps/rofi/theme.nix @@ -0,0 +1,27 @@ +{theme}: let + text = "#${theme.colors.text}"; + base = "#${theme.colors.base}"; + surface = "#${theme.colors.surface}"; + primary = "#${theme.colors.primary}"; + error = "#${theme.colors.error}"; + outerGap = "${toString theme.outerGap}px"; + innerGap = "${toString theme.innerGap}px"; + outerRadius = "${toString theme.outerRadius}px"; + innerRadius = "${toString theme.innerRadius}px"; + borderWidth = "${toString theme.borderWidth}px"; + wallpaper = theme.wallpaper; +in '' + * { + primary: ${primary}; + error: ${error}; + base: ${base}; + surface: ${surface}; + text: ${text}; + inner-radius: ${innerRadius}; + outer-radius: ${outerRadius}; + inner-gap: ${innerGap}; + outer-gap: ${outerGap}; + border-width: ${borderWidth}; + background: url("${wallpaper}", height); + } +'' diff --git a/home/apps/wofi/default.nix b/home/apps/wofi/default.nix index 2de9f45..b528f65 100644 --- a/home/apps/wofi/default.nix +++ b/home/apps/wofi/default.nix @@ -7,7 +7,7 @@ cfg = config.apps.wofi; in { config = mkIf cfg.enable { - default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'"; + default.appLauncher = lib.mkOverride 800 "wofi --show drun --prompt 'Seach Programs' --allow-images --no-actions --normal-window"; programs.wofi = { enable = true; diff --git a/home/apps/wofi/style.nix b/home/apps/wofi/style.nix index 75a0a21..8d1fb75 100644 --- a/home/apps/wofi/style.nix +++ b/home/apps/wofi/style.nix @@ -18,7 +18,7 @@ in '' /* Window */ window { margin: 0px; - border: ${borderWidth} solid ${primary}; + border: none; border-radius: ${outerRadius}; background-color: ${base}; } |