Skip to content

Latest commit

 

History

History
4471 lines (3745 loc) · 137 KB

system.org

File metadata and controls

4471 lines (3745 loc) · 137 KB

System Config

Colors

colorkeyvalue
blackcolor0#292d3e
greaycolor1#546A90
redcolor2#e61f44
orangecolor3#cf433e
greencolor4#a7da1e
tealcolor5#A875FF
yellowcolor6#ffd400
bluecolor7#1ea8fc
dark-bluecolor8#3F88AD
magentacolor9#ff2afc
violetcolor10#df85ff
cyancolor11#42c6ff
dark-cyancolor12#204052
whitecolor13#d0d0d0
fgcolor14#f2f3f7
fg-altcolor15#7984D1
bgcolor16#0c0a20
(let ((color (seq-some (lambda (e) (and (string= name (car e)) (nth 2 e))) table)))
  (if (> quote 0)
      (concat "\"" color "\"")
    color))

Polybar

Config

Config

;==========================================================
;
; THIS IS AN EXAMPLE CONFIGURATION FILE!
; IT IS NOT SUPPOSED TO WORK OUT OF THE BOX SINCE IS CONTAINS
; SETTINGS THAT ARE SPECIFIC TO THE MACHINE WHICH WAS USED
; TO GENERATE IT.
; Please refer to the web documentation hosted at:
; https://github.com/polybar/polybar#configuration
; and
; https://github.com/polybar/polybar/wiki/Configuration
; if you want to automatically generate one for you.
;
;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   To learn more about how to configure Polybar
;   go to https://github.com/polybar/polybar
;
;   The README contains a lot of information
;
;==========================================================

[colors]
;background = ${xrdb:color0:#222}
background = <<get-color(name="bg", quote=0)>>

background-alt = #E6020016
;foreground = ${xrdb:color7:#222}
foreground = <<get-color(name="fg", quote=0)>>
foreground-alt = <<get-color(name="fg-alt", quote=0)>>
primary = #ffb52a
secondary = #ff2afc
red = #f90000
alert = #bd2c40
occupied-active =<<get-color(name="teal", quote=0)>> 
foreground-active = <<get-color(name="magenta", quote=0)>>

[bar/example]
monitor = ${env:MONITOR:HDMI-0}
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
;radius = 6.0
fixed-center = false

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 3
line-color = #f00

;border-size = 4
;border-color = #00000000

padding-left = 2
padding-right = 2

module-margin-left = 1
module-margin-right = 2

font-0 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=13;1
font-1 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=18;3
font-2 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=32;7
font-3 = unifont:fontformat=truetype:size=13:antialias=false;0
font-4 = siji:pixelsize=13;1

modules-left = startmenu mpd bspwm
;modules-center = filesystem pulseaudio eth cpu memory temperature date
modules-right = filesystem pulseaudio eth cpu memory temperature date bluetooth powermenu 

tray-position = none
tray-padding = 2
;tray-background = #0063ff

;wm-restack = bspwm
;wm-restack = i3

;override-redirect = true

;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev

;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

cursor-click = pointer
cursor-scroll = ns-resize

Bspwm Bar

[bar/mainbar-bspwm]
monitor = ${env:MONITOR}
;monitor-fallback = HDMI1
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = true
bottom = false
separator = |

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 2
line-color = #f00

wm-restack = bspwm
override-redirect = true

; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true

border-size = 0
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
;border-bottom-size = 25
border-color = #00000000

padding-left = 0
padding-right = 1

module-margin-left = 1
module-margin-right = 1

;https://github.com/jaagr/polybar/wiki/Fonts
font-0 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=13;1
font-1 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=18;2
font-2 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=32;7
font-3 = "FontAwesome:size=13;0"
        
;font-0 = "Noto Sans:size=10;0"
;font-2 = "Noto Sans:size=10;0"
;font-3 = "Noto Sans Mono:size=10;0"

modules-left = bspwm startmenu
;modules-center = kernel
;modules-right = pavolume memory2 cpu2 date
modules-right = filesystem pulseaudio eth cpu memory temperature battery date powermenu 

tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 2
tray-maxsize = 20
tray-scale = 1.0
tray-position = right
tray-background = ${colors.background}

scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev


Modules

[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%

[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock

format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}

label-layout = %layout%
label-layout-underline = ${colors.secondary}

label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}

[module/filesystem]
type = internal/fs
interval = 25

mount-0 = /

label-mounted = %{F<<get-color(name="fg-alt", quote=0)>>}Disk: %free% / %total% 
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}

[module/mpd]
type = internal/mpd
format-online = <label-song>  <icon-prev> <icon-stop> <toggle> <icon-next>

icon-prev = < 
icon-stop = S
icon-play = P
icon-pause = ||
icon-next = >

label-song-maxlen = 25
label-song-ellipsis = true

[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.foreground-alt}
format-underline =<<get-color(name="magenta", quote=0)>> 
label = %percentage:2%%

[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = <<get-color(name="orange", quote=0)>>
label = %percentage_used%%

[module/wlan]
type = internal/network
interface = wlp3s0
interval = 3.0

format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%

format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}

;ramp-signal-0 = 
;ramp-signal-1 = 
;ramp-signal-2 = 
;ramp-signal-3 = 
;ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}

[module/eth]
type = internal/network
interface = eno1
interval = 3.0

format-connected-underline = <<get-color(name="green", quote=0)>>
; format-connected-prefix = %ifname% 
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %ifname%:%{F<<get-color(name="fg", quote=0)>>}%upspeed:9% %downspeed:9%
label-connected-foreground = <<get-color(name="fg-alt", quote=0)>>
label-connected-exec =%ifname%:%local_ip%
label-disconnected = not connected

format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}

[module/date]
type = internal/date
interval = 5

date =
date-alt = "%Y-%m-%d"

time = %H:%M
time-alt = %H:%M:%S

format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline =<<get-color(name="cyan", quote=0)>> 

label = %date% %time%

[module/pulseaudio]
type = internal/pulseaudio

format-volume = <label-volume> 
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}

label-muted =  muted
label-muted-foreground = #666

bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

[module/alsa]
type = internal/alsa

format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}

format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted

bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98

format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a

format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}

;format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}

ramp-capacity-0 =  
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-5 = 
ramp-capacity-6 = 
ramp-capacity-7 = 
ramp-capacity-8 = 
ramp-capacity-9 = 
ramp-capacity-foreground = ${colors.foreground-alt}

animation-charging-0 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750

animation-discharging-0 =  
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750

[module/temperature]
type = internal/temperature
thermal-zone = 0
interval = 2
; Full path of temperature sysfs path
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file
; Default reverts to thermal zone setting
hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp3_input
warn-temperature = 80

format = <label>
format-underline = <<get-color(name="teal", quote=0)>>
format-warn = <label-warn>
format-warn-underline = ${self.format-underline}

label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = <<get-color(name="red", quote=0)>>

ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}

Menu Modules

[module/powermenu]

type = custom/text
content = 
content-font= 3
;content-height = 90%:-100pt
;content-padding = 15pt
format-content-offset = 10px
content-background = ${colors.bg}
content-foreground = <<get-color(name="dark-blue", quote=0)>>

click-left = rofi -show power-menu -width 250 -lines 6
;type = custom/menu

;expand-right = true

;format-spacing = 1

;label-open = P
;label-open-foreground = ${colors.secondary}
;label-close =  cancel
;label-close-foreground = ${colors.secondary}
;label-separator = |
;label-separator-foreground = ${colors.foreground-alt}

;menu-0-0 = reboot
;menu-0-0-exec = rofi -show power-menu
;menu-0-2 = display off
;menu-0-2-exec = xset dpms force off

;menu-1-0 = cancel
;menu-1-0-exec = #powermenu.open.0
;menu-1-1 = reboot
;menu-1-1-exec =  shutdown -r now

;menu-2-0 = power off
;menu-2-0-exec =  shutdown now
;menu-2-1 = cancel
;menu-2-1-exec = #powermenu.open.0

[module/startmenu]
type = custom/menu

expand-left = true

format-spaceing = 1

label-open = 
label-open-font= 3

label-open-foreground = <<get-color(name="dark-blue", quote=0)>>
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}

menu-0-0 = 
menu-0-0-font = 2
menu-0-0-exec = opera
menu-0-1 = 
menu-0-1-font = 2
; menu-0-1-exec = emacsclient -c -a emacs -q --eval "(multi-vterm)"
menu-0-1-exec = alacritty
menu-0-2 = E
menu-0-2-exec = emacsclient -c -a 'emacs'
menu-0-3 = Virt
menu-0-3-exec = virt-manager
menu-0-4 = joplin
menu-0-4-exec = ~/.joplin/Joplin.AppImage
menu-0-5 = Music
menu-0-5-exec = /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=start-ytmdesktop.sh --file-forwarding app.ytmdesktop.ytmdesktop @@u %U @@
menu-0-6 = Drun
menu-0-6-exec = rofi -show drun
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false

[global/wm]
margin-top = 5
margin-bottom = 5

; vim:ft=dosini

Bspwm Module

[module/bspwm]
type = internal/bspwm

enable-click = true
enable-scroll = true
reverse-scroll = true
pin-workspaces = true

ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 10;
ws-icon-default = " "
                

format = <label-state> 

label-focused = %icon%
label-focused-background = ${colors.background}
label-focused-underline= #6790eb
label-focused-padding = 4
label-focused-foreground = #6790EB
label-focused-font = 3

label-occupied = %icon%
label-occupied-padding = 2
label-occupied-background = ${colors.background}
label-occupied-foreground = #6790EB
label-occupied-font = 3

label-urgent = %icon%
label-urgent-padding = 2

label-empty = %icon%
label-empty-foreground = ${colors.foreground}
label-empty-padding = 2
label-empty-background = ${colors.background}
label-empty-font = 3
label-monocle = "  "
label-monocle-foreground = ${colors.foreground}
label-tiled = "  "
label-tiled-foreground = ${colors.foreground}
label-fullscreen = "  "
label-fullscreen-foreground = ${colors.foreground}
label-floating = "  "
label-floating-foreground = ${colors.foreground}
label-pseudotiled = "  "
label-pseudotiled-foreground = ${colors.foreground}
label-locked = "  "
label-locked-foreground = ${colors.foreground}
label-sticky = "  "
label-sticky-foreground = ${colors.foreground}
label-private =  "     "
label-private-foreground = ${colors.foreground}
label-font=3                        
; Separator in between workspaces
;label-separator = |
;label-separator-padding = 10
;label-separator-foreground = #ffb52a

format-foreground = ${colors.foreground}
format-background = ${colors.background}



Rofi-Bluetooth

-font= 3

[module/bluetooth]
type = custom/script
exec = ~/.dotfiles/bin/rofi-bluetooth --status
interval = 1
label-font= 2
click-left = ~/.dotfiles/bin/rofi-bluetooth &

Autostart

# More info : https://github.com/jaagr/polybar/wiki

# Install the following applications for polybar and icons in polybar if you are on ArcoLinuxD
# awesome-terminal-fonts
# Tip : There are other interesting fonts that provide icons like nerd-fonts-complete
# --log=error
# Terminate already running bar instances
killall -q polybar

# Wait until the processes have been shut down
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done

desktop=$(echo $DESKTOP_SESSION)
count=$(xrandr --query | grep " connected" | cut -d" " -f1 | wc -l)


