added Hyprland, Ly and Waybar configs

This commit is contained in:
2024-03-23 17:31:21 +10:30
parent 2618017935
commit b6fdf40ace
24 changed files with 1783 additions and 0 deletions

196
waybar/config Normal file
View File

@@ -0,0 +1,196 @@
{
"layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 36, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
// "gtk-layer-shell": "false",
// Choose the order of the modules
"modules-left": ["hyprland/workspaces", "hyprland/mode"],
"modules-center": ["hyprland/window"],
"modules-right": ["custom/zypper", "network", "bluetooth", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "pulseaudio", "custom/layout", "tray", "clock", "custom/notification"],
"sway/mode": {
"format": " {}"
},
"sway/workspaces": {
"all-outputs": false,
"disable-scroll": true,
"format": " {icon} ",
"format-icons": {
"urgent": "",
"focused": "",
"default": ""
}
},
"hyprland/window": {
"max-length": 80,
"tooltip": false
},
"custom/layout": {
"tooltip": false,
"exec": "swaymsg -mrt subscribe '[\"input\"]' | jq -r --unbuffered \"select(.change == \\\"xkb_layout\\\") | .input | select(.type == \\\"keyboard\\\") | .xkb_active_layout_name | .[0:2]\""
},
"custom/zypper": {
"format": "{} ",
"interval": 3600,
"exec": "zypper lu | grep 'v |' | wc -l; echo 'packages to update'",
"exec-if": "exit 0",
"on-click": "exec alacritty -e sudo sh -c 'zypper ref; zypper dup; pkill -SIGRTMIN+8 waybar'",
"signal": 8
},
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
// },
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"format": " {:%b %d %Y %R}",
"format-alt": "{:%a %d %b w:%V %H:%M}",
"tooltip-format": "<span color='#35b9ab'><tt><small>{calendar}</small></tt></span>",
"calendar": {
"mode-mon-col" : 4,
"weeks-pos" : "left",
"on-scroll" : 1,
"on-click-right" : "mode",
"format": {
"months": "<span color='#35b9ab'><b>{}</b></span>",
"weeks": "<span color='#73ba25'><b>{}</b></span>",
"weekdays": "<span color='#21a4df'><b>{}</b></span>",
"today": "<span color='#21a4df'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right" : "mode",
"on-scroll-up" : "shift_up",
"on-scroll-down" : "shift_down"
},
"interval": 10
},
"cpu": {
"format": "{usage}% ",
"tooltip": false,
"on-click-right": "exec alacritty -e btm"
},
"memory": {
"format": "{}% ",
"on-click-right": "exec alacritty -e btm"
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon}",
"format-charging": "",
"format-plugged": "",
"format-alt": "{capacity}% {time}",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "",
"format-ethernet": "",
"format-linked": "",
"format-disconnected": "⚠",
"format-alt": "{ifname} {essid} ({signalStrength}%)"
},
"bluetooth": {
"format": "",
"format-disabled": "",
"format-off": "",
"format-connected": " {num_connections}",
// "format-connected": " {device_alias}",
"tooltip-format": "{controller_address} {status}\n\n{num_connections} connected",
"tooltip-format-disabled": "{status}",
"tooltip-format-connected": "{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
"on-click": "bluetooth toggle; pkill -SIGRTMIN+8 waybar",
"on-click-right": "blueman-manager"
},
"pulseaudio": {
"format": "{icon}",
"format-alt": "{volume} {icon}",
"format-alt-click": "click-right",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"scroll-step": 10,
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"on-click-right": "pavucontrol",
"tooltip": false
},
"custom/scratchpad": {
"format-text": "{}",
"return-type": "json",
"interval": 3,
"exec": "/usr/share/openSUSEway/helpers/scratchpad-indicator.sh 2> /dev/null",
"exec-if": "exit 0",
"on-click": "swaymsg 'scratchpad show'",
"on-click-right": "swaymsg 'move scratchpad'"
},
"custom/notification": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"notification": "<span foreground='red'><small><sup>⬤</sup></small></span>",
"none": " ",
"dnd-notification": "<span foreground='red'><small><sup>⬤</sup></small></span>",
"dnd-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
}
}

350
waybar/style.css Normal file
View File

@@ -0,0 +1,350 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
/*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button {
margin: 5px 0px;
}
#workspaces button:first-child{
border-radius: 10px 0px 0px 10px;
margin-left: 5px;
}
#workspaces button:last-child{
border-radius: 0px 10px 10px 0px;
}
#workspaces button {
padding: 0 5px;
background-color: #31404A;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.active {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#bluetooth,
#mode,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
#mpd {
padding: 0 10px;
color: #ffffff;
margin: 5px;
border-radius: 10px;
}
#window,
#workspaces {
margin: 0 4px;
}
.modules-center {
background: #288f75;
border-radius: 10px;
margin: 5px 0px;
padding: 0 10px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
#bluetooth {
color: #000000;
background-color: #ffffff;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
#power-profiles-daemon {
padding-right: 15px;
}
#power-profiles-daemon.performance {
background-color: #f53c3c;
color: #ffffff;
}
#power-profiles-daemon.balanced {
background-color: #2980b9;
color: #ffffff;
}
#power-profiles-daemon.power-saver {
background-color: #2ecc71;
color: #000000;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}
#privacy {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
}