Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
number5 committed Sep 10, 2024
1 parent 256d42c commit cd966e9
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 15 deletions.
72 changes: 71 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
nixd.url = "github:nix-community/nixd";
nuenv.url = "github:DeterminateSystems/nuenv";

# Fast nix search client
nix-search = {
url = "github:diamondburned/nix-search";
inputs.nixpkgs.follows = "nixpkgs";
};
# Neovim
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
neovim-nightly-overlay.inputs.nixpkgs.follows = "nixpkgs";
Expand Down
22 changes: 11 additions & 11 deletions home/modules/wayland/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ let
xwaylandvideobridge # screensharing bridge
] ++ fontPkgs ++ audioPkgs;

gblast = lib.exe pkgs.grimblast;
gblast = lib.getExe pkgs.grimblast;
wpctl = "${pkgs.wireplumber}/bin/wpctl";

scripts = pkgs.callPackage ./scripts.nix { };

workspaceConf = { monitor }: ''
workspace=1,persistent:true,monitor:${monitor}
workspace=2,persistent:true,on-created-empty:${lib.exe scripts.wsNix},monitor:${monitor}
workspace=2,persistent:true,on-created-empty:${lib.getExe scripts.wsNix},monitor:${monitor}
workspace=3,persistent:true,monitor:${monitor}
workspace=4,persistent:true,monitor:${monitor}
workspace=5,persistent:true,on-created-empty:firefox-beta -p 'sxm',monitor:${monitor}
Expand All @@ -59,7 +59,7 @@ in
{
imports = [
# ../../shared
../../foot
# ../../foot
../../hyprlock
../../hyprpaper
# ../../programs/pyprland
Expand All @@ -69,11 +69,11 @@ in

home = {
inherit packages;
stateVersion = "23.11";
stateVersion = "24.11";

sessionVariables = {
NIXOS_OZONE_WL = 1;
SHELL = "${lib.exe pkgs.zsh}";
SHELL = "${lib.getExe pkgs.zsh}";
MOZ_ENABLE_WAYLAND = 1;
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
Expand Down Expand Up @@ -111,24 +111,24 @@ in
wayland.windowManager.hyprland = {
enable = true;
extraConfig = (builtins.readFile ./hyprland.conf) + ''
bind=SUPER,P,exec,${lib.exe pkgs.wofi} --show run --style=${./wofi.css} --term=footclient --prompt=Run
bind=SUPER,P,exec,${lib.getExe pkgs.wofi} --show run --style=${./wofi.css} --term=footclient --prompt=Run
bind=SUPER,A,exec,${gblast} save area
bind=SUPER,S,exec,${gblast} save screen
bind=SUPERCTRL,L,exec,${lib.exe pkgs.hyprlock}
bind=SUPERCTRL,L,exec,${lib.getExe pkgs.hyprlock}
# audio volume bindings
bindel=,XF86AudioRaiseVolume,exec,${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel=,XF86AudioLowerVolume,exec,${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl=,XF86AudioMute,exec,${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle
${workspaceConf { monitor = "${scripts.extMonitor}"; }}
exec-once=${lib.exe scripts.monitorInit}
exec-once=${lib.exe pkgs.hyprland-monitor-attached} ${lib.exe scripts.monitorAdded} ${lib.exe scripts.monitorRemoved}
exec-once=${lib.exe pkgs.hyprpaper}
exec-once=${lib.getExe scripts.monitorInit}
exec-once=${lib.getExe pkgs.hyprland-monitor-attached} ${lib.getExe scripts.monitorAdded} ${lib.getExe scripts.monitorRemoved}
exec-once=${lib.getExe pkgs.hyprpaper}
exec-once=${pkgs.pyprland}/bin/pypr
exec-once=${pkgs.blueman}/bin/blueman-applet
exec-once=${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable --indicator
exec-once=${lib.exe pkgs.pasystray}
exec-once=${lib.getExe pkgs.pasystray}
'';
plugins = [ ];
systemd = {
Expand Down
6 changes: 3 additions & 3 deletions home/modules/wayland/hyprland/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let
dispatch moveworkspacetomonitor 4 ${extMonitor};\
dispatch moveworkspacetomonitor 5 ${extMonitor};\
dispatch moveworkspacetomonitor 6 ${extMonitor}"
${lib.exe monitorConnected}
${lib.getExe monitorConnected}
'';

monitorConnected = writeShellScriptBin "monitor-connected" ''
Expand All @@ -39,9 +39,9 @@ in
monitorInit = writeShellScriptBin "monitor-init" ''
monitors=$(hyprctl monitors)
if [[ $monitors == *"${extMonitor}"* ]]; then
${lib.exe monitorConnected}
${lib.getExe monitorConnected}
else
${lib.exe monitorRemoved}
${lib.getExe monitorRemoved}
fi
'';
}

0 comments on commit cd966e9

Please sign in to comment.