case $desktop in

    i3|/usr/share/xsessions/i3)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-i3 -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-i3 -c ~/.config/polybar/config &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-i3-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-i3-extra -c ~/.config/polybar/config &
    # fi
    ;;

    openbox|/usr/share/xsessions/openbox)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-openbox -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-openbox -c ~/.config/polybar/config &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-openbox-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-openbox-extra -c ~/.config/polybar/config &
    # fi
    ;;

    bspwm|/usr/share/xsessions/bspwm)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-bspwm -c ~/.config/polybar/config.ini &
      done
    else
    polybar --reload mainbar-bspwm -c ~/.config/polybar/config.ini &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-bspwm-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-bspwm-extra -c ~/.config/polybar/config &
    # fi
    ;;

    herbstluftwm|/usr/share/xsessions/herbstluftwm)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-herbstluftwm -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-herbstluftwm -c ~/.config/polybar/config &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-herbstluftwm-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-herbstluftwm-extra -c ~/.config/polybar/config &
    # fi
    ;;

    worm|/usr/share/xsessions/worm)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-worm -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-worm -c ~/.config/polybar/config &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-worm-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-worm-extra -c ~/.config/polybar/config &
    # fi
    ;;

    berry|/usr/share/xsessions/berry)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-berry -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-berry -c ~/.config/polybar/config &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-berry-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-berry-extra -c ~/.config/polybar/config &
    # fi
    ;;

    xmonad|/usr/share/xsessions/xmonad)
    if [ $count = 1 ]; then
      m=$(xrandr --query | grep " connected" | cut -d" " -f1)
      MONITOR=$m polybar --reload mainbar-xmonad -c ~/.config/polybar/config &
    else
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-xmonad -c ~/.config/polybar/config &
      done
    fi
    # second polybar at bottom
    # if [ $count = 1 ]; then
    #   m=$(xrandr --query | grep " connected" | cut -d" " -f1)
    #   MONITOR=$m polybar --reload mainbar-xmonad-extra -c ~/.config/polybar/config &
    # else
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-xmonad-extra -c ~/.config/polybar/config &
    #   done
    # fi
    ;;

    spectrwm|/usr/share/xsessions/spectrwm)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-spectrwm -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-spectrwm -c ~/.config/polybar/config &
    fi
    ;;

    cwm|/usr/share/xsessions/cwm)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-cwm -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-cwm -c ~/.config/polybar/config &
    fi

     # second polybar at bottom
     # if type "xrandr" > /dev/null; then
     #  for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
     #    MONITOR=$m polybar --reload mainbar-cwm-extra -c ~/.config/polybar/config &
     #  done
     # else
     # polybar --reload mainbar-cwm-extra -c ~/.config/polybar/config &
     # fi

    ;;

    fvwm3|/usr/share/xsessions/fvwm3)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-fvwm3 -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-fvwm3 -c ~/.config/polybar/config &
    fi

     # second polybar at bottom
     # if type "xrandr" > /dev/null; then
     #  for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
     #    MONITOR=$m polybar --reload mainbar-fvwm3-extra -c ~/.config/polybar/config &
     #  done
     # else
     # polybar --reload mainbar-fvwm3-extra -c ~/.config/polybar/config &
     # fi

    ;;

    wmderland|/usr/share/xsessions/wmderland)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload mainbar-wmderland -c ~/.config/polybar/config &
      done
    else
    polybar --reload mainbar-wmderland -c ~/.config/polybar/config &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-wmderland-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-wmderland-extra -c ~/.config/polybar/config &
    # fi
    ;;

    leftwm|/usr/share/xsessions/leftwm)
    if type "xrandr" > /dev/null; then
      for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
          echo $m
          if [ $m == 'DP-5' ]; then
              echo "Portrait"
              MONITOR=$m polybar --reload mainbar-leftwm-portrait -c ~/.config/polybar/config.ini &
          elif [ $m == 'DP-2' ]; then
              echo "Portrait"
              MONITOR=$m polybar --reload mainbar-leftwm-center -c ~/.config/polybar/config.ini &

          else
              MONITOR=$m polybar --reload mainbar-leftwm -c ~/.config/polybar/config.ini &
          fi
      done
    else
    polybar --reload mainbar-leftwm -c ~/.config/polybar/config &
    fi
    # second polybar at bottom
    # if type "xrandr" > /dev/null; then
    #   for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    #     MONITOR=$m polybar --reload mainbar-leftwm-extra -c ~/.config/polybar/config &
    #   done
    # else
    # polybar --reload mainbar-leftwm-extra -c ~/.config/polybar/config &
    # fi
    ;;

esac

Average Temperature Script

#!/bin/bash
cat /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp3_input

Rofi

Rofi Config

configuration {
        modi: "window,drun,ssh,power-menu:~/.dotfiles/bin/rofi-power-menu";
        width: 600; 
        lines: 8;
/*	columns: 1;*/
        font: "InconsolataGo Nerd Font Mono 16";
/*	bw: 1;*/
/*	location: 0;*/
/*	padding: 5;*/
/*	yoffset: 0;*/
/*	xoffset: 0;*/
/*	fixed-num-lines: true;*/
/*	show-icons: false;*/
/*	terminal: "rofi-sensible-terminal";*/
/*	ssh-client: "ssh";*/
/*	ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/
/*	run-command: "{cmd}";*/
/*	run-list-command: "";*/
/*	run-shell-command: "{terminal} -e {cmd}";*/
/*	window-command: "wmctrl -i -R {window}";*/
/*	window-match-fields: "all";*/
        icon-theme: "Papirus" ;
/*	drun-match-fields: "name,generic,exec,categories,keywords";*/
/*	drun-categories: ;*/
/*	drun-show-actions: false;*/
/*	drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";*/
/*	drun-url-launcher: "xdg-open";*/
/*	disable-history: false;*/
/*	ignored-prefixes: "";*/
/*	sort: false;*/
/*	sorting-method: "normal";*/
/*	case-sensitive: false;*/
/*	cycle: true;*/
/*	sidebar-mode: false;*/
/*	eh: 1;*/
/*	auto-select: false;*/
/*	parse-hosts: false;*/
/*	parse-known-hosts: true;*/
/*	combi-modi: "window,run";*/
/*	matching: "normal";*/
/*	tokenize: true;*/
/*	m: "-5";*/
/*	line-margin: 2;*/
/*	line-padding: 1;*/
/*	filter: ;*/
/*	separator-style: "dash";*/
/*	hide-scrollbar: false;*/
/*	fullscreen: false;*/
/*	fake-transparency: false;*/
/*	dpi: -1;*/
/*	threads: 0;*/
/*	scrollbar-width: 8;*/
/*	scroll-method: 0;*/
/*	fake-background: "screenshot";*/
/*	window-format: "{w}    {c}   {t}";*/
/*	click-to-exit: true;*/
/*	show-match: true;*/
/*	theme: ;*/
/*	color-normal: ;*/
/*	color-urgent: ;*/
/*	color-active: ;*/
/*	color-window: ;*/
/*	max-history-size: 25;*/
/*	combi-hide-mode-prefix: false;*/
/*	matching-negate-char: '-' /* unsupported */*/
/*	cache-dir: ;*/
/*	window-thumbnail: false;*/
/*	drun-use-desktop-cache: false;*/
/*	drun-reload-desktop-cache: false;*/
/*	normalize-match: false;*/
/*	pid: "/run/user/1000/rofi.pid";*/
/*	display-window: ;*/
/*	display-windowcd: ;*/
/*	display-run: ;*/
/*	display-ssh: ;*/
/*	display-drun: ;*/
/*	display-combi: ;*/
/*	display-keys: ;*/
/*	display-file-browser: ;*/
/*	kb-primary-paste: "Control+V,Shift+Insert";*/
/*	kb-secondary-paste: "Control+v,Insert";*/
/*	kb-clear-line: "Control+w";*/
/*	kb-move-front: "Control+a";*/
/*	kb-move-end: "Control+e";*/
/*	kb-move-word-back: "Alt+b,Control+Left";*/
/*	kb-move-word-forward: "Alt+f,Control+Right";*/
/*	kb-move-char-back: "Left,Control+b";*/
/*	kb-move-char-forward: "Right,Control+f";*/
/*	kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/
/*	kb-remove-word-forward: "Control+Alt+d";*/
/*	kb-remove-char-forward: "Delete,Control+d";*/
/*	kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/
/*	kb-remove-to-eol: "Control+k";*/
/*	kb-remove-to-sol: "Control+u";*/
        kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";
/*	kb-accept-custom: "Control+Return";*/
/*	kb-accept-alt: "Shift+Return";*/
/*	kb-delete-entry: "Shift+Delete";*/
        kb-mode-next: "Shift+Right,Control+Tab";
        kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";
/*	kb-row-left: "Control+Page_Up";*/
/*	kb-row-right: "Control+Page_Down";*/
        /* kb-row-up: "Up,Control+p,ISO_Left_Tab"; */
        kb-row-down: "Down,Control+n";
        /* kb-row-tab: "Tab"; */
/*	kb-page-prev: "Page_Up";*/
/*	kb-page-next: "Page_Down";*/
/*	kb-row-first: "Home,KP_Home";*/
/*	kb-row-last: "End,KP_End";*/
/*	kb-row-select: "Control+space";*/
/*	kb-screenshot: "Alt+S";*/
/*	kb-ellipsize: "Alt+period";*/
/*	kb-toggle-case-sensitivity: "grave,dead_grave";*/
        kb-toggle-sort: "Alt+grave";
        kb-cancel: "Escape,Control+g,Control+bracketleft";
/*	kb-custom-1: "Alt+1";*/
/*	kb-custom-2: "Alt+2";*/
/*	kb-custom-3: "Alt+3";*/
/*	kb-custom-4: "Alt+4";*/
/*	kb-custom-5: "Alt+5";*/
/*	kb-custom-6: "Alt+6";*/
/*	kb-custom-7: "Alt+7";*/
/*	kb-custom-8: "Alt+8";*/
/*	kb-custom-9: "Alt+9";*/
/*	kb-custom-10: "Alt+0";*/
/*	kb-custom-11: "Alt+exclam";*/
/*	kb-custom-12: "Alt+at";*/
/*	kb-custom-13: "Alt+numbersign";*/
/*	kb-custom-14: "Alt+dollar";*/
/*	kb-custom-15: "Alt+percent";*/
/*	kb-custom-16: "Alt+dead_circumflex";*/
/*	kb-custom-17: "Alt+ampersand";*/
/*	kb-custom-18: "Alt+asterisk";*/
/*	kb-custom-19: "Alt+parenleft";*/
/*	kb-select-1: "Super+1";*/
/*	kb-select-2: "Super+2";*/
/*	kb-select-3: "Super+3";*/
/*	kb-select-4: "Super+4";*/
/*	kb-select-5: "Super+5";*/
/*	kb-select-6: "Super+6";*/
/*	kb-select-7: "Super+7";*/
/*	kb-select-8: "Super+8";*/
/*	kb-select-9: "Super+9";*/
/*	kb-select-10: "Super+0";*/
/*	ml-row-left: "ScrollLeft";*/
/*	ml-row-right: "ScrollRight";*/
/*	ml-row-up: "ScrollUp";*/
/*	ml-row-down: "ScrollDown";*/
        me-select-entry: "MousePrimary";
        me-accept-entry: "MouseDPrimary";
/*	me-accept-custom: "Control+MouseDPrimary";*/
}

Rofi Theme

