xmonad: use volnoti and eliminate dzvol
This commit is contained in:
parent
da1c13b8d9
commit
9983d0d2df
@ -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" ];
|
||||
}
|
@ -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 { };
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ in {
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.driSupport = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
environment = {
|
||||
etc = {
|
||||
|
@ -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]+(?=%)")
|
@ -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;
|
||||
};
|
||||
|
@ -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 )
|
||||
|
@ -3,7 +3,6 @@
|
||||
farbfeld
|
||||
xss-lock
|
||||
imgurbash2
|
||||
dzvol
|
||||
maim
|
||||
xclip
|
||||
xorg.xdpyinfo
|
||||
|
@ -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;
|
||||
}}
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user