initial commit

This commit is contained in:
Belal Elsabbagh
2024-12-18 19:45:33 +02:00
commit 408a1d9f1f
19 changed files with 1523 additions and 0 deletions

12
waybar/colors.css Executable file
View File

@@ -0,0 +1,12 @@
@define-color background-darker rgba(30, 31, 41, 230);
@define-color background #282a36;
@define-color selection #44475a;
@define-color foreground #f8f8f2;
@define-color comment #6272a4;
@define-color cyan #8be9fd;
@define-color green #50fa7b;
@define-color orange #ffb86c;
@define-color pink #ff79c6;
@define-color purple #bd93f9;
@define-color red #ff5555;
@define-color yellow #f1fa8c;

109
waybar/config Executable file
View File

@@ -0,0 +1,109 @@
{
"layer": "top",
"position": "top",
"margin": "9 13 -10 18",
"height": 24,
"spacing": 4,
"output": "eDP-1",
"modules-left": [
"hyprland/workspaces",
"hyprland/language",
"tray"
],
"modules-center": [
"clock"
],
"modules-right": [
"network",
"backlight",
"pulseaudio",
"cpu",
"memory",
"battery",
],
"hyprland/workspaces": {
"disable-scroll": true,
},
"hyprland/window": {
"max-length": 128
},
"clock": {
"format": "{:%a, %d %b, %H:%M}",
"tooltip-format": "<tt><small>{calendar}</small></tt>"
},
"hyprland/language": {
"format-en": "US",
"format-eg": "AR",
"on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next"
},
"battery": {
"interval": 2,
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", "", "", "", "", "", ""],
},
"backlight": {
"device": "intel_backlight",
"reverse-scrolling": 1,
"format": "{percent}% {icon}",
"format-icons": [""],
"min-length": 7,
},
"tray": {
"icon-size": 16,
"spacing": 4
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"reverse-scrolling": 1,
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}",
"format-bluetooth-muted": " {icon}",
"format-muted": " {format_source}",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol",
"min-length": 7,
},
"cpu": {
"interval": 2,
"format": "{usage}% ",
"min-length": 7
},
"memory": {
"interval": 2,
"format": "{used:0.1f}G ",
"max-length": 10,
"min-length": 8
},
"network": {
"interface": "wlp0s20f3",
"format": "{ifname}",
"format-wifi": "{bandwidthTotalBits} ",
"format-ethernet": "{ipaddr}/{cidr} 󰊗",
"format-disconnected": "", //An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} 󰊗",
"tooltip-format-wifi": "{essid}",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50,
"min-length": 12,
}
}

242
waybar/style.css Executable file
View File

@@ -0,0 +1,242 @@
@import url("./colors.css");
* {
border: none;
border-radius: 0;
font-family: FontAwesome, JetBrains Mono Nerd Font;
font-size: 10pt;
min-height: 16px;
}
window#waybar {
background: transparent;
color: @foreground;
padding: 2px;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces button {
padding: 0 10px;
background: @background;
color: @foreground;
}
#workspaces button.urgent {
background-image: linear-gradient(0deg, @red, @background-darker);
}
#clock {
padding: 4px;
background: @background;
}
#workspaces {
margin-right: 8px;
border-radius: 10px;
transition: none;
background: #383c4a;
}
#workspaces button {
transition: none;
color: #7c818c;
background: transparent;
padding: 5px;
font-size: 18px;
}
#workspaces button.persistent {
color: #7c818c;
font-size: 12px;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
border-radius: inherit;
color: #383c4a;
background-image: linear-gradient(0deg, @selection, @background-darker);
}
#workspaces button.active {
background-image: linear-gradient(0deg, @purple, @selection);
color: white;
border-radius: inherit;
}
#language {
padding: 0 8px;
border-radius: 10px;
transition: none;
border: 1px solid @purple;
color: @foreground;
background: @background;
}
#keyboard-state {
margin-right: 8px;
padding-right: 16px;
border-radius: 0px 10px 10px 0px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#custom-pacman {
padding-left: 16px;
padding-right: 8px;
border-radius: 10px 0px 0px 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#custom-mail {
margin-right: 8px;
padding-right: 16px;
border-radius: 0px 10px 10px 0px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#submap {
padding: 0 8px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#clock {
padding: 0 8px;
border-radius: 10px;
border: 1px solid @purple;
transition: none;
color: #ffffff;
background: @background;
}
#pulseaudio {
margin-right: 8px;
padding: 0 8px;
border: 1px solid @purple;
border-radius: 10px;
transition: none;
color: @foreground;
background: @background;
}
#pulseaudio.muted {
background-color: @red;
color: #2a5c45;
}
#memory {
margin-right: 8px;
padding: 0 8px;
border-radius: 10px;
border: 1px solid @purple;
transition: none;
color: @foreground;
background: @background;
}
#cpu {
margin-right: 8px;
padding: 0 8px;
border-radius: 10px;
border: 1px solid @purple;
transition: none;
color: @foreground;
background: @background;
}
#temperature {
margin-right: 8px;
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: @foreground;
background: @background;
}
#temperature.critical {
background-color: #eb4d4b;
}
#backlight {
margin-right: 8px;
padding: 0 8px;
border-radius: 10px;
border: 1px solid @purple;
transition: none;
color: @foreground;
background: @background;
}
#network {
margin-right: 8px;
padding: 0 8px;
border-radius: 10px;
border: 1px solid @purple;
transition: none;
color: @foreground;
background: @background;
}
#battery {
margin-right: 8px;
padding: 0 8px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#battery.charging {
color: @background;
background-color: @green;
}
#battery.warning:not(.charging) {
background-color: #ffbe61;
color: black;
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#tray {
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
border: 1px solid @purple;
transition: none;
color: @foreground;
background: @background;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}

5
waybar/wittr.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/sh
req=$(curl -s wttr.in/CITY?format="%t|%l+(%c%f)+%h,+%C")
bar=$(echo $req | awk -F "|" '{print $1}')
tooltip=$(echo $req | awk -F "|" '{print $2}')
echo "{\"text\":\"$bar\", \"tooltip\":\"$tooltip\"}"