@theme "/dev/null"
*{
    /*selected-normal-foreground:  rgba( 255, 255, 255, 100% );
    foreground:                  rgba( 180, 180, 180, 100% );
    normal-foreground:           @foreground;
    alternate-normal-background: rgba( 47, 30, 46, 63% );
    red:                         rgba( 220, 50, 47, 100% );
    selected-urgent-foreground:  rgba( 239, 97, 85, 100% );
    blue:                        rgba( 38, 139, 210, 100% );
    urgent-foreground:           rgba( 239, 97, 85, 100% );
    alternate-urgent-background: rgba( 47, 30, 46, 18% );
    active-foreground:           rgba( 129, 91, 164, 100% );
    lightbg:                     rgba( 238, 232, 213, 100% );
    selected-active-foreground:  rgba( 129, 91, 164, 100% );
    alternate-active-background: rgba( 47, 30, 46, 18% );
    background:                  rgba( 47, 30, 46, 100% );
    bordercolor:                 rgba( 239, 97, 85, 21% );
    alternate-normal-foreground: @foreground;
    normal-background:           rgba( 47, 30, 46, 63% );
    lightfg:                     rgba( 88, 104, 117, 100% );
    selected-normal-background:  rgba( 129, 91, 164, 33% );
    border-color:                @foreground;
    spacing:                     2;
    separatorcolor:              rgba( 239, 97, 85, 18% );
    urgent-background:           rgba( 47, 30, 46, 15% );
    selected-urgent-background:  rgba( 129, 91, 164, 33% );
    alternate-urgent-foreground: @urgent-foreground;
    background-color:            rgba( 0, 0, 0, 0% );
    alternate-active-foreground: @active-foreground;
    active-background:           rgba( 47, 30, 46, 15% );
    selected-active-background:  rgba( 129, 91, 164, 33% );*/
    none:                                   rgba(0,0,0,0);
    foreground:                rgba(255, 42, 252, 1); 
    normal-foreground:          @foreground;
    urgent-foreground:          @foreground;
    active-foreground:          @foreground;
    alternate-normal-foreground:@foreground;
    alternate-active-foreground: @foreground;
    selected-normal-foreground: rgba(159, 172, 249, 0.8);
    selected-normal-background: rgba(50, 2, 150, 0.5);
    selected-active-foreground: @foreground;
    background:                 rgba(29, 18, 115, 0.9);
    background-color:           @none;
    normal-background:          rgba(172, 0, 99, 0.5);
    urgent-background:          @background;
    active-background:          rgba(200, 0, 170, 0.5);
    selected-active-background: rgba(172, 0, 99, 0.5);
    alternate-normal-background:rgba(175,  0,  145, 0.5);
    seperatorcolor:             rgba(117, 255, 214, 0.5);
    border-color:                @none;
    spacing:                     2;
    border: 0;
    margin: 0;
    padding: 0;
    spacing: 0;
}
window {
    background-color: @background;
    border:           1;
    padding:         20 0;
    border-radius:                  12px;
}
mainbox {
    border:  0;
    padding: 0;
}
message {
    border:       1px dash 0px 0px ;
    /* border-color: @separatorcolor; */
    padding:      1px ;
}
textbox {
    text-color: @foreground;
}
listview {
    fixed-height: 0;
    border:       0px dash 0px 0px ;
    border-color: @seperatorcolor;
    spacing:      2px ;
    scrollbar:    false;
    padding:      1px 0px 0px ;
    elements:     5;
}
element {
    border:  0;
    padding: 1px ;
    children: [ element-icon, element-text ];
}
element-text {
    background-color: inherit;
    text-color:       inherit;
}
element-icon { 
    size: 36px ; 
}


element.normal.normal {
    background-color: @normal-background;
    text-color:       @normal-foreground;
}
element.normal.urgent {
    background-color: @urgent-background;
    text-color:       @urgent-foreground;
}
element.normal.active {
    background-color: @active-background;
    text-color:       @active-foreground;
}
element.selected.normal {
    background-color: @selected-normal-background;
    text-color:       @selected-normal-foreground;
}
/* element.selected.urgent { */
/*     /\* background-color: @selected-urgent-background; *\/ */
/*     text-color:       @selected-urgent-foreground; */
/* } */
element.selected.active {
    background-color: @selected-active-background;
    text-color:       @selected-active-foreground;
}
element.alternate.normal {
    background-color: @alternate-normal-background;
    text-color:       @alternate-normal-foreground;
}
/* element.alternate.urgent { */
/*     /\* background-color: @alternate-urgent-background; *\/ */
/*     text-color:       @alternate-urgent-foreground; */
/* } */
element.alternate.active {
    /* background-color: @alternate-active-background; */
    text-color:       @alternate-active-foreground;
}
scrollbar {
    width:        8px ;
    border:       0;
    handle-width: 8px ;
    padding:      0;
}
mode-switcher {
    border:       0px dash 0px 0px ;
    /* border-color: @separatorcolor; */
}
button.selected {
    background-color: @selected-normal-background;
    text-color:       @selected-normal-foreground;
}
inputbar {
    spacing:    0;
    text-color: @normal-foreground;
    padding:    1px ;
}
case-indicator {
    spacing:    0;
    text-color: @normal-foreground;
}
entry {
    spacing:    0;
    text-color: @normal-foreground;
}
prompt {
    spacing:    0;
    text-color: @normal-foreground;
}
inputbar {
    children:   [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
textbox-prompt-colon {
    expand:     false;
    str:        ":";
    margin:     0px 0.3em 0em 0em ;
    text-color: @normal-foreground;
}

Rofi Menus

Power-menu

#  /usr/bin/env bah

# Script Original Version: https://github.com/jluttine/rofi-power-menu
# This script defines just a mode for rofi instead of being a self-contained
# executable that launches rofi by itself. This makes it more flexible than
# running rofi inside this script as now the user can call rofi as one pleases.
# For instance:
#
#   rofi -show powermenu -modi powermenu:./rofi-power-menu
#
# See README.md for more information.

set -e
set -u

# All supported choices logout lockscreen hibernate
all=(shutdown reboot suspend hibernate logout displayoff )

# By default, show all (i.e., just copy the array)
show=("${all[@]}")

declare -A texts
texts[lockscreen]="lock screen"
texts[switchuser]="switch user"
texts[logout]="log out"
texts[suspend]="suspend"
texts[hibernate]="hibernate"
texts[reboot]="reboot"
texts[shutdown]="shut down"
texts[displayoff]="Display Off"

declare -A icons
icons[lockscreen]="\uf023"
icons[switchuser]="\uf518"
icons[logout]="\uf842"
icons[suspend]="\uf9b1"
icons[hibernate]="\uf7c9"
icons[reboot]="\ufc07"
icons[shutdown]="\uf011"
icons[cancel]="\u00d7"
icons[displayoff]=""

declare -A actions
actions[lockscreen]="loginctl lock-session ${XDG_SESSION_ID-}"
#actions[switchuser]="???"
actions[logout]="loginctl terminate-session ${XDG_SESSION_ID-}"
actions[suspend]="systemctl suspend"
actions[hibernate]="systemctl hibernate"
actions[reboot]="systemctl reboot"
actions[shutdown]="systemctl poweroff"
actions[displayoff]="$HOME/.dotfiles/bin/rofi-power-menu-sleep"

# By default, ask for confirmation for actions that are irreversible
confirmations=(reboot shutdown logout)

# By default, no dry run
dryrun=false
showsymbols=true

function check_valid {
    option="$1"
    shift 1
    for entry in "${@}"
    do
        if [ -z "${actions[$entry]+x}" ]
        then
            echo "Invalid choice in $1: $entry" >&2
            exit 1
        fi
    done
}

# Parse command-line options
parsed=$(getopt --options=h --longoptions=help,dry-run,confirm:,choices:,choose:,symbols,no-symbols --name "$0" -- "$@")
if [ $? -ne 0 ]; then
    echo 'Terminating...' >&2
    exit 1
fi
eval set -- "$parsed"
unset parsed
while true; do
    case "$1" in
        "-h"|"--help")
            echo "rofi-power-menu - a power menu mode for Rofi"
            echo
            echo "Usage: rofi-power-menu [--choices CHOICES] [--confirm CHOICES]"
            echo "                       [--choose CHOICE] [--dry-run] [--symbols|--no-symbols]"
            echo
            echo "Use with Rofi in script mode. For instance, to ask for shutdown or reboot:"
            echo
            echo "  rofi -show menu -modi \"menu:rofi-power-menu --choices=shutdown/reboot\""
            echo
            echo "Available options:"
            echo "  --dry-run          Don't perform the selected action but print it to stderr."
            echo "  --choices CHOICES  Show only the selected choices in the given order. Use / "
            echo "                     as the separator. Available choices are lockscreen, logout,"
            echo "                     suspend, hibernate, reboot and shutdown. By default, all"
            echo "                     available choices are shown."
            echo "  --confirm CHOICES  Require confirmation for the gives choices only. Use / as"
            echo "                     the separator. Available choices are lockscreen, logout,"
            echo "                     suspend, hibernate, reboot and shutdown. By default, only"
            echo "                     irreversible actions logout, reboot and shutdown require"
            echo "                     confirmation."
            echo "  --choose CHOICE    Preselect the given choice and only ask for a confirmation"
            echo "                     (if confirmation is set to be requested). It is strongly"
            echo "                     recommended to combine this option with --confirm=CHOICE"
            echo "                     if the choice wouldn't require confirmation by default."
            echo "                     Available choices are lockscreen, logout, suspend,"
            echo "                     hibernate, reboot and shutdown."
            echo "  --[no-]symbols     Show Unicode symbols or not. Requires a font with support"
            echo "                     for the symbols. Use, for instance, fonts from the"
            echo "                     Nerdfonts collection. By default, they are shown"
            echo "  -h,--help          Show this help text."
            exit 0
            ;;
        "--dry-run")
            dryrun=true
            shift 1
            ;;
        "--confirm")
            IFS='/' read -ra confirmations <<< "$2"
            check_valid "$1" "${confirmations[@]}"
            shift 2
            ;;
        "--choices")
            IFS='/' read -ra show <<< "$2"
            check_valid "$1" "${show[@]}"
            shift 2
            ;;
        "--choose")
            # Check that the choice is valid
            check_valid "$1" "$2"
            selectionID="$2"
            shift 2
            ;;
        "--symbols")
            showsymbols=true
            shift 1
            ;;
        "--no-symbols")
            showsymbols=false
            shift 1
            ;;
        "--")
            shift
            break
            ;;
        *)
            echo "Internal error" >&2
            exit 1
            ;;
    esac
done

# Define the messages after parsing the CLI options so that it is possible to
# configure them in the future.

function write_message {
    icon="<span font_size=\"medium\">$1</span>"
    text="<span font_size=\"medium\">$2</span>"
    if [ "$showsymbols" = "true" ]
    then
        echo -n "\u200e$icon \u2068$text\u2069"
    else
        echo -n "$text"
    fi
}

function print_selection {
    echo -e "$1" | $(read -r -d '' entry; echo "echo $entry")
}

declare -A messages
declare -A confirmationMessages
for entry in "${all[@]}"
do
    messages[$entry]=$(write_message "${icons[$entry]}" "${texts[$entry]^}")
done
for entry in "${all[@]}"
do
    confirmationMessages[$entry]=$(write_message "${icons[$entry]}" "Yes, ${texts[$entry]}")
done
confirmationMessages[cancel]=$(write_message "${icons[cancel]}" "No, cancel")

if [ $# -gt 0 ]
then
    # If arguments given, use those as the selection
    selection="${@}"
else
    # Otherwise, use the CLI passed choice if given
    if [ -n "${selectionID+x}" ]
    then
        selection="${messages[$selectionID]}"
    fi
fi

# Don't allow custom entries
echo -e "\0no-custom\x1ftrue"
# Use markup
echo -e "\0markup-rows\x1ftrue"

if [ -z "${selection+x}" ]
then
    echo -e "\0prompt\x1fPower menu"
    for entry in "${show[@]}"
    do
        echo -e "${messages[$entry]}\0icon\x1f${icons[$entry]}"
    done
else
    for entry in "${show[@]}"
    do
        if [ "$selection" = "$(print_selection "${messages[$entry]}")" ]
        then
            # Check if the selected entry is listed in confirmation requirements
            for confirmation in "${confirmations[@]}"
            do
                if [ "$entry" = "$confirmation" ]
                then
                    # Ask for confirmation
                    echo -e "\0prompt\x1fAre you sure"
                    echo -e "${confirmationMessages[$entry]}\0icon\x1f${icons[$entry]}"
                    echo -e "${confirmationMessages[cancel]}\0icon\x1f${icons[cancel]}"
                    exit 0
                fi
            done
            # If not, then no confirmation is required, so mark confirmed
            selection=$(print_selection "${confirmationMessages[$entry]}")
        fi
        if [ "$selection" = "$(print_selection "${confirmationMessages[$entry]}")" ]
        then
            if [ $dryrun = true ]
            then
                # Tell what would have been done
                echo "Selected: $entry" >&2
            else
                # Perform the action
                ${actions[$entry]}
            fi
            exit 0
        fi
        if [ "$selection" = "$(print_selection "${confirmationMessages[cancel]}")" ]
        then
            # Do nothing
            exit 0
        fi
    done
    # The selection didn't match anything, so raise an error
    echo "Invalid selection: $selection" >&2
    exit 1
fi

Power-Menu Sleep

import sys, select, subprocess
while True:
    p = subprocess.Popen(['xset', 'dpms', 'force', 'off'], 
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    if sys.stdin in select.select([sys.stdin], [], [], 0)[0]:
        break

Wifi menu

Bluetooth

#             __ _       _     _            _              _   _
#  _ __ ___  / _(_)     | |__ | |_   _  ___| |_ ___   ___ | |_| |__
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
    # | | | (_) |  _| |_____| |_) | | |_| |  __/ || (_) | (_) | |_| | | |
# |_|  \___/|_| |_|     |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
#
# Author: Nick Clyde (clydedroid)
# https://github.com/nickclyde/rofi-bluetooth
# A script that generates a rofi menu that uses bluetoothctl to
# connect to bluetooth devices and display status info.
#
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
#
# Depends on:
#   Arch repositories: rofi, bluez-utils (contains bluetoothctl)

# Constants
divider="---------"
goback="Back"

# Checks if bluetooth controller is powered on
power_on() {
    if bluetoothctl show | grep -q "Powered: yes"; then
        return 0
    else
        return 1
    fi
}

# Toggles power state
toggle_power() {
    if power_on; then
        bluetoothctl power off
        show_menu
    else
        if rfkill list bluetooth | grep -q 'blocked: yes'; then
            rfkill unblock bluetooth && sleep 3
        fi
        bluetoothctl power on
        show_menu
    fi
}

# Checks if controller is scanning for new devices
scan_on() {
    if bluetoothctl show | grep -q "Discovering: yes"; then
        echo "Scan: on"
        return 0
    else
        echo "Scan: off"
        return 1
    fi
}

# Toggles scanning state
toggle_scan() {
    if scan_on; then
        kill $(pgrep -f "bluetoothctl scan on")
        bluetoothctl scan off
        show_menu
    else
        bluetoothctl scan on &
        echo "Scanning..."
        sleep 5
        show_menu
    fi
}

# Checks if controller is able to pair to devices
pairable_on() {
    if bluetoothctl show | grep -q "Pairable: yes"; then
        echo "Pairable: on"
        return 0
    else
        echo "Pairable: off"
        return 1
    fi
}

# Toggles pairable state
toggle_pairable() {
    if pairable_on; then
        bluetoothctl pairable off
        show_menu
    else
        bluetoothctl pairable on
        show_menu
    fi
}

# Checks if controller is discoverable by other devices
discoverable_on() {
    if bluetoothctl show | grep -q "Discoverable: yes"; then
        echo "Discoverable: on"
        return 0
    else
        echo "Discoverable: off"
        return 1
    fi
}

# Toggles discoverable state
toggle_discoverable() {
    if discoverable_on; then
        bluetoothctl discoverable off
        show_menu
    else
        bluetoothctl discoverable on
        show_menu
    fi
}

# Checks if a device is connected
device_connected() {
    device_info=$(bluetoothctl info "$1")
    if echo "$device_info" | grep -q "Connected: yes"; then
        return 0
    else
        return 1
    fi
}

# Toggles device connection
toggle_connection() {
    if device_connected $1; then
        bluetoothctl disconnect $1
        device_menu "$device"
    else
        bluetoothctl connect $1
        device_menu "$device"
    fi
}

# Checks if a device is paired
device_paired() {
    device_info=$(bluetoothctl info "$1")
    if echo "$device_info" | grep -q "Paired: yes"; then
        echo "Paired: yes"
        return 0
    else
        echo "Paired: no"
        return 1
    fi
}

# Toggles device paired state
toggle_paired() {
    if device_paired $1; then
        bluetoothctl remove $1
        device_menu "$device"
    else
        bluetoothctl pair $1
        device_menu "$device"
    fi
}

# Checks if a device is trusted
device_trusted() {
    device_info=$(bluetoothctl info "$1")
    if echo "$device_info" | grep -q "Trusted: yes"; then
        echo "Trusted: yes"
        return 0
    else
        echo "Trusted: no"
        return 1
    fi
}

# Toggles device connection
toggle_trust() {
    if device_trusted $1; then
        bluetoothctl untrust $1
        device_menu "$device"
    else
        bluetoothctl trust $1
        device_menu "$device"
    fi
}

# Prints a short string with the current bluetooth status
# Useful for status bars like polybar, etc.
print_status() {
    if power_on; then
        printf ''

        mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
        counter=0

        for device in "${paired_devices[@]}"; do
            if device_connected $device; then
                device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-)

                if [ $counter -gt 0 ]; then
                    printf ", %s" "$device_alias"
                else
                    printf " %s" "$device_alias"
                fi

                ((counter++))
            fi
        done
        printf "\n"
    else
        echo ""
    fi
}

# A submenu for a specific device that allows connecting, pairing, and trusting
device_menu() {
    device=$1

    # Get device name and mac address
    device_name=$(echo $device | cut -d ' ' -f 3-)
    mac=$(echo $device | cut -d ' ' -f 2)

    # Build options
    if device_connected $mac; then
        connected="Connected: yes"
    else
        connected="Connected: no"
    fi
    paired=$(device_paired $mac)
    trusted=$(device_trusted $mac)
    options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"

    # Open rofi menu, read chosen option
    chosen="$(echo -e "$options" | $rofi_command "$device_name")"

    # Match chosen option to command
    case $chosen in
        "" | $divider)
            echo "No option chosen."
            ;;
        $connected)
            toggle_connection $mac
            ;;
        $paired)
            toggle_paired $mac
            ;;
        $trusted)
            toggle_trust $mac
            ;;
        $goback)
            show_menu
            ;;
    esac
}

# Opens a rofi menu with current bluetooth status and options to connect
show_menu() {
    # Get menu options
    if power_on; then
        power="Power: on"

        # Human-readable names of devices, one per line
        # If scan is off, will only list paired devices
        devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)

        # Get controller flags
        scan=$(scan_on)
        pairable=$(pairable_on)
        discoverable=$(discoverable_on)

        # Options passed to rofi
        options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
    else
        power="Power: off"
        options="$power\nExit"
    fi

    # Open rofi menu, read chosen option
    chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"

    # Match chosen option to command
    case $chosen in
        "" | $divider)
            echo "No option chosen."
            ;;
        $power)
            toggle_power
            ;;
        $scan)
            toggle_scan
            ;;
        $discoverable)
            toggle_discoverable
            ;;
        $pairable)
            toggle_pairable
            ;;
        *)
            device=$(bluetoothctl devices | grep "$chosen")
            # Open a submenu if a device is selected
            if [[ $device ]]; then device_menu "$device"; fi
            ;;
    esac
}

# Rofi command to pipe into, can add any options here
rofi_command="rofi -dmenu -no-fixed-num-lines -yoffset -100 -i -p"

case "$1" in
    --status)
        print_status
        ;;
    *)
        show_menu
        ;;
esac

Wifi Config

# Config for rofi-wifi-menu

# position values:
# 1 2 3
# 8 0 4
# 7 6 5
POSITION=3

#y-offset
YOFF=17

#x-offset
XOFF=0

#fields to be displayed
FIELDS=SSID,SECURITY,BARS

#font
FONT="DejaVu Sans Mono 8	"

Bspwm

bspwmrc

#LAUNCHERS
$HOME/.config/bspwm/autostart.sh
#fix for moving spotify to specific workspace
#bspc config external_rules_command ~/.config/bspwm/scripts/external_rules_command

#BSPWM configuration
#bspc config border_radius       8
bspc config border_width         2
bspc config window_gap           10
bspc config top_padding          30
bspc config bottom_padding       10
bspc config left_padding         10
bspc config right_padding        10
bspc config single_monocle       false
#bspc config click_to_focus       true
bspc config split_ratio          0.50
bspc config borderless_monocle   true
bspc config gapless_monocle      true
#bspc config focus_by_distance    true
bspc config focus_follows_pointer true
#bspc config history_aware_focus  true
bspc config pointer_modifier mod4
bspc config pointer_action1 move
bspc config pointer_action2 resize_side
bspc config pointer_action3 resize_corner
bspc config remove_disabled_monitors true
bspc config merge_overlapping_monitors true

#BSPWM coloring
bspc config normal_border_color		"#4c566a"
bspc config active_border_color		"#ffffff"
bspc config focused_border_color	"#ffffff"
bspc config presel_feedback_color	"#5e81ac"
#bspc config urgent_border_color 	"#dd2727"


#Single monitor
bspc monitor -d 1 2 3 4 5 6 7 8 9 10

#Dual monitor
#find out names with arandr or xrandr
bspc monitor DP-1 -d 1 2 3 4 5 6 7 8 9 10
bspc monitor DP-2 -d 1 2 3 4 5 6 7 8 9 10
#bspc monitor LVDS1 -d 1 2 3 4
#bspc monitor DP3 -d  5 6 7 8 9
bspc monitor HDMI-0 -d 1 2 3 4 5 6 7 8 9 10
# bspc monitor HDMI-1 -d 1 2 3 4 5 6 7 8 9 10
#bspc monitor HDMI1 -d 1 2 3 4 5
#bspc monitor HDMI2 -d 6 7 8 9 10

#Fullscreen applications
bspc rule -a inkscape state=fullscreen
bspc rule -a Spotify state=fullscreen
bspc rule -a Vlc state=fullscreen
bspc rule -a VirtualBox Manager state=fullscreen
bspc rule -a VirtualBox Machine state=fullscreen
#bspc rule -a Gimp state=fullscreen

#Floating applications
bspc rule -a Arandr state=floating
bspc rule -a Arcolinux-tweak-tool.py state=floating
bspc rule -a Arcolinux-welcome-app.py state=floating
bspc rule -a Arcolinux-calamares-tool.py state=floating
bspc rule -a feh state=floating
#bspc rule -a mpv state=floating sticky=on
#bspc rule -a Font-manager state=floating
bspc rule -a Galculator state=floating
#bspc rule -a Gpick state=floating sticky=on
#bspc rule -a Nitrogen state=floating
bspc rule -a Oblogout state=floating
#bspc rule -a Pavucontrol state=floating sticky=on
#bspc rule -a Peek state=floating
#bspc rule -a rofi state=floating sticky=on
#bspc rule -a Skype state=floating
#bspc rule -a Stacer state=floating
#bspc rule -a Xfce4-appfinder state=floating sticky=on
bspc rule -a Xfce4-terminal state=floating

#Tiled applications
bspc rule -a Gnome-disks state=tiled
bspc rule -a Xfce4-settings-manager state=tiled
# bspc rule -a emacs state=tiled
# bspc rule -a emacsclient state=tiled

#open applications on specific workspaces
#bspc rule -a Firefox desktop='^1' follow=on
#bspc rule -a Google-chrome desktop='^1' follow=on
#bspc rule -a Chromium desktop='^1'  follow=on
#bspc rule -a Subl desktop='^2' follow=on
#bspc rule -a Atom desktop='^2' follow=on
#bspc rule -a Steam desktop='^5'
#bspc rule -a vlc desktop='^6'  follow=on
#bspc rule -a mpv desktop='^6'  follow=on
#bspc rule -a Vivaldi-stable desktop='^6' follow=on
#bspc rule -a Vivaldi-snapshot desktop='^6' follow=on
#bspc rule -a Transmission-gtk desktop='^7' follow=on
#bspc rule -a Thunar desktop='^8' follow=on
#bspc rule -a discord desktop='^9' follow=on
#bspc rule -a Spotify desktop='^10' follow=on

#Spotify fix  --move desktop 10
#sleep 1
#wmctrl -r Spotify -t 10
#exit

#polybar hidden when fullscreen for vlc, youtube, mpv ...
#find out the name of your monitor with xrandr
#xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_DP-1)
#xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_HDMI1)
#xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_HDMI2)

###External rules
##Pseudo automatic mode: always splits focused window when opening new window
#bspc config external_rules_command ~/.config/bspwm/scripts/pseudo_automatic_mode
##Adjust new window: splits biggest windows to keep windows about the same size
#bspc config external_rules_command ~/.config/bspwm/scripts/adjust-new-window

