From 94f30bfd4817c3f039c3e22d6d2562d8b8ba7316 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 26 Nov 2023 13:43:37 +0100 Subject: [PATCH] test hyprland --- flake.nix | 4 +- laptop/.config/hypr/hyprland.conf | 1 + laptop/hyperland.nix | 69 ++++++++++++++++++++++++++++++- 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 1ffe171..62f9949 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,7 @@ nixpkgs-unstable, agenix, home-manager, - nixinate + nixinate, }@inputs: let system = "x86_64-linux"; @@ -90,7 +90,7 @@ specialArgs = { ## Custom variables (e.g. ip, interface, etc) vars = (import ./systems/laptop/userdata.nix); - inherit inputs ; + inherit inputs; }; modules = [ ./users/kopatz.nix diff --git a/laptop/.config/hypr/hyprland.conf b/laptop/.config/hypr/hyprland.conf index 036f9cd..1d23fe6 100644 --- a/laptop/.config/hypr/hyprland.conf +++ b/laptop/.config/hypr/hyprland.conf @@ -125,6 +125,7 @@ bind = $mainMod, E, exec, dolphin bind = $mainMod, V, togglefloating, bind = $mainMod, R, exec, wofi --show drun bind = $mainMod, S, exec, rofi -show drun -show-icons +bind = ALT, SPACE, exec, rofi -show combi bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle diff --git a/laptop/hyperland.nix b/laptop/hyperland.nix index 4e4d03c..65d3221 100644 --- a/laptop/hyperland.nix +++ b/laptop/hyperland.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let patchedWaybar = pkgs.waybar.overrideAttrs (oldAttrs: { @@ -41,6 +41,73 @@ in nvidia.modesetting.enable = true; }; + home-manager.users.kopatz = { + #systemd.user.services.waybar.Service.ExecStart = lib.mkForce "${pkgs.waybar}/bin/waybar -b 0"; + programs.waybar = { + enable = true; + #systemd.enable = true; + #systemd.target = "sway-session.target"; + settings.main = { + layer = "bottom"; + position = "bottom"; + #output = lib.mapAttrsToList (n: v: v.monitor) outputs; + height = 25; + spacing = 4; + modules-left = [ + "hyprland/workspaces" + ]; + modules-center = []; + modules-right = [ + "network" + "cpu" + "memory" + "temperature" + "backlight" + "pulseaudio" + "battery" + "clock" + "tray" + ]; + "network".format-wifi = "{essid} ({signalStrength}%) "; + "network".format-ethernet = "{ifname}: {ipaddr}/{cidr} "; + "network".format-disconnected = "Disconnected ⚠"; + "network".interval = 7; + "cpu".format = "CPU: {usage}% "; + "memory".format = "MEM: {}% "; + "temperature".critical-threshold = 80; + "temperature".format = "{temperatureC}°C "; + "backlight".format = "{percent}% {icon}"; + "backlight".states = [0 50]; + "backlight".format-icons = ["" ""]; + "pulseaudio".format = "{volume}% {icon}"; + "pulseaudio".format-bluetooth = ": {volume}% {icon}"; + "pulseaudio".format-muted = ""; + "pulseaudio".format-icons.headphones = ""; + "pulseaudio".format-icons.handsfree = ""; + "pulseaudio".format-icons.headset = ""; + "pulseaudio".format-icons.phone = ""; + "pulseaudio".format-icons.portable = ""; + "pulseaudio".format-icons.car = ""; + "pulseaudio".format-icons.default = ["" ""]; + "pulseaudio".on-click = "pavucontrol"; + "battery".states.good = 95; + "battery".states.warning = 30; + "battery".states.critical = 15; + "battery".format = "{capacity}% {icon}"; + "battery".format-icons = ["" "" "" "" ""]; + "clock".format = "{:%F %H:%M}"; + "tray".icon-size = 21; + "tray".spacing = 10; + "hyprland/workspaces" = { + "disable-scroll" = true; + "all-outputs" = true; + "active-only" = false; + "on-click" = "activate"; + }; + }; + }; + }; + # XDG portal xdg.portal.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];