mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
init
This commit is contained in:
commit
259d9ed5a0
111 changed files with 7219 additions and 0 deletions
126
user/modules/gui/wm/hyprland/config/waybar/config
Normal file
126
user/modules/gui/wm/hyprland/config/waybar/config
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"output": "HDMI-A-1",
|
||||
"modules-left": [ "custom/logo", "clock", "custom/blockheight", "custom/price", "memory", "cpu" ],
|
||||
"modules-center": [ "hyprland/workspaces" ],
|
||||
"modules-right": [ "tray", "pulseaudio", "network" ],
|
||||
"reload_style_on_change":true,
|
||||
|
||||
"custom/logo": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "alacritty --class sys-specs -e bash -c 'fastfetch; read -n 1'"
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"format": "<span color='#ffffff'>{icon}</span>",
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"5": "",
|
||||
"6": "",
|
||||
"active": "",
|
||||
"default": ""
|
||||
},
|
||||
"persistent-workspaces": {
|
||||
"*": [ 2, 3, 4, 5, 6 ]
|
||||
}
|
||||
},
|
||||
|
||||
"custom/weather": {
|
||||
"format": "<span color='#ffffff'>{}</span>",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/weather.sh",
|
||||
"interval": 10,
|
||||
},
|
||||
|
||||
"custom/blockheight": {
|
||||
"format": "<span color='#ef8e19'> </span><span color='#ffffff'>{} </span>",
|
||||
"interval": 30,
|
||||
"exec": "~/.config/waybar/scripts/getBlock",
|
||||
"on-click": "xdg-open https://www.mempool.space",
|
||||
},
|
||||
|
||||
"custom/price": {
|
||||
"format": "<span color='#00ff00'>$</span><span color='#ffffff'>{}</span>",
|
||||
"interval": 10,
|
||||
"exec": "~/.config/waybar/scripts/getPrice",
|
||||
"on-click": "xdg-open https://www.coinbase.com/price/bitcoin",
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": "{:%I:%M:%S %p}",
|
||||
"interval":1,
|
||||
"tooltip-format": "\n<big>{:%d %A}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"calendar-weeks-pos": "right",
|
||||
"today-format": "<span color='#7645AD'><b><u>{}</u></b></span>",
|
||||
"format-calendar": "<span color='#aeaeae'><b>{}</b></span>",
|
||||
"format-calendar-weeks": "<span color='#aeaeae'><b>W{:%V}</b></span>",
|
||||
"format-calendar-weekdays": "<span color='#aeaeae'><b>{}</b></span>"
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": "<span color='#ffffff'> </span>",
|
||||
"format-ethernet":"<span color='#ffffff'></span>",
|
||||
"format-disconnected": "<span class='#e11e2d'></span>",
|
||||
"tooltip-format": "{ipaddr}",
|
||||
"tooltip-format-wifi": "{essid} ({signalStrength}%) | {ipaddr}",
|
||||
"tooltip-format-ethernet": "{ifname} | {ipaddr}",
|
||||
"tooltip-format-disconnected": "Offline",
|
||||
"on-click": "alacritty -e nmtui"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 1,
|
||||
"format": "<span color='#ffd808'> </span><span color='#ffffff'> {usage}%</span>",
|
||||
"min-length": 6,
|
||||
"max-length": 6,
|
||||
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"format": "<span color='#cc63ff'></span><span color='#ffffff'>{percentage}%</span>"
|
||||
},
|
||||
|
||||
"temperature": {
|
||||
"format": "<span color='#99c3ff'> </span><span color='#ffffff'>:{temperatureC}°C</span>",
|
||||
"format-critical": "<span color='#fd4400'></span><span color='#ffffff'>:{temperatureC}°C</span>",
|
||||
"interval": 1,
|
||||
"critical-threshold": 80,
|
||||
"on-click": "alacritty -e btop",
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "<span color='#ffffff'>{icon}</span>",
|
||||
"format-bluetooth":"",
|
||||
"format-muted": "<span font='12'></span>",
|
||||
"format-icons": {
|
||||
"headphones": "",
|
||||
"bluetooth": "",
|
||||
"handsfree": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["","",""]
|
||||
},
|
||||
"justify": "center",
|
||||
"on-click": "alacritty -e pulsemixer",
|
||||
"tooltip-format": "{volume}%"
|
||||
},
|
||||
|
||||
"jack": {
|
||||
"format": "{} ",
|
||||
"format-xrun": "{xruns} xruns",
|
||||
"format-disconnected": "DSP off",
|
||||
"realtime": true
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 14,
|
||||
"spacing": 10
|
||||
},
|
||||
}
|
||||
BIN
user/modules/gui/wm/hyprland/config/waybar/scripts/getBlock
Executable file
BIN
user/modules/gui/wm/hyprland/config/waybar/scripts/getBlock
Executable file
Binary file not shown.
12
user/modules/gui/wm/hyprland/config/waybar/scripts/getPrice
Executable file
12
user/modules/gui/wm/hyprland/config/waybar/scripts/getPrice
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
response=$(curl -s "https://api.coinbase.com/v2/prices/BTC-USD/spot")
|
||||
price=$(echo "$response" | jq -r .data.amount | awk -F. '{print $1}')
|
||||
|
||||
if [ -z "$price" ]; then
|
||||
echo -e "\033[31mErr\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$price"
|
||||
exit 0
|
||||
24
user/modules/gui/wm/hyprland/config/waybar/scripts/weather.sh
Executable file
24
user/modules/gui/wm/hyprland/config/waybar/scripts/weather.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
BSSIDS="$(nmcli device wifi list |
|
||||
awk 'NR>1 {if ($1 != "*") {print $1}}' |
|
||||
tr -d ":" |
|
||||
tr "\n" ",")"
|
||||
|
||||
LOC=""
|
||||
REQUEST_GEO="$(wget -qO - http://openwifi.su/api/v1/bssids/"$BSSIDS")"
|
||||
if [[ "$(jq ".count_results" <<< "$REQUEST_GEO")" -gt 0 ]] ; then
|
||||
LAT="$(jq ".lat" <<< "$REQUEST_GEO")"
|
||||
LON="$(jq ".lon" <<< "$REQUEST_GEO")"
|
||||
LOC="$LAT,$LON"
|
||||
fi
|
||||
|
||||
text="$(curl -s "https://wttr.in/$LOC?format=1" | sed 's/ //g')"
|
||||
tooltip="$(curl -s "https://wttr.in/$LOC?0QT" |
|
||||
sed 's/\\/\\\\/g' |
|
||||
sed ':a;N;$!ba;s/\n/\\n/g' |
|
||||
sed 's/"/\\"/g')"
|
||||
|
||||
if ! grep -q "Unknown location" <<< "$text"; then
|
||||
echo "{\"text\": \"$text\", \"tooltip\": \"<tt>$tooltip</tt>\", \"class\": \"weather\"}"
|
||||
fi
|
||||
|
||||
73
user/modules/gui/wm/hyprland/config/waybar/style.css
Normal file
73
user/modules/gui/wm/hyprland/config/waybar/style.css
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
* {
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
font-family: "Terminus Nerd Font Propo" ;
|
||||
min-height: 25px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
padding: 0 10px;
|
||||
color: #5277c3;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
padding-left: 5px;
|
||||
border-radius: 15px 0 0 15px;
|
||||
margin-top: 2px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.modules-center {
|
||||
padding: 0 15px;
|
||||
margin-top: 2px;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
border-radius: 0 15px 15px 0;
|
||||
margin-top: 2px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
#custom-clipboard,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#disk,
|
||||
#memory,
|
||||
#backlight,
|
||||
#cpu,
|
||||
#temperature,
|
||||
#custom-weather,
|
||||
#jack,
|
||||
#tray,
|
||||
#window,
|
||||
#workspaces,
|
||||
#clock {
|
||||
padding: 0 5px;
|
||||
}
|
||||
#pulseaudio {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
#temperature.critical,
|
||||
#pulseaudio.muted {
|
||||
color: #FF0000;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#clock{
|
||||
color: #5fd1fa;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue