Fix repobar

This commit is contained in:
The-Repo-Club 2023-08-06 12:34:05 +01:00
parent bf7d55caa4
commit 0816dcd482
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
13 changed files with 123 additions and 161 deletions

View File

@ -0,0 +1,19 @@
output DP-1-0
off
output eDP-1
crtc 0
mode 1920x1080
pos 0x0
primary
rate 120.21
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
x-prop-scaling_mode Full aspect
output HDMI-1-0
crtc 3
mode 1920x1080
pos 1920x0
rate 59.94
x-prop-non_desktop 0

View File

@ -0,0 +1,2 @@
HDMI-1-0 00ffffffffffff004c2d520f334c5843101f0103804627782aaea5af4f42af260f5054bfef80714f810081c081809500a9c0b300010108e80030f2705a80b0588a00b9882100001e000000fd00184b1e873c000a202020202020000000fc005533324a3539780a2020202020000000ff0048344c523430303937360a2020012a020334f04d611203130420221f105f605d5e23090707830100006d030c002000b83c20006001020367d85dc401788003e30f0104023a801871382d40582c4500b9882100001e023a80d072382d40102c4580b9882100001e04740030f2705a80b0588a00b9882100001e565e00a0a0a0295030203500b9882100001a00000090
eDP-1 00ffffffffffff0006afedd100000000221d0104a52213780348358f575992291e505400000001010101010101010101010101010101546f809c70383e406c30aa0058c1100000180000000f0000000000000000000000000020000000fd003c788a8a1d010a202020202020000000fe004231353648414e31332e31200a00a9

View File