sxhkdrc

 #################################################################
 # KEYBOARD BINDINGS FOR ANY TWM
 #################################################################

 #################################################################
 # SUPER + FUNCTION KEYS
 #################################################################

 # Vivaldi
 super + F1
         nemo

 # Atom
 super + F2
         emacsclient -c -a 'emacs'

 #Move Floating Window
 super + {Left,Down,Up,Right}
       bspc node -v {-20 0,0 20,0 -20,20 0}


 #################################################################
 # SUPER + ... KEYS
 #################################################################


 #Browser
 super + b
     flatpak run com.brave.Browser 


 #Terminals
 super + Return
         alacritty

 #arcolinux-logout
 super + x
     arcolinux-logout


 #Xkill
 super + Escape
     xkill


 #################################################################
 # SUPER + SHIFT KEYS
 #################################################################

 #Reload bspwm
 super + shift + r
         ~/.config/bspwm/bspwmrc

 #reload sxhkd:
 super + shift + k
      pkill -USR1 -x sxhkd


 #dmenu
 super + shift + d
      rofi -show drun

 #kill
 super + shift + q
         bspc node -c

 # Screenshot
 super + shift + s
         flameshot gui
 #Logout
 super + shift + x
	rofi -show power-menu

 # Focus/swap windows by direction
 super + {_,shift + }{h,j,k,l}
         bspc node --{focus,swap} {west,south,north,east}

 # Flip layout vertically/horizontally
 super + {_,shift + }a
         bspc node @/ --flip {vertical,horizontal}

 # Move focused window to other monitor
 super + shift + Left
         bspc node -m next --follow

 # Move focused window to other monitor
 super + shift + Right
                 bspc node -m next --follow

 # Move focused window to other monitor
 super + shift + Up
         bspc node -m next --follow

 # Move focused window to other monitor
 super + shift + Down
                 bspc node -m next --follow



 #################################################################
 # CONTROL + ALT KEYS
 #################################################################



 #Nitrogen
 ctrl + alt + i
      nitrogen

 #Pulse Audio Control
 ctrl + alt + u
      pavucontrol

 #################################################################
 # ALT + ... KEYS
 #################################################################






 #################################################################
 #     FUNCTION KEYS
 #################################################################

 #xfce4-terminal dropdown
 F12
     xfce4-terminal --drop-down


 #################################################################
 #     MULTIMEDIA KEYS
 #################################################################

 #Raises volume
 XF86AudioRaiseVolume
     amixer set Master 10%+

 #Lowers volume
 XF86AudioLowerVolume
     amixer set Master 10%-

 #Mute
 XF86AudioMute
     amixer -D pulse set Master 1+ toggle

 #Playerctl works for Pragha, Spotify and others
 #Delete the line for playerctl if you want to use mpc
 #and replace it with the corresponding code
 #mpc works for e.g.ncmpcpp
 #mpc toggle
 #mpc next
 #mpc prev
 #mpc stop

 #PLAY
 XF86AudioPlay
     playerctl play-pause

 #Next
 XF86AudioNext
     playerctl next

 #previous
 XF86AudioPrev
     playerctl previous

 #Stop
 XF86AudioStop
     playerctl stop

 #Brightness up
 XF86MonBrightnessUp
     xbacklight -inc 10

 #Brightness down
 XF86MonBrightnessDown
     xbacklight -dec 10

 #########################
 #        POLYBAR        #
 #########################

 #Hide polybar
 super + y
     polybar-msg cmd toggle

 #################################################################
 #################################################################
 ##################   DESKTOP SPECIFIC    ########################
 #################################################################
 #################################################################

 #################################################################
 # CTRL + ALT KEYS
 #################################################################

 #Picom Toggle
 ctrl + alt + o
     ~/.config/bspwm/scripts/picom-toggle.sh

 #################################################################
 # SUPER + KEYS
 #################################################################

 #Toggle fullscreen of window
 super + f
         bspc node --state \~fullscreen

 # Toggle pseudo tiling of window
 super + p
         bspc node --state \~pseudo_tiled

 #kill
 super + q
         bspc node -c

 #################################################################
 # SUPER KEYS
 #################################################################

 #Focus selected desktop
 super + Tab
         bspc desktop -f '^{1-9,10}'

 # Increase/decrease window gap on focused desktop
 super + bracket{left,right}
         bspc config -d focused window_gap $((`bspc config -d focused window_gap` {-,+} 5 ))

 # set the window state
 super + space
         bspc node -t {tiled,pseudo_tiled,floating,fullscreen}

 # Move focus to other monitor
 super + BackSpace
                 bspc monitor -f next

 #################################################################
 # SUPER + ALT KEYS
 #################################################################

 # Move floating window
 super + alt + {_,shift + }{Left,Down,Up,Right}
         ~/.config/bspwm/scripts/move-window {_,edge-}{west,south,north,east}

 #################################################################
 # SUPER + CONTROL KEYS
 #################################################################

 # Cancel preselection
 super + ctrl + space
         bspc node --presel-dir cancel

 #################################################################
 # SUPER + SHIFT KEYS
 #################################################################

 #################################################################
 # SUPER + CONTROL KEYS
 #################################################################

 # Focus/swap windows by direction
 super + ctrl + {Left,Down,Up,Right}
         bspc node --{focus} {west,south,north,east}

 # Contract tiled space
 super + ctrl + {h,j,k,l}
         bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}

 # Focus parent/brother/first/second for preselection
 super + ctrl + {e,r,t,y}
         bspc node --focus @{parent,brother,first,second}

 # Preselect the splitting area for next window on leaf/parent
 super + ctrl + {u,i,o,p}
         bspc node --presel-dir \~{west,south,north,east}

 # Define splitting ratio for next window on leaf/parent
 super + ctrl + {_,shift +}{1-9}
         bspc node {_,@/} --presel-ratio 0.{1-9}


 #################################################################
 # ALT KEYS
 #################################################################

 #Focus selected desktop
 alt + Tab
         bspc desktop -f '^{1-9,10}'

         #Focus selected desktop
 alt + shift + Tab
         bspc desktop -f '^{1-9,10}'

 #Rotate desktop
 alt + space
         bspc node @/ --rotate {90,-90}

 #################################################################
 # ALT + SHIFT KEYS
 #################################################################

 # Expand tiled space
 alt + shift + {h,j,k,l}
         bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10}

 #################################################################
 # CTRL + ALT KEYS
 #################################################################

 # Focus next/previous window
 ctrl + alt + Left
         bspc node --focus west

 # Focus next/previous window
 ctrl + alt + Right
         bspc node --focus east

 # Focus Up window
 ctrl +alt + Up
         bspc node --focus north

 # Focus Down window
 ctrl + alt + Down
         bspc node --focus south

 #################################################################
 #################################################################
 ##################   AZERTY/QWERTY/ ... KEYBOARD#################
 #################################################################
 #################################################################

 #Switch here between qwerty and azerty or make new one
 #Focus selected desktop FOR QWERTY KEYBOARDS
 super + {1-9,0}
         bspc desktop -f '^{1-9,10}'

 #Focus selected desktop	FOR BELIGIAN AZERTY KEYBOARDS
 #super + {ampersand,eacute,quotedbl,apostrophe,parenleft,section,egrave,exclam,ccedilla,agrave}
 #    bspc desktop -f '^{1-9,10}'

 #Focus selected desktop	FOR FRNECH AZERTY KEYBOARDS
 #super + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave}
 #    bspc desktop -f '^{1-9,10}'

 #################################################################

 #Switch here between qwerty and azerty or make new one
 #Move window to selected desktop FOR QWERTY KEYBOARDS
 super + shift + {1-9,0}
     id=$(bspc query -N -n); bspc node -d ^{1-9,10}; bspc node -f ${id}}

 #Move window to selected desktop FOR AZERTY KEYBOARDS
 #super + shift + {ampersand,eacute,quotedbl,apostrophe,parenleft,section,egrave,exclam,ccedilla,agrave}
 #    id=$(bspc query -N -n); bspc node -d ^{1-9,10}; bspc node -f ${id}}

 #################################################################


 ## super & mouse scroll

 # Focused desktop window gap
 super + button{4,5}
   bspc config -d focused window_gap $((`bspc config -d focused window_gap` {-,+} 2 ))

AutoStart

function run {
    if ! pgrep $1 ;
    then
        $@&
    fi
}

#Find out your monitor name with xrandr or arandr (save and you get this line)
#xrandr --output VGA-1 --primary --mode 1360x768 --pos 0x0 --rotate normal
#xrandr --output DP2 --primary --mode 1920x1080 --rate 60.00 --output LVDS1 --off &
#xrandr --output LVDS1 --mode 1366x768 --output DP3 --mode 1920x1080 --right-of LVDS1
#xrandr --output HDMI2 --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off
#autorandr horizontal
xrandr --output DP-3 --mode 1920x1080 --pos 4480x0 --rotate right --output DP-4 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-0 --mode 1920x1080 --pos 0x180 --rotate normal 



#change your keyboard if you need it
#setxkbmap -layout be

keybLayout=$(setxkbmap -v | awk -F "+" '/symbols/ {print $2}')

if [ $keybLayout = "be" ]; then
    run sxhkd -c ~/.config/bspwm/sxhkd/sxhkdrc-azerty &
else
    run sxhkd -c ~/.config/bspwm/sxhkd/sxhkdrc &
fi

#Some ways to set your wallpaper besides variety or nitrogen
#feh --bg-scale ~/.config/bspwm/wall.png &
#feh --bg-fill /usr/share/backgrounds/arcolinux/arco-wallpaper.jpg &
#feh --randomize --bg-fill ~/Képek/*
#feh --randomize --bg-fill ~/Dropbox/Apps/Desktoppr/*
dex $HOME/.config/autostart/arcolinux-welcome-app.desktop
xsetroot -cursor_name left_ptr &

conky -c $HOME/.config/bspwm/system-overview &
# run variety &
run nm-applet &
run pamac-tray &
run xfce4-power-manager &
numlockx on &
blueberry-tray &
picom --config $HOME/.config/bspwm/picom.conf &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
# /usr/lib/xfce4/notifyd/xfce4-notifyd &
run volumeicon &
syncthing serve --no-browser &
nitrogen --restore &
$HOME/.config/polybar/launch.sh &
run emacs --daemon &
#run caffeine &
#run vivaldi-stable &
#run firefox &
#run thunar &
#run dropbox &
#run insync start &
#run discord &
#run spotify &
#run atom &

Picom

#################################
#             Shadows           #
#################################


# Enabled client-side shadows on windows. Note desktop windows 
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, 
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;

# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 7;

# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75

# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;

# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;

# Avoid drawing shadows on dock/panel windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dock-shadow = false

# Don't draw shadows on drag-and-drop windows. This option is deprecated, 
# you should use the *wintypes* option in your config file instead.
#
# no-dnd-shadow = false

# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0

# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0

# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0

# Do not paint shadows on shaped windows. Note shaped windows 
# here means windows setting its shape through X Shape extension. 
# Those using ARGB background is beyond our control. 
# Deprecated, use 
#   shadow-exclude = 'bounding_shaped'
# or 
#   shadow-exclude = 'bounding_shaped && !rounded_corners'
# instead.
#
# shadow-ignore-shaped = ''

# Specify a list of conditions of windows that should have no shadow.
#
# examples:
#   shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g ?= 'Notify-osd'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g = 'Cairo-clock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c"
];

# Add this one too for ...
# "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
# Add this one above to the list to have no shadow in Openbox menu
# "! name~=''",

# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use 
#    shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = "" 

# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false


#################################
#           Fading              #
#################################


# Fade windows in/out when opening/closing and when opacity changes,
#  unless no-fading-openclose is used.
# fading = false
fading = false

# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;

# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.03;

# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10

# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []

# Do not fade on window open/close.
# no-fading-openclose = false

# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false


#################################
#   Transparency / Opacity      #
#################################


# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
inactive-opacity = 1;

# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
frame-opacity = 1;

# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
# menu-opacity = 1.0

# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
# inactive-opacity-override = true
inactive-opacity-override = false;

# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0

# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0

# Specify a list of conditions of windows that should always be considered focused.
# focus-exclude = []
focus-exclude = [ "class_g = 'Cairo-clock'" ];

# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0

# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, 
# like `50:name *= "Firefox"`. picom-trans is recommended over this. 
# Note we don't make any guarantee about possible conflicts with other 
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
#    opacity-rule = [ "80:class_g = 'URxvt'" ];
#
opacity-rule = [ "80:class_g = 'Alacritty'" ]


#################################
#     Background-Blurring       #
#################################


# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method = 
# blur-size = 12
#
# blur-deviation = false

# Blur background of semi-transparent / ARGB windows. 
# Bad in performance, with driver-dependent behavior. 
# The name of the switch may change without prior notifications.
#
# blur-background = false

# Blur background of windows when the window frame is not opaque. 
# Implies:
#    blur-background 
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false


# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false


# Specify the blur convolution kernel, with the following format:
# example:
#   blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ''
blur-kern = "3x3box";


# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];

#################################
#       General Settings        #
#################################

