5th commit : remodeling of file structure, adding noctalia config files

This commit is contained in:
ohinh 2026-09-05 22:50:29 +02:00
parent ab8162d69d
commit ad72a517d9
71 changed files with 9931 additions and 0 deletions

View file

@ -0,0 +1,6 @@
[audio]
enable_overdrive = true # allow volume sliders above 100% (up to 150%)
enable_sounds = false # master toggle for UI sounds
sound_volume = 0.5 # global sound volume (0.0 - 1.0)
volume_change_sound = "~/.config/noctalia/sounds/volchange.mp3" # empty = bundled default sounds/volume-change.wav
notification_sound = "~/.config/noctalia/sounds/notification.mp3" # empty = bundled default sounds/notification.wav

View file

@ -0,0 +1,56 @@
[bar]
order = ["main"] # layer-shell creation order
[bar.default]
position = "top" # top | bottom | left | right
enabled = true
auto_hide = false # slide out after pointer leaves; reveal from edge trigger strip
smart_auto_hide = false # show when the active workspace is empty; hide when it has windows
show_on_workspace_switch = true # with auto_hide: briefly reveal when the active workspace changes
reserve_space = false # reserve compositor exclusive zone / push windows away
layer = "top" # top | overlay; overlay appears above fullscreen apps
thickness = 31 # bar cross-axis size in pixels (height for horizontal, width for vertical)
background_opacity = 1.0 # 0.0 (transparent) to 1.0 (opaque)
border = "outline" # color role or #RRGGBB for the bar outline
border_width = 0.0 # inside outline width in pixels; 0 disables it
shadow = true # cast the global [shell.shadow]
contact_shadow = false # dark gradient between an attached panel and the bar (depth at the seam)
panel_overlap = 1 # logical px an attached panel overlaps the bar edge to hide the seam
radius = 12 # global corner radius fallback
radius_top_left = 12
radius_top_right = 12
radius_bottom_left = 12
radius_bottom_right = 12
concave_edge_corners = true # carve the screen-edge corners inward; requires margin_edge = 0
margin_ends = 100 # inset from each end of the bar along its main axis
margin_edge = 0 # distance from the nearest screen edge (positive values float the bar)
margin_opposite_edge = 0 # extra reserved space on the inward side of the bar (below for top, above for bottom)
padding = 14 # main-axis padding from bar edges to start/end widget sections
widget_spacing = 7 # gap between widgets within a section
hover_highlight = true # softly tint the widget under the mouse pointer with its foreground color
scale = 2.0 # content scale multiplier for icons, spacing, and base text size
font_scale = 2.0 # additional text-only scale multiplier
font_weight = 500 # CSS weight 1001000 (e.g. 400 regular, 700 bold); primary label weight for bar widgets
font_family = "" # typeface for this bar's widgets; empty inherits the global font
# Default capsule style for all widgets on this bar (see Widget Capsule section)
capsule = false
capsule_fill = "surface_variant"
capsule_thickness = 0.76 # capsule size across the bar as a fraction of bar thickness (1.0 fills the bar)
capsule_radius = 8.0 # omit for automatic pill radius
capsule_opacity = 1.0
# capsule_border = "outline" # omit this key for no border by default
start = ["launcher", "wallpaper", "workspaces"]
center = ["clock"]
end = ["media", "tray", "notifications", "clipboard", "network", "bluetooth", "volume", "brightness", "battery", "control-center", "session"]
[bar.default.dead_zone.actions]
left = "panel-toggle control-center"
middle = "exec foot"
scroll_up = "volume-up"
scroll_down = "volume-down"
back = "media previous"
forward = "media next"

View file

@ -0,0 +1,8 @@
[battery]
warning_threshold = 10 # 0 disables low-battery warnings
[battery.device."/org/freedesktop/UPower/devices/battery_BAT0"]
warning_threshold = 15
[battery.device."/org/freedesktop/UPower/devices/headset_dev_00_11_22_33_44_55"]
warning_threshold = 10

View file

@ -0,0 +1,2 @@
[hooks]
battery_percentage_changed = "NOCTALIA_BATTERY_THRESHOLD=20 ~/.config/noctalia/hooks/battery-threshold.sh"

View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
# Use the threshold from the hook command, or fall back to 20%.
threshold="${NOCTALIA_BATTERY_THRESHOLD:-20}"
# Keep a tiny state file so the script can compare this event with the last one.
state_dir="${XDG_STATE_HOME:-$HOME/.local/state}/noctalia"
state_file="$state_dir/battery-percent"
# Noctalia provides these values whenever battery_percentage_changed fires.
percent="${NOCTALIA_BATTERY_PERCENT:-}"
battery_state="${NOCTALIA_BATTERY_STATE:-unknown}"
# Ignore the event if the percentage is missing or not a whole number.
[[ "$percent" =~ ^[0-9]+$ ]] || exit 0
mkdir -p "$state_dir"
# Read the previous percentage, then save the current percentage for next time.
previous=""
[[ -r "$state_file" ]] && previous="$(<"$state_file")"
printf '%s\n' "$percent" > "$state_file"
# Only warn while discharging, and only after we have a previous value to compare.
[[ "$battery_state" == "discharging" ]] || exit 0
[[ "$previous" =~ ^[0-9]+$ ]] || exit 0
# Fire once when crossing below the threshold, not every time the battery changes below it.
if (( previous >= threshold && percent < threshold )); then
notify-send -u critical "Battery low" "Battery is ${percent}%."
# Or run any other command, for example:
# systemctl --user start low-battery.target
fi

View file

@ -0,0 +1,19 @@
[idle.behavior.lock]
timeout = 600
action = "lock"
enabled = false # explicitly disabled in the default config
[idle.behavior.screen-off]
timeout = 660
action = "screen_off" # turns monitors off, and back on when you return
enabled = false # explicitly disabled in the default config
[idle.behavior.suspend]
timeout = 900
action = "lock_and_suspend" # or action = "suspend" with lock_before_suspend = false
[idle.behavior.custom]
timeout = 48
action = "command"
command = "notify-send 'Idle' 'Going idle'"
resume_command = "notify-send 'Idle' 'Back from idle'"

Binary file not shown.

Binary file not shown.