diff --git a/README.md b/README.md index 4bca939..aad5c91 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ First, install [CachyOS Desktop Edition](https://cachyos.org/download/) and sele ### Setup -After first boot login to Hyprland (uwsm) and open a terminal (defaults to kitty). +After first boot login to Hyprland (not uwsm) and open a terminal (defaults to kitty). #### Install required Hyprland packages @@ -29,6 +29,7 @@ paru -S \ qt5-wayland \ qt6-wayland \ hypridle \ + hyprlock \ waybar \ hyprpaper \ swayosd \ @@ -41,12 +42,6 @@ paru -S \ impala ``` -I am using [uwsm](https://github.com/Vladimir-csp/uwsm) to run Hyprland. The following user services must be started: - -```bash -systemctl --user enable --now hyprpaper.service -``` - I prefer [iwd as Wifi back-end of NetworkManager](https://wiki.archlinux.org/title/NetworkManager#Using_iwd_as_the_Wi-Fi_backend). Once configured, restart the service: ```bash diff --git a/dot_config/hypr/hypridle.conf b/dot_config/hypr/hypridle.conf new file mode 100644 index 0000000..420d6e4 --- /dev/null +++ b/dot_config/hypr/hypridle.conf @@ -0,0 +1,17 @@ +general { + lock_cmd = pidof hyprlock || hyprlock & # lock screen + before_sleep_cmd = loginctl lock-session # lock before suspend. + after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. + inhibit_sleep = 3 # wait until screen is locked +} + +listener { + timeout = 300 # 5min + on-timeout = loginctl lock-session # lock screen when timeout has passed +} + +listener { + timeout = 330 # 5.5min + on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed + on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected +} diff --git a/dot_config/hypr/hyprland.conf b/dot_config/hypr/hyprland.conf index 23a87c7..cea9c31 100644 --- a/dot_config/hypr/hyprland.conf +++ b/dot_config/hypr/hyprland.conf @@ -25,8 +25,8 @@ monitor=DP-2, 3840x2160@60, auto, 1.333333 # See https://wiki.hypr.land/Configuring/Keywords/ # Set programs that you use -$terminal = uwsm app -- alacritty -$browser = uwsm app -- zen-browser +$terminal = alacritty +$browser = zen-browser $fileManager = $terminal --class=Yazi -e yazi $menu = wofi --show drun @@ -38,9 +38,10 @@ $menu = wofi --show drun # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: -exec-once = uwsm app -- hypridle -exec-once = uwsm app -- waybar -exec-once = uwsm app -- swayosd-server +exec-once = hyprpaper +exec-once = hypridle +exec-once = waybar +exec-once = swayosd-server exec-once = /usr/lib/polkit-kde-authentication-agent-1 & exec-once = wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+' @@ -262,12 +263,12 @@ bind = $mainMod, B, exec, $browser bind = $mainMod SHIFT, B, exec, $browser --incognito bind = $mainMod, T, exec, $terminal -e btop bind = $mainMod, D, exec, $terminal -e lazydocker -bind = $mainMod, N, exec, uwsm app -- obsidian -disable-gpu --enable-wayland-ime +bind = $mainMod, N, exec, obsidian -disable-gpu --enable-wayland-ime bind = $mainMod, V, togglefloating, bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, SPACE, exec, $menu -bind = $mainMod, ESCAPE, exec, uwsm app -- wlogout +bind = $mainMod, ESCAPE, exec, wlogout # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l diff --git a/dot_config/hypr/hyprlock.conf b/dot_config/hypr/hyprlock.conf new file mode 100644 index 0000000..a3842b3 --- /dev/null +++ b/dot_config/hypr/hyprlock.conf @@ -0,0 +1,47 @@ +# ──────────────────────────────────────────────────────────── +# Hyprlock — rose-pine theme +# ──────────────────────────────────────────────────────────── + +$color = rgba(25, 23, 36, 1) + +$inner_color = rgba(25, 23, 36, 1) +$outer_color = rgba(49, 116, 143, 1) + +$font_color = rgba(224, 222, 244, 1) +$placeholder_color = rgba(205,214,244,0.6) +$check_color = rgba(196,167,231,1) +$fail_color = rgba(235,111,146,1) + +background { + monitor = + color = $color + path = ~/.config/hypr/background.jpg + blur_passes = 3 +} + +animations { + enabled = false +} + +input-field { + monitor = + size = 600, 100 + position = 0, 0 + halign = center + valign = center + inner_color = $inner_color + outer_color = $outer_color + outline_thickness = 4 + font_family = FiraCode Nerd Font + font_color = $font_color + placeholder_text =   Enter Password 󰈷  + check_color = $check_color + fail_text = $PAMFAIL ($ATTEMPTS) + rounding = 0 + shadow_passes = 0 + fade_on_empty = false +} + +auth { + fingerprint:enabled = true +} diff --git a/dot_config/wlogout/layout b/dot_config/wlogout/layout new file mode 100644 index 0000000..0228b67 --- /dev/null +++ b/dot_config/wlogout/layout @@ -0,0 +1,36 @@ +{ + "label" : "lock", + "action" : "loginctl lock-session", + "text" : "Lock", + "keybind" : "l" +} +{ + "label" : "hibernate", + "action" : "systemctl hibernate", + "text" : "Hibernate", + "keybind" : "h" +} +{ + "label" : "logout", + "action" : "hyprctl dispatch exit", + "text" : "Logout", + "keybind" : "e" +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Shutdown", + "keybind" : "s" +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Suspend", + "keybind" : "u" +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Reboot", + "keybind" : "r" +} diff --git a/dot_config/wlogout/style.css b/dot_config/wlogout/style.css new file mode 100644 index 0000000..1c867f2 --- /dev/null +++ b/dot_config/wlogout/style.css @@ -0,0 +1,49 @@ +* { + background-image: none; + box-shadow: none; +} + +window { + background-color: rgba(26, 26, 26, 0.9); +} + +button { + border-radius: 0; + color: #e0e0e0; + background-color: #1a1a1a; + border: 2px solid #00a86b; + border-radius: 8px; + margin: 10px; + background-repeat: no-repeat; + background-position: center; + background-size: 30%; +} + +button:focus, button:active, button:hover { + background-color: #2a2a2a; + border-color: #19b079; +} + +#lock { + background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png")); +} + +#logout { + background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png")); +} + +#suspend { + background-image: image(url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png")); +} + +#hibernate { + background-image: image(url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png")); +} + +#shutdown { + background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png")); +} + +#reboot { + background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png")); +}