use Noctalia instead of various components
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
||||
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.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 300 # 5.0min.
|
||||
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
on-resume = brightnessctl -r # monitor backlight restore.
|
||||
}
|
||||
|
||||
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
|
||||
listener {
|
||||
timeout = 300 # 5.0min.
|
||||
on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
|
||||
on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 900 # 15min
|
||||
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1800 # 30min
|
||||
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 after timeout has fired.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 2700 # 45min
|
||||
on-timeout = systemctl suspend # suspend pc
|
||||
}
|
||||
@@ -9,7 +9,7 @@ local var_color_decoration_shadow = theme.shadow
|
||||
local var_mainMod = "SUPER"
|
||||
local var_terminal = "kitty"
|
||||
local var_fileManager = "dolphin"
|
||||
local var_menu = "wofi --show drun"
|
||||
local var_menu = "noctalia msg panel-toggle launcher"
|
||||
local var_screenshot_folder = "~/Bilder/Screenshots/"
|
||||
|
||||
require("env")
|
||||
@@ -33,15 +33,10 @@ hl.config({
|
||||
-- ##################
|
||||
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("waybar &")
|
||||
hl.exec_cmd("noctalia &")
|
||||
end)
|
||||
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("hyprpaper &")
|
||||
hl.exec_cmd("sleep 1; waypaper --restore &")
|
||||
hl.exec_cmd("swaync &")
|
||||
hl.exec_cmd("hypridle &")
|
||||
hl.exec_cmd("nextcloud &")
|
||||
hl.exec_cmd("sh ~/.config/hypr/scripts/portal-host-override.sh")
|
||||
hl.exec_cmd("sh ~/.config/hypr/scripts/ensure-mime-defaults.sh")
|
||||
end)
|
||||
@@ -376,38 +371,32 @@ hl.device({
|
||||
-- Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
|
||||
hl.bind(var_mainMod .. " + RETURN", hl.dsp.exec_cmd(var_terminal), { description = "Open terminal (kitty)" })
|
||||
hl.bind(var_mainMod .. " + Q", hl.dsp.window.close(), { description = "Close focused window" })
|
||||
hl.bind(var_mainMod .. " + ESCAPE", hl.dsp.exec_cmd("hyprshutdown"), { description = "Shutdown Hyprland" })
|
||||
-- Session menu (noctalia owns the session panel)
|
||||
hl.bind(var_mainMod .. " + ESCAPE", hl.dsp.exec_cmd("noctalia msg panel-toggle session"), { description = "Session menu (logout/reboot/shutdown)" })
|
||||
hl.bind(
|
||||
var_mainMod .. " + SHIFT + ESCAPE",
|
||||
hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit"),
|
||||
hl.dsp.exec_cmd("command -v noctalia >/dev/null 2>&1 && noctalia msg session logout || hyprctl dispatch exit"),
|
||||
{ description = "Exit Hyprland" }
|
||||
)
|
||||
hl.bind(
|
||||
var_mainMod .. " + CTRL + ESCAPE",
|
||||
hl.dsp.exec_cmd("hyprshutdown -t 'Shutting down...' --post-cmd 'shutdown -P 0'"),
|
||||
hl.dsp.exec_cmd("noctalia msg session shutdown"),
|
||||
{ description = "Power off the system" }
|
||||
)
|
||||
hl.bind(
|
||||
var_mainMod .. " + ALT + ESCAPE",
|
||||
hl.dsp.exec_cmd("hyprshutdown -t 'Restarting...' --post-cmd 'reboot'"),
|
||||
hl.dsp.exec_cmd("noctalia msg session reboot"),
|
||||
{ description = "Reboot the system" }
|
||||
)
|
||||
hl.bind(var_mainMod .. " + E", hl.dsp.exec_cmd(var_fileManager), { description = "Open file manager (dolphin)" })
|
||||
hl.bind(var_mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }), { description = "Toggle floating window" })
|
||||
hl.bind(var_mainMod .. " + SPACE", hl.dsp.exec_cmd(var_menu), { description = "Open app launcher (wofi)" })
|
||||
hl.bind(
|
||||
var_mainMod .. " + SHIFT + SPACE",
|
||||
hl.dsp.exec_cmd("nwg-drawer"),
|
||||
{ description = "Open app drawer (nwg-drawer)" }
|
||||
)
|
||||
hl.bind(var_mainMod .. " + SPACE", hl.dsp.exec_cmd(var_menu), { description = "Open app launcher (noctalia)" })
|
||||
hl.bind(var_mainMod .. " + P", hl.dsp.window.pseudo(), { description = "Toggle pseudo-tiling" })
|
||||
hl.bind(var_mainMod .. " + SHIFT + J", hl.dsp.layout("togglesplit"), { description = "Toggle split layout" })
|
||||
hl.bind(var_mainMod .. " + I", hl.dsp.exec_cmd("firefox &"), { description = "Open Firefox" })
|
||||
hl.bind(
|
||||
var_mainMod .. " + n",
|
||||
hl.dsp.exec_cmd("~/.local/bin/hyprltm-net"),
|
||||
{ description = "Network manager (hyprltm)" }
|
||||
)
|
||||
hl.bind(var_mainMod .. " + n", hl.dsp.exec_cmd("nm-connection-editor"), { description = "Network manager" })
|
||||
hl.bind(var_mainMod .. " + comma", hl.dsp.exec_cmd("noctalia msg settings-toggle"), { description = "Noctalia settings" })
|
||||
hl.bind(var_mainMod .. " + S", hl.dsp.exec_cmd("noctalia msg panel-toggle control-center"), { description = "Control center (noctalia)" })
|
||||
|
||||
-- Move focus with mainMod or Vim-style
|
||||
hl.bind(var_mainMod .. " + CTRL + h", hl.dsp.focus({ direction = "left" }), { description = "Focus window left" })
|
||||
@@ -611,9 +600,9 @@ hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd("hyprshot -m active --output-folder " .
|
||||
description = "Screenshot active monitor",
|
||||
})
|
||||
|
||||
-- Screenlock
|
||||
hl.bind("CTRL + ALT + L", hl.dsp.exec_cmd("hyprlock"), { locked = true, description = "Lock screen" })
|
||||
hl.bind(var_mainMod .. " + L", hl.dsp.exec_cmd("hyprlock"), { locked = true, description = "Lock screen" })
|
||||
-- Screenlock (noctalia owns the lock screen)
|
||||
hl.bind("CTRL + ALT + L", hl.dsp.exec_cmd("noctalia msg session lock"), { locked = true, description = "Lock screen" })
|
||||
hl.bind(var_mainMod .. " + L", hl.dsp.exec_cmd("noctalia msg session lock"), { locked = true, description = "Lock screen" })
|
||||
|
||||
-- Keybind overview popup
|
||||
hl.bind(
|
||||
@@ -622,7 +611,7 @@ hl.bind(
|
||||
{ description = "Show keybind overview" }
|
||||
)
|
||||
|
||||
hl.bind(var_mainMod .. " + W", hl.dsp.exec_cmd("waypaper"), { description = "Wallpaper select" })
|
||||
hl.bind(var_mainMod .. " + W", hl.dsp.exec_cmd("noctalia msg panel-toggle wallpaper"), { description = "Wallpaper select (noctalia)" })
|
||||
|
||||
-- #############################
|
||||
-- ## WINDOWS AND WORKSPACES ###
|
||||
@@ -676,12 +665,12 @@ hl.window_rule({
|
||||
float = true,
|
||||
})
|
||||
hl.window_rule({
|
||||
name = "waypaper-float",
|
||||
name = "keybinds-float",
|
||||
match = {
|
||||
class = ".*[Ww]aypaper.*",
|
||||
class = "keybinds",
|
||||
},
|
||||
float = true,
|
||||
size = "1280 800",
|
||||
size = "900 700",
|
||||
center = true,
|
||||
dim_around = true,
|
||||
})
|
||||
@@ -692,31 +681,25 @@ hl.window_rule({
|
||||
},
|
||||
opacity = "0.80 0.70",
|
||||
})
|
||||
-- Noctalia shell surfaces: blur bars/panels/dock/notifications and let
|
||||
-- Noctalia run its own animations (no Hyprland layer animation on top).
|
||||
hl.layer_rule({
|
||||
name = "noctalia",
|
||||
match = {
|
||||
namespace = "waybar",
|
||||
namespace = "^noctalia-(bar-.+|notification|dock|panel|attached-panel|osd|window-switcher)$",
|
||||
},
|
||||
no_anim = true,
|
||||
ignore_alpha = 0.5,
|
||||
blur = true,
|
||||
})
|
||||
hl.layer_rule({
|
||||
match = {
|
||||
namespace = "waybar",
|
||||
},
|
||||
blur_popups = true,
|
||||
})
|
||||
-- Central theme: blur behind the wofi popups (SUPER+SPACE drun, SUPER+K
|
||||
-- keybind help), whose window itself is translucent (@bg_translucent).
|
||||
hl.layer_rule({
|
||||
hl.window_rule({
|
||||
name = "noctalia-settings",
|
||||
match = {
|
||||
namespace = "wofi",
|
||||
class = "dev.noctalia.Noctalia",
|
||||
},
|
||||
blur = true,
|
||||
})
|
||||
hl.layer_rule({
|
||||
match = {
|
||||
namespace = "wofi",
|
||||
},
|
||||
blur_popups = true,
|
||||
float = true,
|
||||
size = "1080 920",
|
||||
})
|
||||
hl.window_rule({
|
||||
name = "no-rounding-fullscreen",
|
||||
@@ -753,3 +736,6 @@ hl.window_rule({
|
||||
|
||||
-- HyprMod managed settings
|
||||
require("hyprland-gui")
|
||||
|
||||
-- For Noctalia Color templates
|
||||
require("noctalia").apply_theme()
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
# sample hyprlock.conf
|
||||
# for more configuration options, refer https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|
||||
#
|
||||
# rendered text in all widgets supports pango markup (e.g. <b> or <i> tags)
|
||||
# ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#general-remarks
|
||||
#
|
||||
# shortcuts to clear password buffer: ESC, Ctrl+U, Ctrl+Backspace
|
||||
#
|
||||
# you can get started by copying this config to ~/.config/hypr/hyprlock.conf
|
||||
#
|
||||
|
||||
# Central theme: palette variables ($sapphire, $text, ...) come from
|
||||
# basic/.config/themes via ~/.config/themes/current/hypr.conf.
|
||||
# Edit colors there, never hardcoded values here.
|
||||
source = ~/.config/themes/current/hypr.conf
|
||||
|
||||
$font = Monospace
|
||||
|
||||
general {
|
||||
hide_cursor = false
|
||||
}
|
||||
|
||||
# uncomment to enable fingerprint authentication
|
||||
# auth {
|
||||
# fingerprint {
|
||||
# enabled = true
|
||||
# ready_message = Scan fingerprint to unlock
|
||||
# present_message = Scanning...
|
||||
# retry_delay = 250 # in milliseconds
|
||||
# }
|
||||
# }
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
bezier = linear, 1, 1, 0, 0
|
||||
animation = fadeIn, 1, 5, linear
|
||||
animation = fadeOut, 1, 5, linear
|
||||
animation = inputFieldDots, 1, 2, linear
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = screenshot
|
||||
blur_passes = 3
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 20%, 5%
|
||||
outline_thickness = 3
|
||||
inner_color = rgba(0, 0, 0, 0.0) # no fill
|
||||
|
||||
outer_color = $sapphire $lavender 45deg
|
||||
check_color = $sapphire $peach 120deg
|
||||
fail_color = $maroon $red 40deg
|
||||
|
||||
font_color = $subtext0
|
||||
fade_on_empty = false
|
||||
rounding = 15
|
||||
|
||||
font_family = $font
|
||||
placeholder_text = Input password...
|
||||
fail_text = $PAMFAIL
|
||||
|
||||
# uncomment to use a letter instead of a dot to indicate the typed password
|
||||
# dots_text_format = *
|
||||
# dots_size = 0.4
|
||||
dots_spacing = 0.3
|
||||
|
||||
# uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator)
|
||||
# hide_input = true
|
||||
|
||||
position = 0, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = $TIME # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution
|
||||
color = $text
|
||||
font_size = 90
|
||||
font_family = $font
|
||||
|
||||
position = -30, 0
|
||||
halign = right
|
||||
valign = top
|
||||
}
|
||||
|
||||
# DATE
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds
|
||||
color = $subtext0
|
||||
font_size = 25
|
||||
font_family = $font
|
||||
|
||||
position = -30, -150
|
||||
halign = right
|
||||
valign = top
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT[en,ru]
|
||||
color = $subtext0
|
||||
font_size = 24
|
||||
onclick = hyprctl switchxkblayout all next
|
||||
|
||||
position = 250, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# show-keybinds.sh — floating keybind overview popup.
|
||||
#
|
||||
# Reads the live keybind list from `hyprctl binds -j` and shows it in a wofi
|
||||
# popup (single column, sorted A-Z, fuzzy-searchable, closes on Esc).
|
||||
# Pressing Enter on a row executes that keybind's action via the compositor's
|
||||
# Lua state (hl.dispatch on the bind's stored dispatcher).
|
||||
# Reads the live keybind list from `hyprctl binds -j` and shows it in a
|
||||
# floating kitty window (single column, sorted A-Z, searchable via less).
|
||||
# Display-only: wofi/rofi are gone (the Noctalia launcher has no stdin-list
|
||||
# mode), so picking a row to execute is not wired up.
|
||||
#
|
||||
# Note: this config uses the Lua API (hl.bind), so `hyprctl binds -j` reports
|
||||
# key + modmask + an opaque Lua registry reference instead of a readable
|
||||
@@ -13,7 +13,7 @@
|
||||
# you change a bind.
|
||||
#
|
||||
# Usage: show-keybinds.sh [--print]
|
||||
# --print print the formatted list to stdout instead of opening wofi
|
||||
# --print print the formatted list to stdout instead of opening kitty
|
||||
# (handy for debugging / testing the formatting pipeline)
|
||||
|
||||
set -euo pipefail
|
||||
@@ -22,9 +22,6 @@ set -euo pipefail
|
||||
# display order. See https://wiki.hypr.land/Configuring/Binds/
|
||||
readonly MOD_ORDER=(64 SUPER 8 ALT 4 CTRL 1 SHIFT 2 CAPS 16 MOD2 32 MOD3 128 MOD5)
|
||||
|
||||
# chord -> Lua registry ref of the dispatcher to run on selection
|
||||
declare -A dispatch_for
|
||||
|
||||
if ! hyprctl binds -j >/dev/null 2>&1; then
|
||||
echo "hyprctl binds failed - are you inside a Hyprland session?" >&2
|
||||
exit 1
|
||||
@@ -38,8 +35,6 @@ rows=()
|
||||
# like the (usually empty) submap. \x1f is not whitespace, so every field
|
||||
# keeps its position.
|
||||
while IFS=$'\x1f' read -r modmask key description submap arg; do
|
||||
raw_key="$key"
|
||||
|
||||
# Humanize mouse-button binds.
|
||||
case "$key" in
|
||||
mouse:272) key="LMB" ;;
|
||||
@@ -68,18 +63,6 @@ while IFS=$'\x1f' read -r modmask key description submap arg; do
|
||||
else
|
||||
rows+=("$(printf '%-26s %s' "$chord" "(no description)")")
|
||||
fi
|
||||
|
||||
# Remember how to run this row. Mouse drag/resize need a real pointer
|
||||
# gesture, so they stay display-only. First occurrence of a chord wins
|
||||
# (media keys are often bound twice with different flags).
|
||||
case "$raw_key" in
|
||||
mouse:272 | mouse:273) ;;
|
||||
*)
|
||||
if [[ -n "$arg" && -z "${dispatch_for[$chord]+x}" ]]; then
|
||||
dispatch_for[$chord]="$arg"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done < <(hyprctl binds -j | jq -r '.[] | [(.modmask | tostring), .key, .description, .submap, .arg] | join("\u001f")')
|
||||
|
||||
if (( ${#rows[@]} == 0 )); then
|
||||
@@ -96,28 +79,16 @@ if [[ "${1:-}" == "--print" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! command -v wofi >/dev/null 2>&1; then
|
||||
printf '%s\n' "${rows[@]}"
|
||||
# Floating display via kitty (class `keybinds` has a float rule in
|
||||
# hyprland.lua). Rows go through a temp file rather than a stdin pipe so the
|
||||
# popup does not depend on kitty forwarding stdin to its child; the previous
|
||||
# run's file is cleaned up on the next invocation. q closes the window.
|
||||
rm -f /tmp/keybinds.??????.txt 2>/dev/null || true
|
||||
if command -v kitty >/dev/null 2>&1; then
|
||||
tmp="$(mktemp /tmp/keybinds.XXXXXX.txt)"
|
||||
printf '%s\n' "${rows[@]}" > "$tmp"
|
||||
kitty --class keybinds --title Keybinds less -S "$tmp"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sel=""
|
||||
if ! sel=$(printf '%s\n' "${rows[@]}" | wofi \
|
||||
--dmenu \
|
||||
--prompt "Keybinds" \
|
||||
--location center \
|
||||
--width 860 \
|
||||
--lines 22 \
|
||||
--cache-file /dev/null \
|
||||
--insensitive \
|
||||
--no-custom-entry \
|
||||
--hide-scroll); then
|
||||
exit 0 # popup dismissed (Esc) - not an error
|
||||
fi
|
||||
|
||||
# Re-derive the chord from the selected row (everything before the first
|
||||
# double space) and run its stored dispatcher in the compositor's Lua state.
|
||||
sel_chord="${sel%% *}"
|
||||
if [[ -n "${dispatch_for[$sel_chord]+x}" ]]; then
|
||||
hyprctl eval "hl.dispatch(debug.getregistry()[${dispatch_for[$sel_chord]}])" >/dev/null 2>&1 || true
|
||||
fi
|
||||
printf '%s\n' "${rows[@]}"
|
||||
Reference in New Issue
Block a user