Update dotfiles

new file:   .config/waybar/colors.css
new file:   .config/waybar/config
new file:   .config/waybar/openweathermap-simple.sh
new file:   .config/waybar/style.css
modified:   .config/fish/config.fish
modified:   .config/foot/foot.ini
modified:   .config/gtk-2.0/gtkfilechooser.ini
modified:   .config/gtk-3.0/settings.ini
modified:   .config/hypr/hyprland.conf
modified:   .config/hypr/hyprpaper.conf
modified:   .config/nvim/init.lua
modified:   .config/nvim/lua/core/autocmds.lua
modified:   .config/nvim/lua/core/globals.lua
modified:   .config/nvim/lua/core/options.lua
modified:   .config/nvim/lua/core/plugins.lua
modified:   .config/nvim/lua/lsp/init.lua
modified:   .config/nvim/lua/plugins/cmp.lua
modified:   .config/systemd/user/telegram-bot-api.service
modified:   .xinitrc
modified:   bin/battery
modified:   bin/restart
This commit is contained in:
hok7z 2023-03-12 21:58:22 +02:00
parent c28b521dd4
commit f102096743
4 changed files with 393 additions and 0 deletions

11
.config/waybar/colors.css Normal file
View File

@ -0,0 +1,11 @@
@define-color background #2e3440;
@define-color foreground #eceff4;
@define-color white #e5e9f0;
@define-color black #3b4252;
@define-color red #bf616a;
@define-color blue #88c0d0;
@define-color green #a3be8c;
@define-color yellow #ebcb8b;
@define-color magenta #b48ead;
@define-color cyan #88c0d0;
@define-color orange #d08770;

108
.config/waybar/config Normal file
View File

@ -0,0 +1,108 @@
{
// "layer": "top", // Waybar at top layer
"position": "top",
"height": 39,
"width": 1895,
"spacing": 10,
"modules-left": ["hyprland/window","pulseaudio"],
"modules-center": ["wlr/workspaces"],
"modules-right": ["custom/cmus", "custom/weather", "tray", "battery", "custom/language", "clock"],
"wlr/workspaces": {
"format": "{icon}",
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"on-click": "activate",
"all-outputs": false,
"format": "{icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"tray": {
"spacing": 10,
"icon-size": 15
},
"clock": {
"format": "{:%I:%M %p}",
"format-alt": "{:%Y-%m-%d %I:%M %p}"
},
"custom/cmus": {
"format": " {}",
"max-length": 45,
"interval": 10,
"exec": "cmus-remote -C \"format_print '%F'\"",
"exec-if": "pgrep cmus",
"on-click": "cmus-remote -u",
"on-scroll-up": "cmus-remote --next",
"on-scroll-down": "cmus-remote --prev",
"escape": true
},
"custom/weather": {
"format": "{}",
"exec": "~/.config/waybar/openweathermap-simple.sh",
// "exec": "curl 'https://wttr.in/?format=1'",
"interval": 3600
},
"hyprland/window": {
"format": "{}",
"separate-outputs": false,
"max-length": 20
},
"custom/language": {
"exec": "~/.config/hypr/scripts/kb_hypr",
"interval": 1,
"format": " {}",
},
"battery": {
"states": {
"good": 60,
"warning": 40,
"critical": 30
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-full": " full charged",
"format-warning": " {capacity}%",
"format-critical": " {capacity}%",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"pulseaudio": {
"scroll-step": 1,
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon} ",
"format-bluetooth-muted": " {icon} ",
"format-muted": "",
"format-source": "",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"default": ["", "", ""]
},
"on-click": "pkill pulsemixer; foot -e pulsemixer"
}
}

View File

