From 57ec380340de7793948aca7d51d26e685da9bbb6 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Sun, 23 Jan 2022 02:30:01 -0800 Subject: [PATCH] updates --- bspwm/bspwm/bspwmrc | 71 +++++++++ bspwm/bspwm/keybindings | 104 +++++++++++++ .../bspwm/scripts/i3lock-fancy/circlelock.png | Bin 0 -> 2381 bytes .../scripts/i3lock-fancy/circlelockdark.png | Bin 0 -> 2433 bytes .../scripts/i3lock-fancy/i3lock-fancy.sh | 141 ++++++++++++++++++ bspwm/bspwm/scripts/keybindings_rofi.sh | 5 + bspwm/bspwm/scripts/low_bat_notifier.sh | 60 ++++++++ bspwm/bspwm/scripts/screenshot.sh | 20 +++ bspwm/bspwm/sxhkdrc | 1 + dunst/dunstrc-desktop | 16 +- polybar-themes/sblocks/config.ini | 15 +- polybar-themes/sblocks/user_modules.ini | 10 +- 12 files changed, 424 insertions(+), 19 deletions(-) create mode 100755 bspwm/bspwm/bspwmrc create mode 100644 bspwm/bspwm/keybindings create mode 100644 bspwm/bspwm/scripts/i3lock-fancy/circlelock.png create mode 100644 bspwm/bspwm/scripts/i3lock-fancy/circlelockdark.png create mode 100755 bspwm/bspwm/scripts/i3lock-fancy/i3lock-fancy.sh create mode 100755 bspwm/bspwm/scripts/keybindings_rofi.sh create mode 100755 bspwm/bspwm/scripts/low_bat_notifier.sh create mode 100644 bspwm/bspwm/scripts/screenshot.sh create mode 120000 bspwm/bspwm/sxhkdrc diff --git a/bspwm/bspwm/bspwmrc b/bspwm/bspwm/bspwmrc new file mode 100755 index 0000000..1234eb9 --- /dev/null +++ b/bspwm/bspwm/bspwmrc @@ -0,0 +1,71 @@ +#! /bin/sh + +pgrep -x sxhkd > /dev/null || sxhkd & + +bspc monitor DP-4 -d I II III IV +bspc monitor DP-0 -d V VI VII VIII IX X + +bspc config border_width 6 +bspc config window_gap 15 +bspc config top_padding 40 + +bspc config split_ratio 0.55 +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config pointer_follows_focus true +bspc config focus_follows_pointer true + +bspc rule -a Gimp desktop='^8' state=floating follow=on +bspc rule -a Chromium desktop='^5' +bspc rule -a firefox desktop='^5' +bspc rule -a mplayer2 state=floating +bspc rule -a Yad state=floating +bspc rule -a Kupfer.py focus=on +bspc rule -a Screenkey manage=off +bspc rule -a gl state=floating +bspc rule -a Gl state=floating +bspc rule -a mpv state=floating + +# Border +# dracula blue +# bspc config focused_border_color "#bd93f9" +bspc config focused_border_color "#2C4762" +bspc config normal_border_color "#073642" +bspc config active_border_color "#073642" + +# +# Autostart +# +# Set display from arandr saved script +sh ~/.screenlayout/monitor.sh & +# Notifications +/usr/bin/dunst & +# Polkit +/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +# Dex +dex -a -s /etc/xdg/autostart/:~/.config/autostart/ +# Picom +picom --config ~/.config/picom/picom.conf & +# Network Applet +nm-applet --indicator & + +# lxsession +if ! pgrep -qaf lxsession; then + lxsession -s bspwm -e BSPWM & +fi + +# SmoothVideoProject +SVPManager & + +# screensaver +xss-lock -- xscreensaver-command -lock & + +# Bar +# ~/.config/polybar/launch.sh & +~/SudacodeRice/scripts/launch_desktop.sh + +# Cursor +# xsetroot -cursor_name left_ptr & + +# Low battery notifier +# ~/.config/bspwm/scripts/low_bat_notifier.sh diff --git a/bspwm/bspwm/keybindings b/bspwm/bspwm/keybindings new file mode 100644 index 0000000..59a2a02 --- /dev/null +++ b/bspwm/bspwm/keybindings @@ -0,0 +1,104 @@ +For the latest version of Endeavour OS Bspwm Edition configs, visit our GitHub repository +https://github.com/EndeavourOS-Community-Editions/bspwm + +For a quick start guide, read our wiki page +https://discovery.endeavouros.com/window-tiling-managers/bspwm-2/2021/03/ + +To share your suggestions, please visit our forum thread +https://forum.endeavouros.com/t/bspwm-edition/8511 + + + + + +################### + +Utility Keyboard Shortcuts + +################### + +-> Open terminal (xfce4-terminal) +Super + Return + +-> App launcher (Rofi) +Super + d + +-> Window switcher +Super + Ctrl + +-> Show SSH sessions +Super + Shift + d + +-> Power Menu +Super + Shift + e + +-> Reload Sxhkd (you need to do this after you modify sxhkdrc) +Super + Escape + +-> Screen shot full monitor and save in Pictures folder +Print + +-> Show screenshot menu +Super + Print + +-> Launch Firefox +Super + w + +-> Launch Thunar +Super + n + + + + + +################### + +Bspwm Keyboard Shortcuts + +################### + +-> Restart Bspwm +Super + Alt + r + +-> Quit Bspwm +Super + Alt + q + +-> Close focused window +Super + Shift + q + +-> Switch between tiled and monocle layout +Super + m + +-> Swap current and largest window +Super + g + +-> Change focus {west, south, north, east} +Super + {h, j, k, l} +It's like vim keys :) + +-> Switch to different desktop +Super + + +-> Send current node to different desktop +Super + Shift + + +-> Expand a window {left, bottom, top, right} +Super + Alt + {h, j, k l} + +-> Contract a window {left, bottom, top, right} +Super + Alt + Shift + {h, j, k, l} + +-> Move a floating window +Super + {left, down, up, right} + +-> Focus the last node +Super + grave + +-> Focus the last desktop +Super + Tab + +-> Focus older node in focus history +Super + o + +-> Focus newer node in focus history +Super + i diff --git a/bspwm/bspwm/scripts/i3lock-fancy/circlelock.png b/bspwm/bspwm/scripts/i3lock-fancy/circlelock.png new file mode 100644 index 0000000000000000000000000000000000000000..232c4e32a5452ef91df55e58b381c3f61ab88be0 GIT binary patch literal 2381 zcmV-T39|NyP)$_qy&YKD5^w?#Fh}i?6OyE zuV?J_jP0>!JahU`d$qf)uQN7LKWU|N&it3}_nCA3XCdei2qBOV;?#BBO9){B01!f0 zz!;|yLNbKV>;w>WV6`^bGh6ORaNiPG%cd*x_do&ilTB3hvPQOvR65d z`;_PTi!94th7cNdbF($zd_KQDl}e2-EiLUS7K=lKke2P!G`;BYc+Pme-c#M(-5)~; zi5(m*2TTY-nM~$;iA3VLY&N^oN|4oDa2)qpFc>`U@p#@u2x(S~St2LP^6rI&g=4u~ z?tUwF8U@2JQ~mw@M?4fwQx-C%@>y0sw%bD7z*nC;x7mrlXcz&4AQ55&-x;|jX4@^;% zx@ps2zKi8ynlX_5gBMz_Kjwjz**Btp3szMde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rY>EiNuT1KPavD$mj# zOVB|GiP!5rRjDsu;&pd-f6Q^*XRR1D48utXshNqi3d1m5t>|HlQ$0OB%PYY$NeCec z27||2FJo$Y7fmU=Ifu?DL`FwtBE4qO|;Ka&})v8|ccsy@13^UcN(Q@MakEK$n z?)`JKFbsp6ot=HHm9z`SI1>m2R(0ZC<298^Jv}uw^;Rq7y1Kd+0)fB@hG9OpVY`Tm z#bQ_##b;Di9cxw@LP!P%27V<7!tYnLuN5SOplCFDUY6yDERenDU>GL4dGqG`*Phky znrI+|=Frg4emn9y_X-H1((v%`{`D><)}2`yhKYtkp+oKXB%$4a5E4NUj`2KyVZG;7 zmlB`P_qyNjf1_>8+60%&^}Zko&sTe1bL|X;LI>P#_j~r!Y7aP$yBZFMpF#*#oiJ+# zj1bZyk;oG~&wpY+J$u10OmySMjo-o;FV&K(yE~#NN*Ns;ebnW0ePACwd%X$ zhiICE(vR=lxpP$0G@(^H%>ZMZ5d`5_Z*T8Q&1O3)usjwG!*GhCcp#BTJgaHipjCTo zQTcQ+5D1(I1Omrtnoe4>XBRQkG`nP3eq55I@$xqnEsyc?ho>c;=P!D_-cvn2J@43c zcixuS)-VibHk*A|QIv1w^Z6aBs&1{9rNkI3EX!WwIPQ|u>HLW2`SX=)89ULD<%JLe z4a4y2x;{`UmAor5mPMMT(-`AeIRnx5f5-bTYpK6!61f6j00000NkvXXu0mjf!FYPD literal 0 HcmV?d00001 diff --git a/bspwm/bspwm/scripts/i3lock-fancy/circlelockdark.png b/bspwm/bspwm/scripts/i3lock-fancy/circlelockdark.png new file mode 100644 index 0000000000000000000000000000000000000000..853fe54f182bf3c4af20f5d5af67ce972df7b875 GIT binary patch literal 2433 zcmV-{34Zp8P){;~{og;(b(`O(B4g+K?c%DJq~gC{>~G zqllFDMzsAs#oc-M~^J88dPbFc3?=R0%n+}Alq&_5uAkj%2IiVzY301-lJ7-QY{ z{W1XfeId~+y@DWICCl=@SS+?%6veAKjvHlJcA!~f&-1E|<9uP;_G!zq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ze_YeFdk{iQsZ@GpW@hGI-}jAvabSA%-8DrflX)%RY!G(==7~>@X2(@On3ykps1pvO|IA8R` z;KIVfZ#>Uiy?yX~-<_YI|5ZP1V~kCV@e&09VB7ZTei*eZ>%FR2g{|G_|sZ=U&12i1AZTlnF zb(i{KeC-Azip@kjAcSDkG+zh!?~RA2>-whgm?&Ww#_^SvmFIO`Ke4>L{O5kyG)?oA z=XomtYu3MFv3P9Twrz)?$2%|I_bXFVQ+M~$###_UNU>Nv7L->n@v7D8JCPEIuC>-^D ze|2NEu2*zjf38-mo$pjBLI`EE*+0=V-SYmqQ&1EoWwY6*y9v8sjEzE}u&xuo^t~pN z$-72JN1yM8T)keOD-;SxYqi>^VXt@qfZ}<6MANiGq9~4cDoh9=b8~aQ&gb)wuB~r2 zK~ZC4W3MZU^6hS!UJ9tyYM-Ayd-hsF$hxz7vx&x^nVC5pMO^1%!S{VUJw1JRqq6{; zq&#?@S9D!>DUnDV_+QEI2tWuSi;Iho6^q4Zn*F|Mj)!gAAG0i*jm2Wu^^RWjD3{Bx z&Cbpqf=zNUx6I-xm&+$5N!lX_!dH93E@D`gbvl>J?cZw4+A2@WE0s#eWm(?G^ZfRR z`9+Fat@ioE#KcXW=M}bU*D}|V5K`B5{iRqewuk5Wk?1H!2g|ZfPfSeQgfX6P)wZqV z(uUJ7G7OWIBPQ=bdpW$8HRD(b=~E7JboiZQEZnyBS9l2 z>ap3`*+ZQiGrQ_3K@hGP8X9_9mgSD)zhOZLA&%orPESuCu2d>-b}HX-f;a#G#yG#S zvhqy5UZ0mF>FbTtQqO@gHWn5Z9-f+-x~E>RPj;gt^tVV+l&opmz3FuNevad=2&-=+ zg4D%Ap>VWNC_K?fTkINKNmNMg*egf5-bbIGqGpB!f +# Dependencies: imagemagick, i3lock-color-git, scrot, wmctrl (optional) + +# Aquired from https://github.com/meskarune/i3lock-fancy +# Modified for use + +set -o errexit -o noclobber -o nounset + +hue=(-level "0%,100%,0.6") +effect=(-filter Gaussian -resize 20% -define "filter:sigma=1.5" -resize 500.5%) +# default system sans-serif font +font=$(convert -list font | awk "{ a[NR] = \$2 } /family: $(fc-match sans -f "%{family}\n")/ { print a[NR-1]; exit }") +image=$(mktemp --suffix=.png) +shot=(import -window root) +desktop="" +i3lock_cmd=(i3lock -i "$image") +shot_custom=false + +options="Options: + -h, --help This help menu. + + -d, --desktop Attempt to minimize all windows before locking. + + -g, --greyscale Set background to greyscale instead of color. + + -p, --pixelate Pixelate the background instead of blur, runs faster. + + -f , --font Set a custom font. + + -t , --text Set a custom text prompt. + + -l, --listfonts Display a list of possible fonts for use with -f/--font. + Note: this option will not lock the screen, it displays + the list and exits immediately. + + -n, --nofork Do not fork i3lock after starting. + + -- Must be last option. Set command to use for taking a + screenshot. Default is 'import -window root'. Using 'scrot' + or 'maim' will increase script speed and allow setting + custom flags like having a delay." + +# move pipefail down as for some reason "convert -list font" returns 1 +set -o pipefail +trap 'rm -f "$image"' EXIT +temp="$(getopt -o :hdnpglt:f: -l desktop,help,listfonts,nofork,pixelate,greyscale,text:,font: --name "$0" -- "$@")" +eval set -- "$temp" + +# l10n support +text="Type password to unlock" +case "${LANG:-}" in + af_* ) text="Tik wagwoord om te ontsluit" ;; # Afrikaans + de_* ) text="Bitte Passwort eingeben" ;; # Deutsch + da_* ) text="Indtast adgangskode" ;; # Danish + en_* ) text="Type password to unlock" ;; # English + es_* ) text="Ingrese su contraseña" ;; # Española + fr_* ) text="Entrez votre mot de passe" ;; # Français + he_* ) text="הליענה לטבל המסיס דלקה" ;; # Hebrew עברית (convert doesn't play bidi well) + hi_* ) text="अनलॉक करने के लिए पासवर्ड टाईप करें" ;; #Hindi + id_* ) text="Masukkan kata sandi Anda" ;; # Bahasa Indonesia + it_* ) text="Inserisci la password" ;; # Italian + ja_* ) text="パスワードを入力してください" ;; # Japanese + lv_* ) text="Ievadi paroli" ;; # Latvian + nb_* ) text="Skriv inn passord" ;; # Norwegian + pl_* ) text="Podaj hasło" ;; # Polish + pt_* ) text="Digite a senha para desbloquear" ;; # Português + tr_* ) text="Giriş yapmak için şifrenizi girin" ;; # Turkish + ru_* ) text="Введите пароль" ;; # Russian + * ) text="Type password to unlock" ;; # Default to English +esac + +while true ; do + case "$1" in + -h|--help) + printf "Usage: %s [options]\n\n%s\n\n" "${0##*/}" "$options"; exit 1 ;; + -d|--desktop) desktop=$(command -V wmctrl) ; shift ;; + -g|--greyscale) hue=(-level "0%,100%,0.6" -set colorspace Gray -average) ; shift ;; + -p|--pixelate) effect=(-scale 10% -scale 1000%) ; shift ;; + -f|--font) + case "$2" in + "") shift 2 ;; + *) font=$2 ; shift 2 ;; + esac ;; + -t|--text) text=$2 ; shift 2 ;; + -l|--listfonts) + convert -list font | awk -F: '/Font: / { print $2 }' | sort -du | command -- ${PAGER:-less} + exit 0 ;; +-n|--nofork) i3lock_cmd+=(--nofork) ; shift ;; + --) shift; shot_custom=true; break ;; + *) echo "error" ; exit 1 ;; + esac +done + +if "$shot_custom" && [[ $# -gt 0 ]]; then + shot=("$@"); +fi + +command -- "${shot[@]}" "$image" + +value="60" #brightness value to compare to + +color=$(convert "$image" -gravity center -crop 100x100+0+0 +repage -colorspace hsb \ + -resize 1x1 txt:- | awk -F '[%$]' 'NR==2{gsub(",",""); printf "%.0f\n", $(NF-1)}'); + +if [[ $color -gt $value ]]; then #white background image and black text + bw="black" + icon="/home/$USER/.config/bspwm/scripts/i3lock-fancy/circlelockdark.png" + param=("--insidecolor=0000001c" "--ringcolor=0000003e" \ + "--linecolor=00000000" "--keyhlcolor=ffffff80" "--ringvercolor=ffffff00" \ + "--separatorcolor=22222260" "--insidevercolor=ffffff1c" \ + "--ringwrongcolor=ffffff55" "--insidewrongcolor=ffffff1c" \ + "--verifcolor=ffffff00" "--wrongcolor=ff000000" "--timecolor=ffffff00" \ + "--datecolor=ffffff00" "--layoutcolor=ffffff00") +else #black + bw="white" + icon="/home/$USER/.config/bspwm/scripts/i3lock-fancy/circlelock.png" + param=("--insidecolor=ffffff1c" "--ringcolor=ffffff3e" \ + "--linecolor=ffffff00" "--keyhlcolor=00000080" "--ringvercolor=00000000" \ + "--separatorcolor=22222260" "--insidevercolor=0000001c" \ + "--ringwrongcolor=00000055" "--insidewrongcolor=0000001c" \ + "--verifcolor=00000000" "--wrongcolor=ff000000" "--timecolor=00000000" \ + "--datecolor=00000000" "--layoutcolor=00000000") +fi + +convert "$image" "${hue[@]}" "${effect[@]}" -font "$font" -pointsize 26 -fill "$bw" -gravity center \ + -annotate +0+160 "$text" "$icon" -gravity center -composite "$image" + +# If invoked with -d/--desktop, we'll attempt to minimize all windows (ie. show +# the desktop) before locking. +${desktop} ${desktop:+-k on} + +# try to use i3lock with prepared parameters +if ! "${i3lock_cmd[@]}" "${param[@]}" >/dev/null 2>&1; then + # We have failed, lets get back to stock one + "${i3lock_cmd[@]}" +fi + +# As above, if we were passed -d/--desktop, we'll attempt to restore all windows +# after unlocking. +${desktop} ${desktop:+-k off} diff --git a/bspwm/bspwm/scripts/keybindings_rofi.sh b/bspwm/bspwm/scripts/keybindings_rofi.sh new file mode 100755 index 0000000..779a20a --- /dev/null +++ b/bspwm/bspwm/scripts/keybindings_rofi.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +awk '/^[a-z]/ && last {print "",$0,"\t",last,""} {last=""} /^#/{last=$0}' ~/.config/sxhkd/sxhkdrc | + column -t -s $'\t' | + rofi -dmenu -i -p "keybindings:" -markup-rows -no-show-icons -width 1000 -lines 15 -yoffset 40 diff --git a/bspwm/bspwm/scripts/low_bat_notifier.sh b/bspwm/bspwm/scripts/low_bat_notifier.sh new file mode 100755 index 0000000..a438a12 --- /dev/null +++ b/bspwm/bspwm/scripts/low_bat_notifier.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +### VARIABLES + +POLL_INTERVAL=60 # seconds at which to check battery level +LOW_BAT=33 # lesser than this is considered low battery + +# If BAT0 doesn't work for you, check available devices with command below +# +# $ ls -1 /sys/class/power_supply/ +# +BAT_PATH=/sys/class/power_supply/BAT0 +BAT_STAT=$BAT_PATH/status + +if [[ -f $BAT_PATH/charge_full ]] +then + BAT_FULL=$BAT_PATH/charge_full + BAT_NOW=$BAT_PATH/charge_now +elif [[ -f $BAT_PATH/energy_full ]] +then + BAT_FULL=$BAT_PATH/energy_full + BAT_NOW=$BAT_PATH/energy_now +else + exit +fi + +### END OF VARIABLES + +kill_running() { # stop older instances to not get multiple notifications + local mypid=$$ + + declare pids=($(pgrep -f ${0##*/})) + + for pid in ${pids[@]/$mypid/}; do + kill $pid + sleep 1 + done +} + +# Run only if battery is detected +if ls -1qA /sys/class/power_supply/ | grep -q . +then + + kill_running + + while true + do + bf=$(cat $BAT_FULL) + bn=$(cat $BAT_NOW) + bs=$(cat $BAT_STAT) + + bat_percent=$(( 100 * $bn / $bf )) + + if [[ $bat_percent -lt $LOW_BAT && "$bs" = "Discharging" ]] + then + notify-send --urgency=critical "$bat_percent% : Low Battery!" + fi + sleep $POLL_INTERVAL + done +fi diff --git a/bspwm/bspwm/scripts/screenshot.sh b/bspwm/bspwm/scripts/screenshot.sh new file mode 100644 index 0000000..5d81cb1 --- /dev/null +++ b/bspwm/bspwm/scripts/screenshot.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# options to be displayed +option0="screen" +option1="area" +option2="window" + +# options to be displyed +options="$option0\n$option1\n$option2" + +selected="$(echo -e "$options" | rofi -lines 3 -dmenu -p "scrot")" +case $selected in + $option0) + cd ~/Pictures/ && sleep 1 && scrot;; + $option1) + cd ~/Pictures/ && scrot -s;; + $option2) + cd ~/Pictures/ && sleep 1 && scrot -u;; +esac + diff --git a/bspwm/bspwm/sxhkdrc b/bspwm/bspwm/sxhkdrc new file mode 120000 index 0000000..afa8a0b --- /dev/null +++ b/bspwm/bspwm/sxhkdrc @@ -0,0 +1 @@ +../sxhkd/sxhkdrc \ No newline at end of file diff --git a/dunst/dunstrc-desktop b/dunst/dunstrc-desktop index a69708a..8f37c40 100644 --- a/dunst/dunstrc-desktop +++ b/dunst/dunstrc-desktop @@ -34,7 +34,7 @@ origin = top-right # Offset from the origin - offset = 22x54 + offset = 14x48 # Scale factor. It is auto-detected if value is 0. scale = 0 @@ -69,7 +69,8 @@ # The transparency of the window. Range: [0; 100]. # This option will only work if a compositing window manager is # present (e.g. xcompmgr, compiz, etc.). (X11 only) - transparency = 0 + # transparency = 0 + transparency = 15; # Draw a line of "separator_height" pixel height between two # notifications. @@ -87,7 +88,7 @@ # Defines width in pixels of frame around the notification window. # Set to 0 to disable. - frame_width = 7 + frame_width = 4 # Defines color of the frame around the notification window. frame_color = "#aaaaaa" @@ -300,18 +301,17 @@ #new_icon = /path/to/icon [urgency_normal] - background = "#282c34" - foreground = "#b26cc6" - # frame_color = "#51afef" + background = "#24282f" + foreground = "#c678dd" frame_color = "#98be65" timeout = 5 # Icon for notifications with normal urgency, uncomment to enable #new_icon = /path/to/icon [urgency_critical] - background = "#900000" + background = "#ff6c6b" foreground = "#ffffff" - frame_color = "#ff0000" + frame_color = "#900000" timeout = 0 # Icon for notifications with critical urgency, uncomment to enable #new_icon = /path/to/icon diff --git a/polybar-themes/sblocks/config.ini b/polybar-themes/sblocks/config.ini index df12bde..a9215e9 100644 --- a/polybar-themes/sblocks/config.ini +++ b/polybar-themes/sblocks/config.ini @@ -61,7 +61,8 @@ fixed-center = true ; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%), ; the percentage can optionally be extended with a pixel offset like so: ; 50%:-10, this will result in a width or height of 50% minus 10 pixels -width = 95% +; width = 95% +width = 99.2% ; height = 34 height = 40 @@ -69,8 +70,9 @@ height = 40 ; the percentage can optionally be extended with a pixel offset like so: ; 50%:-10, this will result in an offset in the x or y direction ; of 50% minus 10 pixels -offset-x = 2.5% -offset-y = 0% +; offset-x = 2.5% +offset-x = 0.4% +offset-y = 0.38% ; Background ARGB color (e.g. #f00, #ff992a, #ddff1023) background = ${color.background} @@ -87,8 +89,9 @@ foreground = ${color.foreground} ; doesn't get rounded ; Individual top/bottom values can be defined using: ; radius-{top,bottom} -radius-top = 0.0 -radius-bottom = 0.0 +; HANDLED BY PICOM +; radius-top = 0.0 +; radius-bottom = 0.0 ; Under-/overline pixel size and argb color ; Individual values can be defined using: @@ -114,7 +117,7 @@ border-bottom-color = ${color.primary} ; Number of spaces to add at the beginning/end of the bar ; Individual side values can be defined using: ; padding-{left,right} -padding = 0 +padding = 1 ; Number of spaces to add before/after each module ; Individual side values can be defined using: diff --git a/polybar-themes/sblocks/user_modules.ini b/polybar-themes/sblocks/user_modules.ini index b9b78ac..5ea43d1 100644 --- a/polybar-themes/sblocks/user_modules.ini +++ b/polybar-themes/sblocks/user_modules.ini @@ -71,9 +71,9 @@ label-padding = 2 [module/launcher] type = custom/text -content-prefix =  +content-prefix = "" content-prefix-background = ${color.teal} -content-prefix-padding = 1 +content-prefix-padding = 2 content = " Menu " content-background = ${color.background-alt} @@ -83,7 +83,7 @@ content-underline = ${color.background} ; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND" ; click-left = ~/.config/polybar/blocks/scripts/launcher.sh & -click-left = ~/SudacodeRice/scripts/menu_small & +click-left = rofi -show drun ;;click-middle = ~/.config/polybar/blocks/scripts/launcher-full click-right = ~/SudacodeRice/scripts/menu_full & ; click-right = ~/.config/polybar/blocks/scripts/style-switch.sh & @@ -97,9 +97,9 @@ click-right = ~/SudacodeRice/scripts/menu_full & [module/sysmenu] type = custom/text -content-prefix = ⏻ +content-prefix = "⏻" content-prefix-background = ${color.red} -content-prefix-padding = 1 +content-prefix-padding = 2 content = " System " content-background = ${color.background-alt}