# 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`.
# `xrender` is the default one.
#
# backend = "glx"
# backend = "xr_glx_hybrid"
backend = "xrender";

# Enable/disable VSync.
vsync = false
#vsync = true

# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false

# Try to detect WM windows (a non-override-redirect window with no 
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;

# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;

# Try to detect windows with rounded corners and don't consider them 
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;

# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;

# Specify refresh rate of the screen. If not specified or 0, picom will 
# try detecting this with X RandR extension.
#
# refresh-rate = 60
refresh-rate = 0

# Limit picom to repaint at most once every 1 / 'refresh_rate' second to 
# boost performance. This should not be used with 
#   vsync drm/opengl/opengl-oml
# as they essentially does sw-opti's job already, 
# unless you wish to specify a lower refresh rate than the actual value.
#
# sw-opti = 

# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, 
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, 
# provided that the WM supports it.
#
# use-ewmh-active-win = false

# Unredirect all windows if a full-screen opaque window is detected, 
# to maximize performance for full-screen windows. Known to cause flickering 
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false

# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0

# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []

# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows 
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true

# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same 
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if 
# detect-transient is enabled, too.
#
# detect-client-leader = false
detect-client-leader = true

# Resize damaged region by a specific number of pixels. 
# A positive value enlarges it while a negative one shrinks it. 
# If the value is positive, those additional pixels will not be actually painted 
# to screen, only used in blur calculation, and such. (Due to technical limitations, 
# with use-damage, those pixels will still be incorrectly painted to screen.) 
# Primarily used to fix the line corruption issues of blur, 
# in which case you should use the blur radius value here 
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, 
# with a 5x5 one you use `--resize-damage 2`, and so on). 
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1

# Specify a list of conditions of windows that should be painted with inverted color. 
# Resource-hogging, and is not well tested.
#
# invert-color-include = []

# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. 
# Might cause incorrect opacity when rendering transparent content (but never 
# practically happened) and may not work with blur-background. 
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false

# GLX backend: Avoid rebinding pixmap on window damage. 
# Probably could improve performance on rapid window content changes, 
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# 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
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true

# Use X Sync fence to sync clients' draw calls, to make sure all draw 
# calls are finished before picom starts drawing. Needed on nvidia-drivers 
# with GLX backend for some users.
#
# 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-fshader-win = ''

# Force all windows to be painted with blending. Useful if you 
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false

# Do not use EWMH to detect fullscreen windows. 
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false

# Dimming bright windows so their brightness doesn't exceed this set value. 
# Brightness of a window is estimated by averaging all pixels in the window, 
# so this could comes with a performance hit. 
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0

# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false

# Set the log level. Possible values are:
#  "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter. 
# If using the "TRACE" log level, it's better to log into a file 
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";

# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr. 
# Otherwise, logs will to written to the given file, though some of the early 
# logs might still be written to the stderr. 
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = '~/.config/compton.log'

# Show all X errors (for debugging)
# show-all-xerrors = false

# Write process ID to a file.
# write-pid-path = '/path/to/your/log/file'

# Window type settings
# 
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: 
#     "unknown", "desktop", "dock", "toolbar", "menu", "utility", 
#     "splash", "dialog", "normal", "dropdown_menu", "popup_menu", 
#     "tooltip", "notification", "combo", and "dnd".
# 
# Following per window-type options are available: ::
# 
#   fade, shadow:::
#     Controls window-type-specific shadow and fade settings.
# 
#   opacity:::
#     Controls default opacity of the window type.
# 
#   focus:::
#     Controls whether the window of this type is to be always considered focused. 
#     (By default, all window types except "normal" and "dialog" has this on.)
# 
#   full-shadow:::
#     Controls whether shadow is drawn under the parts of the window that you 
#     normally won't be able to see. Useful when the window has parts of it 
#     transparent, and you want shadows in those areas.
# 
#   redir-ignore:::
#     Controls whether this type of windows should cause screen to become 
#     redirected again after been unredirected. If you have unredir-if-possible
#     set, and doesn't want certain window to cause unnecessary screen redirection, 
#     you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.9; }
dropdown_menu = { opacity = 0.9; }
};

LeftWM

Workspaces

window_rules = [
{window_class = "qalculate-gtk", spawn_floating = true},
{window_class = "steam_app_244850", spawn_floating = true},
{window_class = "Avorion", spawn_floating = true},
# {window_class = "yubioath-desktop", spawn_floating = true},
{window_class = "youtube-music-desktop-app",spawn_on_tag = 9, spawn_floating = false},
]

Scratch Pads

scratchpad = [
{ name = "Btop", value = "btop", x = 860, y = 390, height = 300, width = 200 },
{ name = "Alacritty", value = "alacritty -e btop", x = 860, y = 390, height = 300, width = 200 },
]

Keybindings

https://github.com/leftwm/leftwm/blob/main/leftwm-core/src/utils/xkeysym_lookup.rs#L46

  [[keybind]]
  command = "Execute"
  value = "amixer -D pulse sset Master 5%+"
  # modifier = ["modkey"]
  key = "XF86XK_AudioRaiseVolume"
  [[keybind]]
  command = "Execute"
  value = "amixer -D pulse sset Master 5%-"
  # modifier = ["modkey"]
  key = "XF86XK_AudioLowerVolume"
  [[keybind]]
  command = "Execute"
  value = "amixer -D pulse sset Master toggle"
  # modifier = ["modkey"]
  key = "XF86XK_AudioMute"




  [[keybind]]
  command = "Execute"
  value = "alacritty"
  modifier = ["modkey"]
  key = "Return"

  [[keybind]]
  command = "Execute"
  value = "nemo"
  modifier = ["modkey"]
  key = "F1"

  [[keybind]]
  command = "Execute"
  value = "emacsclient -c -a 'emacs'"
  modifier = ["modkey"]
  key = "F2"

  [[keybind]]
  command = "Execute"
  value = "flatpak run io.github.Qalculate"
  modifier = ["modkey"]
  key = "F3"

  [[keybind]]
  command = "ToggleScratchPad"
  value = "Alacritty"
  modifier = ["modkey"]
  key = "F4"

  [[keybind]]
  command = "Execute"
  value = "rofi -show drun"
  modifier = ["modkey", "Shift"]
  key = "d"

  [[keybind]]
  command = "Execute"
  value = "flameshot gui"
  modifier = ["modkey", "Shift"]
  key = "s"
  
  [[keybind]]
  command = "ToggleFullScreen"
  modifier = ["modkey", "Shift"]
  key = "f"    

  [[keybind]]
  command = "Execute"
  value = "rofi -show power-menu"
  modifier = ["modkey"]
  key = "x"

  # [[keybind]]
  # command = "Execute"
  # value = "spectacle -r "
  # modifier = ["modkey", "Shift"]
  # key = "s"


  [[keybind]]
  command = "SoftReload"
  modifier = ["modkey", "Shift"]
  key = "r"

  [[keybind]]
  # command = "CloseWindow"
  command = "Execute"
  value = "~/.dotfiles/bin/emacs-leftwm-intergration Close"
  modifier = ["modkey", "Shift"]
  key = "q"

  # [[keybind]]
  # command = "MoveWindowToNextWorkspace"
  # modifier = ["modkey", "Shift"]
  # key = "Right"
  # [[keybind]]
  # command = "MoveWindowToPreviousWorkspace"
  # modifier = ["modkey", "Shift"]
  # key = "Left"

  [[keybind]]
  command = "ToggleFloating"
  modifier = ["modkey"]
  key = "space"

  [[keybind]]
  command = "MoveWindowUp"
  modifier = ["modkey", "Shift"]
  key = "Up"

  [[keybind]]
  command = "MoveWindowDown"
  modifier = ["modkey", "Shift"]
  key = "Down"

  [[keybind]]
  command = "MoveWindowTop"
  modifier = ["modkey", "Alt"]
  key = "Return"

  [[keybind]]
  # command = "FocusWindowUp"
  command = "Execute"
  value = "~/.dotfiles/bin/emacs-leftwm-intergration Focus up"
  modifier = ["modkey"]
  key = "Up"

  [[keybind]]
  # command = "FocusWindowDown"
  command = "Execute"
  value = "~/.dotfiles/bin/emacs-leftwm-intergration Focus down"
  modifier = ["modkey"]
  key = "Down"

  [[keybind]]
  command = "NextLayout"
  modifier = ["modkey", "Control"]
  key = "Up"

  [[keybind]]
  command = "PreviousLayout"
  modifier = ["modkey", "Control"]
  key = "Down"

  [[keybind]]
  command = "SwapTags"
  modifier = ["modkey"]
  key = "w"

  [[keybind]]
  command = "GotoTag"
  value = "1"
  modifier = ["modkey"]
  key = "1"

  [[keybind]]
  command = "GotoTag"
  value = "2"
  modifier = ["modkey"]
  key = "2"

  [[keybind]]
  command = "GotoTag"
  value = "3"
  modifier = ["modkey"]
  key = "3"

  [[keybind]]
  command = "GotoTag"
  value = "4"
  modifier = ["modkey"]
  key = "4"

  [[keybind]]
  command = "GotoTag"
  value = "5"
  modifier = ["modkey"]
  key = "5"

  [[keybind]]
  command = "GotoTag"
  value = "6"
  modifier = ["modkey"]
  key = "6"

  [[keybind]]
  command = "GotoTag"
  value = "7"
  modifier = ["modkey"]
  key = "7"

  [[keybind]]
  command = "GotoTag"
  value = "8"
  modifier = ["modkey"]
  key = "8"

  [[keybind]]
  command = "GotoTag"
  value = "9"
  modifier = ["modkey"]
  key = "9"

  [[keybind]]
  command = "MoveToTag"
  value = "1"
  modifier = ["modkey", "Shift"]
  key = "1"

  [[keybind]]
  command = "MoveToTag"
  value = "2"
  modifier = ["modkey", "Shift"]
  key = "2"

  [[keybind]]
  command = "MoveToTag"
  value = "3"
  modifier = ["modkey", "Shift"]
  key = "3"

  [[keybind]]
  command = "MoveToTag"
  value = "4"
  modifier = ["modkey", "Shift"]
  key = "4"

  [[keybind]]
  command = "MoveToTag"
  value = "5"
  modifier = ["modkey", "Shift"]
  key = "5"

  [[keybind]]
  command = "MoveToTag"
  value = "6"
  modifier = ["modkey", "Shift"]
  key = "6"

  [[keybind]]
  command = "MoveToTag"
  value = "7"
  modifier = ["modkey", "Shift"]
  key = "7"

  [[keybind]]
  command = "MoveToTag"
  value = "8"
  modifier = ["modkey", "Shift"]
  key = "8"

  [[keybind]]
  command = "MoveToTag"
  value = "9"
  modifier = ["modkey", "Shift"]
  key = "9"

[[keybind]]
command = "MoveWindowUp"
modifier = ["modkey"]
key = "t"

Autostart

<<<<<<< HEAD
  function run {
      if ! pgrep $1 ;
      then
          $@&
      fi
  }

  #Find out your monitor name with xrandr or arandr (save and you get this line)
  #xrandr --output VGA-1 --primary --mode 1360x768 --pos 0x0 --rotate normal
  #xrandr --output DP2 --primary --mode 1920x1080 --rate 60.00 --output LVDS1 --off &
  #xrandr --output LVDS1 --mode 1366x768 --output DP3 --mode 1920x1080 --right-of LVDS1
  #xrandr --output HDMI2 --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off
  #autorandr horizontal
  # xrandr --output DVI-D-1 --off --output DP-1 --mode 1920x1080 --pos 4480x0 --rotate right --output DP-2 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-3 --off
  case $HOST in
  (manuel) xrandr --setprovideroutputsource modesetting NVIDIA-0 && xrandr --auto ;;

  (bar) echo "Oops, bar? Are you kidding?";;
  (*) xrandr --output DVI-D-1 --off --output DP-5 --mode 1920x1080 --pos 4480x0 --rotate right --output DP-2 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-3 --off;;
  esac
  #change your keyboard if you need it
  #setxkbmap -layout be
  # leftwm command SoftReload
  #Some ways to set your wallpaper besides variety or nitrogen
  #feh --bg-scale ~/.config/bspwm/wall.png &
  #feh --bg-fill /usr/share/backgrounds/arcolinux/arco-wallpaper.jpg &
  #feh --randomize --bg-fill ~/Képek/*
  #feh --randomize --bg-fill ~/Dropbox/Apps/Desktoppr/*

  xsetroot -cursor_name left_ptr &

  # run variety &
  # run nm-applet &
  # run pamac-tray &
  # run xfce4-power-manager &
  numlockx on &
  # /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
  # /usr/lib/xfce4/notifyd/xfce4-notifyd &
  # run volumeicon &
  syncthing serve --no-browser &
  # run emacs --daemon &
  #run caffeine &
  #run vivaldi-stable &
  #run firefox &
  #run thunar &
  #run dropbox &
  #run insync start &
  #run discord &
  run /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=start-ytmdesktop.sh --file-forwarding app.ytmdesktop.ytmdesktop @@u %U @@
  &
  #run atom &
