Adding sway, waybar, wofi and other things

This commit is contained in:
Chris Cochrun 2021-03-24 08:23:52 -05:00
parent b0cb73adda
commit 3b6d7cac88
5 changed files with 444 additions and 49 deletions

View file

@ -1,57 +1,33 @@
{
// "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
"position": "bottom", // Waybar position (top|bottom|left|right)
"height": 20, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": [],
"modules-left": ["sway/workspaces", "sway/mode", "sway/window"],
"modules-center": ["clock"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "battery", "battery#bat2", "tray"],
"margin-top": 5,
"margin-bottom": 5,
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
// },
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
"on": " "
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
@ -74,7 +50,7 @@
"tooltip": false
},
"memory": {
"format": "{}% "
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
@ -104,12 +80,24 @@
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
"bat": "BAT2",
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-ethernet": "{ifname}: {ipaddr}",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
@ -144,5 +132,18 @@
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
},
"wlr/taskbar": {
"format": "<span style='italic'>{icon} {title}</span>",
"icon-size": 20,
"icon-theme": "Papirus-Dark",
"tooltip-format": "{title}",
"max-length": 30,
"on-click": "activate",
"on-click-middle": "close"
},
"sway/window": {
"format": " {} ",
"max-length": 60,
}
}

171
waybar/style.css Normal file
View file

@ -0,0 +1,171 @@
@define-color base00 #282a36;
@define-color base01 #34353e;
@define-color base02 #43454f;
@define-color base03 #78787e;
@define-color base04 #a5a5a9;
@define-color base05 #e2e4e5;
@define-color base06 #eff0eb;
@define-color base07 #f1f1f0;
@define-color base08 #ff5c57;
@define-color base09 #ff9f43;
@define-color base0A #f3f99d;
@define-color base0B #5af78e;
@define-color base0C #9aedfe;
@define-color base0D #57c7ff;
@define-color base0E #ff6ac1;
@define-color base0F #b2643c;
* {
border: none;
border-radius: 0;
font-family: VictorMono Nerd Font;
font-size: 12px;
font-weight: bold;
box-shadow: none;
text-shadow: none;
transition-duration: 0s;
}
window {
color: @base05;
background: rgba(1, 1, 1, 0.0);
}
window#waybar.solo {
background: rgba(1, 1, 1, 0.40);
}
#workspaces {
border-radius: 20px;
margin-left: 10px;
padding-right: 10px;
background: rgba(40, 42, 54, 0.85);
transition: none;
}
#workspaces button {
transition: none;
color: rgba(217, 216, 216, 0.4);
background: transparent;
}
#workspaces button.visible {
color: rgba(217, 216, 216, 1);
}
#workspaces button.focused {
color: #9aedfe;
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
color: #ff79c6;
}
#workspaces button.urgent {
color: rgba(238, 46, 36, 1);
}
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail {
margin: 0px 6px 0px 5px;
min-width: 25px;
}
#clock {
margin-left: 2px;
margin-right: 2px;
padding-left: 10px;
padding-right: 10px;
border-radius: 20px;
transition: none;
color: #4d4d4d;
background: rgba(107, 142, 35, 0.85);
}
#backlight {
margin-left: 2px;
margin-right: 2px;
padding-left: 5px;
padding-right: 5px;
border-radius: 20px;
transition: none;
color: #4d4d4d;
background: rgba(188, 143, 143, 0.85);
}
#battery.warning {
color: rgba(255, 210, 4, 1);
}
#battery.critical {
color: rgba(238, 46, 36, 1);
}
#battery.charging {
color: rgba(217, 216, 216, 1);
}
#pulseaudio {
margin-left: 2px;
margin-right: 2px;
padding-left: 10px;
padding-right: 10px;
border-radius: 20px;
transition: none;
color: #4d4d4d;
background: rgba(189, 183, 107, 0.85);
}
#network {
margin-left: 2px;
margin-right: 2px;
padding-left: 10px;
padding-right: 14px;
border-radius: 20px;
transition: none;
color: #4d4d4d;
background: rgba(189, 183, 107, 0.85);
}
#cpu {
margin-left: 2px;
margin-right: 2px;
padding-left: 10px;
padding-right: 10px;
border-radius: 20px;
transition: none;
color: #4d4d4d;
background: rgba(205, 92, 92, 0.85);
}
#battery {
margin-left: 2px;
margin-right: 2px;
padding-left: 10px;
padding-right: 18px;
border-radius: 20px;
transition: none;
color: #4d4d4d;
background: rgba(176, 196, 222, 0.85);
}
#battery.bat2 {
margin-right: 10px;
}
#memory {
margin-left: 2px;
margin-right: 2px;
padding-left: 10px;
padding-right: 10px;
border-radius: 20px;
transition: none;
color: #4d4d4d;
background: rgba(222, 184, 135, 0.85);
}
#tray {
margin-right: 10px;
}