diff --git a/flake.nix b/flake.nix index 50cb53d..c492a1b 100755 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + hyprpicker = { + url = "github:hyprwm/hyprpicker"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + waybar = { url = "github:alexays/waybar"; flake = false; @@ -93,6 +98,7 @@ self.overlays.default inputs.hyprland-contrib.overlays.default inputs.hyprpaper.overlays.default + inputs.hyprpicker.overlays.default inputs.webcord.overlays.default ]; }; @@ -127,18 +133,12 @@ steam = prev.steam.override { extraPkgs = pkgs: [ - pkgs.gamescope pkgs.gnome.zenity - pkgs.keyutils - pkgs.libkrb5 - pkgs.mangohud - pkgs.mpg123 ]; + }; - extraLibraries = pkgs: [ - pkgs.mpg123 - pkgs.zlib-ng - ]; + ncmpcpp = prev.ncmpcpp.override { + visualizerSupport = true; }; mesa-git = @@ -154,36 +154,18 @@ "-Dandroid-libbacktrace=disabled" "-Dlmsensors=disabled" "-Dlibunwind=disabled" + "-Dgallium-xa=disabled" ]; })).override { - galliumDrivers = [ "radeonsi" "swrast" "svga" ]; + galliumDrivers = [ "radeonsi" "swrast" ]; vulkanDrivers = [ "amd" ]; enableGalliumNine = false; # Replaced by DXVK }; - mygui = prev.mygui.overrideAttrs - (old: { - version = "3.4.1"; - src = prev.fetchFromGitHub { - owner = "MyGUI"; - repo = "mygui"; - rev = "MyGUI3.4.1"; - sha256 = "sha256-5u9whibYKPj8tCuhdLOhL4nDisbFAB0NxxdjU/8izb8="; - }; - }); - - customedid = pkgs.callPackage - ./pkgs/custom-edid - { }; - wxedid = pkgs.callPackage - ./pkgs/wxedid - { }; - - fastfetch = pkgs.callPackage - ./pkgs/fastfetch - { }; - + customedid = pkgs.callPackage ./pkgs/custom-edid { }; + wxedid = pkgs.callPackage ./pkgs/wxedid { }; + fastfetch = pkgs.callPackage ./pkgs/fastfetch { }; }; nixosConfigurations.terra = nixpkgs.lib.nixosSystem diff --git a/pkgs/mesa-git/default.nix b/pkgs/mesa-git/default.nix deleted file mode 100644 index c58a0e5..0000000 --- a/pkgs/mesa-git/default.nix +++ /dev/null @@ -1,331 +0,0 @@ -{ stdenv -, lib -, fetchurl -, meson -, pkg-config -, ninja -, intltool -, bison -, flex -, file -, python3Packages -, wayland-scanner -, expat -, libdrm -, xorg -, wayland -, wayland-protocols -, openssl -, llvmPackages -, libffi -, libomxil-bellagio -, libva-minimal -, libelf -, libvdpau -, libglvnd -, libunwind -, vulkan-loader -, glslang -, galliumDrivers ? [ "auto" ] - # upstream Mesa defaults to only enabling swrast (aka lavapipe) on aarch64 for some reason, so force building the others -, vulkanDrivers ? if (stdenv.isLinux && stdenv.isAarch64) then [ "swrast" "broadcom" "freedreno" "panfrost" ] else [ "auto" ] -, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ] -, vulkanLayers ? lib.optionals (!stdenv.isDarwin) [ "device-select" "overlay" ] # No Vulkan support on Darwin -, OpenGL -, Xplugin -, withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind-light && !valgrind-light.meta.broken -, valgrind-light -, enableGalliumNine ? stdenv.isLinux -, enableOSMesa ? stdenv.isLinux -, enableOpenCL ? stdenv.isLinux && stdenv.isx86_64 -, enablePatentEncumberedCodecs ? true -, libclc -, jdupes -, cmake -, rustc -, rust-bindgen -, spirv-llvm-translator_14 -, inputs -}: - -/** Packaging design: - - The basic mesa ($out) contains headers and libraries (GLU is in libGLU now). - This or the mesa attribute (which also contains GLU) are small (~ 2 MB, mostly headers) - and are designed to be the buildInput of other packages. - - DRI drivers are compiled into $drivers output, which is much bigger and - depends on LLVM. These should be searched at runtime in - "/run/opengl-driver{,-32}/lib/*" and so are kind-of impure (given by NixOS). - (I suppose on non-NixOS one would create the appropriate symlinks from there.) - - libOSMesa is in $osmesa (~4 MB) -*/ - -let - # Release calendar: https://www.mesa3d.org/release-calendar.html - # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "git"; - branch = lib.versions.major version; - - withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm; - - rust-bindgen' = rust-bindgen.override { - rust-bindgen-unwrapped = rust-bindgen.unwrapped.override { - clang = llvmPackages.clang; - }; - }; - - self = stdenv.mkDerivation { - pname = "mesa-git"; - inherit version; - - src = inputs.mesa-git; - - # TODO: - # revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved - # ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog - patches = [ - # fixes pkgsMusl.mesa build - ./musl.patch - - ./opencl.patch - ./disk_cache-include-dri-driver-path-in-cache-key.patch - ]; - - postPatch = '' - patchShebangs . - - # The drirc.d directory cannot be installed to $drivers as that would cause a cyclic dependency: - substituteInPlace src/util/xmlconfig.c --replace \ - 'DATADIR "/drirc.d"' '"${placeholder "out"}/share/drirc.d"' - substituteInPlace src/util/meson.build --replace \ - "get_option('datadir')" "'${placeholder "out"}/share'" - substituteInPlace src/amd/vulkan/meson.build --replace \ - "get_option('datadir')" "'${placeholder "out"}/share'" - ''; - - outputs = [ "out" "dev" "drivers" ] - ++ lib.optional enableOSMesa "osmesa" - ++ lib.optional stdenv.isLinux "driversdev" - ++ lib.optional enableOpenCL "opencl"; - - # FIXME: this fixes rusticl/iris segfaulting on startup, _somehow_. - # Needs more investigating. - separateDebugInfo = true; - - preConfigure = '' - PATH=${llvmPackages.libllvm.dev}/bin:$PATH - ''; - - # TODO: Figure out how to enable opencl without having a runtime dependency on clang - mesonFlags = [ - "--sysconfdir=/etc" - "--datadir=${placeholder "drivers"}/share" # Vendor files - - # Don't build in debug mode - # https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L327 - "-Db_ndebug=true" - - "-Ddisk-cache-key=${placeholder "drivers"}" - "-Ddri-search-path=${libglvnd.driverLink}/lib/dri" - - "-Dplatforms=${lib.concatStringsSep "," eglPlatforms}" - "-Dgallium-drivers=${lib.concatStringsSep "," galliumDrivers}" - "-Dvulkan-drivers=${lib.concatStringsSep "," vulkanDrivers}" - - "-Ddri-drivers-path=${placeholder "drivers"}/lib/dri" - "-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau" - "-Domx-libs-path=${placeholder "drivers"}/lib/bellagio" - "-Dva-libs-path=${placeholder "drivers"}/lib/dri" - "-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d" - "-Dgallium-nine=${lib.boolToString enableGalliumNine}" # Direct3D in Wine - "-Dosmesa=${lib.boolToString enableOSMesa}" # used by wine - "-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) - - # To enable non-mesa gbm backends to be found (e.g. Nvidia) - "-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm" - ] ++ lib.optionals stdenv.isLinux [ - "-Dglvnd=true" - ] ++ lib.optionals enableOpenCL [ - "-Dgallium-opencl=icd" # Enable the gallium OpenCL frontend - "-Dgallium-rusticl=true" - "-Drust_std=2021" - "-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib" - ] ++ lib.optional enablePatentEncumberedCodecs - "-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec" - ++ lib.optional (vulkanLayers != [ ]) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}"; - - buildInputs = with xorg; [ - expat - llvmPackages.libllvm - libglvnd - xorgproto - libX11 - libXext - libxcb - libXt - libXfixes - libxshmfence - libXrandr - libffi - libvdpau - libelf - libXvMC - libpthreadstubs - openssl /*or another sha1 provider*/ - ] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [ wayland wayland-protocols ] - ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ] - ++ lib.optionals stdenv.isDarwin [ libunwind ] - ++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator_14 ] - ++ lib.optional withValgrind valgrind-light - # Mesa will not build zink when gallium-drivers=auto - ++ lib.optional (lib.elem "zink" galliumDrivers) vulkan-loader; - - depsBuildBuild = [ pkg-config ]; - - nativeBuildInputs = [ - meson - pkg-config - ninja - intltool - bison - flex - file - python3Packages.python - python3Packages.Mako - jdupes - glslang - ] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [ - wayland-scanner - ]; - - propagatedBuildInputs = with xorg; [ - libXdamage - libXxf86vm - ] ++ lib.optional withLibdrm libdrm - ++ lib.optionals stdenv.isDarwin [ OpenGL Xplugin ]; - - doCheck = false; - - postInstall = '' - # Some installs don't have any drivers so this directory is never created. - mkdir -p $drivers $osmesa - '' + lib.optionalString stdenv.isLinux '' - mkdir -p $drivers/lib - - if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then - # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM - mv -t $drivers/lib \ - $out/lib/libxatracker* \ - $out/lib/libvulkan_* - fi - - if [ -n "$(shopt -s nullglob; echo "$out"/lib/lib*_mesa*)" ]; then - # Move other drivers to a separate output - mv -t $drivers/lib $out/lib/lib*_mesa* - fi - - # Update search path used by glvnd - for js in $drivers/share/glvnd/egl_vendor.d/*.json; do - substituteInPlace "$js" --replace '"libEGL_' '"'"$drivers/lib/libEGL_" - done - - # Update search path used by Vulkan (it's pointing to $out but - # drivers are in $drivers) - for js in $drivers/share/vulkan/icd.d/*.json; do - substituteInPlace "$js" --replace "$out" "$drivers" - done - '' + lib.optionalString enableOpenCL '' - # Move OpenCL stuff - mkdir -p $opencl/lib - mv -t "$opencl/lib/" \ - $out/lib/gallium-pipe \ - $out/lib/lib*OpenCL* - - # We construct our own .icd files that contain absolute paths. - mkdir -p $opencl/etc/OpenCL/vendors/ - echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd - echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd - '' + lib.optionalString enableOSMesa '' - # move libOSMesa to $osmesa, as it's relatively big - mkdir -p $osmesa/lib - mv -t $osmesa/lib/ $out/lib/libOSMesa* - '' + lib.optionalString (vulkanLayers != [ ]) '' - mv -t $drivers/lib $out/lib/libVkLayer* - for js in $drivers/share/vulkan/{im,ex}plicit_layer.d/*.json; do - substituteInPlace "$js" --replace '"libVkLayer_' '"'"$drivers/lib/libVkLayer_" - done - ''; - - postFixup = lib.optionalString stdenv.isLinux '' - # set the default search path for DRI drivers; used e.g. by X server - substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}" - [ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}" - - # remove pkgconfig files for GL/EGL; they are provided by libGL. - rm -f $dev/lib/pkgconfig/{gl,egl}.pc - - # Move development files for libraries in $drivers to $driversdev - mkdir -p $driversdev/include - mv $dev/include/xa_* $dev/include/d3d* -t $driversdev/include || true - mkdir -p $driversdev/lib/pkgconfig - for pc in lib/pkgconfig/{xatracker,d3d}.pc; do - if [ -f "$dev/$pc" ]; then - substituteInPlace "$dev/$pc" --replace $out $drivers - mv $dev/$pc $driversdev/$pc - fi - done - - # NAR doesn't support hard links, so convert them to symlinks to save space. - jdupes --hard-links --link-soft --recurse "$drivers" - - # add RPATH so the drivers can find the moved libgallium and libdricore9 - # moved here to avoid problems with stripping patchelfed files - for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do - if [[ ! -L "$lib" ]]; then - patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" - fi - done - ''; - - NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [ - "-UPIPE_SEARCH_DIR" - "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\"" - ]; - - passthru = { - inherit (libglvnd) driverLink; - inherit llvmPackages; - - libdrm = if withLibdrm then libdrm else null; - - tests = lib.optionalAttrs stdenv.isLinux { - devDoesNotDependOnLLVM = stdenv.mkDerivation { - name = "mesa-dev-does-not-depend-on-llvm"; - buildCommand = '' - echo ${self.dev} >>$out - ''; - disallowedRequisites = [ llvmPackages.llvm self.drivers ]; - }; - }; - }; - - meta = with lib; { - description = "An open source 3D graphics library"; - longDescription = '' - The Mesa project began as an open-source implementation of the OpenGL - specification - a system for rendering interactive 3D graphics. Over the - years the project has grown to implement more graphics APIs, including - OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC, and - Vulkan. A variety of device drivers allows the Mesa libraries to be used - in many different environments ranging from software emulation to - complete hardware acceleration for modern GPUs. - ''; - homepage = "https://www.mesa3d.org/"; - changelog = "https://www.mesa3d.org/relnotes/${version}.html"; - license = licenses.mit; # X11 variant, in most files - platforms = platforms.mesaPlatforms; - maintainers = with maintainers; [ primeos vcunat ]; # Help is welcome :) - }; - }; -in -self - diff --git a/pkgs/mesa-git/stubs.nix b/pkgs/mesa-git/stubs.nix deleted file mode 100644 index 753ad1b..0000000 --- a/pkgs/mesa-git/stubs.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ stdenv -, libglvnd, mesa -, OpenGL }: - -stdenv.mkDerivation { - inherit (libglvnd) version; - pname = "libGL"; - outputs = [ "out" "dev" ]; - - # On macOS, libglvnd is not supported, so we just use what mesa - # build. We need to also include OpenGL.framework, and some - # extra tricks to go along with. We add mesa’s libGLX to support - # the X extensions to OpenGL. - buildCommand = if stdenv.hostPlatform.isDarwin then '' - mkdir -p $out/nix-support $dev - echo ${OpenGL} >> $out/nix-support/propagated-build-inputs - ln -s ${mesa.out}/lib $out/lib - - mkdir -p $dev/lib/pkgconfig $dev/nix-support - echo "$out" > $dev/nix-support/propagated-build-inputs - ln -s ${mesa.dev}/include $dev/include - - cat <$dev/lib/pkgconfig/gl.pc - Name: gl - Description: gl library - Version: ${mesa.version} - Libs: -L${mesa.out}/lib -lGL - Cflags: -I${mesa.dev}/include - EOF - - cat <$dev/lib/pkgconfig/glesv1_cm.pc - Name: glesv1_cm - Description: glesv1_cm library - Version: ${mesa.version} - Libs: -L${mesa.out}/lib -lGLESv1_CM - Cflags: -I${mesa.dev}/include - EOF - - cat <$dev/lib/pkgconfig/glesv2.pc - Name: glesv2 - Description: glesv2 library - Version: ${mesa.version} - Libs: -L${mesa.out}/lib -lGLESv2 - Cflags: -I${mesa.dev}/include - EOF - '' - - # Otherwise, setup gl stubs to use libglvnd. - else '' - mkdir -p $out/nix-support - ln -s ${libglvnd.out}/lib $out/lib - - mkdir -p $dev/{,lib/pkgconfig,nix-support} - echo "$out ${libglvnd} ${libglvnd.dev}" > $dev/nix-support/propagated-build-inputs - ln -s ${libglvnd.dev}/include $dev/include - - genPkgConfig() { - local name="$1" - local lib="$2" - - cat <$dev/lib/pkgconfig/$name.pc - Name: $name - Description: $lib library - Version: ${libglvnd.version} - Libs: -L${libglvnd.out}/lib -l$lib - Cflags: -I${libglvnd.dev}/include - EOF - } - - genPkgConfig gl GL - genPkgConfig egl EGL - genPkgConfig glesv1_cm GLESv1_CM - genPkgConfig glesv2 GLESv2 - ''; -} diff --git a/system/configuration.nix b/system/configuration.nix index 6a02583..6fc55ea 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -20,13 +20,6 @@ "drm.edid_firmware=DP-1:edid/edid-EX2780Q.bin" ]; - extraModprobeConfig = '' - options iwlwifi power_save=0 - options iwlwifi swcrypto=0 - options iwlwifi uapsd_disable=1 - options iwlmvm power_scheme=1 - ''; - loader = { efi = { canTouchEfiVariables = true; @@ -56,10 +49,11 @@ networking = { hostName = "terra"; # Define your hostname. + enableIPv6 = false; + networkmanager = { enable = true; wifi = { - scanRandMacAddress = false; powersave = false; }; }; diff --git a/user/configs/cava/cava.nix b/user/configs/cava/cava.nix new file mode 100644 index 0000000..a341ef3 --- /dev/null +++ b/user/configs/cava/cava.nix @@ -0,0 +1,11 @@ +{ pkgs, config, lib, ... }: +{ + home.packages = [ pkgs.cava ]; + + xdg.configFile."cava/config".text = lib.generators.toINI { } { + general = { + bar_width = "2"; + }; + }; +} + diff --git a/user/configs/fish/fish.nix b/user/configs/fish/fish.nix index 80572a4..2fc17e2 100755 --- a/user/configs/fish/fish.nix +++ b/user/configs/fish/fish.nix @@ -69,7 +69,6 @@ }; shellAliases = { nf = "${pkgs.pfetch}/bin/pfetch"; - r = "${pkgs.nnn}/bin/nnn"; }; }; } diff --git a/user/configs/kakoune/kakoune.nix b/user/configs/kakoune/kakoune.nix index 645520f..7d27282 100755 --- a/user/configs/kakoune/kakoune.nix +++ b/user/configs/kakoune/kakoune.nix @@ -18,7 +18,7 @@ in kak-lsp kakboard kakoune-extra-filetypes - #powerline-kak + powerline-kak smarttab sort-selections ]; @@ -53,7 +53,7 @@ in ui = { assistant = "none"; - setTitle = true; + setTitle = false; }; }; extraConfig = '' @@ -69,10 +69,10 @@ in set-face global StatusLine rgb:ebdbb2,default set-face global BufferPadding rgb:504945,default - # require-module powerline - # powerline-start - # powerline-theme gruvbox - # powerline-separator global half-step + require-module powerline + powerline-start + powerline-theme gruvbox + #powerline-separator global half-step ''; }; diff --git a/user/configs/mpd/mpd.nix b/user/configs/mpd/mpd.nix index 8a2c291..9b2c954 100755 --- a/user/configs/mpd/mpd.nix +++ b/user/configs/mpd/mpd.nix @@ -50,7 +50,6 @@ programs.ncmpcpp = { enable = true; - package = pkgs.ncmpcpp.override { visualizerSupport = true; }; settings = { visualizer_data_source = "/tmp/mpd.fifo"; visualizer_output_name = "my_fifo"; diff --git a/user/configs/nnn/nnn.nix b/user/configs/nnn/nnn.nix deleted file mode 100755 index 188ce4f..0000000 --- a/user/configs/nnn/nnn.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, pkgs, ... }: { - programs.nnn = { - enable = true; - package = pkgs.nnn.override { - withNerdIcons = true; - }; - }; -} diff --git a/user/configs/wayland/hyprland.nix b/user/configs/wayland/hyprland.nix index f0128a2..3e07556 100644 --- a/user/configs/wayland/hyprland.nix +++ b/user/configs/wayland/hyprland.nix @@ -78,7 +78,7 @@ in } general { - gaps_in = 10 + gaps_in = 16 border_size = 4 col.active_border = rgba(${colors.base0F}FF) @@ -97,6 +97,8 @@ in misc { vfr = true vrr = 2 + enable_swallow = true + swallow_regex = ^(foot)$ } decoration { @@ -113,12 +115,14 @@ in col.shadow = rgba(${colors.base00}99) } + blurls = waybar + blurls = notifications animations { enabled = yes - animation = windows, 1, 5, default - animation = windowsOut, 1, 5, default + animation = windowsIn, 1, 8, default, slide + animation = windowsOut, 1, 8, default, slide animation = border, 1, 8, default animation = fade, 1, 5, default animation = workspaces, 1, 4, default diff --git a/user/configs/wayland/mako.nix b/user/configs/wayland/mako.nix index b92f93f..c5b9e1a 100755 --- a/user/configs/wayland/mako.nix +++ b/user/configs/wayland/mako.nix @@ -3,7 +3,7 @@ let colors = config.colorScheme.colors; in { - programs.mako = { + services.mako = { enable = true; anchor = "top-right"; defaultTimeout = 5000; @@ -11,7 +11,7 @@ in width = 320; height = 130; - backgroundColor = "#${colors.base00}"; + backgroundColor = "#${colors.base00}B3"; borderColor = "#${colors.base01}"; borderRadius = 10; borderSize = 2; diff --git a/user/configs/wayland/waybar.nix b/user/configs/wayland/waybar.nix index ba307c7..c53c0a4 100755 --- a/user/configs/wayland/waybar.nix +++ b/user/configs/wayland/waybar.nix @@ -1,7 +1,14 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, nix-colors, ... }: let + wobsock = "/tmp/wob-vol.fifo"; colors = config.colorScheme.colors; + backgroundColorRGB = nix-colors.lib-core.conversions.hexToRGBString "," colors.base00; + backgroundAlpha = "0.7"; + + font = "JetBrainsMono Nerd Font"; + fontSize = "9pt"; + ds-battery = pkgs.writeShellScriptBin "ds-battery.sh" '' ds_capacity_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/capacity" ds_status_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/status" @@ -33,7 +40,7 @@ in modules-center = [ "wlr/workspaces" "custom/blank" ]; modules-right = [ "custom/ds-battery" - "pulseaudio" + "wireplumber" "mpd" "tray" "custom/blank" @@ -54,21 +61,11 @@ in format = "{icon}"; format-icons = { - #active = ""; - #default = ""; active = ""; default = ""; }; }; - "custom/workspaceborderleft" = { - format = " "; - }; - - "custom/workspaceborderright" = { - format = " "; - }; - "hyprland/window" = { separate-outputs = true; }; @@ -77,17 +74,20 @@ in format = "{:%a %d. %B %H:%M}"; }; - "pulseaudio" = { + "wireplumber" = { scroll-step = 5; format = "{icon} {volume}%"; format-icons = [ "" "" "墳" "" ]; ignored-sinks = [ "Easy Effects Sink" ]; + on-scroll-up = "${pkgs.pamixer}/bin/pamixer -i 10 --get-volume > ${wobsock}"; + on-scroll-down = "${pkgs.pamixer}/bin/pamixer -d 10 --get-volume > ${wobsock}"; }; "tray" = { icon-size = 16; spacing = 10; }; + "mpd" = { format = "{stateIcon} {artist} - {title} {elapsedTime:%M:%S}/{totalTime:%M:%S}"; @@ -96,6 +96,7 @@ in playing = ""; paused = ""; }; + on-click = "${pkgs.foot}/bin/foot -e ${pkgs.ncmpcpp}/bin/ncmpcpp"; }; "custom/ds-battery" = { @@ -103,23 +104,20 @@ in exec = "${ds-battery}/bin/ds-battery.sh"; escape = "true"; }; + "custom/blank" = { format = " "; }; + }]; + style = '' @define-color foreground #${colors.base06}; - @define-color background #${colors.base00}; + @define-color background rgba(${backgroundColorRGB},${backgroundAlpha}); @define-color box-bg #${colors.base01}; @define-color workspace-bg #${colors.base00}; - label:disabled, - button:disabled { - color: inherit; - background-image: none; - } - * { - font-family: JetBrainsMono Nerd Font; - font-size: 9pt; + font-family: ${font}; + font-size: ${fontSize}; } window#waybar { @@ -127,15 +125,31 @@ in color: @foreground; } - #pulseaudio, #mpd, #custom-waybar-mpris, #custom-ds-battery, #window, #keyboard-state, #tray, #clock { + #wireplumber, + #mpd, + #custom-waybar-mpris, + #custom-ds-battery, + #window, + #keyboard-state, + #tray, + #clock { background: @box-bg; - padding: 0 10px 0 10px; - margin: 5px 10px 5px 0; + padding: 0px 10px 0px 10px; + margin: 5px 10px 5px 0px; border-radius: 10px; } + #wireplumber { + margin: 5px 4px 5px 0px; + border-radius: 10px 0px 0px 10px; + } + + #mpd { + border-radius: 0px 10px 10px 0px; + } + #tray, #clock { - margin: 5px 0 5px 0; + margin: 5px 0px 5px 0px; } window#waybar.empty #window { @@ -143,19 +157,19 @@ in } #workspaces { - margin: 5px 0 5px 0; + margin: 5px 0px 5px 0px; padding-left: 10px; } #workspaces button { color: @foreground; background: @box-bg; - padding: 0 5px; + padding: 0px 5px; } #workspaces button:last-child { background: @box-bg; - border-radius: 0px 10px 10px 0; + border-radius: 0px 10px 10px 0px; } #workspaces button:first-child { @@ -177,7 +191,6 @@ in #workspaces button.unfocused { color: @foreground; background: @box-bg; - /* background: @box-bg; */ } ''; }; diff --git a/user/configs/wayland/wob.nix b/user/configs/wayland/wob.nix index e2d1da5..035903d 100755 --- a/user/configs/wayland/wob.nix +++ b/user/configs/wayland/wob.nix @@ -1,14 +1,17 @@ { config, pkgs, lib, ... }: +let + colors = config.colorScheme.colors; +in { xdg.configFile."wob/wob.ini".text = lib.generators.toINIWithGlobalSection { } { globalSection = { height = "40"; border_size = "2"; - border_color = "D65D0EFF"; + border_color = "${colors.base0F}FF"; - background_color = "282828FF"; - bar_color = "D65D0EFF"; + background_color = "${colors.base00}FF"; + bar_color = "${colors.base0F}FF"; }; sections = { }; diff --git a/user/home.nix b/user/home.nix index d6d27b1..291fc6c 100755 --- a/user/home.nix +++ b/user/home.nix @@ -3,6 +3,7 @@ imports = [ nix-colors.homeManagerModule ./configs/beets/beets.nix + ./configs/cava/cava.nix ./configs/kakoune/kakoune.nix ./configs/wayland/hyprland.nix #./configs/wayland/sway.nix @@ -10,7 +11,6 @@ ./configs/mpd/mpd.nix ./configs/mpv/mpv.nix ./configs/firefox/firefox.nix - ./configs/nnn/nnn.nix ./configs/dircolors.nix ./configs/xdg-mime.nix ]; @@ -31,6 +31,7 @@ gnome.simple-scan gnome.gvfs hyprpaper + hyprpicker lutris mesa-demos mesa-demos @@ -38,7 +39,6 @@ noto-fonts-cjk-sans noto-fonts-cjk-serif obs-studio - pass pavucontrol protontricks sc-im @@ -142,6 +142,8 @@ programs.aria2.enable = true; + programs.password-store.enable = true; + xdg.userDirs = { enable = true; createDirectories = true;