=======
     function run {
         if ! pgrep $1 ;
         then
             $@&
         fi
     }

     #Find out your monitor name with xrandr or arandr (save and you get this line)
     #xrandr --output VGA-1 --primary --mode 1360x768 --pos 0x0 --rotate normal
  #xrandr --output DP2 --primary --mode 1920x1080 --rate 60.00 --output LVDS1 --off &
     #xrandr --output LVDS1 --mode 1366x768 --output DP3 --mode 1920x1080 --right-of LVDS1
     #xrandr --output HDMI2 --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off
     #autorandr horizontal
     # xrandr --output DVI-D-1 --off --output DP-1 --mode 1920x1080 --pos 4480x0 --rotate right --output DP-2 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-3 --off

     xrandr --output DVI-D-1 --off --output DP-3 --mode 1920x1080 --pos 4480x0 --rotate right --output DP-4 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-3 --off
     #change your keyboard if you need it
     #setxkbmap -layout be
     # leftwm command SoftReload
     #Some ways to set your wallpaper besides variety or nitrogen
     #feh --bg-scale ~/.config/bspwm/wall.png &
     #feh --bg-fill /usr/share/backgrounds/arcolinux/arco-wallpaper.jpg &
     #feh --randomize --bg-fill ~/Képek/*
     #feh --randomize --bg-fill ~/Dropbox/Apps/Desktoppr/*

     xsetroot -cursor_name left_ptr &

     # run variety &
     # run nm-applet &
     # run pamac-tray &
     # run xfce4-power-manager &
     numlockx on &
     # /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
     # /usr/lib/xfce4/notifyd/xfce4-notifyd &
     # run volumeicon &
     syncthing serve --no-browser &
     # run emacs --daemon &
     #run caffeine &
     #run vivaldi-stable &
     #run firefox &
     #run thunar &
     #run dropbox &
     #run insync start &
     #run discord &
     # run /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=start-ytmdesktop.sh --file-forwarding app.ytmdesktop.ytmdesktop @@u %U @@
  &
     #run atom &
>>>>>>> stash@{0}

Themes

Custom Theme

Up

export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"

# Down the last running theme
if [ -f "/tmp/leftwm-theme-down" ]; then
    /tmp/leftwm-theme-down
    rm /tmp/leftwm-theme-down
fi
ln -s $SCRIPTPATH/down /tmp/leftwm-theme-down

/usr/bin/nitrogen --restore & 
$HOME/.config/polybar/launch.sh &
# conky -c $HOME/.config/leftwm/themes/custom-theme/conky2.conf -m 3 & 
# echo "LoadTheme $SCRIPTPATH/theme.toml" > $XDG_RUNTIME_DIR/leftwm/commands.pipe
leftwm command "LoadTheme $SCRIPTPATH/theme.toml"
# conky -c $HOME/.config/bspwm/system-overview &
picom --config $HOME/.config/leftwm/themes/custom-theme/picom.conf --experimental &

Down

pkill picom
pkill polybar
pkill conky

Theme

border_width = 5
margin = 12 
default_border_color = "#222222"
floating_border_color = "#555555"
focused_border_color = "#DDDDDD"
window_rules = [
             {window_title = "youtube-music-desktop-app", spawn_on_tag = 9, spawn_floating = true},
                             ]

Polybar

Main-Bar
[bar/mainbar-leftwm]
monitor = ${env:MONITOR}
;monitor-fallback = HDMI1
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = true
bottom = false
separator = |

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 2
line-color = #f00

; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true

; border-size = 2
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
border-bottom-size = 2
border-color = ${colors.background}

padding-left = 0
padding-right = 1
              
module-margin-left = 1
module-margin-right = 1

;https://github.com/jaagr/polybar/wiki/Fonts
font-0 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=13;1
font-1 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=18;2
font-2 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=32;7
font-3 = "FontAwesome:size=13;0"

;font-0 = "Noto Sans:size=10;0"
;font-2 = "Noto Sans:size=10;0"
;font-3 = "Noto Sans Mono:size=10;0"

modules-left = ewmh startmenu
;modules-center = kernel
;modules-right = pavolume memory2 cpu2 date
modules-right = kill-emacs filesystem pulseaudio eth cpu memory temperature battery date powermenu 

tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 2
tray-maxsize = 20
tray-scale = 1.0
tray-position = none
tray-background = ${colors.background}

; scroll-up = bspwm-desknext
; scroll-down = bspwm-deskprev

Main-Bar-Center
[bar/mainbar-leftwm-center]
monitor = ${env:MONITOR}
;monitor-fallback = HDMI1
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = true
bottom = false
separator = |

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 2
line-color = #f00

; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true

; border-size = 2
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
border-bottom-size = 2
border-color = ${colors.background}

padding-left = 0
padding-right = 1

module-margin-left = 2
module-margin-right = 2

;https://github.com/jaagr/polybar/wiki/Fonts
font-0 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=13;1
font-1 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=18;2
font-2 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=32;7
font-3 = "FontAwesome:size=13;0"

;font-0 = "Noto Sans:size=10;0"
;font-2 = "Noto Sans:size=10;0"
;font-3 = "Noto Sans Mono:size=10;0"

modules-left = ewmh startmenu
;modules-center = kernel
;modules-right = pavolume memory2 cpu2 date
modules-right = filesystem pulseaudio eth cpu memory temperature battery date

tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 2
tray-maxsize = 20
tray-scale = 1.0
tray-position = none
tray-background = ${colors.background}

; scroll-up = bspwm-desknext
; scroll-down = bspwm-deskprev

Main-Bar-Portrait
[bar/mainbar-leftwm-portrait]
monitor = ${env:MONITOR}
;monitor-fallback = HDMI1
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = true
bottom = false
separator = |

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 4
line-color = #f00

; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true

border-size = 0
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
;border-bottom-size = 25
border-bottom-size = 2
border-color = ${colors.background}

padding-left = 0
padding-right = 1

module-margin-left = 2
module-margin-right = 2

;https://github.com/jaagr/polybar/wiki/Fonts
font-0 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=13;1
font-1 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=18;2
font-2 = InconsolataGo Nerd Font Mono:style=Bold:pixelsize=32;7
font-3 = "FontAwesome:size=13;0"

;font-0 = "Noto Sans:size=10;0"
;font-2 = "Noto Sans:size=10;0"
;font-3 = "Noto Sans Mono:size=10;0"

modules-left = ewmh 
;modules-center = kernel
;modules-right = pavolume memory2 cpu2 date
modules-right = filesystem date

tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 2
tray-maxsize = 20
tray-scale = 1.0
tray-position = none
tray-background = ${colors.background}

; scroll-up = bspwm-desknext
; scroll-down = bspwm-deskprev

ewmh-module
[module/ewmh]
type = internal/xworkspaces

pin-workspaces = false
enable-click = true
enable-scroll = true
reverse-scroll = true

icon-0 = 1;
icon-1 = 2;
icon-2 = 3;
icon-3 = 4;
icon-4 = 5;
icon-5 = 6;
icon-6 = 7;
icon-7 = 8;
icon-8 = ﱘ;
#icon-5 = 6;
icon-default = ♟

format = <label-state>
label-monitor = %name%



label-active = %name%
label-active-foreground = ${colors.foreground-active}
label-active-background = ${colors.background}
label-active-underline= ${colors.foreground-active}
label-active-padding = 1

label-occupied = %name%
label-occupied-foreground = ${colors.occupied-active}
label-occupied-background = ${colors.background}
label-occupied-padding = 1

label-urgent = %name%
label-urgent-foreground = ${colors.foreground}
label-urgent-background = ${colors.alert}
label-urgent-underline = ${colors.alert}
label-urgent-padding = 1

label-empty = %name%
label-empty-foreground = ${colors.foreground}
label-empty-padding = 1
format-foreground = ${colors.foreground}
format-background = ${colors.background}
kill emacs module
[module/kill-emacs]
type = custom/text
content = k-Emacs
click-left = pkill emacs

