New configuration based on xfce4 + bpswm. No more tint2
This commit is contained in:
14
scripts/bsp-auto-monitors
Executable file
14
scripts/bsp-auto-monitors
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/env bash
|
||||
|
||||
monitors=($(xrandr | grep " connected " | awk '{ print$1 }'))
|
||||
monitorcount=${#monitors[*]}
|
||||
names=(I II III IV V)
|
||||
|
||||
if [ $monitorcount -eq 1 ]; then
|
||||
bspc monitor -d ${names[@]}
|
||||
else
|
||||
for((i=0; i<${monitorcount}; i++)); do
|
||||
name=${names[$i]}
|
||||
bspc monitor ${monitors[$i]} -d ${name}-0 ${name}-1
|
||||
done
|
||||
fi
|
||||
6
scripts/bsp-key-daemon
Executable file
6
scripts/bsp-key-daemon
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Make sure user bin is imported for sxhkd
|
||||
PATH="/home/dakedres/bin:$PATH"
|
||||
|
||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||
53
scripts/change-scheme
Executable file
53
scripts/change-scheme
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
# Favorites:
|
||||
# - horizon-terminal-dark
|
||||
# - heetch
|
||||
# - blueforest
|
||||
# - tarot
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
export SCHEME=$1
|
||||
fi
|
||||
|
||||
if ! shchemes install_tinted_scheme; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
shchemes inject "$HOME/.profile"
|
||||
|
||||
shchemes inject "$HOME/.config/qutebrowser/config.py"
|
||||
pkill -HUP qutebrowser
|
||||
|
||||
BSPWM_THEME="$HOME/.config/bspwm/colors"
|
||||
shchemes create_theme bspwm > "$BSPWM_THEME"
|
||||
"$BSPWM_THEME"
|
||||
|
||||
shchemes inject "$HOME/.config/kitty/kitty.conf"
|
||||
pkill -SIGUSR1 kitty
|
||||
|
||||
shchemes create_theme rofi > "$HOME/.config/rofi/theme.rasi"
|
||||
shchemes create_theme better-discord > "$HOME/.config/vesktop/themes/.theme.css"
|
||||
shchemes create_theme obsidian > "$HOME/media/vault/.obsidian/themes/base16.css"
|
||||
|
||||
"$HOME/repos/oomox-gtk-theme/change_color.sh" -o base16 <(shchemes create_theme oomox-gtk)
|
||||
|
||||
# Reload XFCE theme
|
||||
xfconf-query -c xsettings -p /Net/ThemeName -r
|
||||
xfconf-query -c xsettings -p /Net/ThemeName -s base16
|
||||
|
||||
le-wallpaper
|
||||
|
||||
# WALLPAPER_OUT="$HOME/.wallpaper.png"
|
||||
# shchemes create_theme imagemagick \
|
||||
# | convert ~/pictures/wallpapers/tradin.jpg -dither FloydSteinberg -colorspace srgb -remap txt:- "$WALLPAPER_OUT"
|
||||
# feh --bg-scale "$WALLPAPER_OUT"
|
||||
|
||||
# terminal=$(ps -o comm= -p "$(($(ps -o ppid= -p "$(($(ps -o sid= -p "$$")))")))")
|
||||
# if [[ "$terminal" == "kitty" ]]; then
|
||||
# tmp=$(mktemp)
|
||||
# shchemes create_theme imagemagick \
|
||||
# | convert txt:- -filter point -resize 2400% "$tmp"
|
||||
# kitty +kitten icat "$tmp"
|
||||
# fi
|
||||
32
scripts/f
Executable file
32
scripts/f
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
path=$1
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
path="."
|
||||
fi
|
||||
|
||||
if [ -d "$path" ]; then
|
||||
ls -lh --color=tty "$path"
|
||||
else
|
||||
if [ ! -f "$path" ]; then
|
||||
echo "No such file: $path"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
format="$(file -i "$path" | cut -d' ' -f2)"
|
||||
format="${format%%/*}"
|
||||
|
||||
case "$format" in
|
||||
"text")
|
||||
batcat "$path" --paging=never
|
||||
;;
|
||||
|
||||
"image")
|
||||
kitty +kitten icat "$path"
|
||||
;;
|
||||
|
||||
*)
|
||||
xdg-open "$path"
|
||||
esac
|
||||
fi
|
||||
2
scripts/le-keyboard
Executable file
2
scripts/le-keyboard
Executable file
@@ -0,0 +1,2 @@
|
||||
setxkbmap -option altwin:swap_alt_win
|
||||
setxkbmap -option caps:swapescape
|
||||
58
scripts/le-wallpaper
Executable file
58
scripts/le-wallpaper
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/env bash
|
||||
|
||||
if [ -f "$HOME/.profile" ]; then
|
||||
source "$HOME/.profile"
|
||||
fi
|
||||
|
||||
# Note: In the future, when multi-monitor support is added, the monitor offset could be retrieved from xrandr
|
||||
# here and fed into feh using --geometry
|
||||
monitor=($(xrandr | grep " connected" | head -n 1 | awk '{ split($4, a, /[+x]/); print $1 " " a[1] " " a[2]; }'))
|
||||
monitor_name="${monitor[0]}"
|
||||
monitor_width="${monitor[1]}"
|
||||
monitor_height="${monitor[2]}"
|
||||
prop="/backdrop/screen0/monitor${monitor_name}/workspace0/last-image"
|
||||
|
||||
path="$1"
|
||||
wallpaper_dir="$HOME/.local/share/le_wallpaper"
|
||||
wallpaper_path="${wallpaper_dir}/wallpaper.png"
|
||||
wallpaper_store="${wallpaper_dir}/source_path"
|
||||
|
||||
mkdir -p "$wallpaper_dir"
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
path="$(xfconf-query -c xfce4-desktop -p "$prop")"
|
||||
|
||||
if [[ ! "$path" = /* ]]; then
|
||||
path="${HOME}/${path}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$path" == "$wallpaper_path" ]; then
|
||||
path=$(cat "$wallpaper_store")
|
||||
fi
|
||||
|
||||
# path="$(readlink -f "$path")"
|
||||
|
||||
if [ ! -f "$path" ]; then
|
||||
echo "No wallpaper source"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
filename=$(basename -- "$path")
|
||||
ext="${filename##*.}"
|
||||
|
||||
# The following always assumes the monitor is landscape
|
||||
if [ "$ext" == "svg" ] && command -v inkscape; then
|
||||
tmp="$(mktemp).png"
|
||||
inkscape -h "$monitor_height" "$path" -o "$tmp"
|
||||
path="$tmp"
|
||||
fi
|
||||
|
||||
export SCHEME
|
||||
shchemes create_theme imagemagick \
|
||||
| convert "$path" -colorspace srgb -dither FloydSteinberg -geometry "${monitor_width}x" -remap txt:- "$wallpaper_path"
|
||||
|
||||
echo "Setting wallpaper: $path"
|
||||
xfconf-query -c xfce4-desktop -p "$prop" -s "$wallpaper_path"
|
||||
echo "$path" > "$wallpaper_store"
|
||||
feh --bg-center "$wallpaper_path"
|
||||
15
scripts/qutebrowser
Executable file
15
scripts/qutebrowser
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# initial idea: Florian Bruhin (The-Compiler)
|
||||
# author: Thore Bödecker (foxxx0)
|
||||
|
||||
_url="$1"
|
||||
_qb_version='1.0.4'
|
||||
_proto_version=1
|
||||
_ipc_socket="${XDG_RUNTIME_DIR}/qutebrowser/ipc-$(echo -n "$USER" | md5sum | cut -d' ' -f1)"
|
||||
_qute_bin="/home/dakedres/repos/qutebrowser/.venv/bin/qutebrowser"
|
||||
|
||||
printf '{"args": ["%s"], "target_arg": null, "version": "%s", "protocol_version": %d, "cwd": "%s"}\n' \
|
||||
"${_url}" \
|
||||
"${_qb_version}" \
|
||||
"${_proto_version}" \
|
||||
"${PWD}" | socat -lf /dev/null - UNIX-CONNECT:"${_ipc_socket}" || "$_qute_bin" "$@" &
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
db=$HOME/.local/share/qutebrowser/history.sqlite
|
||||
url=$(sqlite3 "$db" "select title,url from History" | tac | awk '!a[$0]++' | rofi -dmenu | awk -F '|' '{print $NF}')
|
||||
url=$(sqlite3 "$db" "select title,url from History" | tac | rofi -dmenu | awk -F '|' '{print $NF}')
|
||||
[ -z "$url" ] && exit
|
||||
qutebrowser --target window "$url"
|
||||
qutebrowser "$url"
|
||||
|
||||
2
scripts/rack
Executable file
2
scripts/rack
Executable file
@@ -0,0 +1,2 @@
|
||||
cd $HOME/apps/Rack2Free
|
||||
./Rack
|
||||
16
scripts/xfce4-le-wallpaper
Executable file
16
scripts/xfce4-le-wallpaper
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/env bash
|
||||
|
||||
monitors=($(xrandr | grep " connected " | awk '{ print$1 }'))
|
||||
monitor="${monitors[0]}"
|
||||
prop="/backdrop/screen0/monitor${monitor}/workspace0/last-image"
|
||||
wallpaper_dir="$HOME/.local/share/le_wallpaper"
|
||||
wallpaper_path="${wallpaper_dir}/wallpaper.png"
|
||||
|
||||
feh --bg-scale "$wallpaper_path"
|
||||
|
||||
xfconf-query -c xfce4-desktop -p "$prop" -m | while read -r line; do
|
||||
if echo "$line" | grep -e "^set:"; then
|
||||
echo "Wallpaper updated, reacting"
|
||||
le-wallpaper
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user