diff --git a/pkgs/applications/misc/dzvol.nix b/pkgs/applications/misc/dzvol.nix deleted file mode 100644 index 2532c0d0..00000000 --- a/pkgs/applications/misc/dzvol.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, pkgconfig, alsaLib, x11, fetchFromGitHub }: -stdenv.mkDerivation { - name = "dzvol"; - src = fetchFromGitHub { - owner = "allevaton"; - repo = "dzvol"; - rev = "ca7099520525df2d54ad24f6def22819d5f36b3b"; - sha256 = "1xx7xai6hzrm3gs026z41pl877y849vpfi71syj6cj3ir9h16lpz"; - }; - - installPhase = '' - mkdir -p $out/bin - cp dzvol $out/bin - ''; - - buildInputs = [ pkgconfig alsaLib x11 ]; - hardeningDisable = [ "format" ]; -} diff --git a/pkgs/default.nix b/pkgs/default.nix index 759901c0..d4fe75e7 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,6 +4,5 @@ final: prev: { dejavu_nerdfont = prev.callPackage ./data/fonts/dejavu-nerdfont { }; purs = prev.callPackage ./shells/zsh/purs { }; pure = prev.callPackage ./shells/zsh/pure { }; - dzvol = prev.callPackage ./applications/misc/dzvol.nix { }; wii-u-gc-adapter = prev.callPackage ./misc/drivers/wii-u-gc-adapter { }; } diff --git a/profiles/graphical/default.nix b/profiles/graphical/default.nix index ed98d1b7..88ed4804 100644 --- a/profiles/graphical/default.nix +++ b/profiles/graphical/default.nix @@ -5,7 +5,7 @@ in { hardware.opengl.enable = true; hardware.opengl.driSupport = true; - hardware.pulseaudio.enable = true; + hardware.pulseaudio.enable = false; environment = { etc = { diff --git a/profiles/graphical/sway/volnoti.nix b/profiles/graphical/misc/volnoti.nix similarity index 92% rename from profiles/graphical/sway/volnoti.nix rename to profiles/graphical/misc/volnoti.nix index c8a545b1..e07fed45 100644 --- a/profiles/graphical/sway/volnoti.nix +++ b/profiles/graphical/misc/volnoti.nix @@ -1,6 +1,6 @@ { pkgs, ... }: let inherit (pkgs) alsaUtils bash gnugrep volnoti; -in '' +in pkgs.writeScript "volnoti.sh" '' #!${bash}/bin/bash declare -i current=$(${alsaUtils}/bin/amixer get Master | ${gnugrep}/bin/grep -m1 -Po "[0-9]+(?=%)") diff --git a/profiles/graphical/sway/default.nix b/profiles/graphical/sway/default.nix index ea31c5d0..e1826ca1 100644 --- a/profiles/graphical/sway/default.nix +++ b/profiles/graphical/sway/default.nix @@ -36,17 +36,16 @@ in { }; environment.etc = { - "sway/config".text = let - volnoti = - pkgs.writeScript "volnoti.sh" (import ./volnoti.nix { inherit pkgs; }); - in '' - set $volume ${volnoti} + "sway/config".text = + let volnoti = import ../misc/volnoti.nix { inherit pkgs; }; + in '' + set $volume ${volnoti} - # set background - output * bg ${pkgs.adapta-backgrounds}/share/backgrounds/adapta/tri-fadeno.jpg fill + # set background + output * bg ${pkgs.adapta-backgrounds}/share/backgrounds/adapta/tri-fadeno.jpg fill - ${readFile ./config} - ''; + ${readFile ./config} + ''; "xdg/waybar".source = ./waybar; }; diff --git a/profiles/graphical/xmonad/_xmonad.nix b/profiles/graphical/xmonad/_xmonad.nix index 20ee86ca..34c5d60f 100644 --- a/profiles/graphical/xmonad/_xmonad.nix +++ b/profiles/graphical/xmonad/_xmonad.nix @@ -1,4 +1,4 @@ -{ autostart, screenshots, touchtoggle, dzvol, pkgs, stoggle }: '' +{ autostart, screenshots, touchtoggle, pkgs, stoggle, volnoti }: '' -- Function for fullscreen toggle fullToggle :: X () fullToggle = do @@ -6,10 +6,6 @@ sendMessage $ Toggle NBFULL sendMessage $ SetStruts [] [minBound .. maxBound] - -- function to call dzen2 and show volume in the middle of the screen - dzcall :: String - dzcall = "${dzvol}/bin/dzvol -fn 'monospace'" - myAutostart :: X () myAutostart = do spawn "${autostart}" @@ -45,15 +41,15 @@ ) -- lower volume , ( ( 0 , xF86XK_AudioLowerVolume ) - , spawn dzcall + , spawn "${volnoti}" ) -- raise volume , ( ( 0 , xF86XK_AudioRaiseVolume ) - , spawn dzcall + , spawn "${volnoti}" ) -- mute volume , ( ( 0 , xF86XK_AudioMute ) - , spawn dzcall + , spawn "${volnoti}" ) -- start qutebrowser , ( ( myModKey , xK_b ) diff --git a/profiles/graphical/xmonad/default.nix b/profiles/graphical/xmonad/default.nix index 49501440..83acb8cd 100644 --- a/profiles/graphical/xmonad/default.nix +++ b/profiles/graphical/xmonad/default.nix @@ -3,7 +3,6 @@ farbfeld xss-lock imgurbash2 - dzvol maim xclip xorg.xdpyinfo diff --git a/profiles/graphical/xmonad/xmonad.hs.nix b/profiles/graphical/xmonad/xmonad.hs.nix index 93ece501..15831292 100644 --- a/profiles/graphical/xmonad/xmonad.hs.nix +++ b/profiles/graphical/xmonad/xmonad.hs.nix @@ -1,7 +1,7 @@ { pkgs, ... }: let inherit (builtins) readFile; - inherit (pkgs) writeScript dzvol; + inherit (pkgs) writeScript; screenshots = "Pictures/shots"; @@ -11,9 +11,11 @@ let touchtoggle = writeScript "xmonad-touchtoggle" (readFile ./scripts/touchtoggle); + + volnoti = import ../misc/volnoti.nix { inherit pkgs; }; in '' ${readFile ./_xmonad.hs} ${import ./_xmonad.nix { - inherit screenshots touchtoggle autostart dzvol stoggle pkgs; + inherit screenshots touchtoggle autostart stoggle pkgs volnoti; }} ''