From 425670c80844e6aca54dc08fcf3c0160fd98fa00 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Fri, 18 Aug 2023 00:09:30 +0200 Subject: [PATCH] swayidle is working --- home-manager-modules/hyprland/default.nix | 43 +++++++++++------------ home-manager-modules/waybar/default.nix | 2 +- machines/x2100/home-julien.nix | 21 ++++++++++- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/home-manager-modules/hyprland/default.nix b/home-manager-modules/hyprland/default.nix index 74f5bda..684afe3 100644 --- a/home-manager-modules/hyprland/default.nix +++ b/home-manager-modules/hyprland/default.nix @@ -21,12 +21,6 @@ with lib; xdg.configFile."hypr/hyprland.conf".text = '' exec-once = waybar & hyprpaper exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY - exec swayidle -w \ - timeout 300 'swaylock -f -c 000000' \ - timeout 600 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock -f -c 000000' - exec-once = nm-applet --indicator # Monitors monitor = eDP-1, preferred, auto, auto @@ -40,8 +34,8 @@ with lib; # General general { - gaps_in = 4 - gaps_out = 8 + gaps_in = 3 + gaps_out = 5 border_size = 2 col.active_border = rgb(11111b) col.inactive_border = rgb(11111b) @@ -57,18 +51,13 @@ with lib; # Decorations decoration { - rounding = 5 - active_opacity = 0.9 - blur_new_optimizations = on - blur_size = 8 - blur_passes = 10 - blur = false - - } - - animations { - enabled = true + rounding = 4 } + + animations { + enabled = false + } + # Gestures gestures { @@ -79,13 +68,13 @@ with lib; # Variables $term = ${terminal} - $browser = firefox + $browser = chromium $editor = nvim $files = nemo $launcher = ${menu} # Apps - bind = SUPER, RETURN, exec, alacritty + bind = SUPER, RETURN, exec, kitty bind = SUPER SHIFT, E, exec, $editor bind = SUPER SHIFT, F, exec, $files bind = SUPER SHIFT, B, exec, $browser @@ -163,9 +152,19 @@ with lib; wallpaper = ,${../../machines/macintosh/wallpaper.jpg} ''; + services.swayidle = { + enable = true; + systemdTarget = "hyprland-session.target"; + events = [ + { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; } + ]; + }; - home.packages = with pkgs; [ qt6.qtwayland libsForQt5.qt5.qtwayland hyprpaper swaylock swayidle ]; + + + + home.packages = with pkgs; [ qt6.qtwayland libsForQt5.qt5.qtwayland hyprpaper swaylock ]; }; } diff --git a/home-manager-modules/waybar/default.nix b/home-manager-modules/waybar/default.nix index 14ed362..41d15cc 100644 --- a/home-manager-modules/waybar/default.nix +++ b/home-manager-modules/waybar/default.nix @@ -50,7 +50,7 @@ with lib; tooltip-format-enumerate-connected = "{device_alias} {device_address}"; }; "network" = { - interface = "wlp1s0f0"; + interface = "wlp3s0"; format = "{ifname}"; format-wifi = "{essid}"; format-ethernet = "{ipaddr}/{cidr} "; diff --git a/machines/x2100/home-julien.nix b/machines/x2100/home-julien.nix index 1db5b04..51b3315 100644 --- a/machines/x2100/home-julien.nix +++ b/machines/x2100/home-julien.nix @@ -12,6 +12,7 @@ luj.programs.hyprland.enable = true; luj.programs.waybar.enable = true; luj.programs.kitty.enable = true; + luj.emails.enable = true; programs.rofi = { enable = true; @@ -43,7 +44,6 @@ jq lazygit fira-code - unstable.firefox feh meld vlc @@ -66,6 +66,7 @@ step-cli coq cvc5 + signal-desktop coqPackages.coqide (why3.withProvers [ @@ -85,6 +86,24 @@ enable = true; }; + programs.chromium = { + enable = true; + commandLineArgs = [ + "--ozone-platform-hint=wayland" + "--load-media-router-component-extension=1" + ]; + extensions = [ + { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin + { id = "ldlghkoiihaelfnggonhjnfiabmaficg"; } # Alt+Q switcher + { id = "enjjhajnmggdgofagbokhmifgnaophmh"; } # Resolution Zoom for HiDPI + { id = "fihnjjcciajhdojfnbdddfaoknhalnja"; } # I don't care about cookies + { id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero Connector + { id = "hlepfoohegkhhmjieoechaddaejaokhf"; } # Refined GitHub + { id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden + { id = "dcpihecpambacapedldabdbpakmachpb"; updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/src/updates/updates.xml"; } + ]; + }; + };