diff --git a/README.md b/README.md index 29b99f89..836481f7 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@ nixos-rebuild switch --flake '/etc/nixos#' * [ ] Try the multi-GPU configs on the wiki * [ ] set up pinentry on awesome-hyprland * [ ] Get swaylock to dim / turn off the screen, then enter suspend/hibernate - * [ ] swayosd + * [x] swayosd * [ ] wayprompt * [ ] wlogout * [ ] cli-based filebrowser for hyprland - * [ ] Find a way to adjust window sizes with a keyboard shortcut in Hyprland + * [x] Find a way to adjust window sizes with a keyboard shortcut in Hyprland * [ ] Try disko - [Link](https://github.com/nix-community/disko) * [ ] btrfs snapshots * [ ] weechat / weechat-matrix diff --git a/home-manager/common/software/cli/btop.nix b/home-manager/common/software/cli/btop.nix index 638a79fa..78d36685 100644 --- a/home-manager/common/software/cli/btop.nix +++ b/home-manager/common/software/cli/btop.nix @@ -51,7 +51,7 @@ base_10_sizes = False show_cpu_freq = True #* Special formatting: /host = hostname | /user = username | /uptime = system uptime -clock_format = "[/usr@/host] [/uptime] [%X]" +clock_format = "[/user@/host] [/uptime] [%X]" background_update = True custom_cpu_name = "" @@ -80,4 +80,4 @@ selected_battery = "Auto" log_level = "WARNING" ''; -} \ No newline at end of file +} diff --git a/home-manager/common/software/cli/doom-emacs.d/config.el b/home-manager/common/software/cli/doom-emacs.d/config.el index 0de4792e..39378c65 100644 --- a/home-manager/common/software/cli/doom-emacs.d/config.el +++ b/home-manager/common/software/cli/doom-emacs.d/config.el @@ -1 +1,14 @@ -(setq doom-theme 'doom-gruvbox) \ No newline at end of file +(setq doom-theme 'doom-gruvbox) + +(defun posframe-poshandler-window-top-center-offset (info) + "Posframe's position handler. + +Get a position which let posframe stay onto current window's +top center. The structure of INFO can be found in docstring of +`posframe-show'." + (let* ((window-left (plist-get info :parent-window-left)) + (window-top (plist-get info :parent-window-top)) + (window-width (plist-get info :parent-window-width)) + (posframe-width (plist-get info :posframe-width))) + (cons (+ window-left (/ (- window-width posframe-width) 2)) + (+ window-top 48)))) diff --git a/home-manager/common/software/cli/doom-emacs.d/init.el b/home-manager/common/software/cli/doom-emacs.d/init.el index 64b4ceef..737986b2 100644 --- a/home-manager/common/software/cli/doom-emacs.d/init.el +++ b/home-manager/common/software/cli/doom-emacs.d/init.el @@ -23,7 +23,7 @@ company ; the ultimate code completion backend ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... - ;;ivy ; a search engine for love and life + ivy ; a search engine for love and life vertico ; the search engine of the future :ui diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix index 72b62beb..90a637d3 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix @@ -221,6 +221,7 @@ # bind = ALT, TAB, exec, rofi -show window # Resize + bind = $mainMod, R, exec, notify-send "Entered resize mode.\nPress ESC to quit." bind = $mainMod, R, submap, resize submap = resize binde = , H, resizeactive,-50 0 @@ -257,8 +258,8 @@ # Set up the idle management daemon swayidle -w \ timeout 300 'swaylock -f' \ - timeout 600 'swaymsg "output * power off"' \ - resume 'swaymsg "output * power on"' \ + timeout 600 'hyprctl dispatch dpms off' \ + resume 'hyprctl dispatch dpms on' \ before-sleep 'swaylock -f' mako ''; diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/mako-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/mako-conf.nix index baf5c788..b0d0bde5 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/mako-conf.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/mako-conf.nix @@ -8,13 +8,14 @@ on-button-right=dismiss-all font=Jetbrains Regular Nerd background-color=#252423 +border-color=#d5c4a1bb text-color=#e2cca9 width=300 height=100 margin=10 padding=15 -border-size=0 -border-radius=5 +border-size=3 +border-radius=15 icons=1 max-icon-size=128 icon-location=left @@ -26,4 +27,4 @@ default-timeout=15000 layer=top anchor=top-right ''; -} \ No newline at end of file +} diff --git a/nixos/common/desktops/hyprland/default.nix b/nixos/common/desktops/hyprland/default.nix index 3ab9870d..cd29208d 100644 --- a/nixos/common/desktops/hyprland/default.nix +++ b/nixos/common/desktops/hyprland/default.nix @@ -38,6 +38,11 @@ NIXOS_OZONE_WL = "1"; }; + services.logind.extraConfig = '' + IdleActionSec=900 + IdleAction=suspend-then-hibernate + ''; + # XDG portal xdg.portal.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];