move config directories into repo

This commit is contained in:
2024-03-15 11:06:26 +00:00
parent eb71181096
commit 349bdde402
178 changed files with 11479 additions and 9 deletions
+325
View File
@@ -0,0 +1,325 @@
// vim: ft=jsonc
{
"layer": "top",
// "output": [],
"position": "right",
// "height": 38,
// "width": 900,
// "margin": "",
"margin-top": 2,
"margin-bottom": 2,
"margin-left": 2,
"margin-right": 2,
"spacing": 0,
"gtk-layer-shell": true,
"modules-left": [
//"custom/notification",
"custom/kernel",
"custom/updates",
"clock",
"disk",
"keyboard-state"
//"keyboard-state#Num"
],
/*
"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": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
*/
"custom/kernel": {
"exec": "uname -r | sed 's/-a.*//p'",
"format": "<big> </big>\n{}",
"interval": "once"
},
"custom/updates": {
// maybe add check to not attempt run when offline
"exec": "( checkupdates; paru -Qua ) | wc -l",
"interval": 7200,
"format": "<big>󰏖</big>\n{}",
"on-click": "( checkupdates; paru -Qua ) | wc -l",
},
"clock": {
"interval": 1,
//"format": "{:<big> 󰥔</big>\n%R\n<big> </big> \n%d/%m}",
"format": "{:<big> </big> \n%d/%m\n<big> 󰥔</big>\n%R}",
"tooltip": true,
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
},
"disk": {
"interval": 30,
"format": "<big></big> {path}:\n{percentage_used}%",
"alt-format": " {path}:{used}\/{total}",
"tooltip-format": " {path}:{used}\/{total}",
},
"keyboard-state": {
"capslock": true,
"format": "CAPS\n {icon}",
"format-icons": {"locked": "", "unlocked": ""}
},
//"keyboard-state#Num": {
// "numlock": true,
// "format": "#lk: {icon}",
// "format-icons": {"locked": "", "unlocked": ""}
//},
"modules-center": [
//"hyprland/workspaces",
"wlr/taskbar"
//"river/tags"
//"hyprland/submap",
//"hyprland/window"
],
"river/tags": {
"on-click": "activate",
"num-tags": 10,
"format": "{icon}",
"tag-labels": [
"", // tag no. 1
"", // tag no. 2
"", // tag no. 3
"", // tag no. 4
"", // tag no. 5
"", // tag no. 6
"", // tag no. 7
"", // tag no. 8
"", // tag no. 9
"" // tag no. 10
]
},
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": false,
"on-click": "activate",
"format": "{icon}",
"persistent-workspaces": {
"*": 10,
},
"format-icons": {
"1" : "",
"2" : "",
"3" : "",
"4" : "",
"5" : "",
"6" : "",
"7" : "",
"8" : "",
"9" : "",
"10" : ""
}
},
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 20,
"all-outputs": true,
"on-click": "activate",
"ignore-list": [
"Alacritty",
"com.mitchellh.ghostty",
"contour",
]
},
"hyprland/submap": {
"format": "{}",
"tooltip": false
},
"hyprland/window": {
"format": "{icon}",
//"format": " <span font_desc='Iosevka Raven 12'>{:.40}</span> ",
"separate-outputs": false
},
"modules-right": [
"tray",
"custom/wofi",
// "cpu",
// "memory",
// "backlight",
"pulseaudio#microphone",
"pulseaudio#audio",
//"bluetooth",
"backlight",
"network",
//"network#wlan0",
//"network#enp46s0",
"battery"
],
"tray": {
"icon-size": 18,
"spacing": 10
},
"custom/wofi" : {
"format": "<big></big>",
"on-click": "wofi --show drun",
"tooltip": false
},
"cpu": {
"format": "󰻠 {usage}%",
"on-click": "",
"tooltip": false
},
"memory": {
"format": "󰍛 {used:0.1f}GB ({percentage}%) / {total:0.1f}GB",
"on-click": "",
"tooltip": false
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": [
"󰃟"
],
"on-scroll-up": "brightnessctl set +5%",
"on-scroll-down": "brightnessctl set 5%-",
"on-click": "",
"tooltip": false
},
"pulseaudio#audio": {
"format": "<big>{icon}</big>",
"format-bluetooth": "󰂯{icon}",
"format-bluetooth-muted": "󰂯󰖁",
"format-muted": "<big>󰖁</big> {volume}%",
"format-icons": {
"headphone": "󰋋",
"hands-free": "󰋋",
"headset": "󰋋",
"phone": "",
"portable": "",
"car": "",
"default": [
"󰕿",
"󰖀",
"󰕾"
]
},
"on-click-right": "pavucontrol",
"on-click": "pamixer -t",
"on-scroll-up": "pamixer -i 5",
"on-scroll-down": "pamixer -d 5",
"tooltip": true,
"tooltip-format": "{icon} {desc} {volume}%"
},
"pulseaudio#microphone": {
"format": "{format_source}",
"format-source": "󰍬 {volume}%",
"format-source-muted": "󰍭 {volume}%",
"on-click": "pamixer --default-source -t",
"on-scroll-up": "pamixer --default-source -i 5",
"on-scroll-down": "pamixer --default-source -d 5",
"max-volume": 100,
"tooltip": false
},
"backlight": {
"device": "acpi_video0",
"format": "<big>{icon}</big>",
"tooltip-format": "{icon} {percent}%",
"format-icons": ["󱩎", "󱩏", "󱩐", "󱩑", "󱩒", "󱩓", "󱩔", "󱩕", "󱩖", "󰛨"],
"on-scroll-up": "brightnessctl set 1%+",
"on-scroll-down": "brightnessctl set 1%-"
},
"network": {
"format-icons": [
"󰤯",
"󰤟",
"󰤢",
"󰤥",
"󰤨"
],
"format-wifi": "<big>{icon}</big>",
"format-disconnected": "󰤮",
"format-ethernet": "<big>󰈀</big>",
"on-click": "nm-connection-editor",
"on-click-right": "", // give applet's menu if possible
"tooltip": true,
"min-length": 9,
"tooltip-format": "󰢮 {ifname}\n󰩟 {ipaddr}/{cidr}\n{icon} {essid}\n󱑽 {signalStrength}% {signaldBm} dBm {frequency} MHz\n󰞒 {bandwidthDownBytes}\n󰞕 {bandwidthUpBytes}"
},
//"network#wlan0": {
// "interval": 1,
// "interface": "wlan0",
// "format-icons": [
// "󰤯",
// "󰤟",
// "󰤢",
// "󰤥",
// "󰤨"
// ],
// "format-wifi": "<big>{icon}</big>",
// "format-disconnected": "󰤮",
// "format-ethernet": "<big>󰈀</big>",
// //"format-disconnected": "",
// // "format-alt": "{icon} {essid} | 󱑽 {signalStrength}% {signaldBm} dBm {frequency} MHz",
// "on-click": "nm-connection-editor",
// "on-click-right": "", // give applet's menu if possible
// "tooltip": true,
// "min-length": 9,
// "tooltip-format": "󰢮 {ifname}\n󰩟 {ipaddr}/{cidr}\n{icon} {essid}\n󱑽 {signalStrength}% {signaldBm} dBm {frequency} MHz\n󰞒 {bandwidthDownBytes}\n󰞕 {bandwidthUpBytes}"
//},
//"network#enp46s0": {
// "interval": 1,
// "interface": "enp46s0",
// "format-icons": [
// "󰈀"
// ],
// "format-ethernet": "{icon}",
// // "format-disconnected": "{icon}",
// "format-disconnected": "",
// // "format-alt": "{icon} | 󰢮 {ifname} | 󰩟 {ipaddr}/{cidr}",
// "on-click": "",
// "tooltip": true,
// "min-length": 8,
// "tooltip-format": "󰢮 {ifname}\n󰩟 {ipaddr}/{cidr}\n󰞒 {bandwidthDownBytes}\n󰞕 {bandwidthUpBytes}"
//},
//"bluetooth": {
// "format-disabled": "",
// "format-off": "",
// "format-on": "󰂯",
// "format-connected": "󰂯",
// "format-connected-battery": "󰂯",
// "tooltip-format-connected": "{device_alias} 󰂄{device_battery_percentage}%",
// "on-click": "",
// "tooltip": true
//},
"battery": {
"states": {
"good": 90,
"warning": 30,
"critical": 15
},
"format": "<big>{icon}</big> {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": "󱘖 {capacity}%",
"format-icons": [
"󰁺",
"󰁻",
"󰁼",
"󰁽",
"󰁾",
"󰁿",
"󰂀",
"󰂁",
"󰂂",
"󰁹"
],
"on-click": "",
"on-update": "/home/liamm/.config/waybar/scripts/battery-warn.py 255",
"tooltip": true
}
}
Binary file not shown.
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python
import os
import sys
discharging = str("discharging")
def alert(id):
stream = os.popen("cat /sys/class/power_supply/BAT0/capacity")
output = stream.read()
battery = int(output.split('\n')[0])
stream = os.popen("cat /sys/class/power_supply/BAT0/status")
output = stream.read()
status = str(output.split('\n')[0]).lower().strip()
if battery <= 10 and status == discharging:
os.system(f'dunstify -u critical "Low Battery" "Connect Power Adapter" -i /usr/share/icons/Adwaita/symbolic/status/battery-caution-symbolic.svg -r {id} -t 60000')
else:
stream = os.popen(f'dunstctl history | grep {id}')
output = stream.read()
if output.strip() != '':
os.system('dunstctl close')
os.system(f'dunstctl history-rm {id}')
if __name__ == "__main__":
alert(int(sys.argv[1]))
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
stream = os.popen("brightnessctl -m")
output = stream.read()
perc = output.split(',')[3]
print(perc)
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
if [ "$(dunstctl history | grep 255)" == "" ];
then
echo "absent"
else
echo "present"
fi
+119
View File
@@ -0,0 +1,119 @@
#!/usr/bin/env python
import json
import requests
from datetime import datetime
WEATHER_CODES = {
'113': '☀️ ',
'116': '',
'119': '☁️ ',
'122': '☁️ ',
'143': '☁️ ',
'176': '🌧️',
'179': '🌧️',
'182': '🌧️',
'185': '🌧️',
'200': '⛈️ ',
'227': '🌨️',
'230': '🌨️',
'248': '☁️ ',
'260': '☁️ ',
'263': '🌧️',
'266': '🌧️',
'281': '🌧️',
'284': '🌧️',
'293': '🌧️',
'296': '🌧️',
'299': '🌧️',
'302': '🌧️',
'305': '🌧️',
'308': '🌧️',
'311': '🌧️',
'314': '🌧️',
'317': '🌧️',
'320': '🌨️',
'323': '🌨️',
'326': '🌨️',
'329': '❄️ ',
'332': '❄️ ',
'335': '❄️ ',
'338': '❄️ ',
'350': '🌧️',
'353': '🌧️',
'356': '🌧️',
'359': '🌧️',
'362': '🌧️',
'365': '🌧️',
'368': '🌧️',
'371': '❄️',
'374': '🌨️',
'377': '🌨️',
'386': '🌨️',
'389': '🌨️',
'392': '🌧️',
'395': '❄️ '
}
data = {}
weather = requests.get("https://wttr.in/?format=j1").json()
def format_time(time):
return time.replace("00", "").zfill(2)
def format_temp(temp):
return (hour['FeelsLikeC']+"°").ljust(3)
def format_chances(hour):
chances = {
"chanceoffog": "Fog",
"chanceoffrost": "Frost",
"chanceofovercast": "Overcast",
"chanceofrain": "Rain",
"chanceofsnow": "Snow",
"chanceofsunshine": "Sunshine",
"chanceofthunder": "Thunder",
"chanceofwindy": "Wind"
}
conditions = []
for event in chances.keys():
if int(hour[event]) > 0:
conditions.append(chances[event]+" "+hour[event]+"%")
return ", ".join(conditions)
tempint = int(weather['current_condition'][0]['FeelsLikeC'])
extrachar = ''
if tempint > 0 and tempint < 10:
extrachar = '+'
data['text'] = ''+WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \
" "+extrachar+weather['current_condition'][0]['FeelsLikeC']+"°"
data['tooltip'] = f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°</b>\n"
data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeC']}°\n"
data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n"
data['tooltip'] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
for i, day in enumerate(weather['weather']):
data['tooltip'] += f"\n<b>"
if i == 0:
data['tooltip'] += "Today, "
if i == 1:
data['tooltip'] += "Tomorrow, "
data['tooltip'] += f"{day['date']}</b>\n"
data['tooltip'] += f"⬆️ {day['maxtempC']}° ⬇️ {day['mintempC']}° "
data['tooltip'] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n"
for hour in day['hourly']:
if i == 0:
if int(format_time(hour['time'])) < datetime.now().hour-2:
continue
data['tooltip'] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeC'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
print(json.dumps(data))
+325
View File
@@ -0,0 +1,325 @@
@define-color white #F2F2F2;
@define-color black #000203;
@define-color text #BECBCB;
@define-color lightgray #686868;
@define-color darkgray #353535;
@define-color red #F38BA8;
@define-color blue #00FFB2;
@define-color lightgreen #a6e3a1;
@define-color magenta #f5c2e7;
@define-color archbtw #1793d1;
@define-color black-transparent-1 rgba(0, 0, 0, 0.1);
@define-color black-transparent-2 rgba(0, 0, 0, 0.2);
@define-color black-transparent-3 rgba(0, 0, 0, 0.3);
@define-color black-transparent-4 rgba(0, 0, 0, 0.4);
@define-color black-transparent-5 rgba(0, 0, 0, 0.5);
@define-color black-transparent-6 rgba(0, 0, 0, 0.6);
@define-color black-transparent-7 rgba(0, 0, 0, 0.7);
@define-color black-transparent-8 rgba(0, 0, 0, 0.8);
@define-color black-transparent-9 rgba(0, 0, 0, 0.9);
@define-color black-solid rgba(0, 0, 0, 1.0);
* {
font-family: Iosevka, Material Design Icons Desktop;
font-weight: bold;
font-size: 16px;
}
/*
* {
border: none;
border-radius: 0;
font-family: Cartograph CF Nerd Font, monospace;
font-weight: bold;
font-size: 16px;
min-height: 0;
}
*/
window#waybar {
background-color: @black-transparent-8;
color: @text;
border-radius: 7px;
border: 2px solid @blue;
/* border: 1px solid rgba(0, 0, 0, 0.0); */
}
tooltip {
background: @black-solid;
border: 1px solid @darkgray;
border-radius: 7px;
}
tooltip label {
color: @text;
}
#tags {
}
#tags button {
background-color: transparent;
color: @lightgray;
padding: 0;
/* margin: 0; */
margin-top: 3px;
margin-bottom: 3px;
/* margin-left: 1px;
margin-right: 1px; */
border-radius: 6px;
transition: all 0.3s ease;
}
#tags button:hover {
box-shadow: inherit;
text-shadow: inherit;
background: @lightgray;
border: 1px solid rgba(0, 0, 0, 0.0);
color: @white;
transition: all 0.3s ease;
}
#tags button.focused {
/* background-color: @darkgray; */
/* border: 1px solid @darkgray; */
color: @white;
transition: all 0.3s ease;
animation: colored-gradient 10s ease infinite;
}
/* #workspaces button.focused:hover,
#workspaces button.active:hover {
background-color: @white;
transition: all 1s ease;
} */
#tags button.urgent {
background-color: @red;
color: @black;
transition: all 0.3s ease;
}
#workspaces {
/* border: 1px solid #10171b; */
/* border-radius: 20px; */
/* margin-top: 0; */
/* margin-bottom: 0; */
margin-left: 2px;
margin-right: 2px;
}
#workspaces button {
background-color: transparent;
color: @lightgray;
padding: 0;
/* margin: 0; */
margin-top: 3px;
margin-bottom: 3px;
/* margin-left: 1px;
margin-right: 1px; */
border-radius: 6px;
transition: all 0.3s ease;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.0);
color: @white;
transition: all 0.3s ease;
}
#workspaces button.focused,
#workspaces button.active {
/* background-color: @darkgray; */
/* border: 1px solid @darkgray; */
color: @white;
transition: all 0.3s ease;
animation: colored-gradient 10s ease infinite;
}
/* #workspaces button.focused:hover,
#workspaces button.active:hover {
background-color: @white;
transition: all 1s ease;
} */
#workspaces button.urgent {
background-color: @red;
color: @black;
transition: all 0.3s ease;
}
/* #workspaces button.hidden {} */
#taskbar {
border-radius: 2px;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 1px;
margin-right: 1px;
}
#taskbar button {
color: @text;
padding: 1px 8px;
margin-left: 1px;
margin-right: 1px;
}
#taskbar button:hover {
background: transparent;
border: 1px solid @lightgray;
border-radius: 8px;
transition: all 0.3s ease;
animation: colored-gradient 10s ease infinite;
}
/* #taskbar button.maximized {} */
/* #taskbar button.minimized {} */
#taskbar button.active {
border: 1px solid @darkgray;
border-radius: 8px;
transition: all 0.3s ease;
animation: colored-gradient 10s ease infinite;
}
/* #taskbar button.fullscreen {} */
/* -------------------------------------------------------------------------------- */
#custom-wofi,
#custom-kernel,
#keyboard-state,
/* #window, */
#submap,
#mode,
#tray,
#cpu,
#memory,
#backlight,
#pulseaudio.audio,
#pulseaudio.microphone,
#network,
#network.enp46s0,
#bluetooth,
#battery,
#clock,
#custom-updates,
#custom-powermenu,
#custom-notification {
background-color: transparent;
color: @text;
padding: 1px 8px;
margin-top: 5px;
margin-bottom: 5px;
margin-left: 2px;
margin-right: 2px;
/* border: 1px solid @darkgray; */
border-radius: 20px;
transition: all 0.3s ease;
}
#submap {
border: 0;
}
/* -------------------------------------------------------------------------------- */
/* #custom-launcher {
background-color: @darkgray;
color: @black;
} */
/* #custom-launcher:hover {
color: @white;
} */
/* #custom-powermenu {
background-color: @red;
color: @black;
}
#custom-powermenu:hover {
color: @white;
} */
/* -------------------------------------------------------------------------------- */
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces button,
.modules-left > widget:first-child > #taskbar button,
.modules-left > widget:first-child > #custom-launcher,
.modules-left > widget:first-child > #window,
.modules-left > widget:first-child > #tray,
.modules-left > widget:first-child > #cpu,
.modules-left > widget:first-child > #memory,
.modules-left > widget:first-child > #backlight,
.modules-left > widget:first-child > #pulseaudio.audio,
.modules-left > widget:first-child > #pulseaudio.microphone,
.modules-left > widget:first-child > #network.enp46s0,
.modules-left > widget:first-child > #bluetooth,
.modules-left > widget:first-child > #battery,
.modules-left > widget:first-child > #clock,
.modules-left > widget:first-child > #custom-powermenu,
.modules-left > widget:first-child > #custom-notification {
margin-top: 10px;
}
.modules-right > widget:last-child > #workspaces button,
.modules-right > widget:last-child > #taskbar button,
.modules-right > widget:last-child > #custom-launcher,
.modules-right > widget:last-child > #window,
.modules-right > widget:last-child > #tray,
.modules-right > widget:last-child > #cpu,
.modules-right > widget:last-child > #memory,
.modules-right > widget:last-child > #backlight,
.modules-right > widget:last-child > #pulseaudio.audio,
.modules-right > widget:last-child > #pulseaudio.microphone,
.modules-right > widget:last-child > #network.enp46s0,
.modules-right > widget:last-child > #bluetooth,
.modules-right > widget:last-child > #battery,
.modules-right > widget:last-child > #clock,
.modules-right > widget:last-child > #custom-powermenu,
.modules-right > widget:last-child > #custom-notification {
margin-bottom: 10px;
}
/* -------------------------------------------------------------------------------- */
#tray {
background-color: transparent;
padding: 1px 8px;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: @red;
}
#battery {
color: @lightgreen;
border-right: 0px;
border-left: 0px;
}
#custom-updates {
color: @magenta;
}
#custom-kernel {
margin-top: 8px;
margin-bottom: 8px;
color: @magenta;
}
#custom-wofi {
color: @archbtw;
}
#keyboard-state {
margin-top: 8px;
}
#clock {
}