diff --git a/config/autostart b/config/autostart new file mode 100644 index 0000000..39a2a5a --- /dev/null +++ b/config/autostart @@ -0,0 +1,21 @@ +# Programs the HyprCosmic session starts after COSMIC's own components. +# +# Installed to ~/.config/hyprcosmic/autostart and read by cosmic-session's +# profile module. One command per line. Arguments and quoting work, but this is +# NOT a shell: no $VAR, no ~, no globs, no $(...). Paths must be absolute. +# +# `#` starts a comment where a word would start, so `--color=#1a1b26` is fine +# but `--color #1a1b26` is not; quote it as '#1a1b26' if you need the latter. + +# The bar. Configs live under /usr/share/hyprcosmic so this file needs no +# per-user paths; copy them into ~/.config/hyprcosmic/waybar and point here to +# customise. +waybar -c /usr/share/hyprcosmic/waybar/config.jsonc -s /usr/share/hyprcosmic/waybar/style.css + +# rofi is not a daemon. It is launched on demand by a keybinding, which COSMIC +# stores in com.system76.CosmicSettings.Shortcuts rather than here. Until that +# binding is set, run `rofi -show drun` from a terminal. + +# HyDE drives wallpaper through swww, which is not packaged for Fedora. Once +# it is available, uncomment: +# swww-daemon diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc new file mode 100644 index 0000000..8c57c82 --- /dev/null +++ b/config/waybar/config.jsonc @@ -0,0 +1,73 @@ +// Waybar configuration for a HyprCosmic session. +// +// Waybar's shipped default (/etc/xdg/waybar/config.jsonc) is built entirely +// around sway/* modules and shows nothing at all under cosmic-comp, so this +// exists rather than a handful of overrides. +// +// Module choices are constrained by what cosmic-comp actually advertises on the +// Wayland registry, which was checked against a live session: +// +// ext/workspaces ext_workspace_manager_v1 -- advertised by stock cosmic-comp. +// wlr/taskbar zwlr_foreign_toplevel_management_v1 -- NOT in stock +// cosmic-comp; provided by the HyprCosmic fork's Patch A. +// Under a stock compositor this module stays empty and the +// rest of the bar still works. +// tray Needs a StatusNotifierWatcher. cosmic-panel normally +// supplies one via cosmic-applet-status-area, and the +// hyprcosmic profile disables the panel, so waybar hosts the +// watcher itself here. +{ + "layer": "top", + "position": "top", + "height": 34, + "spacing": 6, + + "modules-left": ["ext/workspaces", "wlr/taskbar"], + "modules-center": ["clock"], + "modules-right": ["pulseaudio", "network", "cpu", "memory", "battery", "tray"], + + "ext/workspaces": { + "format": "{name}", + "on-click": "activate" + }, + + "wlr/taskbar": { + "format": "{icon}", + "icon-size": 18, + "tooltip-format": "{title}", + "on-click": "activate", + "on-click-middle": "close" + }, + + "clock": { + "format": "{:%a %d %b %H:%M}", + "tooltip-format": "{calendar}" + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": "muted", + "format-icons": { "default": ["", "", ""] }, + "on-click": "pavucontrol" + }, + + "network": { + "format-wifi": " {signalStrength}%", + "format-ethernet": " wired", + "format-disconnected": " offline", + "tooltip-format": "{ifname}: {ipaddr}" + }, + + "cpu": { "format": " {usage}%", "interval": 5 }, + "memory": { "format": " {percentage}%", "interval": 5 }, + + "battery": { + "states": { "warning": 30, "critical": 15 }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-icons": ["", "", "", "", ""] + }, + + "tray": { "icon-size": 18, "spacing": 8 } +} diff --git a/config/waybar/style.css b/config/waybar/style.css new file mode 100644 index 0000000..07a59eb --- /dev/null +++ b/config/waybar/style.css @@ -0,0 +1,74 @@ +/* Waybar styling for a HyprCosmic session. + * + * Deliberately plain. HyDE's own bar styling is bespoke CSS belonging to HyDE + * rather than to any theme: a HyDE theme's waybar.theme file is only a short + * list of @define-color declarations. So the palette below is what a theme + * import can eventually overwrite, and the geometry is what stays put. + * + * Keep every colour reference pointing at one of these names, so that dropping + * a theme's waybar.theme in ahead of this file is enough to re-colour the bar. + */ + +@define-color bar-bg rgba(26, 27, 38, 0.85); +@define-color bar-fg #c0caf5; +@define-color accent #7aa2f7; +@define-color warning #e0af68; +@define-color critical #f7768e; +@define-color muted #565f89; + +* { + font-family: "FontAwesome 6 Free", "Noto Sans", sans-serif; + font-size: 13px; + border: none; + border-radius: 0; + min-height: 0; +} + +window#waybar { + background: @bar-bg; + color: @bar-fg; +} + +#workspaces button { + padding: 0 8px; + color: @muted; + background: transparent; +} + +#workspaces button.active { + color: @bar-fg; + box-shadow: inset 0 -2px @accent; +} + +#workspaces button:hover { + color: @bar-fg; + background: rgba(122, 162, 247, 0.15); +} + +#taskbar button { + padding: 0 6px; + background: transparent; +} + +#taskbar button.active { + box-shadow: inset 0 -2px @accent; +} + +#clock, +#pulseaudio, +#network, +#cpu, +#memory, +#battery, +#tray { + padding: 0 10px; +} + +#clock { + font-weight: bold; +} + +#battery.warning { color: @warning; } +#battery.critical { color: @critical; } +#network.disconnected { color: @critical; } +#pulseaudio.muted { color: @muted; }