diff --git a/i3/audio.py b/i3/audio.py new file mode 100644 index 0000000..fe93494 --- /dev/null +++ b/i3/audio.py @@ -0,0 +1,33 @@ +# script that changes the volume and then shows a notfication with it using dunst +import subprocess +import argparse + +def get_amixer_volume() -> int: + s: str = str(subprocess.check_output(["amixer", "get", "Master"])) + try: + # turns the front left argument into an int + return int( + # the thing we're looking for is in the fifth line + s.split(r"\n")[5] + .strip() + # and is the 4th word + .split(" ")[4] + .replace("[", "") + .replace("]", "") + .replace("%", "") + ) + except: + return -1 + + +def display_volume(volume: int): + subprocess.call( + ["dunstify", "volume 蓼", "-h", "int:value:" + str(volume), "-r", "39489384"] + ) + +parser = argparse.ArgumentParser() +parser.add_argument("volchange") +args = parser.parse_args() + +subprocess.check_output(["amixer", "set", "Master", args.volchange]) +display_volume(get_amixer_volume()) diff --git a/nvim/settings.nix b/nvim/settings.nix index 4a0c5a2..71c7170 100644 --- a/nvim/settings.nix +++ b/nvim/settings.nix @@ -14,12 +14,21 @@ pkgs: ''; plugins = with pkgs.vimPlugins; [ - # coc + # autocompletion coc-nvim + + # rust coc-rust-analyzer - coc-lua + + # python + coc-pyright + + # nix vim-nix + # lua + coc-lua + # make brackets nicer nvim-autopairs diff --git a/user.nix b/user.nix index a186e33..67fc85c 100644 --- a/user.nix +++ b/user.nix @@ -25,14 +25,6 @@ # music / sound cmus pavucontrol - ## production - ### daw - lmms - ### plugin - surge-XT - zynaddsubfx - fluidsynth - carla # video mpv @@ -64,10 +56,6 @@ ## python python311 black - ## haskell - stylish-haskell - haskell-language-server - ghc # help tldr