Mic mute og key

This commit is contained in:
Daniel Flanagan 2024-03-27 10:38:30 -05:00
parent 14949fb6d6
commit afb5e5aa93
10 changed files with 148 additions and 102 deletions

View file

@ -224,9 +224,7 @@
"hyprcursor": "hyprcursor", "hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang_2", "hyprlang": "hyprlang_2",
"nixpkgs": [ "nixpkgs": "nixpkgs_2",
"nixpkgs"
],
"systems": "systems_3", "systems": "systems_3",
"wlroots": "wlroots", "wlroots": "wlroots",
"xdph": "xdph" "xdph": "xdph"
@ -383,6 +381,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1711333969,
"narHash": "sha256-5PiWGn10DQjMZee5NXzeA6ccsv60iLu+Xtw+mfvkUAs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "57e6b3a9e4ebec5aa121188301f04a6b8c354c9b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1711163522, "lastModified": 1711163522,
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
@ -430,7 +444,7 @@
"helix": "helix", "helix": "helix",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixpkgsForIosevka": "nixpkgsForIosevka", "nixpkgsForIosevka": "nixpkgsForIosevka",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",

View file

@ -30,7 +30,7 @@
# hardware.inputs.nixpkgs.follows = "nixpkgs"; # hardware.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs"; # hyprland.inputs.nixpkgs.follows = "nixpkgs";
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"; api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
api-lyte-dev.inputs.nixpkgs.follows = "nixpkgs"; api-lyte-dev.inputs.nixpkgs.follows = "nixpkgs";
@ -202,6 +202,7 @@
"https://ssbm-nix.cachix.org" "https://ssbm-nix.cachix.org"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://nix.h.lyte.dev" "https://nix.h.lyte.dev"
"https://hyprland.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
@ -210,6 +211,7 @@
"ssbm-nix.cachix.org-1:YN104LKAWaKQIecOphkftXgXlYZVK/IRHM1UD7WAIew=" "ssbm-nix.cachix.org-1:YN104LKAWaKQIecOphkftXgXlYZVK/IRHM1UD7WAIew="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0=" "h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
}; };
} }

View file

