From 10babe814b9ce2bd5287a016e67b5b2e18cb4ede Mon Sep 17 00:00:00 2001 From: Liam Malone Date: Sun, 17 Mar 2024 18:35:27 +0000 Subject: [PATCH] . --- hosts/default/configuration.nix | 26 +++++++++++++++++++----- modules/old_configs/hypr/hyprland.conf | 28 +++++++++++++------------- modules/old_configs/swaylock/config | 2 +- modules/themes/sddm-theme.nix | 1 - 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 36a4e62..2b354f2 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -59,20 +59,36 @@ layout = "us"; variant = ""; }; - displayManager = { - sddm.enable = true; - sddm.theme = "${import ../../modules/themes/sddm-theme.nix { inherit pkgs; }}"; - sessionPackages = [ pkgs.hyprland ]; - }; + # displayManager = { + # sddm.enable = true; + # sddm.theme = "${import ../../modules/themes/sddm-theme.nix { inherit pkgs; }}"; + # sessionPackages = [ pkgs.hyprland ]; + # }; windowManager.i3.enable = true; libinput.enable = true; }; + + services.greetd = { + enable = true; + restart = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland"; + }; + }; + }; + environment.etc."greetd/environments".text = '' + Hyprland + none+i3 + ''; + hardware.bluetooth.enable = true; services.blueman.enable = true; services.printing.enable = true; # Enable CUPS to print documents. + security.pam.services.swaylock = {}; # Enable sound. sound.enable = true; diff --git a/modules/old_configs/hypr/hyprland.conf b/modules/old_configs/hypr/hyprland.conf index ff80c20..4f24a6f 100644 --- a/modules/old_configs/hypr/hyprland.conf +++ b/modules/old_configs/hypr/hyprland.conf @@ -21,26 +21,17 @@ env = QT_QPA_PLATFORMTHEME,qt6ct env = SDL_VIDEODRIVER,wayland #auto-runs -exec-once = ~/.config/hypr/xdg-portal-hyprland +exec-once = /home/liamm/.config/hypr/xdg-portal-hyprland #exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once = dbus-update-activation-environment --systemd all -exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME +# exec-once = dbus-update-activation-environment --systemd all +# exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME # exec-once = /usr/lib/polkit-kde-authentication-agent-1 exec-once = wl-clipboard-history -t exec-once = swww init -exec-once = gammastep +# exec-once = gammastep exec-once = waybar exec-once = wl-paste -p --watch wl-copy -p '' -# THE FOLLOWING LINES ARE A TEST TO GET IDLE LOCKING/SLEEP WORKING -# Turn monitors off if locked (swaylock running) and idle for 10 seconds -#exec-once = swayidle -w timeout 10 'if pgrep -x swaylock; then hyprctl dispatch dpms off; fi' resume 'hyprctl dispatch dpms on' -# -# Sleep if locked (swaylock running) and idle for 10 seconds -$lock = swaylock -C $HOME/.config/swaylock/config -exec-once = swayidle -w timeout 180 'if pgrep -x swaylock; then systemctl suspend; fi' before-sleep '$lock' & -# Lock screen after idle for 300s and turn monitors off after 330 -exec-once = swayidle -w timeout 300 '$lock' timeout 330 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' & # IF ABANDONING ABOVE METHODS, UNCOMMENT BELOW #exec-once = swaylock @@ -59,6 +50,15 @@ exec-once = blueman-applet exec-once = nm-applet exec-once = kdeconnect-indicator +# THE FOLLOWING LINES ARE A TEST TO GET IDLE LOCKING/SLEEP WORKING +# Turn monitors off if locked (swaylock running) and idle for 10 seconds +#exec-once = swayidle -w timeout 10 'if pgrep -x swaylock; then hyprctl dispatch dpms off; fi' resume 'hyprctl dispatch dpms on' +# +# Sleep if locked (swaylock running) and idle for 10 seconds +$lock = swaylock -C $HOME/.config/swaylock/config +exec-once = swayidle -w timeout 180 'if pgrep -x swaylock; then systemctl suspend; fi' before-sleep '$lock' & +# Lock screen after idle for 300s and turn monitors off after 330 +exec-once = swayidle -w timeout 300 '$lock' timeout 330 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' & input { kb_layout = us @@ -191,7 +191,7 @@ $ctrlMod = CTRL # NATIVE PROGRAM BINDS bind = $altMod, Return, exec, $HOME/.local/bin/ghostty bind = $mainMod, Return, exec, $HOME/.local/bin/ghostty # for apps that yoink alt- binds -bind = $altMod SHIFT, Return, exec, contour +bind = $altMod SHIFT, Return, exec, alacritty bind = $mainMod SHIFT, D, exec, discord --enable-blink-features=MiddleClickAutoscroll bind = $mainMod SHIFT, E, exec, emacsclient -c -a 'emacs' bind = $mainMode SHIFT, F, exec, focus-linux diff --git a/modules/old_configs/swaylock/config b/modules/old_configs/swaylock/config index 1119616..afcf2bb 100644 --- a/modules/old_configs/swaylock/config +++ b/modules/old_configs/swaylock/config @@ -24,5 +24,5 @@ ring-clear-color=9ccfd8 line-clear-color=1f1d2e line-wrong-color=1f1d2e bs-hl-color=31748f -image=/usr/share/pixmaps/background.jpg +image=/home/liamm/pictures/desert.jpg ignore-empty-password diff --git a/modules/themes/sddm-theme.nix b/modules/themes/sddm-theme.nix index b72c546..59f217e 100644 --- a/modules/themes/sddm-theme.nix +++ b/modules/themes/sddm-theme.nix @@ -19,7 +19,6 @@ pkgs.stdenv.mkDerivation { installPhase = '' mkdir -p $out cp -R ./* $out - # rm Background.jpg cp -r ${image} $out/Background.jpg ''; }