mirror of
https://github.com/eliasrenman/dotfiles.git
synced 2026-03-16 20:46:08 +01:00
chore: moved to support stow
This commit is contained in:
208
.config/waybar/config
Normal file
208
.config/waybar/config
Normal file
@@ -0,0 +1,208 @@
|
||||
// Global
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"margin": 5,
|
||||
|
||||
// If height property would be not present, it'd be calculated dynamically
|
||||
"height": 34,
|
||||
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"custom/separator",
|
||||
"custom/weather",
|
||||
"custom/separator",
|
||||
"memory",
|
||||
"custom/separator",
|
||||
"cpu"
|
||||
],
|
||||
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
|
||||
"modules-right": [
|
||||
|
||||
"backlight#value",
|
||||
"custom/separator",
|
||||
"pulseaudio",
|
||||
"pulseaudio#microphone",
|
||||
"custom/separator",
|
||||
"network",
|
||||
"battery",
|
||||
"custom/separator",
|
||||
"custom/power"
|
||||
],
|
||||
|
||||
// Modules
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon} ",
|
||||
"format-icons":{
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}% {icon} ",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
// "format-full": "",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"interval": 10,
|
||||
// "format-alt": " {:%e %b %Y}", // Icon: calendar-alt
|
||||
"format": "{:%e %b %Y %H:%M} ",
|
||||
"tooltip-format": "{:%e %B %Y}"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 5,
|
||||
"format": " {usage}% ({load})", // Icon: nf-oct-cpu
|
||||
"states": {
|
||||
"warning": 70,
|
||||
"critical": 90,
|
||||
},
|
||||
"on-click": "alacritty -e 'glances'",
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 5,
|
||||
"format": " {}%", // Icon: nf-cod-graph
|
||||
"on-click": "alacritty -e 'glances'",
|
||||
"states": {
|
||||
"warning": 70,
|
||||
"critical": 90
|
||||
}
|
||||
},
|
||||
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"format-wifi": "", // Icon: wifi
|
||||
"format-ethernet": "", // Icon: ethernet
|
||||
"format-disconnected": "⚠ Disconnected",
|
||||
"tooltip-format": "{ifname}: {ipaddr}",
|
||||
"on-click": "alacritty -e 'nmtui'",
|
||||
},
|
||||
"network#vpn": {
|
||||
"interface": "tun0",
|
||||
"format": " ",
|
||||
"format-disconnected": "⚠ Disconnected",
|
||||
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
|
||||
},
|
||||
|
||||
"hyprland/mode": {
|
||||
"format": "{}",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"hyprland/window": {
|
||||
"format": "{}",
|
||||
"max-length": 120
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
// "on-scroll-up": "hyprctl dispatch workspace e+1",
|
||||
// "on-scroll-down": "hyprctl dispatch workspace e-1",
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"1": "Ⅰ",
|
||||
"2": "Ⅱ",
|
||||
"3": "Ⅲ",
|
||||
"4": "Ⅳ",
|
||||
"5": "Ⅴ",
|
||||
"6": "Ⅵ",
|
||||
"7": "Ⅶ",
|
||||
"8": "Ⅷ",
|
||||
"9": "Ⅸ",
|
||||
"10": "Ⅹ",
|
||||
//"active": "α",
|
||||
// "default": "1"
|
||||
// "persistent": ""
|
||||
},
|
||||
"all-outputs": true,
|
||||
"persistent_workspaces": {
|
||||
"*": 5
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"scroll-step": 1, // %, can be a float
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "וֹ",
|
||||
"headset": " ",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": [""]
|
||||
},
|
||||
"on-click": "volumectl toggle-mute",
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-scroll-up": "volumectl -u up",
|
||||
"on-scroll-down": "volumectl -u down"
|
||||
},
|
||||
|
||||
"pulseaudio#microphone": {
|
||||
"format": "{format_source}",
|
||||
"format-source": " {volume}%",
|
||||
"format-source-muted": " ",
|
||||
"on-click": "volumectl -m toggle-mute",
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-scroll-up": "volumectl -m up",
|
||||
"on-scroll-down": "volumectl -m down",
|
||||
"scroll-step": 5
|
||||
},
|
||||
|
||||
// to use the weather module replace <your_location> with your city or town
|
||||
// note: do not use spaces: new york would be newyork
|
||||
"custom/weather": {
|
||||
"exec": "sh ~/.config/waybar/scripts/weather.sh 'Vännäs'",
|
||||
"return-type": "json",
|
||||
"interval": 600,
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 18,
|
||||
"spacing":10,
|
||||
},
|
||||
|
||||
"backlight#icon": {
|
||||
"format": "{icon}",
|
||||
"on-scroll-down": "lightctl down",
|
||||
"on-scroll-up": "lightctl up"
|
||||
},
|
||||
|
||||
"backlight#value" :{
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": [" "],
|
||||
"on-scroll-down": "lightctl down",
|
||||
"on-scroll-up": "lightctl up"
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format":"⏻",
|
||||
"on-click": "exec wlogout",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/separator": {
|
||||
"format": "•",
|
||||
"interval": "once",
|
||||
"tooltip": false
|
||||
}
|
||||
}
|
||||
21
.config/waybar/scripts/PBPbattery.sh
Executable file
21
.config/waybar/scripts/PBPbattery.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
|
||||
#!/bin/bash
|
||||
#simple Shellscript for waybar/i3blocks/polybar on Pinebook pro
|
||||
#05012020 geri123@gmx.net Gerhard S.
|
||||
|
||||
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
|
||||
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
|
||||
case $((
|
||||
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
|
||||
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
|
||||
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
|
||||
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
|
||||
#
|
||||
(1) echo $STATUS:"":$PERCENT%;;
|
||||
(2) echo $STATUS:"":$PERCENT%;;
|
||||
(3) echo $STATUS:"":$PERCENT%;;
|
||||
(4) echo $STATUS:"":$PERCENT%;;
|
||||
(5) echo $STATUS:"":$PERCENT%;;
|
||||
esac
|
||||
|
||||
|
||||
2
.config/waybar/scripts/keyhint.sh
Executable file
2
.config/waybar/scripts/keyhint.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
yad --title="EndeavourOS Sway-WM keybindings:" --no-buttons --geometry=400x345-15-400 --list --column=key: --column=description: --column=command: "ESC" "close this app" "" "=" "modkey" "(set mod Mod4)" "+enter" "Terminal" "(xfce4-terminal)" "+d" "Application Menu" "(wofi)" "+p" "Activities" "(wofi)" "+o" "" "Open Broswer" "+n" "" "Open Files" "+q" "close focused app" "(kill)" "[Shift]+Print-key" "screenshot" "(grim)" "+Shift+e" "power-menu" "(wofi)" "+t" "open keybinding helper" "full list"
|
||||
127
.config/waybar/scripts/mediaplayer.py
Normal file
127
.config/waybar/scripts/mediaplayer.py
Normal file
@@ -0,0 +1,127 @@
|
||||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
import signal
|
||||
import gi
|
||||
import json
|
||||
gi.require_version('Playerctl', '2.0')
|
||||
from gi.repository import Playerctl, GLib
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def write_output(text, player):
|
||||
logger.info('Writing output')
|
||||
|
||||
output = {'text': text,
|
||||
'class': 'custom-' + player.props.player_name,
|
||||
'alt': player.props.player_name}
|
||||
|
||||
sys.stdout.write(json.dumps(output) + '\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def on_play(player, status, manager):
|
||||
logger.info('Received new playback status')
|
||||
on_metadata(player, player.props.metadata, manager)
|
||||
|
||||
|
||||
def on_metadata(player, metadata, manager):
|
||||
logger.info('Received new metadata')
|
||||
track_info = ''
|
||||
|
||||
if player.props.player_name == 'spotify' and \
|
||||
'mpris:trackid' in metadata.keys() and \
|
||||
':ad:' in player.props.metadata['mpris:trackid']:
|
||||
track_info = 'AD PLAYING'
|
||||
elif player.get_artist() != '' and player.get_title() != '':
|
||||
track_info = '{artist} - {title}'.format(artist=player.get_artist(),
|
||||
title=player.get_title())
|
||||
else:
|
||||
track_info = player.get_title()
|
||||
|
||||
if player.props.status != 'Playing' and track_info:
|
||||
track_info = ' ' + track_info
|
||||
write_output(track_info, player)
|
||||
|
||||
|
||||
def on_player_appeared(manager, player, selected_player=None):
|
||||
if player is not None and (selected_player is None or player.name == selected_player):
|
||||
init_player(manager, player)
|
||||
else:
|
||||
logger.debug("New player appeared, but it's not the selected player, skipping")
|
||||
|
||||
|
||||
def on_player_vanished(manager, player):
|
||||
logger.info('Player has vanished')
|
||||
sys.stdout.write('\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def init_player(manager, name):
|
||||
logger.debug('Initialize player: {player}'.format(player=name.name))
|
||||
player = Playerctl.Player.new_from_name(name)
|
||||
player.connect('playback-status', on_play, manager)
|
||||
player.connect('metadata', on_metadata, manager)
|
||||
manager.manage_player(player)
|
||||
on_metadata(player, player.props.metadata, manager)
|
||||
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
logger.debug('Received signal to stop, exiting')
|
||||
sys.stdout.write('\n')
|
||||
sys.stdout.flush()
|
||||
# loop.quit()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# Increase verbosity with every occurrence of -v
|
||||
parser.add_argument('-v', '--verbose', action='count', default=0)
|
||||
|
||||
# Define for which player we're listening
|
||||
parser.add_argument('--player')
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
arguments = parse_arguments()
|
||||
|
||||
# Initialize logging
|
||||
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
|
||||
format='%(name)s %(levelname)s %(message)s')
|
||||
|
||||
# Logging is set by default to WARN and higher.
|
||||
# With every occurrence of -v it's lowered by one
|
||||
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
|
||||
|
||||
# Log the sent command line arguments
|
||||
logger.debug('Arguments received {}'.format(vars(arguments)))
|
||||
|
||||
manager = Playerctl.PlayerManager()
|
||||
loop = GLib.MainLoop()
|
||||
|
||||
manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player))
|
||||
manager.connect('player-vanished', on_player_vanished)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||
|
||||
for player in manager.props.player_names:
|
||||
if arguments.player is not None and arguments.player != player.name:
|
||||
logger.debug('{player} is not the filtered player, skipping it'
|
||||
.format(player=player.name)
|
||||
)
|
||||
continue
|
||||
|
||||
init_player(manager, player)
|
||||
|
||||
loop.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
9
.config/waybar/scripts/weather.sh
Executable file
9
.config/waybar/scripts/weather.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOC="$1"
|
||||
# HTML encode string as %20
|
||||
TEMP=$(curl -s 'https://wttr.in/'${LOC}'?format=%t\n&m')
|
||||
ICON=$(curl -s 'https://wttr.in/'${LOC}'?format=1' | grep -o '^\S*' )
|
||||
# echo $ICON
|
||||
echo '{"text": "'$TEMP'", "tooltip": "'$ICON' '$LOC'", "class": "weather" }'
|
||||
|
||||
255
.config/waybar/style.css
Normal file
255
.config/waybar/style.css
Normal file
@@ -0,0 +1,255 @@
|
||||
/* =============================================================================
|
||||
*
|
||||
* Waybar configuration
|
||||
*
|
||||
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||
*
|
||||
* =========================================================================== */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Keyframes
|
||||
* -------------------------------------------------------------------------- */
|
||||
@define-color magenta #9d7cd8;
|
||||
@define-color magenta_2 #ff007c;
|
||||
@define-color bg_highlight #292e42;
|
||||
@define-color blue_1 #65bcff;
|
||||
@define-color bg #222436;
|
||||
/*
|
||||
Arc-Dark Color Scheme
|
||||
*/
|
||||
@keyframes blink-warning {
|
||||
70% {
|
||||
color: white;
|
||||
}
|
||||
|
||||
to {
|
||||
color: white;
|
||||
background-color: orange;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-critical {
|
||||
70% {
|
||||
color: white;
|
||||
}
|
||||
|
||||
to {
|
||||
color: white;
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Base styles
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
/* Reset all styles */
|
||||
* {
|
||||
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
/* color: @blue_1; */
|
||||
}
|
||||
|
||||
|
||||
/* The whole bar */
|
||||
window#waybar {
|
||||
/* color: #dfdfdf; */
|
||||
background-color: rgba(0,0,0,0);
|
||||
/* background-color: @bg; */
|
||||
font-family: JetBrains Mono Nerd Font;
|
||||
/*font-family: Intel One Mono Nerd Font;*/
|
||||
font-size: 14px;
|
||||
/* border-radius: 3px; */
|
||||
}
|
||||
|
||||
/* Every modules */
|
||||
#battery,
|
||||
#clock,
|
||||
#backlight,
|
||||
#cpu,
|
||||
#custom-keyboard-layout,
|
||||
#memory,
|
||||
#mode,
|
||||
#custom-weather,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#temperature,
|
||||
#tray,
|
||||
#idle_inhibitor,
|
||||
#window,
|
||||
#workspaces,
|
||||
#custom-power,
|
||||
#custom-media,
|
||||
#custom-PBPbattery {
|
||||
padding:0.25rem 0.75rem;
|
||||
/* margin: 1px 6px; */
|
||||
/* background-color: @bg;
|
||||
border-radius: 20px; */
|
||||
color: @blue_1;
|
||||
}
|
||||
|
||||
#custom-separator {
|
||||
color: @bg_highlight;
|
||||
}
|
||||
|
||||
.modules-right,
|
||||
.modules-left,
|
||||
.modules-center {
|
||||
background-color: @bg;
|
||||
border-radius: 20px;
|
||||
}
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Modules styles
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
#clock {
|
||||
/* color: @magenta_2; */
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#battery {
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#battery.warning.discharging {
|
||||
animation-name: blink-warning;
|
||||
animation-duration: 3s;
|
||||
}
|
||||
|
||||
#battery.critical.discharging {
|
||||
animation-name: blink-critical;
|
||||
animation-duration: 2s;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#cpu.warning {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#cpu.critical {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#memory {
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#memory.warning {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#memory.critical {
|
||||
color: red;
|
||||
animation-name: blink-critical;
|
||||
animation-duration: 2s;
|
||||
padding-left:5px;
|
||||
padding-right:5px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
/* background: @highlight; */
|
||||
/* background: #dfdfdf; */
|
||||
border-bottom: 3px transparent;
|
||||
color:@magenta_2;
|
||||
/* margin-left: 5px; */
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: @magenta;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
margin-right: 0;
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
/* #pulseaudio.muted { */
|
||||
/* color: @magenta_2; */
|
||||
/* } */
|
||||
/**/
|
||||
#pulseaudio.microphone {
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
border-radius: 0 20px 20px 0;
|
||||
}
|
||||
|
||||
/* #pulseaudio.microphone.muted { */
|
||||
/* color: @magenta_2; */
|
||||
/* } */
|
||||
|
||||
|
||||
#temperature.critical {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
font-size:16px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
border-bottom: 3px solid transparent;
|
||||
margin-bottom: 0px;
|
||||
color: @blue_1;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: @magenta;
|
||||
border-bottom: 1px solid @magenta;
|
||||
/* margin-bottom: 1px; */
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
border-bottom: 1px solid @magenta_2;
|
||||
color: #c9545d;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
font-size:18px;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
#backlight.icon {
|
||||
padding-right:1px;
|
||||
font-size: 13px;
|
||||
}
|
||||
208
.config/waybar/waybar/config
Normal file
208
.config/waybar/waybar/config
Normal file
@@ -0,0 +1,208 @@
|
||||
// Global
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"margin": 5,
|
||||
|
||||
// If height property would be not present, it'd be calculated dynamically
|
||||
"height": 34,
|
||||
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"custom/separator",
|
||||
"custom/weather",
|
||||
"custom/separator",
|
||||
"memory",
|
||||
"custom/separator",
|
||||
"cpu"
|
||||
],
|
||||
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
|
||||
"modules-right": [
|
||||
|
||||
"backlight#value",
|
||||
"custom/separator",
|
||||
"pulseaudio",
|
||||
"pulseaudio#microphone",
|
||||
"custom/separator",
|
||||
"network",
|
||||
"battery",
|
||||
"custom/separator",
|
||||
"custom/power"
|
||||
],
|
||||
|
||||
// Modules
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon} ",
|
||||
"format-icons":{
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}% {icon} ",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
// "format-full": "",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"interval": 10,
|
||||
// "format-alt": " {:%e %b %Y}", // Icon: calendar-alt
|
||||
"format": "{:%e %b %Y %H:%M} ",
|
||||
"tooltip-format": "{:%e %B %Y}"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 5,
|
||||
"format": " {usage}% ({load})", // Icon: nf-oct-cpu
|
||||
"states": {
|
||||
"warning": 70,
|
||||
"critical": 90,
|
||||
},
|
||||
"on-click": "alacritty -e 'glances'",
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 5,
|
||||
"format": " {}%", // Icon: nf-cod-graph
|
||||
"on-click": "alacritty -e 'glances'",
|
||||
"states": {
|
||||
"warning": 70,
|
||||
"critical": 90
|
||||
}
|
||||
},
|
||||
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"format-wifi": "", // Icon: wifi
|
||||
"format-ethernet": "", // Icon: ethernet
|
||||
"format-disconnected": "⚠ Disconnected",
|
||||
"tooltip-format": "{ifname}: {ipaddr}",
|
||||
"on-click": "alacritty -e 'nmtui'",
|
||||
},
|
||||
"network#vpn": {
|
||||
"interface": "tun0",
|
||||
"format": " ",
|
||||
"format-disconnected": "⚠ Disconnected",
|
||||
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
|
||||
},
|
||||
|
||||
"hyprland/mode": {
|
||||
"format": "{}",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"hyprland/window": {
|
||||
"format": "{}",
|
||||
"max-length": 120
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
// "on-scroll-up": "hyprctl dispatch workspace e+1",
|
||||
// "on-scroll-down": "hyprctl dispatch workspace e-1",
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"1": "일",
|
||||
"2": "이",
|
||||
"3": "삼",
|
||||
"4": "사",
|
||||
"5": "오",
|
||||
"6": "육",
|
||||
"7": "칠",
|
||||
"8": "팔",
|
||||
"9": "구",
|
||||
"10": "십",
|
||||
// "active": "",
|
||||
// "default": "1"
|
||||
// "persistent": ""
|
||||
},
|
||||
"all-outputs": true,
|
||||
"persistent_workspaces": {
|
||||
"*": 5
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"scroll-step": 1, // %, can be a float
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "וֹ",
|
||||
"headset": " ",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": [""]
|
||||
},
|
||||
"on-click": "pamixer -t",
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-scroll-up": "pamixer -i 2",
|
||||
"on-scroll-down": "pamixer -d 2"
|
||||
},
|
||||
|
||||
"pulseaudio#microphone": {
|
||||
"format": "{format_source}",
|
||||
"format-source": " {volume}%",
|
||||
"format-source-muted": " ",
|
||||
"on-click": "pamixer --default-source -t",
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-scroll-up": "pamixer --default-source -i 5",
|
||||
"on-scroll-down": "pamixer --default-source -d 5",
|
||||
"scroll-step": 5
|
||||
},
|
||||
|
||||
// to use the weather module replace <your_location> with your city or town
|
||||
// note: do not use spaces: new york would be newyork
|
||||
"custom/weather": {
|
||||
"exec": "sh ~/.config/waybar/scripts/weather.sh 'Vännäs'",
|
||||
"return-type": "json",
|
||||
"interval": 600,
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 18,
|
||||
"spacing":10,
|
||||
},
|
||||
|
||||
"backlight#icon": {
|
||||
"format": "{icon}",
|
||||
"on-scroll-down": "brightnessctl -c backlight set 1%-",
|
||||
"on-scroll-up": "brightnessctl -c backlight set +1%"
|
||||
},
|
||||
|
||||
"backlight#value" :{
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": [" "],
|
||||
"on-scroll-down": "brightnessctl -c backlight set 1%-",
|
||||
"on-scroll-up": "brightnessctl -c backlight set +1%"
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format":"⏻",
|
||||
"on-click": "exec wlogout",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/separator": {
|
||||
"format": "•",
|
||||
"interval": "once",
|
||||
"tooltip": false
|
||||
}
|
||||
}
|
||||
21
.config/waybar/waybar/scripts/PBPbattery.sh
Executable file
21
.config/waybar/waybar/scripts/PBPbattery.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
|
||||
#!/bin/bash
|
||||
#simple Shellscript for waybar/i3blocks/polybar on Pinebook pro
|
||||
#05012020 geri123@gmx.net Gerhard S.
|
||||
|
||||
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
|
||||
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
|
||||
case $((
|
||||
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
|
||||
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
|
||||
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
|
||||
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
|
||||
#
|
||||
(1) echo $STATUS:"":$PERCENT%;;
|
||||
(2) echo $STATUS:"":$PERCENT%;;
|
||||
(3) echo $STATUS:"":$PERCENT%;;
|
||||
(4) echo $STATUS:"":$PERCENT%;;
|
||||
(5) echo $STATUS:"":$PERCENT%;;
|
||||
esac
|
||||
|
||||
|
||||
2
.config/waybar/waybar/scripts/keyhint.sh
Executable file
2
.config/waybar/waybar/scripts/keyhint.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
yad --title="EndeavourOS Sway-WM keybindings:" --no-buttons --geometry=400x345-15-400 --list --column=key: --column=description: --column=command: "ESC" "close this app" "" "=" "modkey" "(set mod Mod4)" "+enter" "Terminal" "(xfce4-terminal)" "+d" "Application Menu" "(wofi)" "+p" "Activities" "(wofi)" "+o" "" "Open Broswer" "+n" "" "Open Files" "+q" "close focused app" "(kill)" "[Shift]+Print-key" "screenshot" "(grim)" "+Shift+e" "power-menu" "(wofi)" "+t" "open keybinding helper" "full list"
|
||||
9
.config/waybar/waybar/scripts/weather.sh
Executable file
9
.config/waybar/waybar/scripts/weather.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOC="$1"
|
||||
# HTML encode string as %20
|
||||
TEMP=$(curl -s 'https://wttr.in/'${LOC}'?format=%t\n&m')
|
||||
ICON=$(curl -s 'https://wttr.in/'${LOC}'?format=1' | grep -o '^\S*' )
|
||||
# echo $ICON
|
||||
echo '{"text": "'$TEMP'", "tooltip": "'$ICON' '$LOC'", "class": "weather" }'
|
||||
|
||||
255
.config/waybar/waybar/style.css
Normal file
255
.config/waybar/waybar/style.css
Normal file
@@ -0,0 +1,255 @@
|
||||
/* =============================================================================
|
||||
*
|
||||
* Waybar configuration
|
||||
*
|
||||
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||
*
|
||||
* =========================================================================== */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Keyframes
|
||||
* -------------------------------------------------------------------------- */
|
||||
@define-color magenta #9d7cd8;
|
||||
@define-color magenta_2 #ff007c;
|
||||
@define-color bg_highlight #292e42;
|
||||
@define-color blue_1 #65bcff;
|
||||
@define-color bg #222436;
|
||||
/*
|
||||
Arc-Dark Color Scheme
|
||||
*/
|
||||
@keyframes blink-warning {
|
||||
70% {
|
||||
color: white;
|
||||
}
|
||||
|
||||
to {
|
||||
color: white;
|
||||
background-color: orange;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-critical {
|
||||
70% {
|
||||
color: white;
|
||||
}
|
||||
|
||||
to {
|
||||
color: white;
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Base styles
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
/* Reset all styles */
|
||||
* {
|
||||
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
/* color: @blue_1; */
|
||||
}
|
||||
|
||||
|
||||
/* The whole bar */
|
||||
window#waybar {
|
||||
/* color: #dfdfdf; */
|
||||
background-color: rgba(0,0,0,0);
|
||||
/* background-color: @bg; */
|
||||
font-family: JetBrains Mono Nerd Font;
|
||||
/*font-family: Intel One Mono Nerd Font;*/
|
||||
font-size: 14px;
|
||||
/* border-radius: 3px; */
|
||||
}
|
||||
|
||||
/* Every modules */
|
||||
#battery,
|
||||
#clock,
|
||||
#backlight,
|
||||
#cpu,
|
||||
#custom-keyboard-layout,
|
||||
#memory,
|
||||
#mode,
|
||||
#custom-weather,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#temperature,
|
||||
#tray,
|
||||
#idle_inhibitor,
|
||||
#window,
|
||||
#workspaces,
|
||||
#custom-power,
|
||||
#custom-media,
|
||||
#custom-PBPbattery {
|
||||
padding:0.25rem 0.75rem;
|
||||
/* margin: 1px 6px; */
|
||||
/* background-color: @bg;
|
||||
border-radius: 20px; */
|
||||
color: @blue_1;
|
||||
}
|
||||
|
||||
#custom-separator {
|
||||
color: @bg_highlight;
|
||||
}
|
||||
|
||||
.modules-right,
|
||||
.modules-left,
|
||||
.modules-center {
|
||||
background-color: @bg;
|
||||
border-radius: 20px;
|
||||
}
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Modules styles
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
#clock {
|
||||
/* color: @magenta_2; */
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#battery {
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#battery.warning.discharging {
|
||||
animation-name: blink-warning;
|
||||
animation-duration: 3s;
|
||||
}
|
||||
|
||||
#battery.critical.discharging {
|
||||
animation-name: blink-critical;
|
||||
animation-duration: 2s;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#cpu.warning {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#cpu.critical {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#memory {
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#memory.warning {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#memory.critical {
|
||||
color: red;
|
||||
animation-name: blink-critical;
|
||||
animation-duration: 2s;
|
||||
padding-left:5px;
|
||||
padding-right:5px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
/* background: @highlight; */
|
||||
/* background: #dfdfdf; */
|
||||
border-bottom: 3px transparent;
|
||||
color:@magenta_2;
|
||||
/* margin-left: 5px; */
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: @magenta;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
margin-right: 0;
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
/* #pulseaudio.muted { */
|
||||
/* color: @magenta_2; */
|
||||
/* } */
|
||||
/**/
|
||||
#pulseaudio.microphone {
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
border-radius: 0 20px 20px 0;
|
||||
}
|
||||
|
||||
/* #pulseaudio.microphone.muted { */
|
||||
/* color: @magenta_2; */
|
||||
/* } */
|
||||
|
||||
|
||||
#temperature.critical {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
font-size:16px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
border-bottom: 3px solid transparent;
|
||||
margin-bottom: 0px;
|
||||
color: @blue_1;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: @magenta;
|
||||
border-bottom: 1px solid @magenta;
|
||||
/* margin-bottom: 1px; */
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
border-bottom: 1px solid @magenta_2;
|
||||
color: #c9545d;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
font-size:18px;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
#backlight.icon {
|
||||
padding-right:1px;
|
||||
font-size: 13px;
|
||||
}
|
||||
Reference in New Issue
Block a user