diff --git a/configuration.nix b/configuration.nix index 27d3e8e..8215d10 100644 --- a/configuration.nix +++ b/configuration.nix @@ -51,7 +51,7 @@ }; enable = true; layout = "us"; - xkbVariant = "altgr-intl"; + xkbVariant = "alt-intl"; windowManager.i3 = { package = pkgs.i3-gaps; enable = true; diff --git a/i3/config.nix b/i3/config.nix index 16504d8..792c11f 100644 --- a/i3/config.nix +++ b/i3/config.nix @@ -55,7 +55,7 @@ in ## calculator "${mod}+c" = "exec rofi -show calc"; ## emoji - "${mod}+period" = "exec rofimoji"; + "${mod}+period" = "exec rofimoji --action copy --prompt 🏳️‍⚧️"; # windows ## switch to resize mode @@ -74,10 +74,22 @@ in ## split "${mod}+e" = "split toggle"; - # control values + # extra keys + ## audio + "XF86AudioMute" = "amixer set Master toggle"; + "XF86AudioUnmute" = "amixer set Master toggle"; + "XF86AudioMicMute" = "amixer set Capture toggle"; + "XF86AudioMicUnmute" = "amixer set Capture toggle"; + ## brightness "XF86MonBrightnessUp" = "exec /etc/nixos/i3/brightness.py 100+"; "XF86MonBrightnessDown" = "exec /etc/nixos/i3/brightness.py 100-"; + + ## display + "XF86Display" = "exec arandr"; + + ## wifi + "XF86WLAN" = "exec rfkill toggle wifi"; }; modes = { @@ -92,8 +104,12 @@ in media = { Return = "mode default"; Escape = "mode default"; - j = "exec --no-startup-id python3 /etc/nixos/i3/audio.py 5%-"; - k = "exec --no-startup-id python3 /etc/nixos/i3/audio.py 5%+"; + j = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 5%-"; + k = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 5%+"; + m = "exec --no-startup-id amixer set Master toggle"; + c = "exec --no-startup-id kitty cmus"; + v = "exec --no-startup-id mpv"; + Space = "exec playerctl play-pause"; }; }; @@ -137,7 +153,6 @@ in border = color_bg; text = color_fg; }; - }; } ]; diff --git a/i3/audio.py b/i3/volume.py similarity index 99% rename from i3/audio.py rename to i3/volume.py index fe93494..d958d82 100644 --- a/i3/audio.py +++ b/i3/volume.py @@ -2,6 +2,7 @@ import subprocess import argparse + def get_amixer_volume() -> int: s: str = str(subprocess.check_output(["amixer", "get", "Master"])) try: @@ -25,6 +26,7 @@ def display_volume(volume: int): ["dunstify", "volume 蓼", "-h", "int:value:" + str(volume), "-r", "39489384"] ) + parser = argparse.ArgumentParser() parser.add_argument("volchange") args = parser.parse_args() diff --git a/user.nix b/user.nix index f93cb0e..75ccead 100644 --- a/user.nix +++ b/user.nix @@ -25,6 +25,7 @@ # music / sound cmus pavucontrol + playerctl # video mpv @@ -32,6 +33,7 @@ # images feh + viewnior # games steam @@ -60,6 +62,10 @@ ## python python311 black + # dotlang + graphviz + # 3d + blender # help tldr