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 { };
|
dejavu_nerdfont = prev.callPackage ./data/fonts/dejavu-nerdfont { };
|
||||||
purs = prev.callPackage ./shells/zsh/purs { };
|
purs = prev.callPackage ./shells/zsh/purs { };
|
||||||
pure = prev.callPackage ./shells/zsh/pure { };
|
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 { };
|
wii-u-gc-adapter = prev.callPackage ./misc/drivers/wii-u-gc-adapter { };
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ in {
|
|||||||
|
|
||||||
hardware.opengl.enable = true;
|
hardware.opengl.enable = true;
|
||||||
hardware.opengl.driSupport = true;
|
hardware.opengl.driSupport = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
etc = {
|
etc = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let inherit (pkgs) alsaUtils bash gnugrep volnoti;
|
let inherit (pkgs) alsaUtils bash gnugrep volnoti;
|
||||||
in ''
|
in pkgs.writeScript "volnoti.sh" ''
|
||||||
#!${bash}/bin/bash
|
#!${bash}/bin/bash
|
||||||
|
|
||||||
declare -i current=$(${alsaUtils}/bin/amixer get Master | ${gnugrep}/bin/grep -m1 -Po "[0-9]+(?=%)")
|
declare -i current=$(${alsaUtils}/bin/amixer get Master | ${gnugrep}/bin/grep -m1 -Po "[0-9]+(?=%)")
|
@ -36,9 +36,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"sway/config".text = let
|
"sway/config".text =
|
||||||
volnoti =
|
let volnoti = import ../misc/volnoti.nix { inherit pkgs; };
|
||||||
pkgs.writeScript "volnoti.sh" (import ./volnoti.nix { inherit pkgs; });
|
|
||||||
in ''
|
in ''
|
||||||
set $volume ${volnoti}
|
set $volume ${volnoti}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ autostart, screenshots, touchtoggle, dzvol, pkgs, stoggle }: ''
|
{ autostart, screenshots, touchtoggle, pkgs, stoggle, volnoti }: ''
|
||||||
-- Function for fullscreen toggle
|
-- Function for fullscreen toggle
|
||||||
fullToggle :: X ()
|
fullToggle :: X ()
|
||||||
fullToggle = do
|
fullToggle = do
|
||||||
@ -6,10 +6,6 @@
|
|||||||
sendMessage $ Toggle NBFULL
|
sendMessage $ Toggle NBFULL
|
||||||
sendMessage $ SetStruts [] [minBound .. maxBound]
|
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 :: X ()
|
||||||
myAutostart = do
|
myAutostart = do
|
||||||
spawn "${autostart}"
|
spawn "${autostart}"
|
||||||
@ -45,15 +41,15 @@
|
|||||||
)
|
)
|
||||||
-- lower volume
|
-- lower volume
|
||||||
, ( ( 0 , xF86XK_AudioLowerVolume )
|
, ( ( 0 , xF86XK_AudioLowerVolume )
|
||||||
, spawn dzcall
|
, spawn "${volnoti}"
|
||||||
)
|
)
|
||||||
-- raise volume
|
-- raise volume
|
||||||
, ( ( 0 , xF86XK_AudioRaiseVolume )
|
, ( ( 0 , xF86XK_AudioRaiseVolume )
|
||||||
, spawn dzcall
|
, spawn "${volnoti}"
|
||||||
)
|
)
|
||||||
-- mute volume
|
-- mute volume
|
||||||
, ( ( 0 , xF86XK_AudioMute )
|
, ( ( 0 , xF86XK_AudioMute )
|
||||||
, spawn dzcall
|
, spawn "${volnoti}"
|
||||||
)
|
)
|
||||||
-- start qutebrowser
|
-- start qutebrowser
|
||||||
, ( ( myModKey , xK_b )
|
, ( ( myModKey , xK_b )
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
farbfeld
|
farbfeld
|
||||||
xss-lock
|
xss-lock
|
||||||
imgurbash2
|
imgurbash2
|
||||||
dzvol
|
|
||||||
maim
|
maim
|
||||||
xclip
|
xclip
|
||||||
xorg.xdpyinfo
|
xorg.xdpyinfo
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (builtins) readFile;
|
inherit (builtins) readFile;
|
||||||
inherit (pkgs) writeScript dzvol;
|
inherit (pkgs) writeScript;
|
||||||
|
|
||||||
screenshots = "Pictures/shots";
|
screenshots = "Pictures/shots";
|
||||||
|
|
||||||
@ -11,9 +11,11 @@ let
|
|||||||
|
|
||||||
touchtoggle =
|
touchtoggle =
|
||||||
writeScript "xmonad-touchtoggle" (readFile ./scripts/touchtoggle);
|
writeScript "xmonad-touchtoggle" (readFile ./scripts/touchtoggle);
|
||||||
|
|
||||||
|
volnoti = import ../misc/volnoti.nix { inherit pkgs; };
|
||||||
in ''
|
in ''
|
||||||
${readFile ./_xmonad.hs}
|
${readFile ./_xmonad.hs}
|
||||||
${import ./_xmonad.nix {
|
${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