From 10b599eb3e9e64a6fe6b424dfd29c0aee6ca0651 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Mon, 2 Jun 2025 18:34:15 +0200 Subject: [PATCH] feat: added waybar & anyrun configs --- .config/anyrun/.vscode/settings.json | 6 ++ .config/anyrun/applications.ron | 8 ++ .config/anyrun/config.ron | 47 +++++++++++ .config/anyrun/style.css | 25 ++++++ .config/anyrun/symbols.ron | 10 +++ .config/waybar/bars/DP-1.json | 29 +++++++ .config/waybar/bars/DP-2.json | 23 +++++ .config/waybar/bars/DP-3.json | 24 ++++++ .config/waybar/config | 23 +++++ .config/waybar/lib/common.json | 9 ++ .config/waybar/lib/components/audio.json | 14 ++++ .config/waybar/lib/components/calendar.json | 18 ++++ .config/waybar/lib/components/clock.json | 6 ++ .config/waybar/lib/components/cpu.json | 8 ++ .config/waybar/lib/components/gpu.json | 9 ++ .config/waybar/lib/components/language.json | 8 ++ .config/waybar/lib/components/memory.json | 7 ++ .config/waybar/lib/components/mpris.json | 15 ++++ .../waybar/lib/components/notifications.json | 15 ++++ .config/waybar/lib/components/tray.json | 5 ++ .config/waybar/lib/components/workspaces.json | 10 +++ .config/waybar/mocha.css | 40 +++++++++ .config/waybar/style.css | 83 +++++++++++++++++++ 23 files changed, 442 insertions(+) create mode 100644 .config/anyrun/.vscode/settings.json create mode 100644 .config/anyrun/applications.ron create mode 100644 .config/anyrun/config.ron create mode 100644 .config/anyrun/style.css create mode 100644 .config/anyrun/symbols.ron create mode 100644 .config/waybar/bars/DP-1.json create mode 100644 .config/waybar/bars/DP-2.json create mode 100644 .config/waybar/bars/DP-3.json create mode 100644 .config/waybar/config create mode 100644 .config/waybar/lib/common.json create mode 100644 .config/waybar/lib/components/audio.json create mode 100644 .config/waybar/lib/components/calendar.json create mode 100644 .config/waybar/lib/components/clock.json create mode 100644 .config/waybar/lib/components/cpu.json create mode 100644 .config/waybar/lib/components/gpu.json create mode 100644 .config/waybar/lib/components/language.json create mode 100644 .config/waybar/lib/components/memory.json create mode 100644 .config/waybar/lib/components/mpris.json create mode 100644 .config/waybar/lib/components/notifications.json create mode 100644 .config/waybar/lib/components/tray.json create mode 100644 .config/waybar/lib/components/workspaces.json create mode 100644 .config/waybar/mocha.css create mode 100644 .config/waybar/style.css diff --git a/.config/anyrun/.vscode/settings.json b/.config/anyrun/.vscode/settings.json new file mode 100644 index 0000000..c153187 --- /dev/null +++ b/.config/anyrun/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.ron": "rust", + "*.toml": "toml" + } +} diff --git a/.config/anyrun/applications.ron b/.config/anyrun/applications.ron new file mode 100644 index 0000000..a9c6943 --- /dev/null +++ b/.config/anyrun/applications.ron @@ -0,0 +1,8 @@ +Config( + // Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf + desktop_actions: false, + max_entries: 5, + // The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used + // to determine what terminal to use. + terminal: Some("kitty"), +) diff --git a/.config/anyrun/config.ron b/.config/anyrun/config.ron new file mode 100644 index 0000000..bde6735 --- /dev/null +++ b/.config/anyrun/config.ron @@ -0,0 +1,47 @@ +Config( + // Position/size fields use an enum for the value, it can be either: + // Absolute(n): The absolute value in pixels + // Fraction(n): A fraction of the width or height of the full screen (depends on exclusive zones and the settings related to them) window respectively + + // The horizontal position, adjusted so that Relative(0.5) always centers the runner + x: Fraction(0.5), + + // The vertical position, works the same as `x` + y: Absolute(64), + + // The width of the runner + width: Absolute(800), + + // The minimum height of the runner, the runner will expand to fit all the entries + height: Absolute(0), + + // Hide match and plugin info icons + hide_icons: false, + + // ignore exclusive zones, f.e. Waybar + ignore_exclusive_zones: false, + + // Layer shell layer: Background, Bottom, Top, Overlay + layer: Overlay, + + // Hide the plugin info panel + hide_plugin_info: true, + + // Close window when a click outside the main box is received + close_on_click: true, + + // Show search results immediately when Anyrun starts + show_results_immediately: true, + + // Limit amount of entries shown in total + max_entries: None, + + // List of plugins to be loaded by default, can be specified with a relative path to be loaded from the + // `/plugins` directory or with an absolute path to just load the file the path points to. + plugins: [ + "libapplications.so", + "libsymbols.so", + "librink.so", + "libtranslate.so", + ], +) diff --git a/.config/anyrun/style.css b/.config/anyrun/style.css new file mode 100644 index 0000000..034b801 --- /dev/null +++ b/.config/anyrun/style.css @@ -0,0 +1,25 @@ +#window { + background-color: rgba(0, 0, 0, 0); +} + +box#main { + border-radius: 10px; + background-color: @theme_bg_color; +} + +list#main { + background-color: rgba(0, 0, 0, 0); + border-radius: 10px; +} + +list#plugin { + background-color: rgba(0, 0, 0, 0); +} + +label#match-desc { + font-size: 10px; +} + +label#plugin { + font-size: 14px; +} \ No newline at end of file diff --git a/.config/anyrun/symbols.ron b/.config/anyrun/symbols.ron new file mode 100644 index 0000000..915c121 --- /dev/null +++ b/.config/anyrun/symbols.ron @@ -0,0 +1,10 @@ +Config( + // The prefix that the search needs to begin with to yield symbol results + prefix: "", + // Custom user defined symbols to be included along the unicode symbols + symbols: { + // "name": "text to be copied" + "shrug": "¯\\_(ツ)_/¯", + }, + max_entries: 5, +) diff --git a/.config/waybar/bars/DP-1.json b/.config/waybar/bars/DP-1.json new file mode 100644 index 0000000..96b6390 --- /dev/null +++ b/.config/waybar/bars/DP-1.json @@ -0,0 +1,29 @@ +{ + "reload_style_on_change": true, + "include": [ + "~/.config/waybar/lib/components/workspaces.json", + "~/.config/waybar/lib/components/tray.json", + "~/.config/waybar/lib/components/notifications.json", + "~/.config/waybar/lib/components/cpu.json", + "~/.config/waybar/lib/components/gpu.json", + "~/.config/waybar/lib/components/memory.json", + "~/.config/waybar/lib/components/audio.json", + "~/.config/waybar/lib/components/calendar.json", + "~/.config/waybar/lib/components/clock.json" + ], + "modules-left": [ + "hyprland/workspaces", + "tray" + ], + "modules-center": [ + ], + "modules-right": [ + "custom/notification", + "cpu", + "custom/gpu", + "memory", + "pulseaudio", + "clock#calendar", + "clock" + ] +} diff --git a/.config/waybar/bars/DP-2.json b/.config/waybar/bars/DP-2.json new file mode 100644 index 0000000..1120caf --- /dev/null +++ b/.config/waybar/bars/DP-2.json @@ -0,0 +1,23 @@ +{ + "reload_style_on_change": true, + "include": [ + "~/.config/waybar/lib/components/workspaces.json", + "~/.config/waybar/lib/components/tray.json", + "~/.config/waybar/lib/components/language.json", + "~/.config/waybar/lib/components/audio.json", + "~/.config/waybar/lib/components/calendar.json", + "~/.config/waybar/lib/components/clock.json" + ], + "modules-left": [ + "hyprland/workspaces", + "tray" + ], + "modules-center": [ + ], + "modules-right": [ + "hyprland/language", + "pulseaudio", + "clock#calendar", + "clock" + ] +} diff --git a/.config/waybar/bars/DP-3.json b/.config/waybar/bars/DP-3.json new file mode 100644 index 0000000..f7af1bc --- /dev/null +++ b/.config/waybar/bars/DP-3.json @@ -0,0 +1,24 @@ +{ + "reload_style_on_change": true, + "include": [ + "~/.config/waybar/lib/components/workspaces.json", + "~/.config/waybar/lib/components/mpris.json", + "~/.config/waybar/lib/components/notifications.json", + "~/.config/waybar/lib/components/calendar.json", + "~/.config/waybar/lib/components/clock.json" + ], + "modules-left": [ + "hyprland/workspaces", + "mpris" + ], + "modules-center": [ + ], + "modules-right": [ + "custom/notification", + "clock#calendar", + "clock" + ], + "mpris": { + "dynamic-len": 65 + } +} diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..37f0b90 --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,23 @@ +[ + { + "output": ["DP-1"], + "include": [ + "~/.config/waybar/lib/common.json", + "~/.config/waybar/bars/DP-1.json" + ] + }, + { + "output": ["DP-2"], + "include": [ + "~/.config/waybar/lib/common.json", + "~/.config/waybar/bars/DP-2.json" + ] + }, + { + "output": ["DP-3"], + "include": [ + "~/.config/waybar/lib/common.json", + "~/.config/waybar/bars/DP-3.json" + ] + } +] diff --git a/.config/waybar/lib/common.json b/.config/waybar/lib/common.json new file mode 100644 index 0000000..9e89618 --- /dev/null +++ b/.config/waybar/lib/common.json @@ -0,0 +1,9 @@ +{ + "layer": "bottom", + "position": "top", + "spacing": 1, + "exclusive": true, + "gtk-layer-shell": true, + "passthrough": false, + "fixed-center": true +} diff --git a/.config/waybar/lib/components/audio.json b/.config/waybar/lib/components/audio.json new file mode 100644 index 0000000..ef69dba --- /dev/null +++ b/.config/waybar/lib/components/audio.json @@ -0,0 +1,14 @@ +{ + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": " ", + "format-icons": { + "default": [ + "", + "", + "" + ] + }, + "on-click": "pavucontrol" + } +} diff --git a/.config/waybar/lib/components/calendar.json b/.config/waybar/lib/components/calendar.json new file mode 100644 index 0000000..7ec3d9f --- /dev/null +++ b/.config/waybar/lib/components/calendar.json @@ -0,0 +1,18 @@ +{ + "clock#calendar": { + "format": " {:L%d/%m}", + "calendar": { + "format": { + "days": "{}", + "months": "{}", + "today": "{}", + "weekdays": "{}", + "weeks": "W{}" + }, + "mode": "month", + "mode-mon-col": 1, + "on-scroll": 1 + }, + "tooltip-format": "{calendar}" + } +} diff --git a/.config/waybar/lib/components/clock.json b/.config/waybar/lib/components/clock.json new file mode 100644 index 0000000..d7084aa --- /dev/null +++ b/.config/waybar/lib/components/clock.json @@ -0,0 +1,6 @@ +{ + "clock": { + "tooltip": false, + "format": " {:%H:%M}" + } +} diff --git a/.config/waybar/lib/components/cpu.json b/.config/waybar/lib/components/cpu.json new file mode 100644 index 0000000..0d1978b --- /dev/null +++ b/.config/waybar/lib/components/cpu.json @@ -0,0 +1,8 @@ +{ + "cpu": { + "interval": 10, + "format": " {usage}%", + "max-length": 10, + "tooltip": false + } +} diff --git a/.config/waybar/lib/components/gpu.json b/.config/waybar/lib/components/gpu.json new file mode 100644 index 0000000..2332bda --- /dev/null +++ b/.config/waybar/lib/components/gpu.json @@ -0,0 +1,9 @@ +{ + "custom/gpu": { + "exec": "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits", + "format": "󰊴 {}%", + "return-type": "", + "interval": 5, + "tooltip": false + } +} diff --git a/.config/waybar/lib/components/language.json b/.config/waybar/lib/components/language.json new file mode 100644 index 0000000..20d2d85 --- /dev/null +++ b/.config/waybar/lib/components/language.json @@ -0,0 +1,8 @@ +{ + "hyprland/language": { + "format": " {}", + "format-en": "QW", + "format-fr": "AZ", + "keyboard-name": "logitech-g512-rgb-mechanical-gaming-keyboard" + } +} diff --git a/.config/waybar/lib/components/memory.json b/.config/waybar/lib/components/memory.json new file mode 100644 index 0000000..dd0b1cb --- /dev/null +++ b/.config/waybar/lib/components/memory.json @@ -0,0 +1,7 @@ +{ + "memory": { + "interval": 30, + "format": " {}%", + "max-length": 10 + } +} diff --git a/.config/waybar/lib/components/mpris.json b/.config/waybar/lib/components/mpris.json new file mode 100644 index 0000000..0be67d9 --- /dev/null +++ b/.config/waybar/lib/components/mpris.json @@ -0,0 +1,15 @@ +{ + "mpris": { + "format": "{player_icon} {dynamic}", + "format-paused": "{player_icon} {dynamic}", + "dynamic-order": ["title", "artist"], + "player-icons": { + "default": "" + }, + "status-icons": { + "playing": "", + "paused": "" + }, + "tooltip": false + } +} diff --git a/.config/waybar/lib/components/notifications.json b/.config/waybar/lib/components/notifications.json new file mode 100644 index 0000000..c55fcde --- /dev/null +++ b/.config/waybar/lib/components/notifications.json @@ -0,0 +1,15 @@ +{ + "custom/notification": { + "escape": true, + "exec": "swaync-client -swb", + "exec-if": "which swaync-client", + "format": "{icon}", + "format-icons": { + "none": "󰅺", + "notification": "󰡟" + }, + "on-click": "sleep 0.1 && swaync-client -t -sw", + "return-type": "json", + "tooltip": false + } +} diff --git a/.config/waybar/lib/components/tray.json b/.config/waybar/lib/components/tray.json new file mode 100644 index 0000000..d28ed5d --- /dev/null +++ b/.config/waybar/lib/components/tray.json @@ -0,0 +1,5 @@ +{ + "tray": { + "spacing": 10 + } +} diff --git a/.config/waybar/lib/components/workspaces.json b/.config/waybar/lib/components/workspaces.json new file mode 100644 index 0000000..f88b57b --- /dev/null +++ b/.config/waybar/lib/components/workspaces.json @@ -0,0 +1,10 @@ +{ + "hyprland/workspaces": { + "show-special": true, + "persistent-workspaces": { + "1": [1], + "2": [2], + "3": [3] + } + } +} diff --git a/.config/waybar/mocha.css b/.config/waybar/mocha.css new file mode 100644 index 0000000..db1af19 --- /dev/null +++ b/.config/waybar/mocha.css @@ -0,0 +1,40 @@ +/* +* +* Catppuccin Mocha palette +* Maintainer: rubyowo +* +*/ + +@define-color mantle #181825; +@define-color crust #11111b; + +@define-color text #cdd6f4; +@define-color subtext0 #a6adc8; +@define-color subtext1 #bac2de; + +/* @define-color surface0 #313244; */ +@define-color surface0 rgba(38,38,43,0.9); +@define-color surface1 #222226; +@define-color surface2 #585b70; + +@define-color overlay0 #6c7086; +@define-color overlay1 #7f849c; +@define-color overlay2 #9399b2; + +@define-color white #f2f2f2; +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color sapphire #74c7ec; +/* @define-color sky #89dceb; */ +@define-color sky #007dff; +@define-color teal #94e2d5; +@define-color green #a6e3a1; +@define-color yellow #f9e2af; +@define-color peach #fab387; +@define-color maroon #eba0ac; +@define-color red #f38ba8; +@define-color mauve #cba6f7; +@define-color pink #f5c2e7; +@define-color flamingo #f2cdcd; +@define-color rosewater #f5e0dc; + diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..60102fc --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,83 @@ +@import "mocha.css"; + +* { + min-height: 0; + min-width: 0; + font-family: "FiraCode Nerd Font Propo"; + font-size: 16px; + font-weight: 600; +} + +#waybar { + background: transparent; + color: @text; +} + +tooltip { + background-color: @surface0; + box-shadow: 0 0 10px @surface1; +} + +#workspaces { + margin-left: 0.5rem; +} + +#workspaces button { + padding: 0.1rem 0.6rem; + margin: 0.4rem 0.25rem 0rem 0.25rem; + border-radius: 4px; + color: @white; + background-color: @surface0; +} + +#workspaces button.active { + background-color: @sky; +} + +#workspaces button:hover { + color: @sky; +} + +#mpris, +#tray, +#cpu, +#custom-gpu, +#custom-gpu-temp, +#memory, +#pulseaudio, +#custom-notification, +#clock, +#mpris, +#language, +#tray { + padding: 0.1rem 0.6rem; + margin: 0.4rem 0.25rem 0rem 0.25rem; + border-radius: 4px; + border: 2px solid @surface1; + background-color: @surface0; +} + +#clock { + color: @rosewater; +} + +#clock.simpleclock { + margin-right: 0.8rem; +} + +#memory { + color: @green; +} + +#custom-gpu { + color: @yellow; +} + +#cpu { + color: @blue; +} + +#pulseaudio, +#mpris { + color: @teal; +}