Initial
This commit is contained in:
commit
c8734e660a
392 changed files with 21043 additions and 0 deletions
196
.config/waybar/waybar_lvntcylmz/config
Normal file
196
.config/waybar/waybar_lvntcylmz/config
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"output": [
|
||||
"eDP-1",
|
||||
"DP-3",
|
||||
"!DP-5"
|
||||
],
|
||||
"modules-left": [
|
||||
"custom/power-user",
|
||||
"sway/language",
|
||||
"clock",
|
||||
"custom/weather#eu",
|
||||
"custom/weather#tr",
|
||||
"custom/pacman",
|
||||
"custom/mail",
|
||||
"custom/scratchpad-indicator",
|
||||
"sway/mode"
|
||||
],
|
||||
"modules-center": [
|
||||
"custom/media"
|
||||
],
|
||||
"modules-right": [
|
||||
"network",
|
||||
"disk",
|
||||
"temperature",
|
||||
"pulseaudio#volume",
|
||||
"pulseaudio#mic",
|
||||
"battery#bat0",
|
||||
"battery#bat1",
|
||||
"custom/battery",
|
||||
"custom/notification",
|
||||
"tray"
|
||||
],
|
||||
|
||||
"custom/power-user": {
|
||||
"tooltip": false,
|
||||
"exec":"$HOME/.config/waybar/scripts/user.sh 2> /dev/null",
|
||||
"on-click": "$HOME/.config/waybar/scripts/powermenu.sh 2> /dev/null",
|
||||
"interval": 60
|
||||
},
|
||||
"sway/language": {
|
||||
"format": "{shortDescription} {flag}",
|
||||
"on-click": "swaymsg input type:keyboard xkb_switch_layout next"
|
||||
},
|
||||
"clock": {
|
||||
"format": "<big></big> {:%H:%M:%S<big></big>%a<big></big>%d/%b/%Y}",
|
||||
"interval": 1,
|
||||
"on-click": "wldash"
|
||||
},
|
||||
"custom/weather#eu": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "$HOME/.config/waybar/scripts/weather.sh 'Clausthal-Zellerfeld' 2> /dev/null",
|
||||
"interval": 300,
|
||||
"tooltip": true
|
||||
},
|
||||
"custom/weather#tr": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "$HOME/.config/waybar/scripts/weather.sh 'Lüleburgaz' 2> /dev/null",
|
||||
"interval": 300,
|
||||
"tooltip": true
|
||||
},
|
||||
"custom/pacman": {
|
||||
"interval": 3600,
|
||||
"exec": "$HOME/.config/waybar/scripts/checkupdates.sh 2> /dev/null",
|
||||
"signal": 8,
|
||||
"on-click": "notify-send -i software-update-available-symbolic \"Updates Available\" \"$(yay -Qu | checkupdates) \""
|
||||
},
|
||||
"custom/mail": {
|
||||
"exec": "$HOME/.config/waybar/scripts/mail.sh 2> /dev/null",
|
||||
"interval": 3600,
|
||||
"on-click": "thunderbird"
|
||||
},
|
||||
"custom/scratchpad-indicator": {
|
||||
"format": "<big></big> {}",
|
||||
"return-type": "json",
|
||||
"exec": "swaymsg -t get_tree | jq --unbuffered --compact-output '(recurse(.nodes[]) | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | if ($scratch_nodes|length) > 0 then { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") } else empty end'",
|
||||
"interval": 3,
|
||||
"on-click": "swaymsg 'scratchpad show'",
|
||||
"on-click-right": "swaymsg 'move scratchpad'"
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<big></big> {}",
|
||||
"max-length": 50
|
||||
},
|
||||
|
||||
"custom/media": {
|
||||
"max-length": 70,
|
||||
"exec": "$HOME/.config/waybar/scripts/mediaplayer.sh 2> /dev/null",
|
||||
"interval": 1,
|
||||
"on-click": "playerctl play-pause"
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": "",
|
||||
"format-ethernet": "",
|
||||
"format-linked": "",
|
||||
"format-disconnected": "Disconnected <big>睊</big>",
|
||||
"internval": 60,
|
||||
"on-click": "iwgtk"
|
||||
},
|
||||
"disk": {
|
||||
"format": "{used} <big></big>",
|
||||
"on-click": "exec thunar"
|
||||
},
|
||||
"temperature": {
|
||||
"critical-threshold": 65,
|
||||
"format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": [
|
||||
"<big></big>",
|
||||
"<big></big>",
|
||||
"<big></big>"
|
||||
]
|
||||
},
|
||||
"pulseaudio#volume": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-muted": "{volume}% <big></big>",
|
||||
"format-icons": {
|
||||
"headphone": "<big></big>",
|
||||
"phone": "<big></big>",
|
||||
"portable": "<big></big>",
|
||||
"car": "<big></big>",
|
||||
"default": [
|
||||
"<big>奄</big>",
|
||||
"<big>奔</big>",
|
||||
"<big>墳</big>"
|
||||
]
|
||||
},
|
||||
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||
"on-click-right": "pavucontrol"
|
||||
},
|
||||
"pulseaudio#mic": {
|
||||
"format": "{format_source}",
|
||||
"format-source": "{volume}% <big></big>",
|
||||
"format-source-muted": "{volume}% <big></big>",
|
||||
"on-click": "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
},
|
||||
"battery#bat0": {
|
||||
"bat": "BAT0",
|
||||
"states": {
|
||||
"good": 95,
|
||||
"warning": 10,
|
||||
"critical": 5
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% <big></big>",
|
||||
"format-plugged": "{capacity}% <big></big>",
|
||||
"format-icons": ["", "", "", "", ""],
|
||||
"tooltip-format": "{time}",
|
||||
"interval": 1
|
||||
},
|
||||
"battery#bat1": {
|
||||
"bat": "BAT1",
|
||||
"states": {
|
||||
"good": 95,
|
||||
"warning": 10,
|
||||
"critical": 5
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% <big></big>",
|
||||
"format-plugged": "{capacity}% <big></big>",
|
||||
"format-icons": ["", "", "", "", ""],
|
||||
"tooltip-format": "{time}",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/battery": {
|
||||
"exec": "$HOME/.config/waybar/scripts/battery.sh 2> /dev/null",
|
||||
"interval": 60
|
||||
},
|
||||
"custom/notification": {
|
||||
"tooltip": false,
|
||||
"format": "{} {icon}",
|
||||
"format-icons": {
|
||||
"notification": "<big></big>",
|
||||
"none": "<big></big>",
|
||||
"dnd-notification": "<big></big>",
|
||||
"dnd-none": "<big></big>"
|
||||
},
|
||||
"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
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 13,
|
||||
"spacing": 1,
|
||||
"show-passive-items": true
|
||||
}
|
||||
}
|
||||
45
.config/waybar/waybar_lvntcylmz/scripts/battery.sh
Normal file
45
.config/waybar/waybar_lvntcylmz/scripts/battery.sh
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
|
||||
PATH_AC="/sys/class/power_supply/AC"
|
||||
PATH_BATTERY_0="/sys/class/power_supply/BAT0"
|
||||
PATH_BATTERY_1="/sys/class/power_supply/BAT1"
|
||||
|
||||
ac=0
|
||||
battery_level_0=0
|
||||
battery_level_1=0
|
||||
battery_max_0=0
|
||||
battery_max_1=0
|
||||
|
||||
if [ -f "$PATH_AC/online" ]; then
|
||||
ac=$(cat "$PATH_AC/online")
|
||||
fi
|
||||
|
||||
if [ -f "$PATH_BATTERY_0/energy_now" ]; then
|
||||
battery_level_0=$(cat "$PATH_BATTERY_0/energy_now")
|
||||
fi
|
||||
|
||||
if [ -f "$PATH_BATTERY_0/energy_full" ]; then
|
||||
battery_max_0=$(cat "$PATH_BATTERY_0/energy_full")
|
||||
fi
|
||||
|
||||
if [ -f "$PATH_BATTERY_1/energy_now" ]; then
|
||||
battery_level_1=$(cat "$PATH_BATTERY_1/energy_now")
|
||||
fi
|
||||
|
||||
if [ -f "$PATH_BATTERY_1/energy_full" ]; then
|
||||
battery_max_1=$(cat "$PATH_BATTERY_1/energy_full")
|
||||
fi
|
||||
|
||||
battery_level=$(("$battery_level_0 + $battery_level_1"))
|
||||
battery_max=$(("$battery_max_0 + $battery_max_1"))
|
||||
|
||||
battery_level=$(("$battery_level_0"))
|
||||
battery_max=$(("$battery_max_0"))
|
||||
|
||||
battery_percent=$(("$battery_level * 100"))
|
||||
battery_percent=$(("$battery_percent / $battery_max"))
|
||||
|
||||
if ([ $battery_percent -eq 10 ] || [ $battery_percent -eq 6 ]) && [ "$ac" -eq 0 ]
|
||||
then
|
||||
notify-send -u normal -i battery-level-10-symbolic "Arch Linux" "$battery_percent battery left."
|
||||
fi
|
||||
24
.config/waybar/waybar_lvntcylmz/scripts/checkupdates.sh
Normal file
24
.config/waybar/waybar_lvntcylmz/scripts/checkupdates.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
updates_yay=$(yay -Qu --aur 2> /dev/null | wc -l)
|
||||
updates_pacman=$(checkupdates 2> /dev/null | wc -l)
|
||||
updates=$((updates_pacman + updates_yay))
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
if [ "$updates_yay" -eq 1 ]; then
|
||||
echo "<big></big> $updates"
|
||||
notify-send -u normal -i software-update-available-symbolic "$updates_yay update available from AUR" "$(yay -Qu --aur)"
|
||||
fi
|
||||
if [ "$updates_pacman" -eq 1 ]; then
|
||||
echo "<big></big> $updates"
|
||||
notify-send -u normal -i software-update-available-symbolic "$updates_pacman update available from pacman" "$(checkupdates)"
|
||||
fi
|
||||
if [ "$updates_yay" -gt 1 ]; then
|
||||
echo "<big></big> $updates"
|
||||
notify-send -u normal -i software-update-available-symbolic "$updates_yay updates available from AUR" "$(yay -Qu --aur)"
|
||||
fi
|
||||
if [ "$updates_pacman" -gt 1 ]; then
|
||||
echo "<big></big> $updates"
|
||||
notify-send -u normal -i software-update-available-symbolic "$updates_pacman updates available from pacman" "$(checkupdates)"
|
||||
fi
|
||||
fi
|
||||
15
.config/waybar/waybar_lvntcylmz/scripts/mail.sh
Normal file
15
.config/waybar/waybar_lvntcylmz/scripts/mail.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Server and mail adress are defined with credentials in ~/.netrc
|
||||
SERVER="$(head -1 ~/.netrc | awk '{print $2}')"
|
||||
INBOX=$(curl --netrc -X "STATUS INBOX (UNSEEN)" imaps://$SERVER/INBOX | tr -d -c "[:digit:]")
|
||||
|
||||
if [ $INBOX ] && [ $INBOX -gt 0 ] ; then
|
||||
if [ $INBOX -eq 1 ] ; then
|
||||
echo "<big></big> $INBOX"
|
||||
notify-send -i mail-unread-symbolic "Thunderbird" "You have an unread e-mail."
|
||||
else
|
||||
echo "<big></big> $INBOX"
|
||||
notify-send -i mail-unread-symbolic "Thunderbird" "You have $INBOX unread e-mail."
|
||||
fi
|
||||
fi
|
||||
27
.config/waybar/waybar_lvntcylmz/scripts/mediaplayer.sh
Normal file
27
.config/waybar/waybar_lvntcylmz/scripts/mediaplayer.sh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
player_status=$(playerctl status)
|
||||
player_name=$(playerctl metadata --format "{{ playerName }}")
|
||||
|
||||
artist=$(playerctl metadata --format "{{ artist }}")
|
||||
title=$(playerctl metadata --format "{{ title }}")
|
||||
duration=$(playerctl metadata --format "{{ duration(position) }} / {{ duration(mpris:length) }}")
|
||||
|
||||
firefox_status=$(playerctl --player=firefox status)
|
||||
spotify_status=$(playerctl --player=spotify status)
|
||||
|
||||
if [ "$player_name" == "spotify" ]; then
|
||||
echo "<big></big> $artist - $title - [$duration]"
|
||||
elif [ "$player_name" == "firefox" ]; then
|
||||
if [ "$artist" == "" ]; then
|
||||
echo "<big></big> $title"
|
||||
else
|
||||
echo "<big></big> $artist - $title"
|
||||
fi
|
||||
else
|
||||
if [ "$player_status" == "Playing" ]; then
|
||||
echo "<big></big> $artist - $title"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
23
.config/waybar/waybar_lvntcylmz/scripts/powermenu.sh
Normal file
23
.config/waybar/waybar_lvntcylmz/scripts/powermenu.sh
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
option0=" Lock"
|
||||
option1=" Logout"
|
||||
option2=" Suspend"
|
||||
option3=" Reboot"
|
||||
option4=" Shutdown"
|
||||
|
||||
options="$option0\n$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||
|
||||
chosen="$(echo -e "$options" | fuzzel --lines 5 --dmenu)"
|
||||
case $chosen in
|
||||
$option0)
|
||||
swaylock;;
|
||||
$option1)
|
||||
swaymsg exit;;
|
||||
$option2)
|
||||
systemctl suspend;;
|
||||
$option3)
|
||||
systemctl reboot;;
|
||||
$option4)
|
||||
systemctl poweroff;;
|
||||
esac
|
||||
6
.config/waybar/waybar_lvntcylmz/scripts/user.sh
Normal file
6
.config/waybar/waybar_lvntcylmz/scripts/user.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
system="$(uptime | awk '{print $3}' | tr -d \,)"
|
||||
user=$(whoami)
|
||||
|
||||
echo "<big></big> ${user^}<big></big>$system"
|
||||
10
.config/waybar/waybar_lvntcylmz/scripts/waybar.sh
Normal file
10
.config/waybar/waybar_lvntcylmz/scripts/waybar.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running instances
|
||||
killall -q waybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x waybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch main
|
||||
waybar
|
||||
17
.config/waybar/waybar_lvntcylmz/scripts/weather.sh
Normal file
17
.config/waybar/waybar_lvntcylmz/scripts/weather.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
text=$(curl -s "https://wttr.in/$1?format=%c+%f+%m")
|
||||
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
text=$(echo "$text" | sed -E "s/\s+/ /g")
|
||||
tooltip=$(curl -s "https://wttr.in/$1?format=%l:+%C+%c+%t+%w+%m")
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
|
||||
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "{\"text\":\"Service Unavailable\", \"tooltip\":\"Service Unavailable\"}"
|
||||
91
.config/waybar/waybar_lvntcylmz/style.css
Normal file
91
.config/waybar/waybar_lvntcylmz/style.css
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
@define-color main-bg-color #120024;
|
||||
@define-color main-fg-color #753AB0;
|
||||
@define-color highlight-color #75B03A;
|
||||
|
||||
* {
|
||||
margin: 2px 5px;
|
||||
font-family: "JetBrains Mono Medium", "Material Design Icons Desktop";
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#waybar {
|
||||
background-color: @main-bg-color;
|
||||
color: @main-fg-color;
|
||||
}
|
||||
|
||||
#mode,
|
||||
#tray,
|
||||
#disk,
|
||||
#temperature,
|
||||
#battery.bat0,
|
||||
#battery.bat1,
|
||||
#pulseaudio.volume,
|
||||
#custom-weather.eu,
|
||||
#custom-weather.tr,
|
||||
#custom-notification,
|
||||
#custom-scratchpad-indicator,
|
||||
#pulseaudio.mic.source-muted {
|
||||
border: 0.5 solid @main-fg-color;
|
||||
background: @main-bg-color;
|
||||
color: @main-fg-color;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
padding: 1px 5px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#language,
|
||||
#custom-media,
|
||||
#custom-power-user {
|
||||
border: 0.5 solid @main-fg-color;
|
||||
background: @main-fg-color;
|
||||
color: @main-bg-color;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
padding: 1px 5px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#mode,
|
||||
#custom-mail,
|
||||
#custom-pacman,
|
||||
#network.disabled,
|
||||
#network.disconnected,
|
||||
#temperature.critical,
|
||||
#pulseaudio.mic,
|
||||
#pulseaudio.volume.muted,
|
||||
#battery.bat0.charging,
|
||||
#battery.bat0.plugged,
|
||||
#battery.bat1.charging,
|
||||
#battery.bat1.plugged,
|
||||
#custom-scratchpad-indicator,
|
||||
#custom-notification.dnd-none,
|
||||
#battery.bat0.warning.discharging,
|
||||
#battery.bat0.critical.discharging,
|
||||
#battery.bat1.warning.discharging,
|
||||
#battery.bat1.critical.discharging,
|
||||
#custom-notification.dnd-notification {
|
||||
border: 0.5 solid @highlight-color;
|
||||
background: @highlight-color;
|
||||
color: @main-bg-color;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
padding: 1px 5px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#battery.bat0.critical.discharging,
|
||||
#battery.bat1.critical.discharging {
|
||||
animation: blink 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
from {
|
||||
background-color: @main-bg-color;
|
||||
}
|
||||
|
||||
to {
|
||||
background-color: @highlight-color;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue