pinwheel: Use hyprland enable option

This commit is contained in:
Alexander Heldt
2023-10-16 23:24:07 +02:00
parent a5ec186a59
commit 6af142e20b
8 changed files with 38 additions and 17 deletions

View File

@@ -1,9 +1,12 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
hyprlandEnabled = config.mod.hyprland.enable;
in
{
home-manager.users.alex = {
home.packages = [ pkgs.bemenu ];
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
"$mod, SPACE, exec, ${pkgs.bemenu}/bin/bemenu-run --fn 'DejaVuSansM Nerd Font Mono 14'"

View File

@@ -1,4 +1,7 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
hyprlandEnabled = config.mod.hyprland.enable;
in
{
home-manager.users.alex = {
programs.foot = {
@@ -12,7 +15,7 @@
};
};
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
"$mod, RETURN, exec, ${pkgs.foot}/bin/foot"

View File

@@ -1,10 +1,13 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
hyprlandEnabled = config.mod.hyprland.enable;
in
{
users.users.alex.extraGroups = [ "video" ];
programs.light.enable = true;
home-manager.users.alex = {
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
", XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -A 5"

View File

@@ -1,5 +1,7 @@
{ inputs, pkgs, system, ...}:
{ inputs, pkgs, lib, system, config, ...}:
let
hyprlandEnabled = config.mod.hyprland.enable;
grimblast = inputs.hyprland-contrib.packages.${system}.grimblast;
area = "${pkgs.libnotify}/bin/notify-send 'ps: selected area' && ${grimblast}/bin/grimblast copy area";
screen = "${pkgs.libnotify}/bin/notify-send 'ps: selected screen' &&${grimblast}/bin/grimblast copy output";
@@ -8,7 +10,7 @@ in
home-manager.users.alex = {
home.packages = [ grimblast ];
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
"$mod, Print, exec, ${area}"

View File

@@ -1,5 +1,7 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
hyprlandEnabled = config.mod.hyprland.enable;
toggle-output-mute = pkgs.writeShellScript "foo" ''
${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
MUTED=$(${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep MUTED | wc -l)
@@ -30,7 +32,7 @@ in
};
home-manager.users.alex = {
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
", XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+"

View File

@@ -1,4 +1,7 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
hyprlandEnabled = config.mod.hyprland.enable;
in
{
home-manager.users.alex = {
home.packages = with pkgs; [
@@ -6,7 +9,7 @@
playerctl
];
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
"$mod ALT, LEFT, exec, ${pkgs.playerctl}/bin/playerctl -p spotify previous"

View File

@@ -1,4 +1,7 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
hyprlandEnabled = config.mod.hyprland.enable;
in
{
home-manager.users.alex = {
programs.swaylock = {
@@ -11,7 +14,7 @@
};
};
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
"$mod SHIFT, x, exec, ${pkgs.swaylock}/bin/swaylock -f && systemctl suspend"

View File

@@ -1,5 +1,7 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
hyprlandEnabled = config.mod.hyprland.enable;
spotify-status = pkgs.writeShellScript "spotify-status" ''
STATUS=$(${pkgs.playerctl}/bin/playerctl -p spotify status 2>&1)
@@ -108,7 +110,7 @@ in
fixed-center = false;
output = [ "eDP-1" ];
modules-left = [ "hyprland/workspaces" ];
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
modules-right = [
"custom/work-vpn-status"
"custom/spotify"
@@ -195,7 +197,7 @@ in
fixed-center = false;
output = [ "HDMI-A-1" ];
modules-left = [ "hyprland/workspaces" ];
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
modules-right = [
"custom/work-vpn-status"
"clock"