@ -26,6 +26,10 @@ in {
''; '';
}; };
# NOTE: Currently, helix crashes when editing markdown in certain scenarios,
# presumably due to an old markdown treesitter grammar
# https://github.com/helix-editor/helix/issues/9011
programs.helix = { programs.helix = {
enable = true; enable = true;
package = inputs.helix.packages.${system}.helix; package = inputs.helix.packages.${system}.helix;

View file

@ -1,21 +1,23 @@
{ {
pkgs, pkgs,
outputs,
colors, colors,
config, config,
lib, lib,
# font, # font,
... ...
}: { }: {
imports = with outputs.homeManagerModules; [ imports = [
ewwbar ./ewwbar.nix
mako ./mako.nix
swaylock ./swaylock.nix
# TODO: figure out how to import this for this module _and_ for the sway module? # TODO: figure out how to import this for this module _and_ for the sway module?
# linux-desktop ./linux-desktop.nix
]; ];
# TODO: Hyprland on Dragon currently cannot screenshare
home.packages = with pkgs; [ home.packages = with pkgs; [
# TODO: integrate osd
swayosd swayosd
]; ];
@ -43,10 +45,13 @@
exec-once = [ exec-once = [
"hyprpaper" "hyprpaper"
"mako" "mako"
"swayosd" "swayosd-server"
"eww daemon && eww open bar$EWW_BAR_MON" "eww daemon && eww open bar$EWW_BAR_MON"
"firefox" "firefox"
"wezterm" "wezterm"
"xwaylandvideobridge"
"dbus-update-activation-environment --systemd --all"
"systemctl --user import-environment QT_QPA_PLATFORMTHEME"
# "wezterm" # "wezterm"
(lib.concatStringsSep " " [ (lib.concatStringsSep " " [
"swayidle -w" "swayidle -w"
@ -138,94 +143,90 @@
dim_inactive = false; dim_inactive = false;
}; };
"$mainMod" = "SUPER"; "$mod" = "SUPER";
bind = [ bind = [
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# "$mainMod, return, exec, wezterm" # "$mod, return, exec, wezterm"
# "$mainMod SHIFT, return, exec, wezterm" # "$mod SHIFT, return, exec, wezterm"
"$mainMod, return, exec, wezterm" "$mod, return, exec, wezterm"
"$mainMod SHIFT, return, exec, kitty" "$mod SHIFT, return, exec, kitty"
"$mainMod, U, exec, firefox" "$mod, U, exec, firefox"
"$mainMod, space, exec, tofi-run | xargs swaymsg exec --" "$mod, space, exec, tofi-run | xargs hyprctl dispatch exec --"
"$mainMod, C, killactive," "$mod, C, killactive,"
"$mainMod, M, exit," "$mod SHIFT, E, exit,"
"$mainMod, E, exec, dolphin" "$mod, E, exec, dolphin"
"$mainMod, F, togglefloating," "$mod, F, togglefloating,"
"$mainMod SHIFT, F, fullscreen," "$mod SHIFT, F, fullscreen,"
"$mainMod, R, exec, anyrun" "$mod, R, exec, anyrun"
"$mainMod, S, pseudo, # dwindle" "$mod, S, pseudo, # dwindle"
"$mainMod, P, togglesplit, # dwindle" "$mod, P, togglesplit, # dwindle"
# Move focus with mod + arrow keys
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod SHIFT, H, swapwindow, l"
"$mod SHIFT, L, swapwindow, r"
"$mod SHIFT, K, swapwindow, u"
"$mod SHIFT, J, swapwindow, d"
"$mod SHIFT, V, exec, swayosd-client --input-volume mute-toggle"
", XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise"
", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower"
", XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
", XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod, h, movefocus, l"
"$mainMod, l, movefocus, r"
"$mainMod, k, movefocus, u"
"$mainMod, j, movefocus, d"
"$mainMod SHIFT, H, swapwindow, l"
"$mainMod SHIFT, L, swapwindow, r"
"$mainMod SHIFT, K, swapwindow, u"
"$mainMod SHIFT, J, swapwindow, d"
"$mainMod SHIFT, V, exec, pamixer --default-source --toggle-mute"
"$mainMod, F1, exec, pamixer --default-source --toggle-mute"
", XF86AudioMicMute, exec, pamixer --default-source --toggle-mute"
", XF86AudioMute, exec, pamixer --toggle-mute"
", XF86AudioRaiseVolume, exec, pamixer --increase 5"
", XF86AudioLowerVolume, exec, pamixer --decrease 5"
"CTRL, XF86AudioRaiseVolume, exec, pamixer --increase 1"
"CTRL, XF86AudioLowerVolume, exec, pamixer --decrease 1"
", XF86AudioPlay, exec, playerctl play-pause" ", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioNext, exec, playerctl next" ", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous" ", XF86AudioPrev, exec, playerctl previous"
"$mainMod, tab, workspace, previous" "$mod, tab, workspace, previous"
"ALT, tab, workspace, previous" "ALT, tab, workspace, previous"
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mod + [0-9]
"$mainMod, 1, workspace, 1" "$mod, 1, workspace, 1"
"$mainMod, 2, workspace, 2" "$mod, 2, workspace, 2"
"$mainMod, 3, workspace, 3" "$mod, 3, workspace, 3"
"$mainMod, 4, workspace, 4" "$mod, 4, workspace, 4"
"$mainMod, 5, workspace, 5" "$mod, 5, workspace, 5"
"$mainMod, 6, workspace, 6" "$mod, 6, workspace, 6"
"$mainMod, 7, workspace, 7" "$mod, 7, workspace, 7"
"$mainMod, 8, workspace, 8" "$mod, 8, workspace, 8"
"$mainMod, 9, workspace, 9" "$mod, 9, workspace, 9"
"$mainMod, 0, workspace, 10" "$mod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9] # Move active window to a workspace with mod + SHIFT + [0-9]
"$mainMod SHIFT, 1, movetoworkspace, 1" "$mod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2" "$mod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3" "$mod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4" "$mod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5" "$mod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6" "$mod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7" "$mod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8" "$mod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9" "$mod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10" "$mod SHIFT, 0, movetoworkspace, 10"
", XF86MonBrightnessDown, exec, brightnessctl set 10%-" "$mod SHIFT, S, exec, clipshot"
", XF86MonBrightnessUp, exec, brightnessctl set +10%"
"SHIFT, XF86MonBrightnessDown, exec, brightnessctl set 1%"
"SHIFT, XF86MonBrightnessUp, exec, brightnessctl set 100%"
"CTRL, XF86MonBrightnessDown, exec, brightnessctl set 1%-"
"CTRL, XF86MonBrightnessUp, exec, brightnessctl set +1%"
"$mainMod SHIFT, S, exec, clipshot"
# Scroll through existing workspaces with mainMod + scroll # Scroll through existing workspaces with mod + scroll
"$mainMod, mouse_down, workspace, e+1" "$mod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1" "$mod, mouse_up, workspace, e-1"
"CTRL SHIFT $mainMod, L, exec, swaylock" "CTRL SHIFT $mod, L, exec, swaylock"
"$mainMod CTRL, space, exec, makoctl dismiss" "$mod CTRL, space, exec, makoctl dismiss"
"$mainMod SHIFT CTRL, space, exec, makoctl restore" "$mod SHIFT CTRL, space, exec, makoctl restore"
"$mainMod SHIFT, space, exec, makoctl invoke" "$mod SHIFT, space, exec, makoctl invoke"
"$mainMod, E, exec, thunar" "$mod, E, exec, thunar"
]; ];
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mod + LMB/RMB and dragging
bindm = ["$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow"]; bindm = ["$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow"];
}; };
extraConfig = '' extraConfig = ''
@ -245,7 +246,7 @@
dwindle { dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
# master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below # master switch for pseudotiling. Enabling is bound to mod + P in the keybinds section below
pseudotile = yes pseudotile = yes
preserve_split = 1 preserve_split = 1
no_gaps_when_only = true no_gaps_when_only = true
@ -269,6 +270,11 @@
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# windowrulev2 = float,class:^.*(kitty|firefox|org.wezfurlong.wezterm).*$ # windowrulev2 = float,class:^.*(kitty|firefox|org.wezfurlong.wezterm).*$
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
windowrulev2 = noblur,class:^(xwaylandvideobridge)$
''; '';
}; };
} }

View file

@ -4,7 +4,7 @@
... ...
}: { }: {
services.mako = with colors.withHashPrefix; { services.mako = with colors.withHashPrefix; {
enable = true; # TODO: launch mako alongside the wm/de instead so that I can use the plasma notification daemon if I choose to use plasma enable = true;
borderSize = 1; borderSize = 1;
maxVisible = 5; maxVisible = 5;

View file

@ -1,17 +1,16 @@
{ {
colors, colors,
outputs,
lib, lib,
config, config,
pkgs, pkgs,
# font, # font,
... ...
}: { }: {
imports = with outputs.homeManagerModules; [ imports = [
waybar ./waybar.nix
mako ./mako.nix
swaylock ./swaylock.nix
linux-desktop ./linux-desktop.nix
]; ];
programs.foot = { programs.foot = {

View file

@ -1,7 +1,7 @@
{ {
imports = [ imports = [
./sway.nix ./sway.nix
./hyprland.nix # ./hyprland.nix
./fonts.nix ./fonts.nix
./user-installed-applications.nix ./user-installed-applications.nix
./kde-connect.nix ./kde-connect.nix

View file

@ -1,8 +1,17 @@
{pkgs, ...}: { {
inputs,
pkgs,
...
}: {
imports = [ imports = [
./ewwbar.nix ./ewwbar.nix
./pipewire.nix ./pipewire.nix
]; {
programs.hyprland.enable = true; programs.hyprland = {
environment.systemPackages = with pkgs; [hyprpaper]; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
environment.systemPackages = with pkgs; [hyprpaper xwaylandvideobridge];
}
];
} }

View file

@ -5,6 +5,18 @@
}: { }: {
imports = [./pipewire.nix]; imports = [./pipewire.nix];
# NOTE: Plasma and Kitty seem to have some weird interactions where
# occasionally, kitty's window will try to move or resize and crash the
# compositor. Plasma recovers, but the Kitty window is quite dead and gone.
# This has lost me a few minutes' work when I have not saved a file while
# typing and I go to resize kitty and crash loses my work.
# It is entirely possible that this is due to my configuration, though, and
# not the fault of the applications themselves!
# TODO: I'm switching to wezterm. Will this solve my issue?
# TODO: find an issue to link to?
# https://www.reddit.com/r/kde/comments/ohiwqf/kitty_crashes_plasma_wayland_session/
# https://gitlab.archlinux.org/archlinux/packaging/packages/kitty/-/issues/3
# qt.platformTheme = "gnome"; # qt.platformTheme = "gnome";
services.xserver.displayManager.defaultSession = "plasma"; services.xserver.displayManager.defaultSession = "plasma";

View file

@ -75,10 +75,10 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
monitor = [ monitor = [
# "DP-2,3840x2160@60,-2160x0,1,transform,3" # "DP-2,3840x2160@60,-2160x0,1,transform,3"
"DP-3,3840x2160@120,0x0,1,bitdepth,10" "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
# "desc:LG Display 0x0521,3840x2160@120,0x0,1" # "desc:LG Display 0x0521,3840x2160@120,0x0,1"
# "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1" # "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
"DP-2,3840x2160@60,-${toString (builtins.ceil (2160 / 1.5))}x0,1.5,transform,1" "DP-2,3840x2160@60,0x0,1.5,transform,1"
]; ];
input = { input = {
force_no_accel = true; force_no_accel = true;