additional work to setup hyprland
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct") -- change to qt6ct if you have that
|
||||
hl.env("SUDO_ASKPASS", os.getenv("HOME") .. "/.local/bin/sudo-askpass.sh")
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
-- Autostart. See https://wiki.hypr.land/Configuring/Basics/Autostart/
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("hyprctl setcursor catppuccin-mocha-dark-cursors 28 &")
|
||||
hl.exec_cmd("systemctl --user start hyprpolkitagent &")
|
||||
hl.exec_cmd("systemctl --user start plasma-polkit-agent &")
|
||||
hl.exec_cmd("waybar & mako & hyprpaper & hypridle & wluma & hyprshell run &")
|
||||
hl.exec_cmd("systemctl --user start hypr-lid.service &")
|
||||
hl.exec_cmd("blueman-applet &")
|
||||
hl.exec_cmd("1password --silent &")
|
||||
hl.exec_cmd("op signin &")
|
||||
hl.exec_cmd("systemctl --user start hyprland-session.target &")
|
||||
hl.exec_cmd("blueman-applet &")
|
||||
hl.exec_cmd("sunsetr &")
|
||||
end)
|
||||
|
||||
hl.on("hyprland.shutdown", function()
|
||||
os.execute("systemctl --user stop hyprland-session.target && sleep 0.1")
|
||||
end)
|
||||
|
||||
@@ -67,7 +67,9 @@ hl.config({
|
||||
})
|
||||
|
||||
hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
|
||||
hl.animation({ leaf = "borderangle", enabled = true, speed = 50, bezier = "linear", style = "loop" })
|
||||
-- borderangle disabled: the old "loop" style animated continuously, forcing
|
||||
-- constant redraws and spiking idle CPU usage even with VFR enabled.
|
||||
hl.animation({ leaf = "borderangle", enabled = false, speed = 50, bezier = "linear", style = "loop" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 0.5, bezier = "default" })
|
||||
hl.animation({ leaf = "windows", enabled = false })
|
||||
hl.animation({ leaf = "fade", enabled = false })
|
||||
@@ -83,9 +85,23 @@ hl.config({
|
||||
-- new_is_master = true
|
||||
-- }
|
||||
|
||||
-- CPU/power efficiency. See https://wiki.hypr.land/Configuring/Variables/#misc
|
||||
hl.config({
|
||||
misc = {
|
||||
force_default_wallpaper = 0, -- Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
middle_click_paste = false,
|
||||
-- Don't wake/re-render just because the cursor crossed a monitor edge.
|
||||
mouse_move_focuses_monitor = false,
|
||||
-- Skip drawing the Hyprland logo in the corner of empty workspaces.
|
||||
disable_hyprland_logo = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Variable framerate: only redraw when the scene actually changes instead of
|
||||
-- running at a fixed rate. This is the single biggest idle-CPU saver; it is
|
||||
-- true by default, but set explicitly (note it lives under `debug:`).
|
||||
hl.config({
|
||||
debug = {
|
||||
vfr = true,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Hyprland session
|
||||
BindsTo=graphical-session.target
|
||||
Wants=graphical-session-pre.target
|
||||
After=graphical-session-pre.target
|
||||
PropagatesStopTo=graphical-session.target
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# Open btop fullscreen in a ghostty window; focus it if it is already open.
|
||||
# Intended as the on-click action for the waybar cpu/memory modules.
|
||||
set -uo pipefail
|
||||
|
||||
if hyprctl clients -j 2>/dev/null | jq -e 'any(.[]; ((.title // "") + " " + (.class // "")) | ascii_downcase | contains("btop"))' >/dev/null 2>&1; then
|
||||
hyprctl dispatch 'hl.dsp.focus({ window = "title:btop" })' 2>/dev/null || true
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ghostty -e btop &
|
||||
sleep 0.5
|
||||
hyprctl dispatch 'hl.dsp.window.fullscreen({ action = "set" })' 2>/dev/null || true
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# sudo-askpass: GUI password prompt for sudo via $SUDO_ASKPASS.
|
||||
#
|
||||
# sudo calls the program pointed to by $SUDO_ASKPASS when it cannot prompt on a
|
||||
# terminal (or with `sudo -A`) and reads the password from its stdout. zenity's
|
||||
# --password dialog does exactly that. If the dialog is cancelled or times out
|
||||
# zenity exits non-zero and sudo aborts.
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
exec zenity --title="sudo authentication" \
|
||||
--password \
|
||||
--text="Enter password for $(id -un):" \
|
||||
--timeout=120 2>/dev/null
|
||||
Reference in New Issue
Block a user