diff --git a/hosts/python/apps.nix b/hosts/python/apps.nix index 45e3926..2165c69 100644 --- a/hosts/python/apps.nix +++ b/hosts/python/apps.nix @@ -24,6 +24,10 @@ enable = true; wallpaper = inputs.wallpkgs.wallpapers.nord-03.path; }; + waybar = { + enable = true; + package = pkgs.amadaluzian-waybar; + }; libvirt.enable = true; direnv.enable = true; git.enable = true; diff --git a/hosts/python/default.nix b/hosts/python/default.nix index 80f3b93..678cc56 100644 --- a/hosts/python/default.nix +++ b/hosts/python/default.nix @@ -1,10 +1,11 @@ {pkgs, ...}: { imports = [ + ./users + ./wrappers ./hardware.nix ./disks.nix ./theme.nix ./apps.nix - ./users ./fonts.nix ]; diff --git a/hosts/python/fonts.nix b/hosts/python/fonts.nix index 3eebb7f..6d419fd 100644 --- a/hosts/python/fonts.nix +++ b/hosts/python/fonts.nix @@ -1,18 +1,17 @@ {pkgs, ...}: { alqueva.system.fonts = { names = { - sansSerif = ["Fira Sans"]; - monospace = ["Fira Mono"]; - serif = ["ETBembo"]; + sansSerif = ["IBM Plex Sans"]; + monospace = ["IBM Plex Mono"]; + serif = ["IBM Plex Serif"]; emoji = ["Twitter Color Emoji"]; }; packages = { - sansSerif = [pkgs.fira-sans]; - monospace = [pkgs.fira-mono]; - serif = [pkgs.etBook]; + sansSerif = [pkgs.ibm-plex]; + monospace = [pkgs.ibm-plex]; + serif = [pkgs.ibm-plex]; emoji = [pkgs.twemoji-color-font]; extra = [ - pkgs.fira-go pkgs.noto-fonts pkgs.nerd-fonts.symbols-only ]; diff --git a/hosts/python/users/configs/niri/config.kdl b/hosts/python/users/configs/niri/config.kdl index eac0965..9ee7e47 100644 --- a/hosts/python/users/configs/niri/config.kdl +++ b/hosts/python/users/configs/niri/config.kdl @@ -20,7 +20,7 @@ input { // Next sections include libinput settings. // Omitting settings disables them, or leaves them at their default values. - touchpad { + /-touchpad { // off tap // dwt @@ -40,7 +40,7 @@ input { // scroll-method "no-scroll" } - trackpoint { + /-trackpoint { // off // natural-scroll // accel-speed 0.2 @@ -99,7 +99,7 @@ output "HDMI-A-1" { // https://github.com/YaLTeR/niri/wiki/Configuration:-Layout layout { // Set gaps around windows in logical pixels. - gaps 8 + gaps 10 // When to center a column when changing focus, options are: // - "never", default behavior, focusing an off-screen column will keep at the left @@ -155,10 +155,10 @@ layout { // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others. // Color of the ring on the active monitor. - active-color "#7fc8ff" + active-color "#88C0D0" // Color of the ring on inactive monitors. - inactive-color "#505050" + inactive-color "#5E81AC" // You can also use gradients. They take precedence over solid colors. // Gradients are rendered the same as CSS linear-gradient(angle, from, to). @@ -272,8 +272,8 @@ window-rule { // Example: enable rounded corners for all windows. // (This example rule is commented out with a "/-" in front.) -/-window-rule { - geometry-corner-radius 12 +window-rule { + geometry-corner-radius 6 clip-to-geometry true } @@ -293,7 +293,7 @@ binds { Mod+Shift+Slash { show-hotkey-overlay; } // Suggested binds for running programs: terminal, app launcher, screen locker. - Mod+T { spawn "kitty"; } + Mod+T { spawn "foot"; } Mod+D { spawn "rofi" "-show" "drun"; } // Super+Alt+L { spawn "swaylock"; } diff --git a/hosts/python/users/default.nix b/hosts/python/users/default.nix index 13e6808..5f5808b 100644 --- a/hosts/python/users/default.nix +++ b/hosts/python/users/default.nix @@ -35,12 +35,10 @@ qutebrowser dunst gh - kitty rofi-wayland - swaybg + amadaluzian-foot ; inherit (inputs.hetch.packages.${pkgs.system}) hetch; - waybar = pkgs.callPackage ./waybar.nix {}; }; groups = [ "wheel" diff --git a/hosts/python/wrappers/default.nix b/hosts/python/wrappers/default.nix new file mode 100644 index 0000000..1fd3e71 --- /dev/null +++ b/hosts/python/wrappers/default.nix @@ -0,0 +1,10 @@ +{ + nixpkgs.overlays = [ + ( + final: _prev: { + amadaluzian-waybar = final.callPackage ./waybar {}; + amadaluzian-foot = final.callPackage ./foot {}; + } + ) + ]; +} diff --git a/hosts/python/wrappers/foot/default.nix b/hosts/python/wrappers/foot/default.nix new file mode 100644 index 0000000..2da7a25 --- /dev/null +++ b/hosts/python/wrappers/foot/default.nix @@ -0,0 +1,19 @@ +{ + foot, + symlinkJoin, + makeWrapper, +}: +symlinkJoin { + name = "foot"; + paths = [ + foot + ]; + nativeBuildInputs = [ + makeWrapper + ]; + postBuild = '' + wrapProgram $out/bin/foot \ + --add-flags "--config" \ + --add-flags ${./foot.ini} + ''; +} diff --git a/hosts/python/wrappers/foot/foot.ini b/hosts/python/wrappers/foot/foot.ini new file mode 100644 index 0000000..11afcd5 --- /dev/null +++ b/hosts/python/wrappers/foot/foot.ini @@ -0,0 +1,29 @@ +[main] +pad=6x6 +font=monospace:size=15 + +[colors] +foreground=e5e9f0 +background=2e3440 +regular0=3b4252 +regular1=bf616a +regular2=a3be8c +regular3=ebcb8b +regular4=81a1c1 +regular5=b48ead +regular6=88c0d0 +regular7=eceff4 +bright0=434c5e +bright1=bf616a +bright2=a3be8c +bright3=ebcb8b +bright4=81a1c1 +bright5=b48ead +bright6=88c0d0 +bright7=8fbcbb +16=d08770 +17=5e81ac +18=3b4252 +19=434c5e +20=d8dee9 +21=eceff4 diff --git a/hosts/python/users/configs/waybar/config.jsonc b/hosts/python/wrappers/waybar/config.jsonc similarity index 100% rename from hosts/python/users/configs/waybar/config.jsonc rename to hosts/python/wrappers/waybar/config.jsonc diff --git a/hosts/python/users/waybar.nix b/hosts/python/wrappers/waybar/default.nix similarity index 58% rename from hosts/python/users/waybar.nix rename to hosts/python/wrappers/waybar/default.nix index d72e6ff..a1735c2 100644 --- a/hosts/python/users/waybar.nix +++ b/hosts/python/wrappers/waybar/default.nix @@ -9,7 +9,7 @@ runCommand "style.css" { nativeBuildInputs = [sass]; } '' - sass ${./configs/waybar/style.scss} > $out + sass ${./style.scss} > $out ''; in symlinkJoin { @@ -23,13 +23,13 @@ in postBuild = '' wrapProgram $out/bin/waybar \ --add-flags "--config" \ - --add-flags "${./configs/waybar/config.jsonc}" \ + --add-flags "${./config.jsonc}" \ --add-flags "--style" \ --add-flags "${styleCss}" - mv $out/lib/systemd/user/waybar.service $out/lib/systemd/user/.waybar-wrapped.service - substitute $out/lib/systemd/user/.waybar-wrapped.service $out/lib/systemd/user/waybar.service \ - --replace-fail ${waybar}/bin/waybar $out/bin/waybar + rm $out/lib/systemd/user/waybar.service + substitute ${waybar}/lib/systemd/user/waybar.service $out/lib/systemd/user/waybar.service \ + --replace-fail ${waybar}/bin/waybar $out/bin/waybar \ ''; meta = { inherit (waybar.meta) mainProgram; diff --git a/hosts/python/users/configs/waybar/style.scss b/hosts/python/wrappers/waybar/style.scss similarity index 100% rename from hosts/python/users/configs/waybar/style.scss rename to hosts/python/wrappers/waybar/style.scss diff --git a/hosts/shared/waybar.nix b/hosts/shared/waybar.nix new file mode 100644 index 0000000..0a654d8 --- /dev/null +++ b/hosts/shared/waybar.nix @@ -0,0 +1,21 @@ +{ + lib, + pkgs, + config, + ... +}: let + cfg = config.alqueva.programs.waybar; +in { + options.alqueva.programs.waybar = { + enable = lib.mkEnableOption "waybar, a highly customizable Wayland bar for Sway and Wlroots based compositors"; + package = lib.mkPackageOption pkgs "waybar" {}; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = [cfg.package]; + systemd = { + packages = [cfg.package]; + user.services.waybar.wantedBy = ["graphical-session.target"]; + }; + }; +} diff --git a/overlays/derivations/nu/cfg/config.nu b/overlays/derivations/nu/cfg/config.nu index e228049..8aba410 100644 --- a/overlays/derivations/nu/cfg/config.nu +++ b/overlays/derivations/nu/cfg/config.nu @@ -17,8 +17,37 @@ # You can remove these comments if you want or leave # them for future reference. +# alias the built-in ls command to ls-builtin +alias ls-builtin = ls + +# List the filenames, sizes, and modification times of items in a directory. +def ls [ + --all (-a), # Show hidden files + --long (-l), # Get all available columns for each entry (slower; columns are platform-dependent) + --short-names (-s), # Only print the file names, and not the path + --full-paths (-f), # display paths as absolute paths + --du (-d), # Display the apparent directory size ("disk usage") in place of the directory metadata size + --directory (-D), # List the specified directory itself instead of its contents + --mime-type (-m), # Show mime-type in type column instead of 'file' (based on filenames only; files' contents are not examined) + --threads (-t), # Use multiple threads to list contents. Output will be non-deterministic. + ...pattern: glob, # The glob pattern to use. +]: [ nothing -> table ] { + let pattern = if ($pattern | is-empty) { [ '.' ] } else { $pattern } + (ls-builtin + --all=$all + --long=$long + --short-names=$short_names + --full-paths=$full_paths + --du=$du + --directory=$directory + --mime-type=$mime_type + --threads=$threads + ...$pattern + ) | sort-by type name -i +} + +alias nos = nh os + mkdir ($nu.data-dir | path join "vendor/autoload") starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu") zoxide init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zoxide.nu") - -alias nos = nh os