Conky

  -- Config_Settings: http://conky.sourceforge.net/config_settings.html
  -- Config_Variables: http://conky.sourceforge.net/variables.html


  conky.config = {
               -- Conky -   -

  background = false,
  update_interval = 1,
  total_run_times = 0,  
  cpu_avg_samples = 4,
  net_avg_samples = 2,  
  override_utf8_locale = true,  
  double_buffer = true,
  no_buffers = true,
  imlib_cache_size=0,  
  text_buffer_size = 256,

  -- Window --

  own_window = true,
  own_window_colour = '222222',
  own_window_class = 'Conky',
  own_window_argb_visual = false,
  own_window_argb_count = 0,
  own_window_argb_value = 0,
  own_window_type = 'desktop',
  own_window_transparent = false,
  own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
  border_inner_margin = 20,
  border_width = 20,
  minimum_height = 1080,
  minimum_width = 200,
  maximum_width = 360,
  alignment = 'top_left',
  gap_x = 0,
  gap_y = 73,

  -- Graphics -- 

  draw_shades = false,
  draw_outline = false,
  draw_borders = false,
  draw_graph_borders = false,

  -- Text --

  use_xft = true,
  font = 'Signika Negative',
  xftalpha = 1,
  uppercase = false,
  pad_percents = 0,

  -- Colors --

  default_color = '039fab',
  default_shade_color = '000000',
  default_outline_color = '000000',

};
  conky.text = [[

                   #				-- RELÓGIO --
                   ${color e95420}${font :size= 10}${alignr}${time %A, %d %B %Y}
                   ${color e95420}${font :size= 36}${alignr}${time %H:%M}
                   #				-- HEADER --
                   ${font :size= 10}${alignr}${color 03b0d2}$nodename
                   ${font :size= 8}${color 03b0d2}${alignr}$uptime

                   ${font :size= 8}${color e95420}${alignr}${exec hostnamectl | grep System | cut -c21-40}
                   ${alignr}${exec hostnamectl | grep Architecture | cut -c7-30}
                   ${alignr}${exec hostnamectl | grep Kernel | cut -c13-32}
                   # ${image ~/Conky_Gorilla/Icons/gorilla.png -p 40,50 -s 160x160 -f 86400}
                   # ${image ~/Conky_Gorilla/Icons/ubuntu.png -p 112,120 -s 42x42 -f 86400}

                   #				-- CPU --
                   ${color 03b0d2}${font :size= 9}"Morwenna"${alignr}${font :size= 9}${color 03b0d2}$cpu%
                   ${offset 4}${color 000000}${cpugraph 222222 039fab}
                   ${color e95420}${offset 4}Core 1 (${color e95420}${execi 5 sensors|grep 'Core 0'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu1 28,86 222222 e95420}${color e95420}${offset 4} Core 2 (${color e95420}${execi 5 sensors|grep 'Core 1'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu3 28,86 222222 e95420}
                   ${color 03b0d2}${offset 4}Core 3 (${color 039fab}${execi 5 sensors|grep 'Core 2'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu2 28,86 222222 039fab}${color 03b0d2}${offset 4}Core 4 (${color 039fab}${execi 5 sensors|grep 'Core 3'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu4 28,86 222222 039fab}


                   ${color e95420}${offset 4}Core 5 (${color e95420}${execi 5 sensors|grep 'Core 4'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu2 28,86 222222 e95420}${color e95420}${offset 4}Core 6 (${color e95420}${execi 5 sensors|grep 'Core 5'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu4 28,86 222222 e95420}
                   ${color 03b0d2}${offset 4}Core 7 (${color 039fab}${execi 5 sensors|grep 'Core 6'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu2 28,86 222222 039fab}${color 03b0d2}${offset 4}Core 8 (${color 039fab}${execi 5 sensors|grep 'Core 7'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C)${color 000000}${cpugraph cpu4 28,86 222222 039fab}

                   #				-- RAM --
                   ${color e95420}${font :size= 9}Memory${alignr}$mem
                   ${color e95420}${font :size= 9}Swap${alignr}$swapperc% / $swapmax
                   ${offset 4}${color 000000}${memgraph 222222 e95420}

                   #				-- HD --
                   ${color 03b0d2}${font :size= 9}"Nvme SSD"${alignr}${diskio /dev/nvme0}
                   ${offset 4}${color 000000}${diskiograph 222222 039fab}

                   #				-- INTERNET --
                   ${color e95420}${font :size= 9}${wireless_essid "eno1"}${alignr}${addr "eno1"}
                   ${color e95420}${offset 4}${color 000000}${downspeedgraph "eno1" 28,178 222222 e95420}${color e95420}${color 000000}${upspeedgraph "eno1" 28,178 222222 e95420}
                   ${color e95420}${font :size=8} ▼  ${downspeed "eno1"}${alignr}${color e95420} ▲  ${upspeed "eno1"}

                   # #				-- TO DO LIST --
                   ${color 03b0d2}${font :size= 9}Keybindings	${hr 1}${color 039fab}
                   ${color 03b0d2}${font :size= 9}C-s-d ${color 03b0d2}${font :size= 9}${alignr}Launch App
                   ${color 03b0d2}${font :size= 9}C-s-r ${color 03b0d2}${font :size= 9}${alignr}Reload Leftwm
                   ${color 03b0d2}${font :size= 9}C-s-q ${color 03b0d2}${font :size= 9}${alignr}Close Window
                   ${color 03b0d2}${font :size= 9}S-Space ${color 03b0d2}${font :size= 9}${alignr}Toggle Floating
                   ${color 03b0d2}${font :size= 9}C-Shift-Up ${color 03b0d2}${font :size= 9}${alignr}Move Window
                   ${color 03b0d2}${font :size= 9}C-Shift-Down ${color 03b0d2}${font :size= 9}${alignr}Move Window
                   ${color 03b0d2}${font :size= 9}C-s-Up ${color 03b0d2}${font :size= 9}${alignr}Next Layout
                   ${color 03b0d2}${font :size= 9}C-s-Up ${color 03b0d2}${font :size= 9}${alignr}Previous Layout

               ]];

Picom

Shadows
#################################
#             Shadows           #
#################################


# Enabled client-side shadows on windows. Note desktop windows 
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, 
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = false;

# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 7;

# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75

# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;

# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;

# Avoid drawing shadows on dock/panel windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dock-shadow = false

# Don't draw shadows on drag-and-drop windows. This option is deprecated, 
# you should use the *wintypes* option in your config file instead.
#
# no-dnd-shadow = false

# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0

# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0

# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0

# Do not paint shadows on shaped windows. Note shaped windows 
# here means windows setting its shape through X Shape extension. 
# Those using ARGB background is beyond our control. 
# Deprecated, use 
#   shadow-exclude = 'bounding_shaped'
# or 
#   shadow-exclude = 'bounding_shaped && !rounded_corners'
# instead.
#
# shadow-ignore-shaped = ''

# Specify a list of conditions of windows that should have no shadow.
#
# examples:
#   shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g ?= 'Notify-osd'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g = 'Cairo-clock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c"
];

# Add this one too for ...
# "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
# Add this one above to the list to have no shadow in Openbox menu
# "! name~=''",

# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use 
#    shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = "" 

# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false

Fading
#################################
#           Fading              #
#################################


# Fade windows in/out when opening/closing and when opacity changes,
#  unless no-fading-openclose is used.
# fading = false
fading = false

# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;

# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.03;

# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10

# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []

# Do not fade on window open/close.
# no-fading-openclose = false

# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false

Transparency
#################################
#   Transparency / Opacity      #
#################################


# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
# inactive-opacity = 0.05;

# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
frame-opacity = 0.2;

# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
# menu-opacity = 1.0

# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
# inactive-opacity-override = true
inactive-opacity-override = false;

# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 0.95

# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0

# Specify a list of conditions of windows that should always be considered focused.
# focus-exclude = []
focus-exclude = [ "class_g = 'Cairo-clock'" ];

# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0

# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, 
# like `50:name *= "Firefox"`. picom-trans is recommended over this. 
# Note we don't make any guarantee about possible conflicts with other 
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
#    opacity-rule = [ "80:class_g = 'URxvt'" ];
#
opacity-rule = [
"60:class_g = 'Alacritty'",
"75:class_g = 'Conky'",
"85:class_g = 'Polybar'",
"60:class_g = 'emacs'",
"75:class_g = 'kitty'",
"85:class_g = 'Nemo'"
]

Bluring
#################################
#     Background-Blurring       #
#################################


# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method = 
# blur-size = 12
#
# blur-deviation = false

# Blur background of semi-transparent / ARGB windows. 
# Bad in performance, with driver-dependent behavior. 
# The name of the switch may change without prior notifications.
#
# blur-background = false

# Blur background of windows when the window frame is not opaque. 
# Implies:
#    blur-background 
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false


# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false


# Specify the blur convolution kernel, with the following format:
# example:
#   blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ''
blur-kern = "3x3box";

blur:
{
method = "dual_kawase";
strength = 1.5;
}

# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
# "window_type = 'desktop'",
# "class_g = 'Conky'",
"_GTK_FRAME_EXTENTS@:c"
];
General Settings
#################################
#       General Settings        #
#################################

# 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`.
# `xrender` is the default one.
#
# backend = "glx"
# backend = "xr_glx_hybrid"
backend = "glx";

# Enable/disable VSync.
vsync = true
#vsync = true

# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false

# Try to detect WM windows (a non-override-redirect window with no 
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;

# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;

# Try to detect windows with rounded corners and don't consider them 
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;

# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;

# Specify refresh rate of the screen. If not specified or 0, picom will 
# try detecting this with X RandR extension.
#
# refresh-rate = 60
refresh-rate = 0

# Limit picom to repaint at most once every 1 / 'refresh_rate' second to 
# boost performance. This should not be used with 
#   vsync drm/opengl/opengl-oml
# as they essentially does sw-opti's job already, 
# unless you wish to specify a lower refresh rate than the actual value.
#
# sw-opti = 

# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, 
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, 
# provided that the WM supports it.
#
# use-ewmh-active-win = false

# Unredirect all windows if a full-screen opaque window is detected, 
# to maximize performance for full-screen windows. Known to cause flickering 
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false

# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0

# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []

# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows 
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true

# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same 
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if 
# detect-transient is enabled, too.
#
# detect-client-leader = false
detect-client-leader = true

# Resize damaged region by a specific number of pixels. 
# A positive value enlarges it while a negative one shrinks it. 
# If the value is positive, those additional pixels will not be actually painted 
# to screen, only used in blur calculation, and such. (Due to technical limitations, 
# with use-damage, those pixels will still be incorrectly painted to screen.) 
# Primarily used to fix the line corruption issues of blur, 
# in which case you should use the blur radius value here 
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, 
# with a 5x5 one you use `--resize-damage 2`, and so on). 
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1

# Specify a list of conditions of windows that should be painted with inverted color. 
# Resource-hogging, and is not well tested.
#
# invert-color-include = []

# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. 
# Might cause incorrect opacity when rendering transparent content (but never 
# practically happened) and may not work with blur-background. 
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false

# GLX backend: Avoid rebinding pixmap on window damage. 
# Probably could improve performance on rapid window content changes, 
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# 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
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true

# Use X Sync fence to sync clients' draw calls, to make sure all draw 
# calls are finished before picom starts drawing. Needed on nvidia-drivers 
# with GLX backend for some users.
#
# 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-fshader-win = ''

# Force all windows to be painted with blending. Useful if you 
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false

# Do not use EWMH to detect fullscreen windows. 
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false

# Dimming bright windows so their brightness doesn't exceed this set value. 
# Brightness of a window is estimated by averaging all pixels in the window, 
# so this could comes with a performance hit. 
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0

# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false

# Set the log level. Possible values are:
#  "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter. 
# If using the "TRACE" log level, it's better to log into a file 
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";

# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr. 
# Otherwise, logs will to written to the given file, though some of the early 
# logs might still be written to the stderr. 
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = '~/.config/compton.log'

# Show all X errors (for debugging)
# show-all-xerrors = false

# Write process ID to a file.
# write-pid-path = '/path/to/your/log/file'

# Window type settings
# 
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: 
#     "unknown", "desktop", "dock", "toolbar", "menu", "utility", 
#     "splash", "dialog", "normal", "dropdown_menu", "popup_menu", 
#     "tooltip", "notification", "combo", and "dnd".
# 
# Following per window-type options are available: ::
# 
#   fade, shadow:::
#     Controls window-type-specific shadow and fade settings.
# 
#   opacity:::
#     Controls default opacity of the window type.
# 
#   focus:::
#     Controls whether the window of this type is to be always considered focused. 
#     (By default, all window types except "normal" and "dialog" has this on.)
# 
#   full-shadow:::
#     Controls whether shadow is drawn under the parts of the window that you 
#     normally won't be able to see. Useful when the window has parts of it 
#     transparent, and you want shadows in those areas.
# 
#   redir-ignore:::
#     Controls whether this type of windows should cause screen to become 
#     redirected again after been unredirected. If you have unredir-if-possible
#     set, and doesn't want certain window to cause unnecessary screen redirection, 
#     you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.9; }
dropdown_menu = { opacity = 0.9; }
};

Emacs Intergration

Script

if [[ $(xdotool getactivewindow getwindowname) =~ ^emacs(:.*)?@.* ]]; then
    command="(viktorya/emacs-leftwm-integration \"$@\")"
    emacsclient -e "$command"
else
    leftwm-command "$1Window$2"
    # echo "$1Window$2"
fi

Install

Flatpak

Install Flatpak

Get Installed Packages

import subprocess
print("#+NAME: flatpak-packages-list");
flatpak = subprocess.run(["flatpak", "list", "--app"],stdout=subprocess.PIPE, text=True)
programs = flatpak.stdout.split("\n")
programs.pop()
for program in programs:
  s = program.split("\t")

  print("- [ ] {:<30} {:}".format(s[0], s[1]))
return(x)
test = []
packages = {}
for li in x:
      item = li[0][3:].split(" ")
      test.append([li[0][:3], item[1]])
for item in test:
      if item[0] == "[ ]":
           # packages.append(False)
           packages[item[1]] = "false"
      elif item[0] == "[X]":
           # packages.append(True)
           packages[item[1]] = "true"
      else:
           # packages.append("Error")
           packages[item[1]] = "Error"
try: p
except NameError: p = None

if p is None:
     return packages
else:
     return packages[p]
if "<<toggle-packages(p="Ui")>>"; then
    echo "True"
else
 echo "False"
fi

Install ssh authorised keys

wget https://raw.githubusercontent.com/RampedIndent/dotfiles/main/bin/authorized_keys.sh -P ~/.bin &&
chmod +x ~/.bin/authorized_keys.sh &&
EDITOR=nano crontab -e 

*/15 * * * * ~/.bin/authorized_keys.sh
sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
wget https://raw.githubusercontent.com/RampedIndent/dotfiles/main/bin/authorized_keys.sh -P ~/.bin 
chmod +x ~/.bin/authorized_keys.sh
crontab -l > crontab_new
echo "*/15 * * * * ~/.bin/authorized_keys.sh" >> crontab_new
crontab crontab_new
rm crontab_new
sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config

bash <(curl -s https://raw.githubusercontent.com/RampedIndent/dotfiles/main/ssh.sh )

Disable lid suspend

/etc/systemd/logind.conf systemctl restart systemd

Increase Swap Size

https://askubuntu.com/a/178726

Troubleshooting

Fix Bluetooth audio

https://askubuntu.com/a/1207648

Setting up SSH with yubikey

https://gist.github.com/artizirk/d09ce3570021b0f65469cb450bee5e29

Kill emacs

(kill-emacs)

Proxmox

Proxmox post install script

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-install.sh)"

Network

tmp