archived old stuff;new layout

This commit is contained in:
pim-wtf
2023-02-16 10:26:50 +01:00
parent 8a327dc6f3
commit 4424e07644
54 changed files with 4779 additions and 0 deletions

View File

@ -0,0 +1,198 @@
#!/usr/bin/env bash
# this is a simple config for herbstluftwm
hc() {
herbstclient "$@"
}
hc emit_hook reload
xsetroot -solid '#666666'
# launch desktop flair
feh --bg-fill ~/.wallpapers/stairs.jpg
picom -b
~/.config/polybar/launch.sh
# remove all existing keybindings
hc keyunbind --all
# keybindings
Mod=Mod4 # Use the super key as the main modifier
hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-w close
hc keybind $Mod-Return spawn kitty
# app shortcuts
hc keybind $Mod-d spawn rofi -show drun
hc keybind XF86LaunchA spawn pcmanfm
# fn buttons
hc keybind XF86MonBrightnessDown spawn sudo brightnessctl set 5%-
hc keybind XF86MonBrightnessUp spawn sudo brightnessctl set +5%
hc keybind XF86KbdBrightnessDown spawn sudo $HOME/scripts/bl.sh down
hc keybind XF86KbdBrightnessUp spawn sudo $HOME/scripts/bl.sh up
# basic movement in tiling and floating mode
# focusing clients
hc keybind $Mod-h focus left
hc keybind $Mod-j focus down
hc keybind $Mod-k focus up
hc keybind $Mod-l focus right
# moving clients in tiling and floating mode
hc keybind $Mod-Shift-h shift left
hc keybind $Mod-Shift-j shift down
hc keybind $Mod-Shift-k shift up
hc keybind $Mod-Shift-l shift right
# splitting frames
# create an empty frame at the specified direction
hc keybind $Mod-u split bottom 0.5
hc keybind $Mod-o split right 0.5
# let the current frame explode into subframes
hc keybind $Mod-Control-space split explode
# resizing frames and floating clients
resizestep=0.02
hc keybind $Mod-Control-h resize left +$resizestep
hc keybind $Mod-Control-j resize down +$resizestep
hc keybind $Mod-Control-k resize up +$resizestep
hc keybind $Mod-Control-l resize right +$resizestep
hc keybind $Mod-Control-Left resize left +$resizestep
hc keybind $Mod-Control-Down resize down +$resizestep
hc keybind $Mod-Control-Up resize up +$resizestep
hc keybind $Mod-Control-Right resize right +$resizestep
# tags
tag_names=("www" "doc" "msg" "dev" "mus" "kdb" "7" "8")
tag_keys=( {1..8} 0 )
hc rename default "${tag_names[0]}" || true
for i in "${!tag_names[@]}" ; do
hc add "${tag_names[$i]}"
key="${tag_keys[$i]}"
if [ -n "$key" ] ; then
hc keybind "$Mod-$key" use_index "$i"
hc keybind "$Mod-Shift-$key" move_index "$i"
fi
done
# cycle through tags
hc keybind $Mod-period use_index +1 --skip-visible
hc keybind $Mod-comma use_index -1 --skip-visible
# layouting
hc keybind $Mod-r remove
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-Shift-f set_attr clients.focus.floating toggle
hc keybind $Mod-Shift-d set_attr clients.focus.decorated toggle
hc keybind $Mod-Shift-m set_attr clients.focus.minimized true
hc keybind $Mod-Control-m jumpto last-minimized
hc keybind $Mod-p pseudotile toggle
# The following cycles through the available layouts within a frame, but skips
# layouts, if the layout change wouldn't affect the actual window positions.
# I.e. if there are two windows within a frame, the grid layout is skipped.
hc keybind $Mod-space \
or , and . compare tags.focus.curframe_wcount = 2 \
. cycle_layout +1 vertical horizontal max vertical grid \
, cycle_layout +1
# mouse
hc mouseunbind --all
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 zoom
hc mousebind $Mod-Button3 resize
# focus
hc keybind $Mod-BackSpace cycle_monitor
hc keybind $Mod-Tab cycle_all +1
hc keybind $Mod-Shift-Tab cycle_all -1
hc keybind $Mod-c cycle
hc keybind $Mod-i jumpto urgent
# theme
hc attr theme.tiling.reset 1
hc attr theme.floating.reset 1
hc set frame_border_active_color '#222222cc'
hc set frame_border_normal_color '#101010cc'
hc set frame_bg_normal_color '#565656aa'
hc set frame_bg_active_color '#345F0Caa'
hc set frame_border_width 1
hc set always_show_frame on
hc set frame_bg_transparent on
hc set frame_transparent_width 5
hc set frame_gap 4
hc attr theme.title_height 15
hc attr theme.title_when never
hc attr theme.title_font 'Roboto Mono For Powerline:pixelsize=12' # example using Xft
# hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
hc attr theme.title_depth 3 # space below the title's baseline
hc attr theme.active.color '#345F0Cef'
hc attr theme.title_color '#ffffff'
hc attr theme.normal.color '#323232dd'
hc attr theme.urgent.color '#7811A1dd'
hc attr theme.tab_color '#1F1F1Fdd'
hc attr theme.active.tab_color '#2B4F0Add'
hc attr theme.active.tab_outer_color '#6C8257dd'
hc attr theme.active.tab_title_color '#ababab'
hc attr theme.normal.title_color '#898989'
hc attr theme.inner_width 1
hc attr theme.inner_color black
hc attr theme.border_width 3
hc attr theme.floating.border_width 4
hc attr theme.floating.outer_width 1
hc attr theme.floating.outer_color black
hc attr theme.active.inner_color '#789161'
hc attr theme.urgent.inner_color '#9A65B0'
hc attr theme.normal.inner_color '#606060'
# copy inner color to outer_color
for state in active urgent normal ; do
hc substitute C theme.${state}.inner_color \
attr theme.${state}.outer_color C
done
hc attr theme.tiling.outer_width 1
hc attr theme.background_color '#141414'
hc set window_gap 0
hc set frame_padding 0
hc set smart_window_surroundings off
hc set smart_frame_surroundings on
hc set mouse_recenter_gap 0
# rules
hc unrule -F
#hc rule class=XTerm tag=3 # move all xterms to tag 3
hc rule focus=on # normally focus new clients
hc rule floatplacement=smart
#hc rule focus=off # normally do not focus new clients
# give focus to most common terminals
#hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
hc rule fixedsize floating=on
hc set tree_style '╾│ ├└╼─┐'
# unlock, just to be sure
hc unlock
# do multi monitor setup here, e.g.:
hc set_monitors 1280x780+0+20
# or simply:
# hc detect_monitors
# find the panel
panel=~/.config/herbstluftwm/panel.sh
[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
for monitor in $(hc list_monitors | cut -d: -f1) ; do
# start it on each monitor
"$panel" "$monitor" &
done

View File

@ -0,0 +1,9 @@
font_family Source Code Pro
bold_font auto
italic_font auto
bold_italic_font auto
font_size 13.0
# vim:fileencoding=utf-8:ft=conf

View File

@ -0,0 +1,233 @@
;==========================================================
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 32
;offset-x = 1%
;offset-y = 1%
radius = 1.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin-left = 1
module-margin-right = 1
font-0 = RobotoMono:pixelsize=10;1
font-1 = noto-fonts-emoji:pixelsize=10;1
modules-left = bspwm
modules-center = mpd
modules-right = backlight-acpi battery wlan date powermenu
tray-position = right
tray-padding = 1
;tray-background = #0063ff
wm-restack = bspwm
cursor-click = pointer
cursor-scroll = ns-resize
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/wlan]
type = internal/network
interface = wlp8s0
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 = void0
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
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 = 1
date = %Y-%m-%d
date-alt = %Y-%m-%d
time = %H:%M:%S
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/battery]
type = internal/battery
battery = BAT1
adapter = ACAD
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <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-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[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

View File

@ -0,0 +1,182 @@
# ________
# | _____ \
# | | _/ / Pim Nelissen
# | | /__/ https://pim.wtf/
# | |
# \_|
# Polybar configuation file.
[colors]
background = #ff000000
foreground = #ffffffff
background-alt = #444
foreground-alt = #555
primary = #ffb52a
alert = #bd2c40
[bar/top]
bottom = false
width = 1280
height = 20
background = ${colors.background}
foreground = ${colors.foreground}
border-color = #00000000
offset-y = 0
offset-x = 0
padding-left = 0
padding-right = 1
tray-padding = 1
spacing = 1
module-margin-left = 1
font-0 = Roboto Mono For Powerline:size=11;2
font-1 = MaterialIcons;3
modules-left = ewmh
modules-right = brightnessctl wlan wireless-network battery
modules-center = date
fixed-center = true
tray-position = right
[module/brightnessctl]
type = custom/script
exec = ~/.config/polybar/scripts/brightnessctl.sh
scroll-up = exec brightnessctl set +5%
scroll-down = exec brightnessctl set 5%-
interval = 5
label = %output%
label-foreground = ${colors.foreground}
[module/xwindow]
type = internal/xwindow
[module/battery]
type = internal/battery
battery = BAT0
adapter = ACAD
full-at = 98
interval = 30
click-left = ~/.config/polybar/scripts/bat_toggle.sh
format-charging = <label-charging>
format-discharging = <ramp-capacity><label-discharging>
format-full = <ramp-capacity><label-discharging>
format-charging-foreground = #90C2E7
ramp-capacity-0 =
ramp-capacity-0-foreground = #DB5461
ramp-capacity-1 =
ramp-capacity-1-foreground = #E9C46A
ramp-capacity-2 =
ramp-capacity-2-foreground = #E9C46A
ramp-capacity-3 =
ramp-capacity-3-foreground = #169873
ramp-capacity-4 =
ramp-capacity-4-foreground = #169873
bar-capacity-width = 10
bar-capacity-format = %{+u}%{+o}%fill%%empty%%{-u}%{-o}
bar-capacity-fill =
bar-capacity-fill-foreground = #ddffffff
bar-capacity-fill-font = 3
bar-capacity-empty =
bar-capacity-empty-font = 3
bar-capacity-empty-foreground = #44ffffff
[module/ewmh]
type = internal/xworkspaces
pin-workspaces = true
fuzzy-match = true
enable-click = 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;
format = <label-state>
label-monitor = %icon%
label-focused = %icon%
label-focused-background= ${colors.foreground-alt}
label-focused-padding = 1
label-occupied = %icon%
label-occupied-padding = 1
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %icon%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 1
[module/date]
type = internal/date
date = %H:%M
format = <label>
[module/wlan]
type = internal/network
interface = eth0
interval = 5.0
format-connected =  eth
[module/wireless-network]
type = internal/network
interface = wlan0
interval = 5.0
ping-interval = 10
label-connected = %essid%
format-connected = <ramp-signal><label-connected>
label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
animation-packetloss-0 =
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 =
animation-packetloss-1-foreground = ${bar/top.foreground}
animation-packetloss-framerate = 500
[module/volume]
type = internal/volume
speaker-mixer = Speaker
headphone-mixer = Headphone
headphone-id = 9
format-volume = <ramp-volume> <label-volume>
label-muted =  muted
label-muted-foreground = #66
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
; vim:ft=dosini

View File

@ -0,0 +1,11 @@
#!/bin/bash
# Terminate already running bar instances
pkill polybar
# If all your bars have ipc enabled, you can also use
# polybar-msg cmd quit
# Launch Polybar, using default config location ~/.config/polybar/config
polybar top | tee -a /tmp/polybar.log & disown
echo "Polybar launched..."

View File

@ -0,0 +1,9 @@
#!/bin/sh
updates=$(xbps-install -Mun 2> /dev/null | wc -l)
if [ -n "$updates" ] && [ "$updates" -gt 0 ]; then
echo "$updates"
else
echo ""
fi

View File

@ -0,0 +1,16 @@
#!/bin/bash
BRIGHTNESS_VALUE=`brightnessctl | grep -o "(.*" | tr -d "()"`
BRIGHTNESS_NR=${BRIGHTNESS_VALUE//%}
if [ $BRIGHTNESS_NR -lt 20 ]; then
BRIGHTNESS_ICON=''
elif [ $BRIGHTNESS_NR -lt 50 ]; then
BRIGHTNESS_ICON=''
elif [ $BRIGHTNESS_NR -lt 80 ]; then
BRIGHTNESS_ICON=''
else
BRIGHTNESS_ICON=''
fi
echo "$BRIGHTNESS_ICON $BRIGHTNESS_VALUE"