diff options
| author | Devin Finlinson <devin.finlinson@pm.me> | 2024-01-26 17:42:10 +0000 |
|---|---|---|
| committer | Devin Finlinson <devin.finlinson@pm.me> | 2024-01-26 17:42:10 +0000 |
| commit | 053d4ebb58ea9a9d0e3ee98c14f1f5c375f57556 (patch) | |
| tree | e1ee576269532ca638d9d7d90c0b216d63cf9edc /modules/home-manager | |
| parent | e4801c21871f82a8a427b6657d87ecb9a9202c13 (diff) | |
| parent | fb96c957c3b0d1226d965195ab637f1be6250618 (diff) | |
merging zenbook branch to bosco
Diffstat (limited to 'modules/home-manager')
| -rw-r--r-- | modules/home-manager/bat.nix | 4 | ||||
| -rw-r--r-- | modules/home-manager/btop.nix | 4 | ||||
| -rw-r--r-- | modules/home-manager/helix.nix | 10 | ||||
| -rw-r--r-- | modules/home-manager/shell.nix | 7 | ||||
| -rw-r--r-- | modules/home-manager/starship.nix | 6 | ||||
| -rw-r--r-- | modules/home-manager/swayidle.nix | 30 | ||||
| -rw-r--r-- | modules/home-manager/swaylock.nix | 23 | ||||
| -rw-r--r-- | modules/home-manager/waybar.nix | 136 |
8 files changed, 210 insertions, 10 deletions
diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index 5a9802e..3a06076 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -1,4 +1,4 @@ -{ catppuccin-bat, ...}: { +{ inputs, ...}: { # a cat(1) clone with syntax highlighting and Git integration. programs.bat = { enable = true; @@ -7,7 +7,7 @@ theme = "catppuccin-mocha"; }; themes = { - catppuccin-mocha = builtins.readFile "${catppuccin-bat}/Catppuccin-mocha.tmTheme"; + catppuccin-mocha = builtins.readFile "${inputs.catppuccin-bat}/Catppuccin-mocha.tmTheme"; }; }; } diff --git a/modules/home-manager/btop.nix b/modules/home-manager/btop.nix index 7243a6e..894ff2e 100644 --- a/modules/home-manager/btop.nix +++ b/modules/home-manager/btop.nix @@ -1,5 +1,5 @@ -{ catppuccin-btop, ... }: { - home.file.".config/btop/themes".source = "${catppuccin-btop}/themes"; +{ inputs, ... }: { + home.file.".config/btop/themes".source = "${inputs.catppuccin-btop}/themes"; #replace htop/nmon programs.btop = { diff --git a/modules/home-manager/helix.nix b/modules/home-manager/helix.nix index d93a2ea..1eaebfb 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/helix.nix @@ -1,11 +1,17 @@ -{ pkgs, catppuccin-helix, ... }: { +{ pkgs, inputs, ... }: { # https://github.com/catppuccin/helix - xdg.configFile."helix/themes".source = "${catppuccin-helix}/themes/default"; + xdg.configFile."helix/themes".source = "${inputs.catppuccin-helix}/themes/default"; programs.helix = { enable = true; package = pkgs.helix; # defaultEditor = true; + # themes = { + # custom = { + # "inherits" = "catpuccin_mocha"; + # "ui.background" = {}; + # }; + # }; settings = { theme = "catppuccin_mocha"; editor = { diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix index cd35607..685cda1 100644 --- a/modules/home-manager/shell.nix +++ b/modules/home-manager/shell.nix @@ -1,4 +1,6 @@ -{nushell-scripts, ... }: { +{inputs, ... }: let + nushell-scripts = inputs.nushell-scripts; +in { programs.nushell = { enable = true; shellAliases = { @@ -13,6 +15,7 @@ # egpu = "(DRI_PRIME=pci-0000_05_00_0 glxinfo | grep 'OpenGL renderer')"; # checkgpu = "(lspci | grep VGA)"; cat = "bat -f # --paging never"; + search = "nix search nixpkgs#"; }; configFile.source = ../../resources/nushell/config.nu; extraConfig = '' @@ -24,6 +27,8 @@ source ${nushell-scripts}/custom-completions/cargo/cargo-completions.nu source ${nushell-scripts}/custom-completions/make/make-completions.nu source ${nushell-scripts}/custom-completions/git/git-completions.nu + use ${nushell-scripts}/themes/nu-themes/catppuccin-mocha.nu + $env.config = ($env.config | merge {color_config: (catppuccin-mocha)}) ''; }; } diff --git a/modules/home-manager/starship.nix b/modules/home-manager/starship.nix index 12d6f6b..eafc03c 100644 --- a/modules/home-manager/starship.nix +++ b/modules/home-manager/starship.nix @@ -1,4 +1,4 @@ -{ catppuccin-starship, ... }: { +{ inputs, ... }: { programs.starship = { enable = true; @@ -6,6 +6,6 @@ command_timeout = 1000; palette = "catppuccin_mocha"; - } // builtins.fromTOML (builtins.readFile "${catppuccin-starship}/palettes/mocha.toml"); + } // builtins.fromTOML (builtins.readFile "${inputs.catppuccin-starship}/palettes/mocha.toml"); }; -}
\ No newline at end of file +} diff --git a/modules/home-manager/swayidle.nix b/modules/home-manager/swayidle.nix new file mode 100644 index 0000000..19cd171 --- /dev/null +++ b/modules/home-manager/swayidle.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: { + services.swayidle = { + enable = true; + systemdTarget = "hyprland-session.target"; + timeouts = + let + dpmsCommand = "${pkgs.hyprland}/bin/hyprctl dispatch dpms"; + brightnessCommand = "${pkgs.brightnessctl}/bin/brightnessctl -s %% brightnessctl s"; + in + [ + { #timeout 180 + timeout = 3; + command = "${brightnessCommand} 15%"; + resumeCommand = "brightnessctl -r"; + } + { + #timeout 300 + timeout = 5; + command = "${dpmsCommand} off && swaylock"; + resumeCommand = "${dpmsCommand} on"; + } + { #timeout 420 + timeout = 7; + command = "${brightnessCommand} 0%"; + resumeCommand = "brightnessctl -r"; + } + ]; + # events.before-sleep.event = "swaylock"; + }; +} diff --git a/modules/home-manager/swaylock.nix b/modules/home-manager/swaylock.nix new file mode 100644 index 0000000..745d3ef --- /dev/null +++ b/modules/home-manager/swaylock.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: { + programs.swaylock.enable = true; + programs.swaylock.package = pkgs.swaylock-effects; + programs.swaylock.settings = { + ignore-empty-password = true; + clock = true; + screenshots = true; + grace = 10; + indicator-radius = 100; + indicator-thickness = 7; + ring-color = "455a64"; + key-hl-color = "be5046"; + text-color = "ffc107"; + line-color = 00000000; + inside-color = 00000088; + separator-color = 00000000; + fade-in = 4; + effect-blur = "7x3"; + effect-scale = 2; + effect-vignette = "0.5:0.5"; + # effect-compose = [ "0,1.5%;-1x10%;$HOME/.config/sway/lock.svg" "$@" ]; + }; +} diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix new file mode 100644 index 0000000..c35bc75 --- /dev/null +++ b/modules/home-manager/waybar.nix @@ -0,0 +1,136 @@ +{ config, ... }: { + programs.waybar = { + enable = true; + systemd.enable = true; + systemd.target = "hyprland-session.target"; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 40; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "clock" ]; + modules-right = [ "idle_inhibitor" "pulseaudio" "bluetooth" "network" "backlight/slider" "battery" "cpu" "temperature" "memory" "keyboard_state" "tray" ]; + + "tray" = { + icon-size = 21; + spacing = 10; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + "pulseaudio" = { + # // "scroll-step": 1, // %, can be a float + format = "{volume}% {icon} {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = "{volume}% "; + format-source-muted = ""; + "format-icons" = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ "" "" "" ]; + }; + on-click = "pavucontrol"; + }; + "wireplumber" = { + on-click = "helvum"; + max-volume = 150; + scroll-step = 0.2; + + # format-bluetooth = "{volume}% {icon} {format_source}"; + # format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " "; + format = "{volume}% {icon} "; + # format-source-muted = ""; + format-icons = { + # headphone = ""; + # hands-free = ""; + # headset = ""; + # phone = ""; + # portable = ""; + # car = ""; + default = [ "" "" "" ]; + }; + # on-click = "pavucontrol" + }; + "network" = { + format-wifi = "{essid} ({signalStrength}%) "; + format-ethernet = "{ipaddr}/{cidr} "; + tooltip-format = "{ifname} via {gwaddr} "; + format-linked = "{ifname} (No IP) "; + format-disconnected = "Disconnected ⚠"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + }; + "backlight/slider" = { + min = 1; + max = 100; + orientation = "horizontal"; + # device = "intel_backlight"; + }; + "clock" = { + format = "{:%H:%M} "; + format-alt = "{:%A, %B %d, %Y (%R)} "; + # timezone = config.time.timeZone; + timezone = "US/Mountain"; + tooltip-format = "<tt><small>{calendar}</small></tt>"; + "calendar" = { + mode = "year"; + mode-mon-col = 3; + weeks-pos = "right"; + on-scroll = 1; + on-right-click = "mode"; + "format" = { + months = "<span color='#ffead3'><b>{}</b></span>"; + days = "<span color='#ecc6d9'><b>{}</b></span>"; + weeks = "<span color='#99ffdd'><b>W{}</b></span>"; + weekdays = "<span color='#ffcc66'><b>{}</b></span>"; + today = "<span color='#ff6699'><b><u>{}</u></b></span>"; + }; + }; + }; + "battery" = { + interval = 60; + states = { + "warning" = 30; + "critical" = 15; + }; + format = "{capacity}% {icon}"; + format-icons = [ "" "" "" "" "" ]; + max-length = 25; + }; + "cpu" = { + format = "{usage}% "; + tooltip = false; + }; + "memory" = { + format = "{used:0.1f}G/{total:0.1f}G "; + }; + "temperature" = { + format = "{temperatureC}°C "; + }; + "keyboard-state" = { + numlock = true; + capslock = true; + "format" = { + numlock = "N {icon}"; + # capslock = "C {icon}"; + }; + "format-icons" = { + locked = ""; + unlocked = ""; + }; + }; + }; + }; + }; +} |
