Dotfiles config update (2022-05-01)
This commit is contained in:
parent
5cdcc6b054
commit
b9f4e0f453
|
@ -8,7 +8,8 @@
|
||||||
"modules-left": ["sway/workspaces"],
|
"modules-left": ["sway/workspaces"],
|
||||||
// "modules-center": ["sway/window"],
|
// "modules-center": ["sway/window"],
|
||||||
//"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "sway/language", "battery", "battery#bat2", "clock", "tray"],
|
//"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "sway/language", "battery", "battery#bat2", "clock", "tray"],
|
||||||
"modules-right": ["custom/kernel", "custom/cpu", "custom/memory", "custom/disk", "pulseaudio", "sway/language", "network", "custom/clock", "tray"],
|
//"modules-right": ["custom/kernel", "custom/cpu", "custom/memory", "custom/disk", "pulseaudio", "sway/language", "network", "custom/clock", "tray"],
|
||||||
|
"modules-right": ["custom/checkupdates", "custom/kernel", "custom/cpu", "custom/memory", "custom/getvolume", "sway/language", "custom/currentdate","tray"],
|
||||||
// Modules configuration
|
// Modules configuration
|
||||||
// "sway/workspaces": {
|
// "sway/workspaces": {
|
||||||
// "disable-scroll": true,
|
// "disable-scroll": true,
|
||||||
|
@ -49,7 +50,7 @@
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
//"max-length": 12,
|
//"max-length": 12,
|
||||||
"interval": 10,
|
"interval": 10,
|
||||||
"exec": "~/.config/waybar/scripts/kernel_version.sh",
|
"exec": "~/.config/waybar/iscripts/kernel_version.sh",
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/clock": {
|
"custom/clock": {
|
||||||
|
@ -59,25 +60,46 @@
|
||||||
"exec": "date '+%h %d, %H:%M'",
|
"exec": "date '+%h %d, %H:%M'",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"custom/currentdate": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 2,
|
||||||
|
"exec": "~/.config/waybar/iscripts/current_date.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/getvolume": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 2,
|
||||||
|
"exec": "~/.config/waybar/iscripts/get_volume.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/checkupdates": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 1800,
|
||||||
|
"exec": "~/.config/waybar/iscripts/checkUpdates.sh",
|
||||||
|
},
|
||||||
|
|
||||||
"custom/cpu": {
|
"custom/cpu": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
//"max-length": 12,
|
//"max-length": 12,
|
||||||
"interval": 2,
|
"interval": 2,
|
||||||
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
"exec": "~/.config/waybar/iscripts/cpu_info.sh",
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/memory": {
|
"custom/memory": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
//"max-length": 12,
|
//"max-length": 12,
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
"exec": "~/.config/waybar/scripts/mem_info.sh",
|
"exec": "~/.config/waybar/iscripts/mem_info.sh",
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/disk": {
|
"custom/disk": {
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
//"max-length": 12,
|
//"max-length": 12,
|
||||||
"interval": 10,
|
"interval": 10,
|
||||||
"exec": "~/.config/waybar/scripts/disk_info.sh",
|
"exec": "~/.config/waybar/iscripts/disk_info.sh",
|
||||||
},
|
},
|
||||||
|
|
||||||
"idle_inhibitor": {
|
"idle_inhibitor": {
|
||||||
|
|
198
.config/waybar/config.icons
Normal file
198
.config/waybar/config.icons
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
{
|
||||||
|
// "layer": "top", // Waybar at top layer
|
||||||
|
"position": "top", // Waybar position (top|bottom|left|right)
|
||||||
|
"height": 28, // Waybar height (to be removed for auto height)
|
||||||
|
// "width": 1280, // Waybar width
|
||||||
|
// Choose the order of the modules
|
||||||
|
// "modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
|
||||||
|
"modules-left": ["sway/workspaces"],
|
||||||
|
// "modules-center": ["sway/window"],
|
||||||
|
//"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "sway/language", "battery", "battery#bat2", "clock", "tray"],
|
||||||
|
//"modules-right": ["custom/kernel", "custom/cpu", "custom/memory", "custom/disk", "pulseaudio", "sway/language", "network", "custom/clock", "tray"],
|
||||||
|
"modules-right": ["custom/checkupdates", "custom/kernel", "custom/cpu", "custom/memory", "custom/getvolume", "sway/language", "custom/currentdate","tray"],
|
||||||
|
// 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": {
|
||||||
|
"all-outputs": false,
|
||||||
|
//"format": "{name}: {icon}",
|
||||||
|
"format": "{name}",
|
||||||
|
"format-icons": {
|
||||||
|
// "1": "",
|
||||||
|
// "2": "",
|
||||||
|
// "3": "",
|
||||||
|
// "4": "",
|
||||||
|
// "5": "",
|
||||||
|
"urgent": "",
|
||||||
|
"focused": "",
|
||||||
|
"default": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"sway/mode": {
|
||||||
|
"format": "<span style=\"italic\">{}</span>"
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/kernel": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 10,
|
||||||
|
"exec": "~/.config/waybar/iscripts/kernel_version.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/clock": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 20,
|
||||||
|
"exec": "date '+%h %d, %H:%M'",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/currentdate": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 2,
|
||||||
|
"exec": "~/.config/waybar/iscripts/current_date.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/getvolume": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 2,
|
||||||
|
"exec": "~/.config/waybar/iscripts/get_volume.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/checkupdates": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 1800,
|
||||||
|
"exec": "~/.config/waybar/iscripts/checkUpdates.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/cpu": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 2,
|
||||||
|
"exec": "~/.config/waybar/iscripts/cpu_info.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/memory": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 5,
|
||||||
|
"exec": "~/.config/waybar/iscripts/mem_info.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/disk": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 10,
|
||||||
|
"exec": "~/.config/waybar/iscripts/disk_info.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"idle_inhibitor": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"activated": "",
|
||||||
|
"deactivated": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
// "icon-size": 21,
|
||||||
|
"spacing": 5
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
// "timezone": "America/New_York",
|
||||||
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "{usage}% ",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": "{}% "
|
||||||
|
},
|
||||||
|
"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": "{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": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"battery#bat2": {
|
||||||
|
"bat": "BAT2"
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||||
|
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
|
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
|
||||||
|
"format-linked": "{ifname} (No IP) ",
|
||||||
|
"format-disconnected": "Disconnected ⚠",
|
||||||
|
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
// "scroll-step": 1, // %, can be a float
|
||||||
|
"format": "{volume}% {icon}",
|
||||||
|
//"format": "{volume}% {icon} {format_source}",
|
||||||
|
//"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||||
|
//"format-bluetooth-muted": " {icon} {format_source}",
|
||||||
|
//"format-muted": " {format_source}",
|
||||||
|
//"format-source": "{volume}% ",
|
||||||
|
//"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
"custom/media": {
|
||||||
|
"format": "{icon} {}",
|
||||||
|
"return-type": "json",
|
||||||
|
"max-length": 40,
|
||||||
|
"format-icons": {
|
||||||
|
"spotify": "",
|
||||||
|
"default": "🎜"
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
176
.config/waybar/config.simple
Normal file
176
.config/waybar/config.simple
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
{
|
||||||
|
// "layer": "top", // Waybar at top layer
|
||||||
|
"position": "top", // Waybar position (top|bottom|left|right)
|
||||||
|
"height": 28, // Waybar height (to be removed for auto height)
|
||||||
|
// "width": 1280, // Waybar width
|
||||||
|
// Choose the order of the modules
|
||||||
|
// "modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
|
||||||
|
"modules-left": ["sway/workspaces"],
|
||||||
|
// "modules-center": ["sway/window"],
|
||||||
|
//"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "sway/language", "battery", "battery#bat2", "clock", "tray"],
|
||||||
|
"modules-right": ["custom/kernel", "custom/cpu", "custom/memory", "custom/disk", "pulseaudio", "sway/language", "network", "custom/clock", "tray"],
|
||||||
|
// 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": {
|
||||||
|
"all-outputs": false,
|
||||||
|
//"format": "{name}: {icon}",
|
||||||
|
"format": "{name}",
|
||||||
|
"format-icons": {
|
||||||
|
// "1": "",
|
||||||
|
// "2": "",
|
||||||
|
// "3": "",
|
||||||
|
// "4": "",
|
||||||
|
// "5": "",
|
||||||
|
"urgent": "",
|
||||||
|
"focused": "",
|
||||||
|
"default": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"sway/mode": {
|
||||||
|
"format": "<span style=\"italic\">{}</span>"
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/kernel": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 10,
|
||||||
|
"exec": "~/.config/waybar/scripts/kernel_version.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/clock": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 20,
|
||||||
|
"exec": "date '+%h %d, %H:%M'",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/cpu": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 2,
|
||||||
|
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/memory": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 5,
|
||||||
|
"exec": "~/.config/waybar/scripts/mem_info.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/disk": {
|
||||||
|
"format": "{}",
|
||||||
|
//"max-length": 12,
|
||||||
|
"interval": 10,
|
||||||
|
"exec": "~/.config/waybar/scripts/disk_info.sh",
|
||||||
|
},
|
||||||
|
|
||||||
|
"idle_inhibitor": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"activated": "",
|
||||||
|
"deactivated": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
// "icon-size": 21,
|
||||||
|
"spacing": 5
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
// "timezone": "America/New_York",
|
||||||
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "{usage}% ",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": "{}% "
|
||||||
|
},
|
||||||
|
"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": "{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": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"battery#bat2": {
|
||||||
|
"bat": "BAT2"
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||||
|
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
|
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
|
||||||
|
"format-linked": "{ifname} (No IP) ",
|
||||||
|
"format-disconnected": "Disconnected ⚠",
|
||||||
|
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
// "scroll-step": 1, // %, can be a float
|
||||||
|
"format": "{volume}% {icon}",
|
||||||
|
//"format": "{volume}% {icon} {format_source}",
|
||||||
|
//"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||||
|
//"format-bluetooth-muted": " {icon} {format_source}",
|
||||||
|
//"format-muted": " {format_source}",
|
||||||
|
//"format-source": "{volume}% ",
|
||||||
|
//"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
"custom/media": {
|
||||||
|
"format": "{icon} {}",
|
||||||
|
"return-type": "json",
|
||||||
|
"max-length": 40,
|
||||||
|
"format-icons": {
|
||||||
|
"spotify": "",
|
||||||
|
"default": "🎜"
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
22
.config/waybar/iscripts/checkUpdates.sh
Executable file
22
.config/waybar/iscripts/checkUpdates.sh
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check updates on Arch Linux
|
||||||
|
# Note: Create cron on /etc/cron.d/checkupdates with the following lines:
|
||||||
|
# 0 * * * * root /usr/bin/pacman -Sy
|
||||||
|
# 30 * * * * root /usr/bin/pacman -Sy
|
||||||
|
if [ -f /usr/bin/pacman ] ; then
|
||||||
|
num_packages=$(pacman -Qu | wc -l)
|
||||||
|
echo " ${num_packages} "
|
||||||
|
|
||||||
|
# Check updates on Ubuntu/Debian/Devuan
|
||||||
|
# Note: Create cron on /etc/cron.d/checkupdates with the following lines:
|
||||||
|
# 0 * * * * root /usr/bin/aptitude update
|
||||||
|
# 30 * * * * root /usr/bin/aptitude update
|
||||||
|
elif [ -f /usr/bin/aptitude ] ; then
|
||||||
|
num_packages=$(aptitude search "~U" | wc -l)
|
||||||
|
echo " ${num_packages} "
|
||||||
|
|
||||||
|
# Disable for other distros
|
||||||
|
else
|
||||||
|
echo " 0 "
|
||||||
|
fi
|
20
.config/waybar/iscripts/cpu_info.sh
Executable file
20
.config/waybar/iscripts/cpu_info.sh
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
check_sensor=$(sensors | grep "Tdie:" 2> /dev/null)
|
||||||
|
if [ -z "${check_sensor}" ] ; then
|
||||||
|
check_sensor=$(sensors | grep "Tctl:" 2> /dev/null)
|
||||||
|
if [ -z "${check_sensor}" ] ; then
|
||||||
|
CPU_USAGE=$(~/.config/polybar/iscripts/cpu_load.sh -p)
|
||||||
|
echo "$CPU_USAGE" | awk '{ printf("%6s \n"), $1, $2 }'
|
||||||
|
else
|
||||||
|
TEMP=$(sensors | grep 'Package id 0:\|Tctl' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
||||||
|
#CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
|
||||||
|
CPU_USAGE=$(~/.config/polybar/scripts/cpu_load.sh -p)
|
||||||
|
echo "$CPU_USAGE $TEMP" | awk '{ printf("%6s @ %s \n"), $1, $2 }'
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
TEMP=$(sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
||||||
|
#CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
|
||||||
|
CPU_USAGE=$(~/.config/polybar/iscripts/cpu_load.sh -p)
|
||||||
|
echo "$CPU_USAGE $TEMP" | awk '{ printf("%6s @ %s \n"), $1, $2 }'
|
||||||
|
fi
|
83
.config/waybar/iscripts/cpu_load.sh
Executable file
83
.config/waybar/iscripts/cpu_load.sh
Executable file
|
@ -0,0 +1,83 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script to show cpu
|
||||||
|
# Created by q3aql (q3aql@protonmail.ch)
|
||||||
|
# Licensed by GPL v.2
|
||||||
|
# Date: 10-01-2020
|
||||||
|
# --------------------------------------
|
||||||
|
VERSION="1.0"
|
||||||
|
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
cpuPercentage=$(top -b -n1 | grep \%Cpu | awk '{print 100-$8}')
|
||||||
|
showCpuPercentage=$(echo ${cpuPercentage})
|
||||||
|
showCpuPercentageInteger=$(echo ${showCpuPercentage} | cut -d "." -f 1)
|
||||||
|
|
||||||
|
# Show percentage bar
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 0 ] ; then
|
||||||
|
showCpuPercentageBar="="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 3 ] ; then
|
||||||
|
showCpuPercentageBar="=="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 12 ] ; then
|
||||||
|
showCpuPercentageBar="==="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 18 ] ; then
|
||||||
|
showCpuPercentageBar="===="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 25 ] ; then
|
||||||
|
showCpuPercentageBar="====="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 35 ] ; then
|
||||||
|
showCpuPercentageBar="======"
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 40 ] ; then
|
||||||
|
showCpuPercentageBar="======="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 45 ] ; then
|
||||||
|
showCpuPercentageBar="========"
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 50 ] ; then
|
||||||
|
showCpuPercentageBar="=========="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 62 ] ; then
|
||||||
|
showCpuPercentageBar="============="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 75 ] ; then
|
||||||
|
showCpuPercentageBar="==============="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 85 ] ; then
|
||||||
|
showCpuPercentageBar="================="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 90 ] ; then
|
||||||
|
showCpuPercentageBar="=================="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 95 ] ; then
|
||||||
|
showCpuPercentageBar="==================="
|
||||||
|
fi
|
||||||
|
if [ ${showCpuPercentageInteger} -ge 100 ] ; then
|
||||||
|
showCpuPercentageBar="===================="
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show results
|
||||||
|
if [ "$1" == "-p" ]; then
|
||||||
|
echo ${showCpuPercentage}%
|
||||||
|
elif [ "$1" == "-b" ]; then
|
||||||
|
echo ${showCpuPercentageBar}
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo " cpuinfo v$VERSION"
|
||||||
|
echo " ------------"
|
||||||
|
echo ""
|
||||||
|
echo " CpuPercentage Use:"
|
||||||
|
echo " ${showCpuPercentageBar} ${showCpuPercentage}%"
|
||||||
|
echo ""
|
||||||
|
echo " Available commands:"
|
||||||
|
echo ""
|
||||||
|
echo " cpuinfo.sh -p | Show CpuPercentage"
|
||||||
|
echo " cpuinfo.sh -b | Show CpuPercentage Bar"
|
||||||
|
echo ""
|
||||||
|
echo " Note: Conky require 'maximum_width = 240'"
|
||||||
|
echo ""
|
||||||
|
fi
|
4
.config/waybar/iscripts/current_date.sh
Executable file
4
.config/waybar/iscripts/current_date.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
current_date=$(date "+%d/%m/%Y %H:%M")
|
||||||
|
echo " ${current_date}"
|
3
.config/waybar/iscripts/disk_info.sh
Executable file
3
.config/waybar/iscripts/disk_info.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
df -h / | awk '/\//{ printf(" %4s / %s \n", $4, $2) }'
|
4
.config/waybar/iscripts/get_volume.sh
Executable file
4
.config/waybar/iscripts/get_volume.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
get_volume=$(amixer | grep "%" | head -1 | cut -d "%" -f 1 | cut -d "[" -f 2)
|
||||||
|
echo " ${get_volume}% "
|
34
.config/waybar/iscripts/kernel_version.sh
Executable file
34
.config/waybar/iscripts/kernel_version.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Parameters
|
||||||
|
longNumber=2
|
||||||
|
kernelCommand="uname -r"
|
||||||
|
archCommand=$(uname -m)
|
||||||
|
|
||||||
|
# Kernel version
|
||||||
|
kernelVersion=""
|
||||||
|
count=1
|
||||||
|
|
||||||
|
# Extract numbers of kernel version
|
||||||
|
kernelVersionTemp=$(uname -r | cut -d "." -f ${count})
|
||||||
|
kernelVersionTempDot="${kernelVersionTemp}"
|
||||||
|
kernelVersion="${kernelVersion}${kernelVersionTempDot}"
|
||||||
|
count=$(expr ${count} + 1)
|
||||||
|
|
||||||
|
while [ ${count} -le ${longNumber} ] ; do
|
||||||
|
kernelVersionTemp=$(uname -r | cut -d "." -f ${count})
|
||||||
|
kernelVersionTempDot=".${kernelVersionTemp}"
|
||||||
|
kernelVersion="${kernelVersion}${kernelVersionTempDot}"
|
||||||
|
count=$(expr ${count} + 1)
|
||||||
|
done
|
||||||
|
|
||||||
|
kernelVersionTemp=$(uname -r | cut -d "." -f ${count} | cut -d "-" -f 1)
|
||||||
|
kernelVersionTempDot=".${kernelVersionTemp}"
|
||||||
|
kernelVersion=${kernelVersion}${kernelVersionTempDot}
|
||||||
|
|
||||||
|
# Apply arch
|
||||||
|
#kernelVersion=${kernelVersion}-${archCommand}
|
||||||
|
kernelVersion=${kernelVersion}
|
||||||
|
#echo "Kernel: Linux ${kernelVersion} "
|
||||||
|
echo " Linux ${kernelVersion} "
|
||||||
|
|
6
.config/waybar/iscripts/mem_info.sh
Executable file
6
.config/waybar/iscripts/mem_info.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mem_info=$(free -h | awk '/Mem:/ { printf(" %5s/%s \n", $3, $2) }')
|
||||||
|
echo -n " "
|
||||||
|
echo -n ${mem_info}
|
||||||
|
echo " "
|
|
@ -2,8 +2,8 @@
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
/* `otf-font-awesome` is required to be installed for icons */
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
font-family: Noto Sans, Roboto, Helvetica, Arial, sans-serif;
|
font-family: UbuntuMono Nerd Font, Noto Sans, Roboto, Helvetica, Arial, sans-serif;
|
||||||
font-size: 13px;
|
font-size: 15px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,6 +108,11 @@ window#waybar.chromium {
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-currentdate {
|
||||||
|
color: #C14F3F;
|
||||||
|
margin: 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
#custom-kernel {
|
#custom-kernel {
|
||||||
color: #51A6E3;
|
color: #51A6E3;
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
|
@ -123,6 +128,16 @@ window#waybar.chromium {
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-checkupdates {
|
||||||
|
color: #CADD8A;
|
||||||
|
margin: 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-getvolume {
|
||||||
|
color: #DDAA33;
|
||||||
|
margin: 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
#custom-clock {
|
#custom-clock {
|
||||||
color: #51A6E3;
|
color: #51A6E3;
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
|
|
|
@ -29,6 +29,7 @@ dotfiles - My tiling sway configuration (for Arch/Devuan/Debian)
|
||||||
$ cd dotfiles
|
$ cd dotfiles
|
||||||
$ chmod +x install-config.sh
|
$ chmod +x install-config.sh
|
||||||
$ ./install-config.sh
|
$ ./install-config.sh
|
||||||
|
$ cp -rfv ~/.config/waybar/config.icons ~/.config/waybar/config
|
||||||
````
|
````
|
||||||
|
|
||||||
### Configuration:
|
### Configuration:
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.6 MiB |
Loading…
Reference in New Issue
Block a user