New directory structure + basilisk
This commit is contained in:
52
home/.local/bin/bsp-auto-monitors
Executable file
52
home/.local/bin/bsp-auto-monitors
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/env bash
|
||||
|
||||
path="$HOME/.config/bspwm/bspwmrc"
|
||||
tmp=$(mktemp)
|
||||
primary=$(xrandr | grep " connected" | rofi -dmenu -a | awk '{ print $1 }')
|
||||
secondary=$(xrandr | grep " connected" | grep -v "^$primary" | awk '{ print $1 }')
|
||||
use_secondary=$(printf 'Yes\nNo\n' | rofi -dmenu -e "Use secondary displays?" -format i)
|
||||
|
||||
p() {
|
||||
if [ -n "$secondary" ] && [ "$use_secondary" == 0 ]; then
|
||||
printf 'bspc monitor %s -d I II III IV\n' "$primary"
|
||||
printf 'bspc monitor %s -d %s\n' "$secondary" "$secondary"
|
||||
else
|
||||
printf 'bspc monitor %s -d I II III IV V\n' "$primary"
|
||||
bspc monitor "$secondary" -r
|
||||
fi
|
||||
}
|
||||
|
||||
p | awk -v blockstart="# START MONITOR BLOCK" \
|
||||
-v blockend="# END MONITOR BLOCK" \
|
||||
-v sq="'" \
|
||||
-v nl="\n" '
|
||||
FILENAME == "-" {
|
||||
block=block $0 nl
|
||||
next
|
||||
}
|
||||
!inblock { print }
|
||||
inblock {
|
||||
lines[++bi] = $0
|
||||
}
|
||||
$0 ~ blockstart {
|
||||
inblock = 1;
|
||||
bi = 0;
|
||||
printf block
|
||||
next
|
||||
}
|
||||
$0 == blockend && inblock {
|
||||
inblock = 0;
|
||||
print blockend;
|
||||
next;
|
||||
}
|
||||
ENDFILE {
|
||||
if(inblock) {
|
||||
print nl blockend;
|
||||
for(i=1;i<=bi;i++) {
|
||||
print lines[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
' - "$path" > "$tmp" && mv "$tmp" "$path"
|
||||
chmod +x "$path"
|
||||
"$path"
|
||||
3
home/.local/bin/bsp-float
Executable file
3
home/.local/bin/bsp-float
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
# Open a command in float mode
|
||||
bspc rule -a \* -o state=floating && $@
|
||||
14
home/.local/bin/bsp-floating-only
Executable file
14
home/.local/bin/bsp-floating-only
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -z $1 ]; then
|
||||
# FLOATING_DESKTOP_ID=$(bspc query -D -d '^3')
|
||||
FLOATING_DESKTOP_ID=$1
|
||||
|
||||
bspc subscribe node_add | while read -a msg ; do
|
||||
desk_id=${msg[2]}
|
||||
wid=${msg[4]}
|
||||
[ "$FLOATING_DESKTOP_ID" = "$desk_id" ] && bspc node "$wid" -t floating
|
||||
done
|
||||
else
|
||||
echo "No desktop provided"
|
||||
fi
|
||||
6
home/.local/bin/bsp-key-daemon
Executable file
6
home/.local/bin/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 &
|
||||
60
home/.local/bin/bsp-smove
Executable file
60
home/.local/bin/bsp-smove
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
# A more fluid way of moving windows with BSPWM, which is meant to be
|
||||
# implemented in SXHKD. If there is a window in the given direction,
|
||||
# swap places with it. Else if there is a receptacle move to it
|
||||
# ("consume" its place). Otherwise create a receptacle in the given
|
||||
# direction by splitting the entire viewport (circumvents the tiling
|
||||
# scheme while respecting the current split ratio configuration). In
|
||||
# the latter scenario, inputting the direction twice will thus move the
|
||||
# focused window out of its current layout and into the receptacle.
|
||||
#
|
||||
# Part of my dotfiles: https://gitlab.com/protesilaos/dotfiles
|
||||
#
|
||||
# Copyright (c) 2019 Protesilaos Stavrou <info@protesilaos.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
[ "$#" -eq 1 ] || { echo "Pass only one argument: north,east,south,west"; exit 1; }
|
||||
|
||||
# Check if argument is a valid direction.
|
||||
case "$1" in
|
||||
north|east|south|west)
|
||||
dir="$1"
|
||||
;;
|
||||
*)
|
||||
echo "Not a valid argument."
|
||||
echo "Use one of: north,east,south,west"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
_query_nodes() {
|
||||
bspc query -N -n "$@"
|
||||
}
|
||||
|
||||
# Do not operate on floating windows!
|
||||
[ -z "$(_query_nodes focused.floating)" ] || { echo "Only move tiled windows."; exit 1; }
|
||||
|
||||
receptacle="$(_query_nodes 'any.leaf.!window')"
|
||||
|
||||
# This regulates the behaviour documented in the description.
|
||||
if [ -n "$(_query_nodes "${dir}.!floating")" ]; then
|
||||
bspc node -s "$dir"
|
||||
elif [ -n "$receptacle" ]; then
|
||||
bspc node focused -n "$receptacle" --follow
|
||||
else
|
||||
bspc node @/ -p "$dir" -i && bspc node -n "$receptacle" --follow
|
||||
fi
|
||||
17
home/.local/bin/bsp-status
Executable file
17
home/.local/bin/bsp-status
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -A layout_symbols
|
||||
|
||||
layout_symbols[monocle]="mono"
|
||||
layout_symbols[tiled]="tiled"
|
||||
|
||||
send_symbol() {
|
||||
echo ${layout_symbols[$1]}
|
||||
}
|
||||
|
||||
# Optional, sends first output. This requires jq
|
||||
send_symbol $(bspc query -T --desktop focused | jq -r '.layout')
|
||||
|
||||
bspc subscribe desktop_layout | while read -a msg ; do
|
||||
send_symbol ${msg[3]}
|
||||
done
|
||||
37
home/.local/bin/bsp-toggle-visibility
Executable file
37
home/.local/bin/bsp-toggle-visibility
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
cat <<EOF
|
||||
Usage: $(basename "${0}") process_name [executable_name] [--take-first]
|
||||
process_name As recognized by 'xdo' command
|
||||
executable_name As used for launching from terminal
|
||||
--take-first In case 'xdo' returns multiple process IDs
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Get id of process by class name and then fallback to instance name
|
||||
id=$(xdo id -N "${1}" || xdo id -n "${1}")
|
||||
|
||||
executable=${1}
|
||||
shift
|
||||
|
||||
while [ -n "${1}" ]; do
|
||||
case ${1} in
|
||||
--take-first)
|
||||
id=$(head -1 <<<"${id}" | cut -f1 -d' ')
|
||||
;;
|
||||
*)
|
||||
executable=${1}
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "${id}" ]; then
|
||||
${executable}
|
||||
else
|
||||
while read -r instance; do
|
||||
bspc node "${instance}" --flag hidden --to-monitor focused --focus
|
||||
done <<<"${id}"
|
||||
fi
|
||||
55
home/.local/bin/change-scheme
Executable file
55
home/.local/bin/change-scheme
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
# Favorites:
|
||||
# - horizon-terminal-dark
|
||||
# - heetch
|
||||
# - blueforest
|
||||
# - tarot
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
export SCHEME=$1
|
||||
fi
|
||||
|
||||
if [ ! -r "$(shchemes path)" ]; then
|
||||
if ! shchemes install_tinted_scheme; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# shchemes inject "$HOME/.profile"
|
||||
|
||||
shchemes inject "$HOME/.config/qutebrowser/config.py"
|
||||
shchemes create_theme css > "$HOME/.config/base16.css"
|
||||
shchemes create_theme css > "$HOME/.config/qutebrowser/base16.css"
|
||||
pkill -HUP qutebrowser
|
||||
|
||||
shchemes create_theme xfce4-terminal | sh
|
||||
|
||||
shchemes create_theme i3 > "$HOME/.config/i3/theme"
|
||||
i3-msg reload
|
||||
|
||||
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
|
||||
|
||||
xrandr | awk '$2 == "connected" { system("le-wallpaper " $1) }'
|
||||
|
||||
# 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
|
||||
5
home/.local/bin/ezmount
Executable file
5
home/.local/bin/ezmount
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo mkdir /media/$USER/$1
|
||||
sudo mount /dev/$1 /media/$USER/$1
|
||||
sudo chown $(id -u $USER) /media/$USER/$1
|
||||
29
home/.local/bin/f
Executable file
29
home/.local/bin/f
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
path=$1
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
path="."
|
||||
fi
|
||||
|
||||
if [ -d "$path" ]; then
|
||||
ls -lha --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
|
||||
"image")
|
||||
kitty +kitten icat "$path"
|
||||
;;
|
||||
|
||||
*)
|
||||
cat "$path"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
162
home/.local/bin/le-audio
Executable file
162
home/.local/bin/le-audio
Executable file
@@ -0,0 +1,162 @@
|
||||
#!/bin/sh
|
||||
|
||||
get_cards() {
|
||||
pacmd list-cards | awk -F '[\t ]+' '
|
||||
function printcard() {
|
||||
print cardindex " " cardname " " carddesc
|
||||
}
|
||||
|
||||
$2 ~ "index:" {
|
||||
if(incard) {
|
||||
printcard()
|
||||
}
|
||||
incard=1
|
||||
cardindex=$3
|
||||
}
|
||||
incard && $2 ~ "name:" {
|
||||
cardname=substr($3, 2, length($3) - 2)
|
||||
}
|
||||
incard && $2 ~ "device.description" {
|
||||
carddesc=substr($0, index($0, "= ") + 2)
|
||||
}
|
||||
END {
|
||||
printcard()
|
||||
}
|
||||
'
|
||||
}
|
||||
|
||||
# First line will always be the active profile
|
||||
get_selected_card_profiles() {
|
||||
pacmd list-cards | awk -F '[\t ]+' \
|
||||
-v selected_card_index="$selected_card_index" '
|
||||
BEGIN {
|
||||
profile_count=0
|
||||
}
|
||||
function print_card() {
|
||||
if(do_print) {
|
||||
print profile_names[i] " " profile_descs[i]
|
||||
}
|
||||
}
|
||||
|
||||
$2 ~ "index:" && $3 == selected_card_index {
|
||||
incard=1
|
||||
}
|
||||
incard && $2 ~ "profiles:" {
|
||||
inprofiles=1
|
||||
next
|
||||
}
|
||||
inprofiles && $2 ~ "active" {
|
||||
for(i = 0; i < profile_count; i++) {
|
||||
if(profile_names[i] == substr($4, 2, length($4) - 2)) {
|
||||
current_card_index=i
|
||||
do_print=1
|
||||
}
|
||||
print_card()
|
||||
}
|
||||
for(i = 0; i < current_card_index; i++) {
|
||||
print_card()
|
||||
}
|
||||
exit
|
||||
}
|
||||
inprofiles {
|
||||
profile_names[profile_count] = substr($2, 0, length($2) - 1)
|
||||
profile_descs[profile_count] = substr($0, index($0, ": ") + 2)
|
||||
profile_count++
|
||||
}
|
||||
'
|
||||
}
|
||||
|
||||
select_default_sink_card() {
|
||||
selected_card=$(pacmd list-sinks | awk -F '[\t ]+' '
|
||||
$2 == "*" && $3 ~ "index:" {
|
||||
incard=1
|
||||
}
|
||||
incard && $2 == "card:" {
|
||||
print $3 " " substr($4, 2, length($4) - 2)
|
||||
exit
|
||||
}
|
||||
')
|
||||
}
|
||||
|
||||
select_card_manually() {
|
||||
card_options=$(get_cards)
|
||||
selected_option_index=$(printf %s\\n "$card_options" | rofi -dmenu -format 'i')
|
||||
selected_option_index=$((selected_option_index+1))
|
||||
selected_card=$(printf %s\\n "$card_options" | sed -n "${selected_option_index}p")
|
||||
}
|
||||
|
||||
print_usage() {
|
||||
printf '
|
||||
Usage: le-audio [OPTIONS]
|
||||
Manage audio profiles
|
||||
|
||||
Options
|
||||
-a Auto - Auto-select the card for the default sink
|
||||
-f Filter - Filter out "off" profiles
|
||||
-c Cycle - Auto-select the next audio profile after the current one
|
||||
|
||||
Utility written by Dakedres (dakedres.sys42.net)
|
||||
'
|
||||
}
|
||||
|
||||
while getopts 'afc' args; do
|
||||
case "$args" in
|
||||
a)
|
||||
arg_auto_select_card=true
|
||||
;;
|
||||
|
||||
f)
|
||||
arg_filter_off_profile=true
|
||||
;;
|
||||
|
||||
c)
|
||||
arg_select_next_profile=true
|
||||
;;
|
||||
|
||||
?)
|
||||
print_usage
|
||||
exit
|
||||
;;
|
||||
|
||||
*)
|
||||
>&2 echo "Invalid option '${args}'"
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$arg_auto_select_card" = true ]; then
|
||||
select_default_sink_card
|
||||
else
|
||||
select_card_manually
|
||||
fi
|
||||
|
||||
selected_card_index=$(printf %s\\n "$selected_card" | awk '{ print $1 }')
|
||||
echo "$selected_card"
|
||||
|
||||
if [ "$arg_filter_off_profile" = true ]; then
|
||||
selected_card_profiles=$(get_selected_card_profiles | grep -v '^off')
|
||||
else
|
||||
selected_card_profiles=$(get_selected_card_profiles)
|
||||
fi
|
||||
|
||||
if [ "$arg_select_next_profile" = true ]; then
|
||||
selected_profile_index=1
|
||||
else
|
||||
selected_profile_index=$(printf %s\\n "$selected_card_profiles" | rofi -dmenu -format "i")
|
||||
fi
|
||||
|
||||
if [ -z "$selected_profile_index" ]; then
|
||||
>&2 echo "No profile selected"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf %s\\n "$selected_card_profiles" | awk \
|
||||
-v selected_profile_index="$selected_profile_index" \
|
||||
-v selected_card="$selected_card" \
|
||||
-v qt="'" '
|
||||
NR-1 == selected_profile_index {
|
||||
split(selected_card, split_card, " ")
|
||||
printf "pactl set-card-profile" " " split_card[1] " " $1
|
||||
$1=""
|
||||
print " && notify-send " qt "Set audio profile to" $0 qt
|
||||
}
|
||||
' | sh
|
||||
2
home/.local/bin/le-keyboard
Executable file
2
home/.local/bin/le-keyboard
Executable file
@@ -0,0 +1,2 @@
|
||||
# setxkbmap -option altwin:swap_alt_win
|
||||
setxkbmap -option caps:swapescape
|
||||
63
home/.local/bin/le-wallpaper
Executable file
63
home/.local/bin/le-wallpaper
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/env bash
|
||||
|
||||
if [ -f "$HOME/.profile" ]; then
|
||||
source "$HOME/.profile"
|
||||
fi
|
||||
|
||||
monitor=($(xrandr | awk -v name="$1" '$1 == name && $2 == "connected" {
|
||||
for(i=1;i<=NF;i++) {
|
||||
if($i ~ /[0-9]+x[0-9]+\+[0-9]+\+[0-9]+/) {
|
||||
split($i, a, /[+x]/); print $1 " " a[1] " " a[2]; exit
|
||||
}
|
||||
}
|
||||
}'))
|
||||
monitor_name="${monitor[0]}"
|
||||
monitor_width="${monitor[1]}"
|
||||
monitor_height="${monitor[2]}"
|
||||
prop="/backdrop/screen0/monitor${monitor_name}/workspace0/last-image"
|
||||
|
||||
path="$2"
|
||||
wallpaper_dir="$HOME/.local/share/le_wallpaper"
|
||||
wallpaper_path="${wallpaper_dir}/.${monitor_name}.png"
|
||||
wallpaper_store="${wallpaper_dir}/${monitor_name}_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"
|
||||
|
||||
le-wallpaper-open
|
||||
32
home/.local/bin/le-wallpaper-open
Executable file
32
home/.local/bin/le-wallpaper-open
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
xrandr | awk '
|
||||
function addWallpaper(i) {
|
||||
split($3, a, "+");
|
||||
b[bi] = a[2];
|
||||
c[bi] = $1;
|
||||
bi++
|
||||
}
|
||||
|
||||
$2 == "connected" {
|
||||
for(i=1;i<=NF;i++) {
|
||||
if($i ~ /[0-9]+x[0-9]+\+[0-9]+\+[0-9]+/) {
|
||||
addWallpaper(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
PROCINFO["sorted_in"] = "@val_num_asc";
|
||||
d = "feh --bg-center";
|
||||
for(i in b) {
|
||||
p="$HOME/.local/share/le_wallpaper/." c[i] ".png";
|
||||
if(system("test -f " p)) {
|
||||
p = lp;
|
||||
}
|
||||
lp = p;
|
||||
d=d " " p;
|
||||
}
|
||||
system(d);
|
||||
}
|
||||
'
|
||||
6
home/.local/bin/mdread
Executable file
6
home/.local/bin/mdread
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
o="$(mktemp).html"
|
||||
t="$(basename $1)"
|
||||
pandoc "$1" -o "$o" --metadata="title:$t"
|
||||
xdg-open "$o"
|
||||
1830
home/.local/bin/pfetch
Executable file
1830
home/.local/bin/pfetch
Executable file
File diff suppressed because it is too large
Load Diff
7
home/.local/bin/qutesearch
Executable file
7
home/.local/bin/qutesearch
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/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}')
|
||||
|
||||
[ -z "$url" ] && exit
|
||||
qutebrowser "$url"
|
||||
2
home/.local/bin/rack
Executable file
2
home/.local/bin/rack
Executable file
@@ -0,0 +1,2 @@
|
||||
cd $HOME/apps/Rack2Free
|
||||
./Rack
|
||||
9
home/.local/bin/rofi-ask
Executable file
9
home/.local/bin/rofi-ask
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Take password prompt from STDIN, print password to STDOUT
|
||||
# the sed piece just removes the colon from the provided
|
||||
# prompt: rofi -p already gives us a colon
|
||||
rofi -dmenu \
|
||||
-password \
|
||||
-no-fixed-num-lines \
|
||||
-p "$(printf "$1" | sed s/://)"
|
||||
5
home/.local/bin/sxhkd-help
Executable file
5
home/.local/bin/sxhkd-help
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
awk '/^[a-z]/ && last {print "<small>",$0,"\t",last,"</small>"} {last=""} /^#/{last=$0}' ~/.config/sxhkd/sxhkdrc{,.common} |
|
||||
column -t -s $'\t' |
|
||||
rofi -dmenu -i -markup-rows -no-show-icons -width 1000 -lines 15
|
||||
9
home/.local/bin/tabc-smart-detach
Executable file
9
home/.local/bin/tabc-smart-detach
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
id=$(bspc query -N -n);
|
||||
if [ "$(tabc printclass $id)" == "tabbed" ]; then
|
||||
bspc node -p $1;
|
||||
tabc detach $id;
|
||||
else \
|
||||
tabc attach $id $(bspc query -N -n $1);
|
||||
fi
|
||||
2
home/.local/bin/web
Executable file
2
home/.local/bin/web
Executable file
@@ -0,0 +1,2 @@
|
||||
echo "$1"
|
||||
chromium --new-window --app="$1"
|
||||
10
home/.local/bin/xfce4-le-wallpaper
Executable file
10
home/.local/bin/xfce4-le-wallpaper
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/env bash
|
||||
|
||||
# xrandr | awk '$2 == "connected" && $3 ~ /[0-9]+x[0-9]+\+[0-9]+\+[0-9]+/ { split($3, a, "+"); b[bi] = a[2]; c[bi] = $1; bi++ } END { PROCINFO["sorted_in"] = "@val_num_asc"; d = "feh --bg-center"; for(i in b) { d=d " $HOME/.local/share/le_wallpaper/" c[i] ".png" }; system(d) }'
|
||||
|
||||
le-wallpaper-open
|
||||
|
||||
xfconf-query -c xfce4-desktop -m | awk -F '/' '
|
||||
$2 == "backdrop" && $3 == "screen0" && $4 ~ /^monitor/ {
|
||||
system("le-wallpaper " substr($4, 8))
|
||||
}'
|
||||
Reference in New Issue
Block a user