@ -24,7 +24,7 @@ is_charging() {
battery() {
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
battery_status=""
if $(is_charging); then
@ -35,11 +35,11 @@ battery() {
else
if $(has_battery); then
if [[ $(get_charge) -ge 66 ]]; then
icon=" "
icon=" "
elif [[ $(get_charge) -ge 33 ]]; then
icon=" "
icon=" "
else
icon=" "
icon=" "
fi
battery_status="$(get_charge)%"
fi

View File

@ -44,7 +44,7 @@ DaySuffix() {
clock() {
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
icon_date="  "
icon_time=" "
@ -52,7 +52,7 @@ clock() {
date=$(date +" %-d$(DaySuffix) %b %Y")
time=$(date +" %I:%M %P")
printf " %s %s %s %s \n" "^c$Foreground^^b$Green^$icon_date" "^c$Foreground^^b$Green_Bright^ $date" "^c$Foreground^^b$Green^$icon_time" "^c$Foreground^^b$Green_Bright^ $time"
printf " %s %s %s %s \n" "^c$Foreground^^b$Green^$icon_date" "^c$Foreground^^b$Green_Bright^$date" "^c$Foreground^^b$Green^$icon_time" "^c$Foreground^^b$Green_Bright^$time"
}
clock

View File

@ -2,9 +2,9 @@
cpu() {
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
icon=" "
icon=" "
read -r cpu a b c previdle rest </proc/stat
prevtotal=$((a + b + c + previdle))

View File

@ -2,9 +2,9 @@
keyboard() {
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
icon=" "
icon=" 󰌌 "
keyboard="$(setxkbmap -query | awk '/layout/{print $2}')"
keyboard="${keyboard^^}"

View File

@ -2,7 +2,7 @@
network() {
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
R1=$(cat /sys/class/net/wlan0/statistics/rx_bytes)
T1=$(cat /sys/class/net/wlan0/statistics/tx_bytes)
@ -13,8 +13,8 @@ network() {
RBPS=$(expr $R2 - $R1)
TKBPS=$(echo "$TBPS / 1024" | bc)
RKBPS=$(echo "$RBPS / 1024" | bc)
icon_up=" "
icon_down=" "
icon_up=" "
icon_down=" 󰖪 "
if [ "$RKBPS" -gt "1024" ]; then
RKBPS=$(echo "scale=2; $RKBPS / 1024" | bc)
RKBPS=" $RKBPS mb"

View File

@ -2,9 +2,9 @@
ram() {
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
icon=" "
icon=" 󰍛 "
ram=$(free -h | awk '/Mem:/ { print $3 }' | cut -f1 -d 'i')

View File

@ -3,13 +3,13 @@ get_updates() {
configFile=$HOME/.config/repowm/repobar/bar_updates.ini
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
updates=$(yay -Pn)
timestamp=$(date +%s)
icon=" "
if [ "$updates" -eq "0" ]; then
if [ -z "$updates" ]; then
updatecount="Fully Updated"
elif [ "$updates" -ge "1" ]; then
updatecount="$updates Update"
@ -18,17 +18,17 @@ get_updates() {
fi
[[ -f $configFile ]] && . $configFile
if [ -z "$LastUsed" ] || [ -z "$Message" ]; then
printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^ $updatecount"
printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^$updatecount"
newtime=$(expr $timestamp + 900)
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
else
if [[ "$timestamp" -ge "$LastUsed" ]]; then
printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^ $updatecount"
printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^$updatecount"
newtime=$(expr $timestamp + 900)
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
else
updatecount=" $Message"
printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^ $updatecount"
printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^$updatecount"
fi
fi
}

View File

@ -2,7 +2,7 @@
volume_alsa() {
# load colors
. ~/.config/repobar/bar_themes/minimal-mistakes
. $HOME/.config/repobar/bar_themes/minimal-mistakes
analog=$(pamixer --list-sinks | grep analog | awk '{ print $2 }' | sed 's/"//g')
hdmi=$(pamixer --list-sinks | grep hdmi | awk '{ print $2 }' | sed 's/"//g')
@ -12,16 +12,16 @@ volume_alsa() {
vol=$(pamixer --sink $analog --get-volume | sed 's/[^0-9]*//g')
if [ "$muted" = "muted" ]; then
vol_a=" muted"
vol_a="󰝟 muted"
else
if [ "$vol" -ge 75 ]; then
vol_a="  $vol%"
vol_a=" $vol%"
elif [ "$vol" -ge 50 ]; then
vol_a=" $vol%"
vol_a="󰕾 $vol%"
elif [ "$vol" -ge 25 ]; then
vol_a=" 奔 $vol%"
vol_a="󰖀 $vol%"
elif [ "$vol" -ge 0 ]; then
vol_a=" $vol%"
vol_a="󰕿 $vol%"
fi
fi
fi
@ -31,21 +31,21 @@ volume_alsa() {
vol=$(pamixer --sink $hdmi --get-volume | sed 's/[^0-9]*//g')
if [ "$muted" = "muted" ]; then
vol_a=" muted"
vol_a="󰝟 muted"
else
if [ "$vol" -ge 75 ]; then
vol_h="  $vol%"
vol_a=" $vol%"
elif [ "$vol" -ge 50 ]; then
vol_h=" 墳 $vol%"
vol_a="󰕾 $vol%"
elif [ "$vol" -ge 25 ]; then
vol_h=" 奔 $vol%"
vol_a="󰖀 $vol%"
elif [ "$vol" -ge 0 ]; then
vol_h=" 奄 $vol%"
vol_a="󰕿 $vol%"
fi
fi
fi
if [ ! -z "$vol_a" ] && [ ! -z "$vol_h" ]; then
icon_a=" "
icon_a=" "
icon_h="  "
printf " %s %s %s %s \n" "^c$Foreground^^b$Cyan^$icon_a" "^c$Foreground^^b$Cyan_Bright^ $vol_a" "^c$Foreground^^b$Cyan^$icon_h" "^c$Foreground^^b$Cyan_Bright^ $vol_h"
@ -54,11 +54,11 @@ volume_alsa() {
printf " %s %s \n" "^c$Foreground^^b$Cyan^$icon_h" "^c$Foreground^^b$Cyan_Bright^ $vol_h"
elif [ ! -z "$vol_a" ]; then
icon_a=" "
icon_a=" "
printf " %s %s \n" "^c$Foreground^^b$Cyan^$icon_a" "^c$Foreground^^b$Cyan_Bright^ $vol_a"
else
icon=" "
icon=" 󰝟 "
text=" Auido Disconnected"
printf " %s %s %s \n" "^c$Foreground^^b$Cyan^$icon" "^c$Foreground^^b$Cyan_Bright^ $text" "^c$Foreground^^b$Cyan^$icon"
fi

View File

@ -2,17 +2,17 @@
#-*-coding:utf-8 -*-
#Auto updated?
# Yes
#File :
#File:
# autostart.sh
#Author :
#Author:
# The-Repo-Club [wayne6324@gmail.com]
#Github :
#Github:
# https://github.com/The-Repo-Club/
#
#Created:
# Mon 22 November 2021, 03:15:54 PM [GMT]
#Last edited:
# Fri 08 July 2022, 07:18:26 AM [GMT+1]
#Modified:
# Sun 06 August 2023, 11:46:15 AM [GMT+1]
#
#Description:
# <Todo>
@ -21,14 +21,6 @@
# <None>
#
# if command -v autorandr &>/dev/null; then
# if ! pgrep -f "autorandr" >/dev/null; then
# autorandr --force --load repowm &
# else
# echo "autorandr already Running"
# fi
# fi
if command -v /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &>/dev/null; then
if ! pgrep -f "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" >/dev/null; then
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
@ -37,22 +29,6 @@ if command -v /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &>/dev/n
fi
fi
# if command -v xroot &>/dev/null; then
# if ! pgrep -f "xroot" >/dev/null; then
# xroot -r xmenu_desktop &
# else
# echo "xroot already Running"
# fi
# fi
# if command -v clipmenu-daemon &>/dev/null; then
# if ! pgrep -f "clipmenu-daemon" >/dev/null; then
# clipmenu-daemon &
# else
# echo "clipmenu-daemon already Running"
# fi
# fi
if ! command -v feh &>/dev/null; then
echo "feh could not be found"
else
@ -70,85 +46,30 @@ if ! command -v picom &>/dev/null; then
exit
else
if ! pgrep -x "picom" >/dev/null; then
picom -b --experimental-backend --config $HOME/.config/repowm/picom.conf &
picom --config $HOME/.config/repowm/picom.conf &
else
echo "picom already Running"
fi
fi
# ################
# ## Tray Icons ##
# ################
# if ! command -v ckb-next &>/dev/null; then
# echo "ckb-next could not be found"
# else
# if ! pgrep -x "ckb-next" >/dev/null; then
# ckb-next --background &
# else
# echo "ckb-next already Running"
# fi
# fi
# if command -v nm-applet &>/dev/null; then
# if ! pgrep -x "nm-applet" >/dev/null; then
# nm-applet &
# else
# echo "nm-applet already Running"
# fi
# fi
# if command -v blueman-applet &>/dev/null; then
# if ! pgrep -x "blueman-applet" >/dev/null; then
# blueman-applet &
# else
# echo "blueman-applet already Running"
# fi
# fi
# if command -v touchpad-indicator &>/dev/null; then
# if ! pgrep -f "touchpad-indicator" >/dev/null; then
# touchpad-indicator &
# else
# echo "touchpad-indicator already Running"
# fi
# fi
# if command -v numlockx &>/dev/null; then
# numlockx on &
# fi
# if command -v volumeicon &>/dev/null; then
# if ! pgrep -x "volumeicon" >/dev/null; then
# volumeicon &
# else
# echo "volumeicon already Running"
# fi
# fi
# ###############
# ## Auto Lock ##
# ###############
if command -v xidlehook &>/dev/null; then
# shellcheck disable=SC2155
export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
if ! pgrep -x "xidlehook" >/dev/null; then
xidlehook \
--not-when-fullscreen \
--not-when-audio \
--timer 300 \
"xrandr --output $PRIMARY_DISPLAY --brightness .1" \
"xrandr --output $PRIMARY_DISPLAY --brightness 1" \
--timer 30 \
"xrandr --output $PRIMARY_DISPLAY --brightness 1; multimonitorlock -l -- --time-str=%I:%M:%S %p" \
"" \
--timer 3600 \
"systemctl suspend" \
""
else
echo "xidlehook already Running"
fi
if command -v xautolock &>/dev/null; then
# shellcheck disable=SC2155
if ! pgrep -x "xautolock" >/dev/null; then
(
sleep 2s
xautolock \
-time 15 -locker "multimonitorlock -l -- --time-str=%I:%M:%S %p" \
-detectsleep
) &
else
echo "xautolock already Running"
fi
else
echo "xautolock could not be found"
fi
# ################

View File

@ -8,7 +8,7 @@
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = false;
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
@ -35,7 +35,7 @@ shadow-offset-y = -7;
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
shadow-color = "#434c5e"
# Specify a list of conditions of windows that should have no shadow.
#
@ -61,8 +61,9 @@ shadow-exclude = [
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
# Crop shadow of a window fully on a particular monitor to that monitor. This is
# currently implemented using the X RandR extension.
# crop-shadow-to-monitor = false
#################################
@ -73,7 +74,7 @@ shadow-exclude = [
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = false;
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
@ -103,11 +104,11 @@ fade-out-step = 0.03;
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
inactive-opacity = 0.95;
inactive-opacity = 0.8;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
frame-opacity = 0.9;
frame-opacity = 0.7;
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true
@ -134,14 +135,6 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ];
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
# opacity-rule = []
opacity-rule = [
"100:class_g = 'firefox' && focused",
"95:class_g = 'firefox' && !focused",
"95:class_g = 'kitty' && focused",
"80:class_g = 'kitty' && !focused",
"95:class_g = 'Nemo' && focused",
"80:class_g = 'Nemo' && !focused"
];
#################################
@ -151,12 +144,19 @@ opacity-rule = [
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 0
corner-radius = 10
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
"window_type = 'desktop'",
"class_g = 'Dunst'",
"class_g = 'kitty'",
"class_g = 'Alacritty'",
"class_g = 'Polybar'",
"class_g = 'Code'",
"class_g = 'firefox'",
"class_g = 'Nemo'"
];
@ -211,15 +211,23 @@ blur-background-exclude = [
# General Settings #
#################################
# Enable remote control via D-Bus. See the man page for more details.
# dbus = true
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`.
# `xrender` is the default one.
#
# backend = "glx"
backend = "xrender";
# Use higher precision during rendering, and apply dither when presenting the
# rendered screen. Reduces banding artifacts, but might cause performance
# degradation. Only works with OpenGL.
dithered-present = false;
# Enable/disable VSync.
# vsync = false
vsync = true;
@ -303,7 +311,7 @@ detect-transient = true;
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
glx-no-stencil = true;
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
@ -313,7 +321,7 @@ glx-no-stencil = true;
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# This cause the whole screen to be redrawn every time, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
@ -326,11 +334,17 @@ use-damage = true;
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
# GLX backend: Use specified GLSL fragment shader for rendering window
# contents. Read the man page for a detailed explanation of the interface.
#
# glx-fshader-win = ""
# window-shader-fg = "default"
# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar
# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg.
#
# window-shader-fg-rule = [
# "my_shader.frag:window_type != 'dock'"
# ]
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
@ -354,6 +368,12 @@ use-damage = true;
#
# transparent-clipping = false
# Specify a list of conditions of windows that should never have transparent
# clipping applied. Useful for screenshot tools, where you need to be able to
# see through transparent parts of the window.
#
# transparent-clipping-exclude = []
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
@ -402,7 +422,7 @@ log-level = "warn";
# transparent, and you want shadows in those areas.
#
# clip-shadow-above:::
# Controls wether shadows that would have been drawn above the window should
# Controls whether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore:::
@ -418,4 +438,4 @@ wintypes:
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};
};

View File

@ -1,2 +1,2 @@
LastUsed=1691319324
Message=' Updates'
LastUsed=1691322025
Message='Fully Updated'