@ -0,0 +1,75 @@
#!/bin/sh
get_icon() {
case $1 in
# Icons for weather-icons
01d) icon="";;
01n) icon="";;
02d) icon="";;
02n) icon="";;
03*) icon="";;
04*) icon="";;
09d) icon="";;
09n) icon="";;
10d) icon="";;
10n) icon="";;
11d) icon="";;
11n) icon="";;
13d) icon="";;
13n) icon="";;
50d) icon="";;
50n) icon="";;
*) icon="";
# Icons for Font Awesome 5 Pro
#01d) icon="";;
#01n) icon="";;
#02d) icon="";;
#02n) icon="";;
#03d) icon="";;
#03n) icon="";;
#04*) icon="";;
#09*) icon="";;
#10d) icon="";;
#10n) icon="";;
#11*) icon="";;
#13*) icon="";;
#50*) icon="";;
#*) icon="";
esac
echo $icon
}
KEY="e434b5435a979de6e155570590bee89b"
CITY="Novosibirsk"
UNITS="metric"
SYMBOL="°"
API="https://api.openweathermap.org/data/2.5"
if [ -n "$CITY" ]; then
if [ "$CITY" -eq "$CITY" ] 2>/dev/null; then
CITY_PARAM="id=$CITY"
else
CITY_PARAM="q=$CITY"
fi
weather=$(curl -sf "$API/weather?appid=$KEY&$CITY_PARAM&units=$UNITS")
else
location=$(curl -sf https://location.services.mozilla.com/v1/geolocate?key=geoclue)
if [ -n "$location" ]; then
location_lat="$(echo "$location" | jq '.location.lat')"
location_lon="$(echo "$location" | jq '.location.lng')"
weather=$(curl -sf "$API/weather?appid=$KEY&lat=$location_lat&lon=$location_lon&units=$UNITS")
fi
fi
if [ -n "$weather" ]; then
weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
weather_icon=$(echo "$weather" | jq -r ".weather[0].icon")
echo "$(get_icon "$weather_icon")" "$weather_temp$SYMBOL"
fi

199
.config/waybar/style.css Normal file
View File

@ -0,0 +1,199 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, JetBrainsMono, sans-serif;
font-size: 13px;
}
@import "./colors.css";
window#waybar {
background-color: rgba(43, 48, 59, 0.0);
color: @foreground;
transition-property: background-color;
transition-duration: .5s;
padding: 0;
margin: 0;
}
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
button {
margin: 0;
padding: 10px;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
}
button:hover {
margin: 0;
padding: 10px;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
}
button:focus {
margin: 0;
padding: 10px;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
}
#workspaces {
margin: 0;
}
#workspaces button {
padding: 0 5px;
margin: 5px;
background-color: @background;
color: #444b6a;
border-radius: 16px;
}
#workspaces button:hover {
color: @background;
}
#workspaces button.active {
background-color: @background;
color: @blue;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#tray {
padding: 7px;
margin: 5px 0 5px 0;
background-color: @background;
color: #d8dee8;
border-radius: 12px;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#custom-cmus {
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
background-color: @background;
color: #b9f27c;
border-radius: 15px;
}
#window {
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
background-color: @background;
color: @white;
border-radius: 12px;
}
#clock {
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
background-color: @background;
color: @white;
border-radius: 12px;
}
#mode,
#custom-weather {
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
label:focus {
background-color: #ffffff;
}
#custom-language {
background-color: @background;
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
border-radius: 12px;
}
/* #keyboard-state { */
/* background: #97e1ad; */
/* color: #000000; */
/* padding: 0 0px; */
/* margin: 0 5px; */
/* min-width: 16px; */
/* } */
/**/
/* #keyboard-state > label { */
/* padding: 0 0px; */
/* } */
/**/
/* #keyboard-state > label.locked { */
/* background: rgba(0, 0, 0, 0.2); */
/* } */
#pulseaudio {
background-color: @background;
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
border-radius: 12px;
}
#battery {
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
border-radius: 12px;
color: @blue;
background: @background;
}
#battery.charging, #battery.plugged {
color: @green;
background-color: @background;
}
#battery.warning:not(.charging) {
background-color: @background;
color: @orange;
}
#battery.critical:not(.charging) {
background-color: @barkground;
color: @red;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}