mirror of
https://github.com/hydroxycarbamide/dotfiles.git
synced 2025-05-04 20:09:08 -04:00
Add waybar
This commit is contained in:
parent
e0c17f71e2
commit
1ff2d77058
19 changed files with 1043 additions and 0 deletions
BIN
dot_config/waybar/Normal.png
(Stored with Git LFS)
Normal file
BIN
dot_config/waybar/Normal.png
(Stored with Git LFS)
Normal file
Binary file not shown.
29
dot_config/waybar/README.md
Normal file
29
dot_config/waybar/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Getting Started
|
||||
|
||||
## Dependancies
|
||||
|
||||
TODO: wip sorry
|
||||
|
||||
- `playerctl`
|
||||
- `jq`
|
||||
- for update tracking: `paru` (modify `modules/updates.sh` for a different AUR helper)
|
||||
|
||||
Optionals (unused):
|
||||
- `zscroll`
|
||||
|
||||
##
|
||||
|
||||
You know the drills : download and extract to your `${XDG_CONFIG_HOME}/waybar`
|
||||
|
||||
# Screenshots
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
screenshot by BLACKmeow(x:@miji_black, p:91709880)
|
||||
|
12
dot_config/waybar/archlinux.svg
Normal file
12
dot_config/waybar/archlinux.svg
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="65" height="65">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="54.638%" x2="28.129%" y1="26.924%" y2="79.519%">
|
||||
<stop offset="0" stop-color="#fff" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="#fff" stop-opacity=".27451"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill="#1793D1" d="M32.253.20991c-2.849 6.9843-4.579 11.559-7.75 18.336 1.944 2.061 4.334 4.453 8.211 7.164-4.168-1.715-7.009-3.432-9.133-5.219-4.059 8.47-10.423 20.531-23.328 43.719 10.14-5.854 18.002-9.466 25.328-10.844-.314-1.351-.481-2.819-.469-4.344l.008-.32c.161-6.498 3.542-11.495 7.547-11.156 4.004.339 7.122 5.884 6.961 12.383-.031 1.224-.173 2.4-.414 3.492 7.247 1.418 15.034 5.013 25.039 10.789-1.973-3.632-3.74-6.905-5.422-10.024-2.649-2.053-5.411-4.724-11.047-7.617 3.874 1.007 6.65 2.171 8.812 3.469-17.098-31.835-18.48-36.068-24.343-49.828V.20982z"/>
|
||||
<path fill="#fff" fill-opacity=".16568" d="M50.266 38.249C36.394 19.422 33.179 4.247 32.364.624c7.4 17.067 7.349 17.277 17.902 37.625z"/>
|
||||
<path fill="url(#a)" d="M32.378.45992c-.36.88448-.7 1.7468-1.032 2.5625-.364.8946-.718 1.7565-1.062 2.5938s-.693 1.6309-1.031 2.4375c-.339.8065-.654 1.6039-1 2.4063-.346.802-.726 1.613-1.094 2.437-.368.825-.752 1.658-1.156 2.532-.404.873-.828 1.801-1.282 2.75-.061.128-.124.276-.187.406 1.939 2.054 4.33 4.427 8.187 7.125-4.167-1.715-7-3.432-9.125-5.219-.11.226-.198.425-.312.656-.42.871-.871 1.733-1.344 2.688-.113.224-.196.427-.312.656-.501 1.004-1.026 2.043-1.594 3.156-.113.22-.228.402-.344.625-.343.667-1.44 2.77-2.562 4.907-.655 1.248-1.169 2.27-1.907 3.656-.209.398-.639 1.195-.75 1.406 8.125-4.573 16.891-11.216 32.813-5.531-.797-1.51-1.562-2.919-2.25-4.25-.688-1.332-1.312-2.571-1.906-3.75s-1.143-2.291-1.657-3.344c-.513-1.053-.989-2.047-1.437-3s-.885-1.87-1.281-2.75c-.397-.879-.766-1.73-1.125-2.562-.359-.833-.695-1.658-1.032-2.469-.336-.8115-.672-1.5896-1-2.4063-.142-.3554-.263-.7338-.406-1.0938-.888-2.0849-1.759-4.1515-2.812-6.625v.00002z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2 KiB |
7
dot_config/waybar/biome.json
Normal file
7
dot_config/waybar/biome.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"json": {
|
||||
"formatter": {
|
||||
"indentStyle": "space"
|
||||
}
|
||||
}
|
||||
}
|
472
dot_config/waybar/config.jsonc
Normal file
472
dot_config/waybar/config.jsonc
Normal file
|
@ -0,0 +1,472 @@
|
|||
{
|
||||
"output": ["DP-1", "HDMI-A-1"],
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 32,
|
||||
"modules-left": [
|
||||
//"hyprland/workspaces",
|
||||
//"sway/workspaces#sway"
|
||||
"river/tags",
|
||||
//"river/layout",
|
||||
|
||||
"group/visualisation"
|
||||
// "custom/media",
|
||||
// "hyprland/window",
|
||||
],
|
||||
"modules-center": [
|
||||
"group/tray-group",
|
||||
"wlr/taskbar"
|
||||
// "mpd",
|
||||
],
|
||||
"modules-right": [
|
||||
"group/hardware",
|
||||
"group/audio",
|
||||
"network",
|
||||
"group/rightmost"
|
||||
],
|
||||
"group/tray-group": {
|
||||
"orientation": "horizontal",
|
||||
"modules": [
|
||||
"tray",
|
||||
"gamemode"
|
||||
// "keyboard-state",
|
||||
]
|
||||
},
|
||||
"group/mpdris": {
|
||||
"orientation": "horizontal",
|
||||
"modules": [
|
||||
// "image#album-art",
|
||||
"mpris"
|
||||
]
|
||||
},
|
||||
"group/visualisation": {
|
||||
"orientation": "horizontal",
|
||||
"drawer": {
|
||||
"transition-duration": 500,
|
||||
"children-class": "visualiser",
|
||||
"transition-left-to-right": true
|
||||
},
|
||||
"modules": ["cava", "group/mpdris"]
|
||||
},
|
||||
"group/audio": {
|
||||
"orientation": "horizontal",
|
||||
"drawer": {
|
||||
"transition-duration": 500,
|
||||
"children-class": "not-power",
|
||||
"transition-left-to-right": false
|
||||
},
|
||||
"modules": [
|
||||
"pulseaudio"
|
||||
// "pulseaudio/slider"
|
||||
]
|
||||
},
|
||||
"group/hardware": {
|
||||
"orientation": "horizontal",
|
||||
"drawer": {
|
||||
"transition-duration": 500,
|
||||
"children-class": "not-power",
|
||||
"transition-left-to-right": false
|
||||
},
|
||||
"modules": ["temperature", "memory", "cpu", "temperature#amdgpu"]
|
||||
},
|
||||
"group/rightmost": {
|
||||
"orientation": "horizontal",
|
||||
"modules": [
|
||||
"custom/notification",
|
||||
"custom/updates",
|
||||
"clock"
|
||||
// "custom/logo"
|
||||
]
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"active-only": false,
|
||||
"disable-scroll": true,
|
||||
"all-outputs": false,
|
||||
"format": "{name}",
|
||||
"sort-by-number": true,
|
||||
"format-icons": {
|
||||
"active": "",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"sway/workspaces#sway": {
|
||||
"current-only": false,
|
||||
"disable-scroll": true,
|
||||
"all-outputs": false,
|
||||
"format": "{name}: {icon}",
|
||||
"numeric-first": true,
|
||||
"format-icons": {
|
||||
"1": " ",
|
||||
"2": " ",
|
||||
"3": " ",
|
||||
"4": " ",
|
||||
"5": " ",
|
||||
"6": " ",
|
||||
"7": " ",
|
||||
"8": " ",
|
||||
"9": " ",
|
||||
"default": " "
|
||||
}
|
||||
// "persistent-workspaces": {
|
||||
// "1": ["DP-1"],
|
||||
// "2": ["DP-1"],
|
||||
// "3": ["DP-1"],
|
||||
// "4": ["DP-1"],
|
||||
// "5": ["DP-1"],
|
||||
// "6": ["HDMI-A-1"],
|
||||
// "7": ["HDMI-A-1"],
|
||||
// "8": ["HDMI-A-1"],
|
||||
// "9": ["HDMI-A-1"],
|
||||
// "10": ["HDMI-A-1"]
|
||||
// }
|
||||
},
|
||||
"river/tags": {
|
||||
"num-tags": 8,
|
||||
"set-tags": [
|
||||
// 00000001
|
||||
2147483649,
|
||||
|
||||
// 00000010
|
||||
2147483650,
|
||||
|
||||
// 00000100
|
||||
2147483652,
|
||||
|
||||
// 00001000
|
||||
2147483656,
|
||||
|
||||
// 00010000
|
||||
2147483664,
|
||||
|
||||
// 00100000
|
||||
2147483680,
|
||||
|
||||
// 01000000
|
||||
2147483712,
|
||||
|
||||
// 10000000
|
||||
2147483776
|
||||
],
|
||||
"tag-labels": [" ", " ", " ", " ", " ", " ", " ", " "]
|
||||
},
|
||||
"river/layout": {
|
||||
"format": "{}",
|
||||
"min-length": 4,
|
||||
"align": "right"
|
||||
},
|
||||
"wlr/taskbar": {
|
||||
"all-outputs": false,
|
||||
"format": "{icon}",
|
||||
"icon-size": 14,
|
||||
"icon-theme": "Papirus-Dark",
|
||||
"active-first": false,
|
||||
"tooltip-format": "{title} - {app_id}",
|
||||
"on-click": "activate",
|
||||
"on-click-middle": "close",
|
||||
"ignore-list": [],
|
||||
"app_ids-mapping": {
|
||||
"firefoxdeveloperedition": "firefox-developer-edition"
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 12,
|
||||
"spacing": 10
|
||||
},
|
||||
"custom/media": {
|
||||
"format": "{icon} {}",
|
||||
"max-length": 40,
|
||||
"escape": true,
|
||||
"exec": "$HOME/.config/waybar/modules/mpris/scroll_status.sh NOBAR",
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-click-middle": "playerctl previous",
|
||||
"on-click-right": "playerctl next"
|
||||
},
|
||||
"mpd": {
|
||||
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",
|
||||
"format-disconnected": "Disconnected",
|
||||
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} Stopped",
|
||||
"interval": 10,
|
||||
"consume-icons": {
|
||||
"on": " " // Icon shows only when "consume" is on
|
||||
},
|
||||
"random-icons": {
|
||||
"off": "<span color=\"#f53c3c\"></span> ", // Icon grayed out when "random" is off
|
||||
"on": " "
|
||||
},
|
||||
"repeat-icons": {
|
||||
"on": " "
|
||||
},
|
||||
"single-icons": {
|
||||
"on": "1 "
|
||||
},
|
||||
"state-icons": {
|
||||
"paused": "",
|
||||
"playing": ""
|
||||
},
|
||||
"tooltip-format": "MPD (connected)",
|
||||
"tooltip-format-disconnected": "MPD (disconnected)"
|
||||
},
|
||||
"mpris": {
|
||||
"markup": true,
|
||||
"interval": 5,
|
||||
// "format": "{player_icon} <span>{title}</span> - <span>{artist}</span>\n<i>{album}</i>",
|
||||
// "format-paused": "{player_icon} <span>{title}</span> - <span>{artist}</span>\n<i>{album}</i>",
|
||||
"format": "{player_icon} {dynamic}",
|
||||
"format-paused": "{status_icon} <i>{dynamic}</i>",
|
||||
"title-len": 30,
|
||||
"dynamic-len": 60,
|
||||
"player-icons": {
|
||||
"default": " ",
|
||||
"mpv": " ",
|
||||
"plasma-browser-integration": " ",
|
||||
"firefox": " ",
|
||||
"spotify": " "
|
||||
},
|
||||
"status-icons": {
|
||||
"paused": "▶"
|
||||
}
|
||||
// "ignored-players": ["firefox"]
|
||||
},
|
||||
"memory": {
|
||||
"interval": 30,
|
||||
"format": " {used:0.1f}G/{total:0.1f}G"
|
||||
},
|
||||
"cpu": {
|
||||
"interval": 1,
|
||||
"max-length": 15,
|
||||
// "format": " {}%",
|
||||
"format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}",
|
||||
"format-icons": [
|
||||
"<span color='#a6da95'>▁</span>", // green
|
||||
"<span color='#8aadf4'>▂</span>", // blue
|
||||
"<span color='#b7bdf8'>▃</span>", // white
|
||||
"<span color='#b7bdf8'>▄</span>", // white
|
||||
"<span color='#eed49f'>▅</span>", // yellow
|
||||
"<span color='#f5a97f'>▆</span>", // yellow
|
||||
"<span color='#ee99a0'>▇</span>", // orange
|
||||
"<span color='#ed8796'>█</span>" // red
|
||||
]
|
||||
},
|
||||
"custom/notification": {
|
||||
"tooltip": false,
|
||||
"format": "{icon} ",
|
||||
"format-icons": {
|
||||
"notification": "",
|
||||
"none": "",
|
||||
"dnd-notification": "",
|
||||
"dnd-none": "",
|
||||
"inhibited-notification": "",
|
||||
"inhibited-none": "",
|
||||
"dnd-inhibited-notification": "",
|
||||
"dnd-inhibited-none": ""
|
||||
},
|
||||
"return-type": "json",
|
||||
"exec-if": "which swaync-client",
|
||||
"exec": "swaync-client -swb",
|
||||
"on-click-release": "swaync-client -t -sw",
|
||||
"on-click-middle-release": "sleep 0.150 && swaync-client -d -sw",
|
||||
"escape": true
|
||||
},
|
||||
"gamemode": {
|
||||
"format": "{glyph}",
|
||||
"format-alt": "{glyph} {count}",
|
||||
"glyph": " ",
|
||||
"hide-not-running": true,
|
||||
"use-icon": true,
|
||||
"icon-name": "input-gaming-symbolic",
|
||||
"icon-spacing": 4,
|
||||
"icon-size": 20,
|
||||
"tooltip": true,
|
||||
"tooltip-format": "Games running: {count}"
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%R}",
|
||||
// "format": "{:%a %d %b %R}",
|
||||
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
||||
"calendar": {
|
||||
"mode": "month",
|
||||
"mode-mon-col": 3,
|
||||
"weeks-pos": "right",
|
||||
"on-scroll": 1,
|
||||
"on-click-right": "mode",
|
||||
"format": {
|
||||
"months": "<span color='#b7bdf8'><b>{}</b></span>",
|
||||
"days": "<span color='#cad3f5'><b>{}</b></span>",
|
||||
"weeks": "<span color='#8bd5ca'><b>W{}</b></span>",
|
||||
"weekdays": "<span color='#8aadf4'><b>{}</b></span>",
|
||||
"today": "<span color='#ed8796'><b><u>{}</u></b></span>"
|
||||
}
|
||||
}
|
||||
},
|
||||
"temperature": {
|
||||
"thermal-zone": 0,
|
||||
"hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input",
|
||||
"critical-threshold": 80,
|
||||
"format-critical": "{icon}",
|
||||
"format": "{icon}",
|
||||
"tooltip-format": "CPU: {temperatureC}°C",
|
||||
"format-icons": [
|
||||
"<span color='#a6da95'> ▁</span>", // green
|
||||
"<span color='#8aadf4'> ▂</span>", // blue
|
||||
"<span color='#b7bdf8'> ▃</span>", // white
|
||||
"<span color='#b7bdf8'> ▄</span>", // white
|
||||
"<span color='#eed49f'> ▅</span>", // yellow
|
||||
"<span color='#f5a97f'> ▆</span>", // yellow
|
||||
"<span color='#ee99a0'> ▇</span>", // orange
|
||||
"<span color='#ed8796'> █</span>" // red
|
||||
]
|
||||
},
|
||||
"temperature#amdgpu": {
|
||||
"thermal-zone": 0,
|
||||
"hwmon-path": "/sys/class/hwmon/hwmon0/temp1_input",
|
||||
"critical-threshold": 100,
|
||||
"format-critical": "{icon}",
|
||||
"format": "{icon}",
|
||||
"tooltip-format": "GPU (edge): {temperatureC}°C",
|
||||
"format-icons": [
|
||||
"<span color='#a6da95'> ▁</span>", // green
|
||||
"<span color='#8aadf4'> ▂</span>", // blue
|
||||
"<span color='#b7bdf8'> ▃</span>", // white
|
||||
"<span color='#b7bdf8'> ▄</span>", // white
|
||||
"<span color='#eed49f'> ▅</span>", // yellow
|
||||
"<span color='#f5a97f'> ▆</span>", // yellow
|
||||
"<span color='#ee99a0'> ▇</span>", // orange
|
||||
"<span color='#ed8796'> █</span>" // red
|
||||
]
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "",
|
||||
"format-ethernet": "",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": " Disconnected",
|
||||
"tooltip-format-ethernet": "{ifname} | {ipaddr}/{cidr} | Down Speed: {bandwidthDownBits}, Up Speed: {bandwidthUpBits}",
|
||||
"tooltip-format-wifi": "{ifname} | {ipaddr}/{cidr} | {essid} | Signal Strenght: {signalStrength}% | Down Speed: {bandwidthDownBits}, Up Speed: {bandwidthUpBits}",
|
||||
"on-click": "networkmanager_dmenu"
|
||||
},
|
||||
"image#album-art": {
|
||||
"exec": "~/.config/waybar/modules/mpris/album_art.sh",
|
||||
"size": 20,
|
||||
"interval": 30
|
||||
},
|
||||
"custom/updates": {
|
||||
"interval": 120,
|
||||
"return-type": "string",
|
||||
"exec": "~/.config/waybar/modules/updates.sh",
|
||||
"tooltip": false,
|
||||
"on-click": "setsid -f foot -e paru -Syyu"
|
||||
},
|
||||
"custom/downloads": {
|
||||
"interval": 600,
|
||||
"return-type": "string",
|
||||
"exec": "~/.config/waybar/modules/downloads.py",
|
||||
"tooltip": false,
|
||||
"on-click": "xdg-open https://github.com/xelphlinux/xelph-iso"
|
||||
},
|
||||
"custom/logo": {
|
||||
"format": " ",
|
||||
"tooltip": false,
|
||||
"on-click-release": "rofi -show power-menu -modi power-menu:rofi-power-menu"
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{volume}%",
|
||||
"format-muted": "",
|
||||
"on-click": "helvum",
|
||||
"max-volume": 150,
|
||||
"scroll-step": 0.2
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{icon}",
|
||||
"format-bluetooth": "{icon} ",
|
||||
"format-muted": " ",
|
||||
"tooltip-format": "{icon} {volume}% {format_source} {desc}",
|
||||
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||
"on-click-middle": "helvum",
|
||||
"on-click-right": "pavucontrol",
|
||||
"scroll-step": 5,
|
||||
// "format-icons": {
|
||||
// "headphone": "",
|
||||
// "hands-free": "",
|
||||
// "headset": "",
|
||||
// "phone": "",
|
||||
// "portable": "",
|
||||
// "car": "",
|
||||
// "default": ["", "", ""]
|
||||
// },
|
||||
"format-icons": [
|
||||
"<span color='#8aadf4'> ▁</span>", // green
|
||||
"<span color='#7dc4e4'> ▂</span>", // blue
|
||||
"<span color='#91d7e3'> ▃</span>", // white
|
||||
"<span color='#8bd5ca'> ▄</span>", // white
|
||||
"<span color='#a6da95'> ▅</span>", // yellow
|
||||
"<span color='#eed49f'> ▆</span>", // yellow
|
||||
"<span color='#f5a97f'> ▇</span>", // orange
|
||||
"<span color='#ed8796'> █</span>" // red
|
||||
],
|
||||
"ignored-sinks": ["Easy Effects Sink"]
|
||||
},
|
||||
"pulseaudio/slider": {
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"orientation": "horizontal"
|
||||
},
|
||||
"cava": {
|
||||
//"cava_config": "$HOME/.config/cava/config",
|
||||
"framerate": 144,
|
||||
"hide_on_silence": false,
|
||||
"autosens": 1,
|
||||
"bars": 12,
|
||||
"lower_cutoff_freq": 50,
|
||||
"higher_cutoff_freq": 10000,
|
||||
"method": "pulse",
|
||||
"source": "auto",
|
||||
"stereo": true,
|
||||
"reverse": false,
|
||||
"bar_delimiter": 0,
|
||||
"monstercat": false,
|
||||
"waves": false,
|
||||
"noise_reduction": 0.77,
|
||||
"input_delay": 2,
|
||||
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
|
||||
"actions": {
|
||||
// "on-click-right": "mode"
|
||||
}
|
||||
},
|
||||
"keyboard-state": {
|
||||
"numlock": false,
|
||||
"capslock": true,
|
||||
"format": {
|
||||
"numlock": "N {icon}",
|
||||
"capslock": "{icon}"
|
||||
},
|
||||
"format-icons": {
|
||||
"locked": "",
|
||||
"unlocked": ""
|
||||
}
|
||||
},
|
||||
"hyprland/window": {
|
||||
"format": "{title}",
|
||||
"separate-outputs": false
|
||||
},
|
||||
"privacy": {
|
||||
"icon-spacing": 4,
|
||||
"icon-size": 18,
|
||||
"transition-duration": 250,
|
||||
"modules": [
|
||||
{
|
||||
"type": "screenshare",
|
||||
"tooltip": true,
|
||||
"tooltip-icon-size": 24
|
||||
},
|
||||
{
|
||||
"type": "audio-out",
|
||||
"tooltip": true,
|
||||
"tooltip-icon-size": 24
|
||||
},
|
||||
{
|
||||
"type": "audio-in",
|
||||
"tooltip": true,
|
||||
"tooltip-icon-size": 24
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
BIN
dot_config/waybar/fullscreen.png
(Stored with Git LFS)
Normal file
BIN
dot_config/waybar/fullscreen.png
(Stored with Git LFS)
Normal file
Binary file not shown.
31
dot_config/waybar/modules/executable_calendar.sh
Normal file
31
dot_config/waybar/modules/executable_calendar.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#! /bin/bash
|
||||
|
||||
send_notification() {
|
||||
TODAY=$(date '+%-d')
|
||||
HEAD=$(cal "$1" | head -n1)
|
||||
BODY=$(cal "$1" | tail -n7 | sed -z "s|$TODAY|<u><b>$TODAY</b></u>|1")
|
||||
notify-send -h string:x-canonical-private-synchronous:calendar \
|
||||
"$HEAD" "$BODY$FOOT" -u NORMAL
|
||||
}
|
||||
|
||||
handle_action() {
|
||||
echo "$DIFF" > "$TMP"
|
||||
if [ "$DIFF" -ge 0 ]; then
|
||||
send_notification "+$DIFF months"
|
||||
else
|
||||
send_notification "$((-DIFF)) months ago"
|
||||
fi
|
||||
}
|
||||
|
||||
TMP=${XDG_RUNTIME_DIR:-/tmp}/"$UID"_calendar_notification_month
|
||||
touch "$TMP"
|
||||
|
||||
DIFF=$(<"$TMP")
|
||||
|
||||
case $1 in
|
||||
"curr") DIFF=0;;
|
||||
"next") DIFF=$((DIFF+1));;
|
||||
"prev") DIFF=$((DIFF-1));;
|
||||
esac
|
||||
|
||||
handle_action
|
2
dot_config/waybar/modules/executable_datetime.sh
Normal file
2
dot_config/waybar/modules/executable_datetime.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
echo "$(date '+%A, %d/%m/%y %r') "
|
37
dot_config/waybar/modules/executable_downloads.py
Normal file
37
dot_config/waybar/modules/executable_downloads.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/python3
|
||||
|
||||
import requests
|
||||
from bs4 import BeautifulSoup as soup
|
||||
|
||||
class OS:
|
||||
|
||||
def __init__(self, url, os):
|
||||
self.url = url
|
||||
self.os = os
|
||||
|
||||
def mk_request(self):
|
||||
try:
|
||||
with requests.get(self.url) as response:
|
||||
page = soup(response.text, 'html.parser')
|
||||
return page
|
||||
except requests.HTTPError as err:
|
||||
print(f"Error! {err}")
|
||||
|
||||
def num_downloads(self):
|
||||
page = OS(self.url, self.os).mk_request()
|
||||
|
||||
for downloads in page.find('title'):
|
||||
fmt_name = self.os.split('-')[0]
|
||||
fmt_dl = downloads.text.split(': ')[1]
|
||||
# if fmt_dl.endswith('k'):
|
||||
# return int(fmt_dl.replace('k', '000'))
|
||||
# else:
|
||||
return fmt_dl
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
base_url = "https://img.shields.io/github/downloads/"
|
||||
distros = [('xelphlinux', 'xelph-iso')]
|
||||
|
||||
for distro in distros:
|
||||
print(f" {OS(f'{base_url}{distro[0]}/{distro[1]}/total?label=downloads',distro[0].capitalize()).num_downloads()}")
|
10
dot_config/waybar/modules/executable_updates.sh
Normal file
10
dot_config/waybar/modules/executable_updates.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
pkg_updates() {
|
||||
updates=$(pacman -Qu | wc -l)
|
||||
aurupdates=$(paru -Qua | wc -l)
|
||||
updates=$((updates + aurupdates))
|
||||
if [ $updates -gt 0 ]; then
|
||||
echo -n " $updates"
|
||||
fi
|
||||
}
|
||||
pkg_updates
|
10
dot_config/waybar/modules/mpris/executable_album_art.bak.sh
Normal file
10
dot_config/waybar/modules/mpris/executable_album_art.bak.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
#!/bin/bash
|
||||
album_art=$(playerctl metadata mpris:artUrl)
|
||||
if [[ -z $album_art ]]
|
||||
then
|
||||
# spotify is dead, we should die to.
|
||||
exit
|
||||
fi
|
||||
curl -s "${album_art}" --output "/tmp/cover.jpeg"
|
||||
echo "/tmp/cover.jpeg"
|
41
dot_config/waybar/modules/mpris/executable_album_art.sh
Normal file
41
dot_config/waybar/modules/mpris/executable_album_art.sh
Normal file
|
@ -0,0 +1,41 @@
|
|||
|
||||
#!/bin/bash
|
||||
|
||||
write_art() {
|
||||
album_art=$(playerctl -p $1 metadata mpris:artUrl)
|
||||
status=$?
|
||||
if [[ -z $album_art || $status -eq 0 ]]
|
||||
then
|
||||
album_art=$(playerctl metadata mpris:artUrl)
|
||||
if [[ -z $album_art ]]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
curl -s "${album_art}" --output "/tmp/cover.jpeg"
|
||||
echo "/tmp/cover.jpeg"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
read -d'\n' -ra PLAYERS <<<"$(playerctl -l 2>/dev/null)"
|
||||
declare -a PAUSED
|
||||
for player in "${PLAYERS[@]}"; do
|
||||
[ "$player" = "playerctld" ] && continue;
|
||||
|
||||
p_status=$(playerctl -p "$player" status 2>/dev/null)
|
||||
|
||||
# if we have one playing, we'll use it and EXIT
|
||||
if [ "$p_status" = "Playing" ]; then
|
||||
write_art "$player"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
[ "$p_status" = "Paused" ] && PAUSED+=("$player")
|
||||
done
|
||||
|
||||
if [ -n "${PAUSED[0]}" ]; then
|
||||
write_art "${PAUSED[0]}"
|
||||
fi
|
76
dot_config/waybar/modules/mpris/executable_get_status.sh
Normal file
76
dot_config/waybar/modules/mpris/executable_get_status.sh
Normal file
|
@ -0,0 +1,76 @@
|
|||
#!/bin/bash
|
||||
|
||||
# The name of polybar bar which houses the main spotify module and the control modules.
|
||||
PARENT_BAR="${1:-music}"
|
||||
PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1)
|
||||
|
||||
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||
|
||||
send_hook() {
|
||||
[ -z "$1" ] && echo "send_hook: missing arg" && exit 1
|
||||
polybar-msg -p "$PARENT_BAR_PID" hook mpris-play-pause "$1" 1>/dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
extract_meta() {
|
||||
grep "$1\W" <<< "$meta" | awk '{$1=$2=""; print $0}' | sed 's/^ *//; s/; */;/g' | paste -s -d/ -
|
||||
}
|
||||
|
||||
# if "icon" given, determine icon. otherwise, print metadata
|
||||
get_info() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: get_info PLAYER [icon]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
meta=$(playerctl -p "$1" metadata)
|
||||
|
||||
# get title
|
||||
title=$(extract_meta title)
|
||||
# if no title, try url e.g. vlc
|
||||
if [ -z "$title" ]; then
|
||||
title=$(extract_meta url)
|
||||
title=$(urldecode "${title##*/}")
|
||||
fi
|
||||
|
||||
# if not "icon", display information and return
|
||||
artist=$(extract_meta artist)
|
||||
[ -z "$artist" ] && artist=$(extract_meta albumArtist)
|
||||
|
||||
if [ -n "$artist" ]; then
|
||||
album=$(extract_meta album)
|
||||
[ -n "$album" ] && echo -n " $album "
|
||||
|
||||
echo -n " $artist "
|
||||
fi
|
||||
|
||||
echo "$title"
|
||||
return 0
|
||||
}
|
||||
|
||||
# manually go through players
|
||||
read -d'\n' -ra PLAYERS <<<"$(playerctl -l 2>/dev/null)"
|
||||
declare -a PAUSED
|
||||
for player in "${PLAYERS[@]}"; do
|
||||
[ "$player" = "playerctld" ] && continue;
|
||||
|
||||
p_status=$(playerctl -p "$player" status 2>/dev/null)
|
||||
|
||||
# if we have one playing, we'll use it and EXIT
|
||||
if [ "$p_status" = "Playing" ]; then
|
||||
send_hook 1
|
||||
get_info "$player" "$2"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
[ "$p_status" = "Paused" ] && PAUSED+=("$player")
|
||||
done
|
||||
|
||||
# if we have a paused, show it otherwise assume there are no players or have all stopped
|
||||
if [ -n "${PAUSED[0]}" ]; then
|
||||
send_hook 2
|
||||
get_info "${PAUSED[0]}" "$2"
|
||||
else
|
||||
[ "$2" = icon ] && echo "none" || echo " no players "
|
||||
fi
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# manually go through players
|
||||
read -d'\n' -ra PLAYERS <<<"$(playerctl -l 2>/dev/null)"
|
||||
declare -a PAUSED
|
||||
for player in "${PLAYERS[@]}"; do
|
||||
[ "$player" = "playerctld" ] && continue;
|
||||
|
||||
p_status=$(playerctl -p "$player" status 2>/dev/null)
|
||||
|
||||
# if we have one playing, we'll use it and EXIT
|
||||
if [ "$p_status" = "Playing" ]; then
|
||||
echo "Playing"
|
||||
exit 0;
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Paused"
|
15
dot_config/waybar/modules/mpris/executable_scroll_status.sh
Normal file
15
dot_config/waybar/modules/mpris/executable_scroll_status.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
cmd="${0%/*}/get_status.sh $1"
|
||||
|
||||
zscroll -l 30 \
|
||||
--scroll-padding "$(printf ' %.0s' {1..8})" \
|
||||
-d 0.5 \
|
||||
-M "${0%/*}/get_status_paused.sh $1" \
|
||||
-m "Playing" "--scroll 1" \
|
||||
-m "Paused" "--scroll 0" \
|
||||
-m "Stopped" "--scroll 0" \
|
||||
-U 5 -u true "$cmd" &
|
||||
|
||||
wait
|
||||
|
29
dot_config/waybar/private_nohup.out
Normal file
29
dot_config/waybar/private_nohup.out
Normal file
|
@ -0,0 +1,29 @@
|
|||
[2024-05-11 22:49:26.897] [info] Using configuration file /home/eric/.config/waybar/config.jsonc
|
||||
[2024-05-11 22:49:26.899] [info] Discovered appearance 'dark'
|
||||
[2024-05-11 22:49:26.899] [info] Using CSS file /home/eric/.config/waybar/style.css
|
||||
[2024-05-11 22:49:26.905] [info] Hyprland IPC starting
|
||||
[2024-05-11 22:49:26.906] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:49:27.724] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:49:28.131] [warning] Waybar has been built without rfkill support.
|
||||
[2024-05-11 22:49:28.191] [warning] Waybar has been built without rfkill support.
|
||||
|
||||
** (waybar:19350): WARNING **: 22:49:28.289: Status Notifier Item with bus name ':1.292' and object path '/org/ayatana/NotificationItem/nm_applet' is already registered
|
||||
[2024-05-11 22:49:28.582] [info] Bar configured (width: 1920, height: 32) for output: HDMI-A-1
|
||||
[2024-05-11 22:49:28.582] [info] Bar configured (width: 1920, height: 32) for output: DP-1
|
||||
[2024-05-11 22:52:59.097] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:52:59.101] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:52:59.101] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:52:59.101] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:52:59.724] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:52:59.724] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:52:59.724] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:52:59.725] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:54:00.819] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:54:00.820] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:54:00.820] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:54:00.821] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:54:07.842] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:54:07.842] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
[2024-05-11 22:54:07.842] [info] Hyprland config reloaded, reinitializing hyprland/workspaces module...
|
||||
[2024-05-11 22:54:07.843] [info] Loading persistent workspaces from Hyprland workspace rules
|
||||
Gdk-Message: 22:54:31.307: Lost connection to Wayland compositor.
|
242
dot_config/waybar/style.css
Normal file
242
dot_config/waybar/style.css
Normal file
|
@ -0,0 +1,242 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: Lexend, FiraCode Nerd Font, "M PLUS 1", Noto Sans CJK JP;
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(24, 25, 38, 0.0);
|
||||
color: white;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: rgba(24, 25, 38, 0.95);
|
||||
border-radius: 5px;
|
||||
border-width: 0px;
|
||||
border-style: solid;
|
||||
border-color: rgb(24, 25, 38);
|
||||
}
|
||||
|
||||
.modules-left,
|
||||
.modules-center,
|
||||
.modules-right,
|
||||
#mpdris {
|
||||
background-color: #1e2030;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.modules-left,
|
||||
.modules-center,
|
||||
.modules-right,
|
||||
#clock,
|
||||
#visualisation,
|
||||
#mpdris,
|
||||
#custom-updates,
|
||||
#layout,
|
||||
#custom-notification.notification
|
||||
{
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
#tray,
|
||||
widget>label {
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
#mpdris {
|
||||
color: #f4dbd6;
|
||||
}
|
||||
|
||||
#visualisation
|
||||
{
|
||||
color: #1e2030;
|
||||
background-color: #f4dbd6;
|
||||
}
|
||||
|
||||
#layout {
|
||||
color: #f4dbd6;
|
||||
}
|
||||
|
||||
|
||||
#layout.focused {
|
||||
margin-right: 2px;
|
||||
color: #1e2030;
|
||||
background-color: #f4dbd6;
|
||||
}
|
||||
|
||||
#tags button {
|
||||
color: #939ab7;
|
||||
margin-right: 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#tags button.occupied {
|
||||
color: #f4dbd6;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: #f4dbd6;
|
||||
margin-right: 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button.empty,
|
||||
#workspaces.sway button.persistent {
|
||||
color: #939ab7;
|
||||
}
|
||||
|
||||
#workspaces button.empty.active {
|
||||
background-color: #939ab7;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #0f0f0f;
|
||||
background-color: #9ec3c4;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: rgba(244, 219, 214, 0.7);
|
||||
color: #0f0f0f;
|
||||
}
|
||||
|
||||
#workspaces.sway button.persistent:hover,
|
||||
#workspaces button.empty:hover {
|
||||
background-color: rgba(147, 154, 183, 0.7);
|
||||
color: #0f0f0f;
|
||||
}
|
||||
|
||||
#workspaces button.active,
|
||||
#workspaces button.focused,
|
||||
#tags button.focused {
|
||||
color: #0f0f0f;
|
||||
background-color: #f4dbd6;
|
||||
}
|
||||
|
||||
|
||||
#mpris {
|
||||
font-size: 7px;
|
||||
}
|
||||
|
||||
#custom-notification {
|
||||
color: #eb6f92;
|
||||
padding-left: 12px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
#custom-notification.notification {
|
||||
color: #0f0f0f;
|
||||
background-color: #eb6f92;
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
margin: 0px 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 10px;
|
||||
padding-right: 8px;
|
||||
border-radius: 4px;
|
||||
background-color: #363a4f;
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
#taskbar button:hover {
|
||||
background-color: #494d64;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#taskbar button.maximized,
|
||||
#taskbar button.fullscreen {
|
||||
border-bottom: 3px solid #8aadf4;
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
background-color: #5b6078;
|
||||
border-radius: 4px;
|
||||
border-bottom: 3px solid #b7bdf8;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: #1e2030;
|
||||
background-color: #8aadf4;
|
||||
}
|
||||
|
||||
#custom-updates {
|
||||
margin-right: 2px;
|
||||
color: #1e2030;
|
||||
background-color: #9ccfd8;
|
||||
}
|
||||
|
||||
#custom-downloads {
|
||||
color: #eed49f;
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #f5a97f;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #a6da95;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #7dc4e4;
|
||||
}
|
||||
|
||||
#pulseaudio.bluetooth {
|
||||
color: #8aadf4;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #ed8796;
|
||||
}
|
||||
|
||||
#pulseaudio-slider {
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
#pulseaudio-slider slider {
|
||||
min-height: 0px;
|
||||
min-width: 0px;
|
||||
border-radius: 20px;
|
||||
opacity: 0;
|
||||
background-image: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#pulseaudio-slider trough {
|
||||
min-height: 4px;
|
||||
min-width: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #363a4f;
|
||||
}
|
||||
|
||||
#pulseaudio-slider highlight {
|
||||
min-width: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #91d7e3;
|
||||
}
|
||||
|
||||
#cava {
|
||||
font-family: FiraCode Nerd Font Mono;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #b7bdf8;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: #91d7e3;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #ed8796;
|
||||
}
|
BIN
dot_config/waybar/waybar-extended1.png
(Stored with Git LFS)
Normal file
BIN
dot_config/waybar/waybar-extended1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
dot_config/waybar/waybar-extended2.png
(Stored with Git LFS)
Normal file
BIN
dot_config/waybar/waybar-extended2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue