diff options
44 files changed, 808 insertions, 1027 deletions
@@ -1,5 +1,7 @@ -all_files := basics emacs spacemacs doom-emacs git i3wm bspwm vim nvim tmux x zsh fish +special_files := git nvim tmux zsh simple_files := emacs spacemacs doom-emacs vim fish +pkg_dependent_files := basics i3wm bspwm herbstluftwm xmonad x polybar +all_files := $(special_files) $(simple_files) $(pkg_dependent_files) .PHONY: $(all_files) @@ -11,27 +13,15 @@ BASE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH))) $(simple_files): stow -t ~ $@ -# special install rules -basics: yay - yay -Q - < meta/basic_deps || yay -S --needed - < meta/basic_deps - stow -t ~ $@ - -x: yay - pacman -Q - < meta/x_deps || yay -S --needed - < meta/x_deps +$(pkg_dependent_files): yay + yay -Q - < meta/$@_deps || yay -S --needed - < meta/$@_deps stow -t ~ $@ +# special install rules git: pacman -Q git || sudo pacman -S git stow -t ~ $@ -i3wm: yay - pacman -Q - < meta/i3wm_deps || yay -S --needed - < meta/i3wm_deps - stow -t ~ $@ - -bspwm: yay - pacman -Q - < meta/bspwm_deps || yay -S --needed - < meta/bspwm_deps - stow -t ~ $@ - yay: git pacman -Q yay || (git clone aur:yay && pushd yay && makepkg -si && popd) diff --git a/basics/.config/alacritty/alacritty.yml b/basics/.config/alacritty/alacritty.yml index d49d07d..e84f5f4 100644 --- a/basics/.config/alacritty/alacritty.yml +++ b/basics/.config/alacritty/alacritty.yml @@ -3,14 +3,14 @@ # Any items in the `env` entry below will be added as # environment variables. Some entries may override variables # set by alacritty itself. -#env: +env: # TERM variable # # This value is used to set the `$TERM` environment variable for # each instance of Alacritty. If it is not present, alacritty will # check the local terminfo database and use `alacritty` if it is # available, otherwise `xterm-256color` is used. - #TERM: xterm-256color + TERM: xterm-256color window: # Window dimensions (changes require restart) @@ -26,8 +26,8 @@ window: # Blank space added around the window in pixels. This padding is scaled # by DPI and the specified value is always added at both opposing sides. padding: - x: 2 - y: 2 + x: 0 + y: 0 # Spread additional padding evenly around the terminal content. dynamic_padding: false @@ -50,13 +50,28 @@ window: # - Fullscreen startup_mode: Maximized + # Window title + #title: Alacritty + + # Window class (Linux/BSD only): + #class: + # Application instance name + #instance: Alacritty + # General application class + #general: Alacritty + + # GTK theme variant (Linux/BSD only) + # + # Override the variant of the GTK theme. Commonly supported values are `dark` and `light`. + # Set this to `None` to use the default theme variant. + #gtk_theme_variant: None + scrolling: # Maximum number of lines in the scrollback buffer. # Specifying '0' will disable scrolling. history: 10000 - # Number of lines the viewport will move for every line scrolled when - # scrollback is enabled (history > 0). + # Scrolling distance multiplier multiplier: 3 # Font configuration (changes require restart) @@ -96,8 +111,19 @@ font: # The `style` can be specified to pick a specific face. #style: Italic + # Bold italic font face + #bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold Italic + # Point size - size: 13.0 + size: 8.0 # Offset is the extra space around each character. `offset.y` can be thought of # as modifying the line spacing, and `offset.x` as modifying the letter spacing. @@ -128,14 +154,6 @@ font: # effect. use_thin_strokes: true -# Debug options -debug: - # Display the time it takes to redraw each frame. - render_timer: false - - # Keep the log file after quitting Alacritty. - persistent_logging: false - # If `true`, bold text is drawn using the bright color variants. draw_bold_text_with_bright_colors: true @@ -522,3 +540,26 @@ key_bindings: - { key: F11, mods: Super, chars: "\x1b[23;3~" } - { key: F12, mods: Super, chars: "\x1b[24;3~" } - { key: NumpadEnter, chars: "\n" } + +# Debug options +debug: + # Display the time it takes to redraw each frame. + render_timer: false + + # Keep the log file after quitting Alacritty. + persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - None + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false + diff --git a/basics/.config/newsboat/urls b/basics/.config/newsboat/urls index 134c73c..e07c8b6 100644 --- a/basics/.config/newsboat/urls +++ b/basics/.config/newsboat/urls @@ -1,2 +1,3 @@ https://www.archlinux.org/feeds/news/ https://www.archlinux.org/feeds/planet/ +https://news.ycombinator.com/rss diff --git a/basics/.config/npm/npmrc b/basics/.config/npm/npmrc index fc84b78..3691078 100644 --- a/basics/.config/npm/npmrc +++ b/basics/.config/npm/npmrc @@ -2,3 +2,4 @@ prefix=${XDG_DATA_HOME}/npm cache=${XDG_CACHE_HOME}/npm tmp=${XDG_RUNTIME_DIR}/npm init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js + diff --git a/basics/.local/bin/battery-monitor b/basics/.local/bin/battery-monitor index ff1ef8b..1dfa7b6 100755 --- a/basics/.local/bin/battery-monitor +++ b/basics/.local/bin/battery-monitor @@ -1,6 +1,41 @@ +#!/bin/sh + +battery_path='/sys/class/power_supply/BAT0' + +percentage=$(head -n1 "${battery_path}/capacity") +state=$(head -n1 "${battery_path}/status") +rate=$([ -f "${battery_path}/current_now" ] && head -n1 "${battery_path}/current_now" || head -n1 "${battery_path}/power_now") +volt=$(head -n1 "${battery_path}/voltage_now") +now=$([ -f "${battery_path}/charge_now" ] && head -n1 "${battery_path}/charge_now" || head -n1 "${battery_path}/energy_now") +max=$([ -f "${battery_path}/current_full" ] && head -n1 "${battery_path}/current_full" || head -n1 "${battery_path}/energy_full") +cap=$([ "$state" = "Charging" ] && printf "%d-%d\n" "${max}" "${now}" | bc || echo "${now}") + +remaining=$( printf "%d/%d\n" "${cap}" "${volt}" | bc -l ) +current_rate=$( printf "%d/%d\n" "${rate}" "${volt}" | bc -l ) +echo $( [ "${current_rate}" != "0" ] && echo "not zero" || echo "is zero" ) +seconds=$( [ "${current_rate}" != "0" ] && printf "3600*%f/%f\n" "${remaining}" "${current_rate}" | bc || echo "0") +time_remaining=$( date -ud "@${seconds}" "+%H:%M:%S" ) + +echo "percentage ${percentage}%" +echo "state ${state}" +echo "rate ${rate}" +echo "volt ${volt}" +echo "now ${now}" +echo "max ${max}" +echo "cap ${cap}" +echo "remaining ${remaining}" +echo "current_rate ${current_rate}" +echo "seconds ${seconds}" +echo "time ${time_remaining}" + +exit 0 + battery_level=`acpi -b | cut -d ' ' -f 4 | grep -o '[0-9]*'` +battery_level=$(head -n1 /sys/class/power_supply/BAT0/capacity) battery_state=$(acpi | grep 'Battery' | sed 's/Battery\s[0-9]*: //' | sed 's/, [0-9][0-9]*\%.*//') +battery_state=$(head -n1 /sys/class/power_supply/BAT0/status) battery_remaining=$(acpi | grep -oh '[0-9:]* remaining' | sed 's/:\w\w remaining$/ Minutes/' | sed 's/00://' | sed 's/:/h /') +kk if [ ! -f "/tmp/.battery" ]; then echo "$battery_level" > /tmp/.battery @@ -18,12 +53,12 @@ checkBatteryLevel() { exit fi - if [ $battery_level -le 3 ]; then + if [ $battery_level -le 4 ]; then sudo systemctl suspend - elif [ $battery_level -le 5 ]; then - notify-send "Low Battery" "Your computer will suspend soon unless plugged into a power outlet." -u critical + elif [ $battery_level -le 7 ]; then + notify-send "Low Battery" "(${time_remaining}) Your computer will suspend soon unless plugged into a power outlet." -u critical elif [ $battery_level -le 10 ]; then - notify-send "Low Battery" "${battery_level}% (${battery_remaining}) of battery remaining." -u normal + notify-send "Low Battery" "${battery_level}% (${time_remaining}) of battery remaining." -u normal fi } @@ -38,4 +73,4 @@ checkBatteryStateChange() { } checkBatteryStateChange -checkBatteryLevel
\ No newline at end of file +checkBatteryLevel diff --git a/basics/.local/bin/change-vol b/basics/.local/bin/change-vol new file mode 100755 index 0000000..a4309fd --- /dev/null +++ b/basics/.local/bin/change-vol @@ -0,0 +1,10 @@ +#!/bin/sh + +case "$1" in + "+") ;; + "-") ;; + *) exit 1; +esac + +pactl set-sink-mute 0 false +pactl set-sink-volume 0 "${1}5%" diff --git a/basics/.local/bin/edit-config b/basics/.local/bin/edit-config index 7d1baae..436a812 100755 --- a/basics/.local/bin/edit-config +++ b/basics/.local/bin/edit-config @@ -1,6 +1,6 @@ #/bin/sh FILE=$(locate-config) -[ -z "$FILE" ] && exit 1 +[ -z "$FILE" ] || [ ! -f "$FILE" ] && exit 1 -$EDITOR $FILE +${TERMINAL} -e ${EDITOR} ${FILE} diff --git a/basics/.local/bin/locate-config b/basics/.local/bin/locate-config index d798a39..26fd2cb 100755 --- a/basics/.local/bin/locate-config +++ b/basics/.local/bin/locate-config @@ -1,24 +1,16 @@ -#! /usr/bin/env bash +#!/bin/sh set -e -CONFIG_FILES=`ls -1 ~/.local/share/config-files | cut -d "" -f 1 | sort -d` -CONFIG_ARRAY=(`find ~/.local/share/config-files/ -maxdepth 1 -mindepth 1 -print0 | sort -z | xargs -r0 echo`) +config_dir="$HOME/.local/share/config-files" -INDEX=`echo "$CONFIG_FILES" | rofi -dmenu -format "i" -no-custom -mesg "Find config file for..."` -[ -z "$INDEX" ] && exit 1 -SOURCE=${CONFIG_ARRAY[$INDEX]} -#echo "$CONFIG_FILES" -#for item in ${CONFIG_ARRAY[*]} -#do -# printf " %s\n" $item -#done -# (https://stackoverflow.com/questions/59895/get-the-source-directory-of-a-bash-script-from-within-the-script-itself) -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )" +p="Config:" + +sel=$(find "$config_dir" -writable -type l | cut -d "/" -f 7- | sort -d | dmenu -p "$p" -l 20) +ec=$? +[ "$ec" -ne 0 ] && exit $ec + +target=$(readlink -f "${config_dir}/${sel}") + +echo "$target" -echo $SOURCE diff --git a/basics/.local/bin/macho b/basics/.local/bin/macho new file mode 100755 index 0000000..2566d7d --- /dev/null +++ b/basics/.local/bin/macho @@ -0,0 +1,25 @@ +#!/bin/sh + +export FZF_DEFAULT_OPTS=' +--height=30% +--layout=reverse +--prompt="Manual: " +--preview="echo {1} | sed -E \"s/^\((.+)\)/\1/\" | xargs -I{S} man -Pcat {S} {2} 2>/dev/null"' + +while getopts ":s:" opt; do + case $opt in + s ) SECTION=$OPTARG; shift; shift;; + \?) echo "Invalid option: -$OPTARG" >&2; exit 1;; + : ) echo "Option -$OPTARG requires an argument" >&2; exit 1;; + esac +done + +manual=$(apropos -s ${SECTION:-''} ${@:-.} | \ + grep -v -E '^.+ \(0\)' |\ + awk '{print $2 " " $1}' | \ + sort | \ + fzf | \ + sed -E 's/^\((.+)\)/\1/') + +[ -z "$manual" ] && exit 0 +man $manual diff --git a/basics/.local/bin/statusbar/battery b/basics/.local/bin/statusbar/battery new file mode 100755 index 0000000..da6dd12 --- /dev/null +++ b/basics/.local/bin/statusbar/battery @@ -0,0 +1,30 @@ +#!/bin/sh + +battery_path='/sys/class/power_supply/BAT0' + +percentage=$(head -n1 "${battery_path}/capacity") +state=$(head -n1 "${battery_path}/status") +rate=$([ -f "${battery_path}/current_now" ] && + head -n1 "${battery_path}/current_now" || + head -n1 "${battery_path}/power_now") +volt=$(head -n1 "${battery_path}/voltage_now") +now=$([ -f "${battery_path}/charge_now" ] && + head -n1 "${battery_path}/charge_now" || + head -n1 "${battery_path}/energy_now") +max=$([ -f "${battery_path}/current_full" ] && + head -n1 "${battery_path}/current_full" || + head -n1 "${battery_path}/energy_full") +cap=$([ "$state" = "Charging" ] && + echo "$max $now" | awk '{printf "%d", $1 - $2}' || + echo "$now") + +remaining=$( echo "$cap $volt" | awk '{printf "%f", $1/$2}' ) +current_rate=$( echo "$rate $volt" | awk '{printf "%f", $1/$2}' ) +seconds_remaining=$( [ "${current_rate#0.00}" = "$current_rate" ] && + echo "$remaining $current_rate" | + awk '{printf "%d", 3600*$1/$2}' || + echo "0" ) +time_remaining=$( date -ud "@${seconds_remaining}" "+%H:%M:%S" ) + +# TODO: more variable output with flags? +echo "$state $percentage $time_remaining" diff --git a/basics/.local/bin/statusbar/memory b/basics/.local/bin/statusbar/memory new file mode 100755 index 0000000..7a952d8 --- /dev/null +++ b/basics/.local/bin/statusbar/memory @@ -0,0 +1,22 @@ +#!/bin/sh + +meminfo=$(awk ' +/^MemTotal:/ {Total=$2*1024} +/^MemAvailable:/ {Available=$2*1024} +/^MemFree:/ {Free=$2*1024} +/^Buffers:/ {Buffers=$2*1024} +/^Cached:/ {Cached=$2*1024} +/^SReclaimable:/ {SReclaimable=$2*1024} +/^Shmem:/ {Shmem=$2*1024} +END { +print Total ":" Available ":" Free ":" Buffers ":" Cached ":" SReclaimable ":" Shmem}' /proc/meminfo) + +echo "$meminfo" | + while IFS=: read -r t a f b c sr sh; do + memfree=$(echo "$a $t" | awk '{printf "%.3f", ($1 / $2) * 100}') + memused=$(echo "$memfree" | awk '{printf "%.3f", (100 - $1)}') + + # Percentage values + # TODO: other values, controllable by flags? + echo "$memfree $memused" + done diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index b514a7a..beef1f7 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -1,18 +1,34 @@ #! /bin/sh # reset polybar -$HOME/.config/polybar/launch.sh & +$HOME/.config/polybar/launch.sh bspwm # Autostart -[[ ! $(pidof -x sxhkd) ]] && sxhkd & -[[ ! $(pidof -x compton) ]] && compton & -[[ ! $(pidof -x nm-applet) ]] && nm-applet & -[[ ! $(pidof -x feh ) ]] && feh --bg-scale "$HOME/.local/share/images/wallpaper.jpg" & +[ ! "$(pidof -x sxhkd)" ] && sxhkd & +[ ! "$(pidof -x picom)" ] && picom & +[ ! "$(pidof -x nm-applet)" ] && nm-applet & # locker -[[ ! $(pidof -x xautolock) ]] && xautolock -locker "$HOME/.local/share/scripts/lock.sh" -time 60 -detectsleep -notify 10 & - -bspc monitor -d I II III IV V VI VII VIII IX X +# [ ! "$(pidof -x xautolock)" ] && xautolock -locker "$HOME/.local/share/scripts/lock.sh" -time 60 -detectsleep -notify 10 & +xset s 300 5 +xss-lock -n /usr/bin/xsecurelock/dimmer -l -- xsecurelock + +# setup monitor +monitors=$(xrandr -q | grep " connected " | cut -d " " -f1) +monitor_list=$(printf "%s" "$monitors" | tr '\n' ' ') +num_monitors=$(echo "$monitors" | wc -w) +case $num_monitors in + 1) + bspc monitor -d I II III IV V VI VII VIII IX X ;; + 2) + primary=$(echo "$monitor_list" | cut -d ' ' -f1) + secondary=$(echo "$monitor_list" | cut -d ' ' -f2) + echo "prim: $primary second: $secondary" + bspc monitor "$primary" -d I II III IV V + bspc monitor "$secondary" -d VI VII VII IX X + bspc wm -O "$primary" "$secondary" ;; + *) +esac bspc config border_width 2 bspc config window_gap 12 @@ -28,4 +44,4 @@ bspc rule -a Kupfer.py focus=on bspc rule -a Screenkey manage=off bspc rule -a scratchpad sticky=on state=floating hidden=on -alacritty --class scratchpad,scratchpad -e ~/code/dotfiles/bspwm/.bin/scratch & +alacritty --class scratchpad,scratchpad -e ~/.local/bin/scratch & diff --git a/bspwm/.config/polybar/config b/bspwm/.config/polybar/config deleted file mode 100644 index 05d6334..0000000 --- a/bspwm/.config/polybar/config +++ /dev/null @@ -1,637 +0,0 @@ -;========================================================== -; -; -; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ -; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ -; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ -; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ -; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ -; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ -; -; -; To learn more about how to configure Polybar -; go to https://github.com/jaagr/polybar -; -; The README contains alot of information -; -;========================================================== - -[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/topbar] -monitor = ${env:MONITOR:eDP-1} -width = 100% -height = 40 -dpi = 96 -;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 = 10 -border-bottom-size = 0 -border-color = #00000000 - -padding-left = 2 -padding-right = 2 - -font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=10;1 -font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1" -font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1" -font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1" - -tray-position = right -tray-padding = 2 -;tray-transparent = true -;tray-background = #0063ff -tray-scale = 1 -tray-detached = false - -wm-restack = bspwm -override-redirect = false - -scroll-up = bspwm-desknext -scroll-down = bspwm-deskprev -cursor-click = pointer -cursor-scroll = ns-resize - -module-margin-left = 2 -module-margin-right = 2 -modules-left = hostname xwindow -modules-center = -modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth ethvpn battery temperature - -[bar/topbar-second] -monitor = ${env:MONITOR:eDP-1} -width = 100% -height = 40 -dpi = 96 -;offset-x = 1% -offset-y = 50 -radius = 6.0 -fixed-center = true - -background = ${colors.background} -foreground = ${colors.foreground} - -line-size = 3 -line-color = #f00 - -border-size = 10 -border-top-size = 0 -border-bottom-size = 0 -border-color = #00000000 - -padding-left = 2 -padding-right = 2 - -font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=10;1 -font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1" -font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1" -font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1" - -wm-restack = bspwm -override-redirect = false - -scroll-up = bspwm-desknext -scroll-down = bspwm-deskprev -cursor-click = pointer -cursor-scroll = ns-resize - -module-margin-left = 2 -module-margin-right = 2 -modules-left = bspwm -modules-center = spotify -modules-right = taskwarrior date - -[module/hostname] -type = custom/script -interval = 256 -format = "<label> " -"format-prefix = " " -format-prefix = " ƸӜƷ " -format-prefix-foreground = ${colors.secondary} -format-padding = 0 -exec = echo "$(uname -n)" - -[module/spotify] -type = custom/script -exec = spotifycl status -tail = true -format = <label> -format-foreground = ${colors.foreground-alt} -format-underline = ${colors.primary} -click-right = playerctl play-pause -click-left = playerctl play-pause -click-middle = playerctl next -scroll-up = playerctl next -scroll-down = playerctl previous -label-maxlen = 120 -label-ellipsis = true - -[module/xwindow] -type = internal/xwindow -label = %title:0:40:...% - -[module/xkeyboard] -type = internal/xkeyboard -blacklist-0 = num lock - -format = <label-layout> -format-prefix = " " -format-prefix-foreground = ${colors.foreground} -format-prefix-underline = ${colors.secondary} - -label-layout = %name% -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#0a81f5}%mountpoint%%{F-}: %percentage_used%% -label-unmounted = %mountpoint% not mounted -label-unmounted-foreground = ${colors.foreground-alt} - -[module/bspwm] -type = internal/bspwm - -pin-workspaces = true -inline-mode = false -enable-click = true -enable-scroll = false -reverse-scroll = false -fuzzy-matching = true - -; Available tags: -; <label-monitor> -; <label-state> - gets replaced with <label-(focused|urgent|occupied|empty)> -; <label-mode> - gets replaced with -; <label-(monocle|tiled|fullscreen|floating|locked|sticky|private)> -; Default: <label-state> -format = <label-state> <label-mode> - -; Available tokens: -; %name% -; Default: %name% -label-monitor = %name% - -; If any values for label-dimmed-N are defined, the workspace/mode -; colors will get overridden with those values if the monitor is out of focus -; To only override workspaces in a specific state, use: -; label-dimmed-focused -; label-dimmed-occupied -; label-dimmed-urgent -; label-dimmed-empty -label-dimmed-foreground = #555 -label-dimmed-underline = ${colors.background} -label-dimmed-focused-background = #f00 - -; Available tokens: -; %name% -; %icon% -; %index% -; Default: %icon% %name% -label-focused = %icon% %name% -label-focused-background = ${colors.background-alt} -label-focused-underline= ${colors.primary} -label-focused-padding = 2 - -; Available tokens: -; %name% -; %icon% -; %index% -; Default: %icon% %name% -label-occupied = %icon% %name% -label-occupied-padding = 2 - -; Available tokens: -; %name% -; %icon% -; %index% -; Default: %icon% %name% -label-urgent = %icon% %name%! -label-urgent-background = ${colors.alert} -label-urgent-padding = 2 - -; Available tokens: -; %name% -; %icon% -; %index% -; Default: %icon% %name% -label-empty = %icon% %name% -label-empty-foreground = ${colors.foreground-alt} -label-empty-padding = 0 - -; The following labels will be used to indicate the layout/mode -; for the focused workspace. Requires <label-mode> -; -; Available tokens: -; None -;label-monocle = -;label-tiled = -;label-fullscreen = -;label-floating = -;label-pseudotiled = P -;label-locked = -;label-locked-foreground = #bd2c40 -;label-sticky = -;label-sticky-foreground = #fba922 -;label-private = -;label-private-foreground = #bd2c40 -;label-marked = M - -; Separator in between workspaces -label-separator = -label-separator-padding = 0 -label-separator-foreground = #ffb52a - -[module/i3] -type = internal/i3 -; Only show workspaces on the same output as the bar -pin-workspaces = true -strip-wsnumbers = true -format = <label-state> <label-mode> -index-sort = true -wrapping-scroll = false - -label-mode = %mode% -label-mode-padding = 2 -label-mode-foreground = #000 -label-mode-background = ${colors.primary} - -; focused = Active workspace on focused monitor -label-focused = %name% -label-focused-background = ${module/bspwm.label-focused-background} -label-focused-underline = ${module/bspwm.label-focused-underline} -label-focused-padding = ${module/bspwm.label-focused-padding} - -; unfocused = Inactive workspace on any monitor -label-unfocused = %name% -label-unfocused-padding = ${module/bspwm.label-occupied-padding} - -; visible = Active workspace on unfocused monitor -label-visible = %name% -label-visible-background = ${self.label-focused-background} -label-visible-underline = ${self.label-focused-underline} -label-visible-padding = ${self.label-focused-padding} - -; urgent = Workspace with urgency hint set -label-urgent = %name% -label-urgent-background = ${module/bspwm.label-urgent-background} -label-urgent-padding = ${module/bspwm.label-urgent-padding} - -; Separator in between workspaces -; label-separator = | - - -[module/taskwarrior] -interval = 30 -type = custom/script -exec = $HOME/.config/polybar/task_polybar.sh -format = <label> -format-foreground = #FFF -format-prefix = "§ " -click-left = task "$((`cat /tmp/tw_polybar_id`))" done - -[module/line-l] -type = custom/text -content = "____[ " -content-foreground = ${colors.primary} - -[module/line-r] -type = custom/text -content = " ]____" -content-foreground = ${colors.primary} - -[module/mpd] -type = internal/mpd -format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> - -icon-prev = -icon-stop = -icon-play = -icon-pause = -icon-next = - -label-song-maxlen = 25 -label-song-ellipsis = true - -[module/backlight] -type = internal/backlight -card = intel_backlight -format = <label> <ramp> -label = "" - -ramp-0 = 🌕 -ramp-1 = 🌔 -ramp-2 = 🌓 -ramp-3 = 🌒 -ramp-4 = 🌑 - -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/xbacklight] -type = internal/xbacklight - -format = <label> <bar> -label = - -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} -format-underline = #f90000 -label = %percentage:2%% - -[module/memory] -type = internal/memory -interval = 2 -format-prefix = " " -format-prefix-foreground = ${colors.foreground} -format-underline = #4bffdc -label = %percentage_used%% - -[module/wlan] -type = internal/network -interface = wlp3s0 -interval = 3.0 -accumulate-stats = true - -format-connected-prefix = " " -format-connected = <label-connected> -format-connected-underline = #9f78e1 -label-connected = %essid% %local_ip% ↓%downspeed% ↑%upspeed% (%signal%) - -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-foreground = ${colors.foreground-alt} - -[module/eth] -type = internal/network -interface = eno1 -interval = 3.0 -accumulate-stats = true - -format-connected-underline = #55aa55 -format-connected-prefix = " " -format-connected-prefix-foreground = ${colors.foreground} -label-connected = %local_ip% ↓%downspeed% ↑%upspeed% ↕%linkspeed% - -format-disconnected = -;format-disconnected = <label-disconnected> -;format-disconnected-underline = ${self.format-connected-underline} -;label-disconnected = %ifname% disconnected -;label-disconnected-foreground = ${colors.foreground-alt} - -[module/ethvpn] -type = internal/network -interface = tun0 -interval = 3.0 -accumulate-stats = true - -format-connected-underline = #55aa55 -format-connected-prefix = "" -format-connected-prefix-foreground = ${colors.foreground} -label-connected = %local_ip% %local_ip6% - -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 = -date-alt = " %Y-%m-%d" - -time = %H:%M:%S -time-alt = %H:%M:%S - -format-prefix = -format-prefix-foreground = ${colors.foreground} -format-underline = #0a6cf5 - -label = %date% %time% - -[module/pulseaudio] -type = internal/pulseaudio - -format-volume = <label-volume> <bar-volume> -label-volume = %percentage%% -label-volume-foreground = ${root.foreground} - -label-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} - -ramp-volume-0 = -ramp-volume-1 = - -[module/alsa] -type = internal/alsa - -format-volume = <label-volume> <bar-volume> -label-volume = VOL -label-volume-foreground = ${root.foreground} - -format-muted-foreground = ${colors.foreground-alt} -label-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 -time-format = %H:%M -battery = BAT0 -adapter = AC -full-at = 89 - -format-charging = <animation-charging> <label-charging> -format-charging-underline = #ffb52a -label-charging = %percentage%% | %time% - -format-discharging = <animation-discharging> <label-discharging> -format-discharging-underline = ${self.format-charging-underline} -label-discharging = %percentage%% | %time% - -format-full = -format-full-foreground = ${colors.foreground} -format-full-underline = ${self.format-charging-underline} - -ramp-capacity-0 = -ramp-capacity-1 = -ramp-capacity-2 = -ramp-capacity-3 = -ramp-capacity-4 = -ramp-capacity-foreground = ${colors.foreground-alt} - -animation-charging-0 = -animation-charging-1 = -animation-charging-2 = -animation-charging-3 = -animation-charging-4 = -animation-charging-foreground = ${colors.foreground} -animation-charging-framerate = 750 - -animation-discharging-0 = -animation-discharging-1 = -animation-discharging-2 = -animation-discharging-3 = -animation-discharging-4 = -animation-discharging-foreground = ${colors.foreground} -animation-discharging-framerate = 1000 - -[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} - -[module/powermenu] -type = custom/menu - -expand-right = true - -format-spacing = 1 - -label-open = -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 = menu-open-1 -menu-0-1 = power off -menu-0-1-exec = menu-open-2 -menu-0-2 = sleep -menu-0-2-exec = systemctl suspend - -menu-1-0 = cancel -menu-1-0-exec = menu-open-0 -menu-1-1 = reboot -menu-1-1-exec = sudo reboot - -menu-2-0 = power off -menu-2-0-exec = sudo poweroff -menu-2-1 = cancel -menu-2-1-exec = menu-open-0 - -[settings] -screenchange-reload = true -;compositing-background = xor -;compositing-background = screen -;compositing-foreground = source -;compositing-border = over - -[global/wm] -margin-top = 5 -margin-bottom = 5 - -; vim:ft=dosini diff --git a/bspwm/.config/polybar/launch.sh b/bspwm/.config/polybar/launch.sh deleted file mode 100755 index c45e085..0000000 --- a/bspwm/.config/polybar/launch.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env sh - -# 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 - - -# Launch bar1 and bar2 -MONITOR=$(polybar -m|tail -n1|sed -e 's/:.*$//g') polybar topbar & -sleep 1 -MONITORS=$(polybar -m|sed -e 's/:.*$//g') -while read -r monitor; do - MONITOR=$monitor polybar topbar-second & - sleep 1 -done <<< $MONITORS - -echo "Bars launched..." diff --git a/bspwm/.config/polybar/task_polybar.sh b/bspwm/.config/polybar/task_polybar.sh deleted file mode 100755 index 555ff1b..0000000 --- a/bspwm/.config/polybar/task_polybar.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -most_urgent_desc=`task rc.verbose: rc.report.next.columns:description rc.report.next.labels:1 limit:1 next` -most_urgent_id=`task rc.verbose: rc.report.next.columns:id rc.report.next.labels:1 limit:1 next` -most_urgent_due=`task rc.verbose: rc.report.next.columns:due.relative rc.report.next.labels:1 limit:1 next` -echo "$most_urgent_id" > /tmp/tw_polybar_id -echo "$most_urgent_desc · $most_urgent_due" diff --git a/bspwm/.config/sxhkd/sxhkdrc b/bspwm/.config/sxhkd/sxhkdrc index 48f764d..14555c0 100644 --- a/bspwm/.config/sxhkd/sxhkdrc +++ b/bspwm/.config/sxhkd/sxhkdrc @@ -144,3 +144,8 @@ XF86Audio{Play,Pause,Next,Prev} super + shift + Delete xautolock -locknow + +# scratchpad +super + ` + id=$(cat /tmp/scratchid) + bspc node $id --flag hidden; bspc node -f $id diff --git a/bspwm/.local/share/lock/lock.png b/bspwm/.local/share/lock/lock.png Binary files differdeleted file mode 100644 index 7759b82..0000000 --- a/bspwm/.local/share/lock/lock.png +++ /dev/null diff --git a/bspwm/.local/share/lock/rick_lock.png b/bspwm/.local/share/lock/rick_lock.png Binary files differdeleted file mode 100644 index 4037c32..0000000 --- a/bspwm/.local/share/lock/rick_lock.png +++ /dev/null diff --git a/bspwm/.local/share/scripts/lock.sh b/bspwm/.local/share/scripts/lock.sh deleted file mode 100755 index 7a3dd42..0000000 --- a/bspwm/.local/share/scripts/lock.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -revert() { - rm /tmp/*screen*.png - xset dpms 0 0 0 -} -trap revert HUP INT TERM -xset +dpms dpms 0 0 5 - -ffmpeg -loglevel quiet -y -f x11grab -video_size `xdpyinfo | grep 'dimensions' | awk '{print $2}'` -i $DISPLAY -i ~/.local/share/lock/rick_lock.png -filter_complex "boxblur=5:1,overlay=(main_w-overlay_w-400):(main_h-overlay_h-5)" -vframes 1 /tmp/screen.png - -#scrot -d 1 /tmp/locking_screen.png -#convert -blur 0x8 /tmp/locking_screen.png /tmp/screen_blur.png -#convert -composite /tmp/screen_blur.png ~/.rick_lock.png -gravity South -geometry -20x1200 /tmp/screen.png -i3lock -eui /tmp/screen.png -revert diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart new file mode 100755 index 0000000..ab844a9 --- /dev/null +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -0,0 +1,198 @@ +#!/usr/bin/env bash + +# this is a simple config for herbstluftwm + +hc() { + herbstclient "$@" +} + +hc emit_hook reload + +if hc silent new_attr bool my_not_first_autostart; then + [ ! "$(pidof -x picom)" ] && picom & + xset s 300 5 + [ ! "$(pidof -x xss-lock)" ] && xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & +fi + +#xsetroot -solid '#5A8E3A' + +# remove all existing keybindings +hc keyunbind --all + +# keybindings +# if you have a super key you will be much happier with Mod set to Mod4 +#Mod=Mod1 # Use alt as the main modifier +Mod=Mod4 # Use the super key as the main modifier + +hc keybind $Mod-Shift-e quit +hc keybind $Mod-Shift-r reload +hc keybind $Mod-Shift-q close +hc keybind $Mod-Shift-c close +hc keybind $Mod-Return spawn "${TERMINAL:-xterm}" # use your $TERMINAL with xterm as fallback + +hc keybind $Mod-x spawn dmenu_run +hc keybind $Mod-d spawn /etc/xdg/herbstluftwm/dmenu_run_hlwm + +hc keybind $Mod-backslash rotate + +# basic movement in tiling and floating mode +# focusing clients +hc keybind $Mod-Left focus left +hc keybind $Mod-Down focus down +hc keybind $Mod-Up focus up +hc keybind $Mod-Right focus right +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-Left shift left +hc keybind $Mod-Shift-Down shift down +hc keybind $Mod-Shift-Up shift up +hc keybind $Mod-Shift-Right shift right +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=( {1..9} 10 ) +tag_keys=( {1..9} 0 ) + +hc rename default "${tag_names[0]}" || true +for i in "${!tag_names[@]}" ; do + hc add "${tag_names[$i]}" + key="${tag_keys[$i]}" + if ! [ -z "$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-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 + +# media +hc keybind XF86AudioLowerVolume spawn change-vol - +hc keybind XF86AudioRaiseVolume spawn change-vol + +hc keybind XF86AudioMute spawn pactl set-sink-mute 0 toggle + +hc keybind XF86AudioPlay spawn playerctl play-pause +hc keybind XF86AudioPause spawn playerctl pause +hc keybind XF86AudioNext spawn playerctl next +hc keybind XF86AudioPrev spawn playerctl previous + +hc keybind XF86MonBrightnessDown spawn brightnessctl s "5%-" +hc keybind XF86MonBrightnessUp spawn brightnessctl s "+5%" + +hc keybind $Mod-Shift-Delete spawn xset s activate + +# 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 '#222222' +hc set frame_border_normal_color '#101010' +hc set frame_bg_normal_color '#565656' +hc set frame_bg_active_color '#345F0C' +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.active.color '#9fbc00' +hc attr theme.normal.color '#454545' +hc attr theme.urgent.color orange +hc attr theme.inner_width 1 +hc attr theme.inner_color black +hc attr theme.border_width 2 +hc attr theme.floating.border_width 2 +hc attr theme.floating.outer_width 1 +hc attr theme.floating.outer_color black +hc attr theme.active.inner_color '#3E4A00' +hc attr theme.active.outer_color '#3E4A00' +hc attr theme.background_color '#141414' + +hc set window_gap 2 +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 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 class='jetbrains-toolbox' floating=on + +hc set tree_style '╾│ ├└╼─┐' + +# unlock, just to be sure +hc unlock + +# do multi monitor setup here, e.g.: +# hc set_monitors 1280x1024+0+0 1280x1024+1280+0 +# 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 diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh new file mode 100755 index 0000000..6088aeb --- /dev/null +++ b/herbstluftwm/.config/herbstluftwm/panel.sh @@ -0,0 +1,204 @@ +#!/usr/bin/env bash + +quote() { + local q="$(printf '%q ' "$@")" + printf '%s' "${q% }" +} + +hc_quoted="$(quote "${herbstclient_command[@]:-herbstclient}")" +hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} +monitor=${1:-0} +geometry=( $(hc monitor_rect "$monitor") ) +if [ -z "$geometry" ] ;then + echo "Invalid monitor $monitor" + exit 1 +fi +# geometry has the format W H X Y +x=${geometry[0]} +y=${geometry[1]} +panel_width=${geometry[2]} +panel_height=16 +font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*" +bgcolor=$(hc get frame_border_normal_color) +selbg=$(hc get window_border_active_color) +selfg='#101010' + +#### +# Try to find textwidth binary. +# In e.g. Ubuntu, this is named dzen2-textwidth. +if which textwidth &> /dev/null ; then + textwidth="textwidth"; +elif which dzen2-textwidth &> /dev/null ; then + textwidth="dzen2-textwidth"; +elif which xftwidth &> /dev/null ; then # For guix + textwidth="xtfwidth"; +else + echo "This script requires the textwidth tool of the dzen2 project." + exit 1 +fi +#### +# true if we are using the svn version of dzen2 +# depending on version/distribution, this seems to have version strings like +# "dzen-" or "dzen-x.x.x-svn" +if dzen2 -v 2>&1 | head -n 1 | grep -q '^dzen-\([^,]*-svn\|\),'; then + dzen2_svn="true" +else + dzen2_svn="" +fi + +if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then + # mawk needs "-W interactive" to line-buffer stdout correctly + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593504 + uniq_linebuffered() { + awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@" + } +else + # other awk versions (e.g. gawk) issue a warning with "-W interactive", so + # we don't want to use it there. + uniq_linebuffered() { + awk '$0 != l { print ; l=$0 ; fflush(); }' "$@" + } +fi + +hc pad $monitor $panel_height + +{ + ### Event generator ### + # based on different input data (mpc, date, hlwm hooks, ...) this generates events, formed like this: + # <eventname>\t<data> [...] + # e.g. + # date ^fg(#efefef)18:33^fg(#909090), 2013-10-^fg(#efefef)29 + + #mpc idleloop player & + while true ; do + # "date" output is checked once a second, but an event is only + # generated if the output changed compared to the previous run. + date +$'date\t^fg(#efefef)%H:%M:%S^fg(#909090), %Y-%m-^fg(#efefef)%d' + sleep 1 || break + done > >(uniq_linebuffered) & + datechildpid=$! + while true ; do + read -r batstatus batpercent battime <<< "$("$HOME"/.local/bin/statusbar/battery)" + echo -e "battery\t$batstatus $batpercent%$([ "$batstatus" != "Full" ] && echo " $battime")" + sleep 5 || break + done > >(uniq_linebuffered) & + batterychildpid=$! + hc --idle + kill $datechildpid + kill $batterychildpid +} 2> /dev/null | { + IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" + visible=true + date="" + battery="status" + windowtitle="" + while true ; do + + ### Output ### + # This part prints dzen data based on the _previous_ data handling run, + # and then waits for the next event to happen. + + separator="^bg()^fg($selbg)|" + # draw tags + for i in "${tags[@]}" ; do + case ${i:0:1} in + '#') + echo -n "^bg($selbg)^fg($selfg)" + ;; + '+') + echo -n "^bg(#9CA668)^fg(#141414)" + ;; + ':') + echo -n "^bg()^fg(#ffffff)" + ;; + '!') + echo -n "^bg(#FF0675)^fg(#141414)" + ;; + *) + echo -n "^bg()^fg(#ababab)" + ;; + esac + if [ ! -z "$dzen2_svn" ] ; then + # clickable tags if using SVN dzen + echo -n "^ca(1,$hc_quoted focus_monitor \"$monitor\" && " + echo -n "$hc_quoted use \"${i:1}\") ${i:1} ^ca()" + else + # non-clickable tags if using older dzen + echo -n " ${i:1} " + fi + done + echo -n "$separator" + echo -n "^bg()^fg() ${windowtitle//^/^^}" + # small adjustments + right="$separator $battery $separator^bg() $date $separator" + right_text_only=$(echo -n "$right" | sed 's.\^[^(]*([^)]*)..g') + # get width of right aligned text.. and add some space.. + width=$($textwidth "$font" "$right_text_only ") + echo -n "^pa($(($panel_width - $width)))$right" + echo + + ### Data handling ### + # This part handles the events generated in the event loop, and sets + # internal variables based on them. The event and its arguments are + # read into the array cmd, then action is taken depending on the event + # name. + # "Special" events (quit_panel/togglehidepanel/reload) are also handled + # here. + + # wait for next event + IFS=$'\t' read -ra cmd || break + + # log events for debugging + #echo "${cmd[@]}" >> /tmp/panel_${monitor}.log + + # find out event origin + case "${cmd[0]}" in + tag*) + #echo "resetting tags" >&2 + IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" + ;; + date) + #echo "resetting date" >&2 + date="${cmd[@]:1}" + ;; + battery) + battery="${cmd[@]:1}" + ;; + quit_panel) + exit + ;; + togglehidepanel) + currentmonidx=$(hc list_monitors | sed -n '/\[FOCUS\]$/s/:.*//p') + if [ "${cmd[1]}" -ne "$monitor" ] ; then + continue + fi + if [ "${cmd[1]}" = "current" ] && [ "$currentmonidx" -ne "$monitor" ] ; then + continue + fi + echo "^togglehide()" + if $visible ; then + visible=false + hc pad $monitor 0 + else + visible=true + hc pad $monitor $panel_height + fi + ;; + reload) + exit + ;; + focus_changed|window_title_changed) + windowtitle="${cmd[@]:2}" + ;; + #player) + # ;; + esac + done + + ### dzen2 ### + # After the data is gathered and processed, the output of the previous block + # gets piped to dzen2. + +} 2> /dev/null | dzen2 -w $panel_width -x $x -y $y -fn "$font" -h $panel_height \ + -e "button3=;button4=exec:$hc_quoted use_index +1;button5=exec:$hc_quoted use_index -1;button7=exec:$hc_quoted use_index +1;button6=exec:$hc_quoted use_index -1" \ + -ta l -bg "$bgcolor" -fg '#efefef' diff --git a/herbstluftwm/.local/share/config-files/herbstluftwm b/herbstluftwm/.local/share/config-files/herbstluftwm new file mode 120000 index 0000000..9e20763 --- /dev/null +++ b/herbstluftwm/.local/share/config-files/herbstluftwm @@ -0,0 +1 @@ +../../../.config/herbstluftwm/autostart
\ No newline at end of file diff --git a/i3wm/.config/i3/config b/i3wm/.config/i3/config index 6d27594..57cbaf2 100644 --- a/i3wm/.config/i3/config +++ b/i3wm/.config/i3/config @@ -9,8 +9,10 @@ # # Please see https://i3wm.org/docs/userguide.html for a complete reference! -exec_always --no-startup-id $HOME/.config/polybar/launch.sh -exec_always --no-startup-id xautolock -locker "$HOME/.local/bin/lock.sh" -time 60 -detectsleep -notify 10 +exec_always --no-startup-id $HOME/.config/polybar/launch.sh i3 +exec_always --no-startup-id xset s 300 5 +exec_always --no-startup-id xss-lock -n /usr/bin/xsecurelock/dimmer -l -- xsecurelock +#exec_always --no-startup-id xautolock -locker "$HOME/.local/bin/lock.sh" -time 60 -detectsleep -notify 10 exec --no-startup-id nm-applet exec --no-startup-id picom @@ -47,15 +49,16 @@ bindsym $mod+Return exec alacritty #kitty #i3-sensible-terminal bindsym $mod+Shift+q kill # start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id rofi -show drun -bindsym $mod+x exec --no-startup-id rofi -show run +#bindsym $mod+d exec --no-startup-id rofi -show drun +#bindsym $mod+x exec --no-startup-id rofi -show run bindsym $mod+Tab exec --no-startup-id rofi -show window # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. -#bindsym $mod+d exec --no-startup-id dmenu_run +bindsym $mod+d exec --no-startup-id i3-dmenu-desktop +bindsym $mod+x exec --no-startup-id dmenu_run # change focus bindsym $mod+j focus left @@ -66,14 +69,16 @@ bindsym $mod+semicolon focus right # alternatively, you can use the cursor keys: bindsym $mod+Left workspace prev_on_output bindsym $mod+Shift+Left workspace prev -bindsym $mod+Shift+j workspace prev +bindsym $mod+Shift+j workspace prev_on_output bindsym $mod+Shift+Control+Left move workspace to output left bindsym $mod+Down focus down bindsym $mod+Up focus up +bindsym $mod+o focus output right + bindsym $mod+Right workspace next_on_output bindsym $mod+Shift+Right workspace next -bindsym $mod+Shift+semicolon workspace next +bindsym $mod+Shift+semicolon workspace next_on_output bindsym $mod+Shift+Control+Right move workspace to output right bindsym $mod+b workspace back_and_forth @@ -242,7 +247,8 @@ bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous -bindsym $mod+Shift+l exec "xautolock -locknow" +#bindsym $mod+Shift+l exec "xautolock -locknow" +bindsym $mod+Shift+l exec "xset s activate" diff --git a/i3wm/.config/polybar/launch.sh b/i3wm/.config/polybar/launch.sh deleted file mode 100755 index c45e085..0000000 --- a/i3wm/.config/polybar/launch.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env sh - -# 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 - - -# Launch bar1 and bar2 -MONITOR=$(polybar -m|tail -n1|sed -e 's/:.*$//g') polybar topbar & -sleep 1 -MONITORS=$(polybar -m|sed -e 's/:.*$//g') -while read -r monitor; do - MONITOR=$monitor polybar topbar-second & - sleep 1 -done <<< $MONITORS - -echo "Bars launched..." diff --git a/i3wm/.local/bin/rofi_goto_workspace b/i3wm/.local/bin/rofi_goto_workspace deleted file mode 100755 index 35e8762..0000000 --- a/i3wm/.local/bin/rofi_goto_workspace +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -NAME=`rofi_workspace_prompt` -i3-msg workspace $NAME diff --git a/i3wm/.local/bin/rofi_moveto_workspace b/i3wm/.local/bin/rofi_moveto_workspace deleted file mode 100755 index 9cc0b9d..0000000 --- a/i3wm/.local/bin/rofi_moveto_workspace +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -NAME=`rofi_workspace_prompt` -i3-msg move container to workspace $NAME diff --git a/i3wm/.local/bin/rofi_workspace_prompt b/i3wm/.local/bin/rofi_workspace_prompt deleted file mode 100755 index f59d1fa..0000000 --- a/i3wm/.local/bin/rofi_workspace_prompt +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -echo `i3-msg -t get_workspaces | jq '.[].name' | sed 's/\"//g' | rofi -dmenu` diff --git a/i3wm/.local/bin/spotifycl b/i3wm/.local/bin/spotifycl deleted file mode 100755 index ffee9f0..0000000 --- a/i3wm/.local/bin/spotifycl +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env python - -# MIT License -# -# Copyright (c) 2018 Andreas Backx -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -import os -import socket -import sys -import time -import traceback -from concurrent.futures import ThreadPoolExecutor - -import click -import dbus -import dbus.mainloop.glib -import spotipy -import spotipy.util as util -from dbus.mainloop.glib import DBusGMainLoop -from gi.repository import GLib -from spotipy import SpotifyException -from spotipy.oauth2 import SpotifyClientCredentials - -inactive_color = '%{F#6E6E6E}' -active_color = '%{F#CECECE}' -default_color = '%{F-}' - -server_address = '/tmp/spotifycl-socket' - - -class Spotify: - - SPOTIFY_BUS = 'org.mpris.MediaPlayer2.spotify' - SPOTIFYD_BUS = 'org.mpris.MediaPlayer2.spotifyd' - SPOTIFY_OBJECT_PATH = '/org/mpris/MediaPlayer2' - - PLAYER_INTERFACE = 'org.mpris.MediaPlayer2.Player' - PROPERTIES_INTERFACE = 'org.freedesktop.DBus.Properties' - - SAVE_REMOVE = b'save' - - def __init__(self): - DBusGMainLoop(set_as_default=True) - self.session_bus = dbus.SessionBus() - self.last_output = '' - self.empty_output = True - - # Last shown metadata - self.last_title = None - # Whether the current song is added to the library - self.saved_track = False - # Whether to ignore the update - self.ignore = False - - def monitor(self): - self.setup_properties_changed() - self.freedesktop = self.session_bus.get_object( - "org.freedesktop.DBus", - "/org/freedesktop/DBus" - ) - self.freedesktop.connect_to_signal( - "NameOwnerChanged", - self.on_name_owner_changed, - arg0=self.SPOTIFYD_BUS - ) - - executor = ThreadPoolExecutor(max_workers=2) - executor.submit(self._start_glib_loop) - executor.submit(self._start_server) - - def _start_glib_loop(self): - loop = GLib.MainLoop() - loop.run() - - def _start_server(self): - try: - os.unlink(server_address) - except OSError: - if os.path.exists(server_address): - raise - sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - sock.bind(server_address) - sock.listen(5) - - @property - def metadata_status(self): - spotify_properties = dbus.Interface( - self.spotify, - dbus_interface=Spotify.PROPERTIES_INTERFACE - ) - metadata = spotify_properties.Get( - Spotify.PLAYER_INTERFACE, - 'Metadata' - ) - playback_status = spotify_properties.Get( - Spotify.PLAYER_INTERFACE, - 'PlaybackStatus' - ) - return metadata, playback_status - - def output(self, line): - if not line: - self.empty_output = True - if line != self.last_output: - print(line, flush=True) - self.last_output = line - - def setup_spotify(self): - try: - self.spotify = self.session_bus.get_object( - Spotify.SPOTIFY_BUS, - Spotify.SPOTIFY_OBJECT_PATH - ) - except dbus.DBusException: - self.spotify = self.session_bus.get_object(Spotify.SPOTIFYD_BUS, Spotify.SPOTIFY_OBJECT_PATH) - - def setup_properties_changed(self): - try: - self.setup_spotify() - self.spotify.connect_to_signal( - 'PropertiesChanged', - self.on_properties_changed - ) - - if self.empty_output: - metadata, playback_status = self.metadata_status - self.output_playback_status( - data={ - 'Metadata': metadata, - 'PlaybackStatus': playback_status, - } - ) - - except dbus.DBusException: - self.output('') - - def output_playback_status(self, data, retry=False): - if self.ignore: - return - - metadata = data['Metadata'] - artists = metadata['xesam:artist'] - artist = artists[0] if artists else None - - if not artist: - self.output('') - return - - title = metadata['xesam:title'] - playback_status = data['PlaybackStatus'] - same_song = title == self.last_title - - color = active_color if playback_status == 'Playing' else inactive_color - # divider = '+' if same_song and self.saved_track else '-' - self.output(f'{color}{artist} - {title}{default_color}') - - if not same_song: - self.last_title = title - - def on_properties_changed(self, interface, data, *args, **kwargs): - self.output_playback_status(data) - - def on_name_owner_changed(self, name, old_owner, new_owner): - if name == self.SPOTIFY_BUS: - if new_owner: - # Spotify was opened. - self.setup_properties_changed() - else: - # Spotify was closed. - self.spotify = None - self.output('') - - -@click.group() -def cli(): - """Script for listening to Spotify over dbus and adding tracks to your library.""" - pass - - -@cli.command() -def status(): - """Follow the status of the currently playing song on Spotify.""" - spotify = Spotify() - spotify.monitor() - - -if __name__ == '__main__': - cli() diff --git a/i3wm/.local/share/config-files/polybar b/i3wm/.local/share/config-files/polybar deleted file mode 120000 index 87fad9e..0000000 --- a/i3wm/.local/share/config-files/polybar +++ /dev/null @@ -1 +0,0 @@ -../../../.config/polybar/config
\ No newline at end of file diff --git a/meta/basic_deps b/meta/basics_deps index 2c8edf1..2c8edf1 100644 --- a/meta/basic_deps +++ b/meta/basics_deps diff --git a/meta/bspwm_deps b/meta/bspwm_deps index 9d2e379..f3fcec0 100644 --- a/meta/bspwm_deps +++ b/meta/bspwm_deps @@ -9,3 +9,5 @@ python-spotipy ffmpeg polybar xorg-xdpyinfo +xsecurelock +xss-lock diff --git a/meta/herbstluftwm_deps b/meta/herbstluftwm_deps new file mode 100644 index 0000000..1cc5107 --- /dev/null +++ b/meta/herbstluftwm_deps @@ -0,0 +1,5 @@ +dmenu +dzen2 +herbstluftwm +xsecurelock +xss-lock diff --git a/meta/polybar_deps b/meta/polybar_deps new file mode 100644 index 0000000..7d51041 --- /dev/null +++ b/meta/polybar_deps @@ -0,0 +1,5 @@ +python-click +python-dbus +python-spotipy +polybar +xorg-xdpyinfo diff --git a/meta/xmonad_deps b/meta/xmonad_deps new file mode 100644 index 0000000..34da79b --- /dev/null +++ b/meta/xmonad_deps @@ -0,0 +1,2 @@ +xmonad +xmonad-contrib diff --git a/i3wm/.config/polybar/config b/polybar/.config/polybar/config index ab31469..8bd3f20 100644 --- a/i3wm/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -27,14 +27,14 @@ primary = #ffb52a secondary = #e60053 alert = #bd2c40 -[bar/topbar] -monitor = ${env:MONITOR:eDP-1} +[bar/base] +monitor = ${env:MONITOR:eDP1} width = 100% height = 40 dpi = 96 ;offset-x = 1% ;offset-y = 1% -radius = 6.0 +radius = 0 fixed-center = false background = ${colors.background} @@ -43,13 +43,16 @@ foreground = ${colors.foreground} line-size = 3 line-color = #f00 -border-size = 10 +border-size = 0 border-bottom-size = 0 border-color = #00000000 -padding-left = 2 +padding-left = 0 padding-right = 2 +module-margin-left = 1 +module-margin-right = 2 + font-0 = fixed:pixelsize=10;1 font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 font-2 = siji:pixelsize=10;1 @@ -57,6 +60,10 @@ font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1" font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1" font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1" +modules-left = +modules-center = +modules-right = + tray-position = right tray-padding = 2 ;tray-transparent = true @@ -64,70 +71,124 @@ tray-padding = 2 tray-scale = 1 tray-detached = false +;wm-restack = bspwm +;wm-restack = i3 + +override-redirect = false + +click-left = +click-middle = +click-right = +scroll-up = +scroll-down = +double-click-left = +double-click-middle = +double-click-right = + +cursor-click = pointer +cursor-scroll = ns-resize + +[bar/topbar-i3] +inherit = bar/base + wm-restack = i3 override-redirect = false +click-left = +click-middle = +click-right = scroll-up = i3wm-wsnext scroll-down = i3wm-wsprev +double-click-left = +double-click-middle = +double-click-right = + cursor-click = pointer cursor-scroll = ns-resize -module-margin-left = 2 -module-margin-right = 2 modules-left = hostname xwindow modules-center = modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth ethvpn battery temperature -[bar/topbar-second] -monitor = ${env:MONITOR:eDP-1} -width = 100% -height = 40 -dpi = 96 -;offset-x = 1% -offset-y = 50 -radius = 6.0 -fixed-center = true +[bar/topbar-bspwm] +inherit = bar/base -background = ${colors.background} -foreground = ${colors.foreground} +wm-restack = bspwm +override-redirect = false -line-size = 3 -line-color = #f00 +click-left = +click-middle = +click-right = +scroll-up = bspwm-desknext +scroll-down = bspwm-deskprev +double-click-left = +double-click-middle = +double-click-right = -border-size = 10 -border-top-size = 0 -border-bottom-size = 0 -border-color = #00000000 +cursor-click = pointer +cursor-scroll = ns-resize -padding-left = 2 -padding-right = 2 +modules-left = hostname xwindow +modules-center = +modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth ethvpn battery temperature -font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=10;1 -font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1" -font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1" -font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1" +[bar/topbar2-i3] +inherit = bar/base +offset-y = 0 +fixed-center = true wm-restack = i3 override-redirect = false +click-left = +click-middle = +click-right = scroll-up = i3wm-wsnext scroll-down = i3wm-wsprev +double-click-left = +double-click-middle = +double-click-right = + cursor-click = pointer cursor-scroll = ns-resize -module-margin-left = 2 -module-margin-right = 2 modules-left = i3 modules-center = spotify modules-right = date +[bar/topbar2-bspwm] +inherit = bar/base +offset-y = 40 +fixed-center = true + +wm-restack = bspwm +override-redirect = false + +click-left = +click-middle = +click-right = +scroll-up = bspwm-desknext +scroll-down = bspwm-deskprev +double-click-left = +double-click-middle = +double-click-right = + +cursor-click = pointer +cursor-scroll = ns-resize + +modules-left = bspwm +modules-center = spotify +modules-right = date + +;============================================================================= +; modules +;============================================================================= + [module/hostname] type = custom/script interval = 256 format = "<label> " -"format-prefix = " " +;format-prefix = " " format-prefix = " ƸӜƷ " format-prefix-foreground = ${colors.secondary} format-padding = 0 @@ -548,9 +609,10 @@ screenchange-reload = true ;compositing-background = screen ;compositing-foreground = source ;compositing-border = over +;pseudo-transparency = false [global/wm] -margin-top = 5 -margin-bottom = 5 +margin-top = 0 +margin-bottom = 0 ; vim:ft=dosini diff --git a/polybar/.config/polybar/launch.sh b/polybar/.config/polybar/launch.sh new file mode 100755 index 0000000..fe2791e --- /dev/null +++ b/polybar/.config/polybar/launch.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# 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 2 +done + +primary_monitor=$(polybar -m | grep '(primary)' | + sed -e 's/:.*$//g') +all_monitors=$(polybar -m | + sed -e 's/:.*$//g') + +WM=${1:+"-$1"} + +# Launch bar1 and bar2 +MONITOR=${primary_monitor} polybar "topbar${WM}" & +sleep 1 +while read -r monitor; do + echo "launching bar on $monitor" + MONITOR=$monitor polybar "topbar2${WM}" & + sleep 1 +done <<< "$all_monitors" + +echo "Bars launched..." diff --git a/bspwm/.local/bin/rofi_goto_workspace b/polybar/.local/bin/rofi_goto_workspace index 35e8762..35e8762 100755 --- a/bspwm/.local/bin/rofi_goto_workspace +++ b/polybar/.local/bin/rofi_goto_workspace diff --git a/bspwm/.local/bin/rofi_moveto_workspace b/polybar/.local/bin/rofi_moveto_workspace index 9cc0b9d..9cc0b9d 100755 --- a/bspwm/.local/bin/rofi_moveto_workspace +++ b/polybar/.local/bin/rofi_moveto_workspace diff --git a/bspwm/.local/bin/rofi_workspace_prompt b/polybar/.local/bin/rofi_workspace_prompt index f59d1fa..f59d1fa 100755 --- a/bspwm/.local/bin/rofi_workspace_prompt +++ b/polybar/.local/bin/rofi_workspace_prompt diff --git a/bspwm/.local/bin/spotifycl b/polybar/.local/bin/spotifycl index ffee9f0..ffee9f0 100755 --- a/bspwm/.local/bin/spotifycl +++ b/polybar/.local/bin/spotifycl diff --git a/bspwm/.local/share/config-files/polybar b/polybar/.local/share/config-files/polybar index 87fad9e..87fad9e 120000 --- a/bspwm/.local/share/config-files/polybar +++ b/polybar/.local/share/config-files/polybar diff --git a/xmonad/.config/xmonad/xmonad.hi b/xmonad/.config/xmonad/xmonad.hi Binary files differnew file mode 100644 index 0000000..2f8b94d --- /dev/null +++ b/xmonad/.config/xmonad/xmonad.hi diff --git a/xmonad/.config/xmonad/xmonad.hs b/xmonad/.config/xmonad/xmonad.hs new file mode 100644 index 0000000..5ad9ea9 --- /dev/null +++ b/xmonad/.config/xmonad/xmonad.hs @@ -0,0 +1,17 @@ +import XMonad + +main :: IO () +main = xmonad $ def { + terminal = myTerminal, + modMask = myModMask, + borderWidth = myBorderWidth + } + +myTerminal :: String +myTerminal = "alacritty" + +myModMask :: KeyMask +myModMask = mod4Mask + +myBorderWidth :: Dimension +myBorderWidth = 3 diff --git a/xmonad/.config/xmonad/xmonad.o b/xmonad/.config/xmonad/xmonad.o Binary files differnew file mode 100644 index 0000000..7692453 --- /dev/null +++ b/xmonad/.config/xmonad/xmonad.o |
