move all existing stuff to old/
This commit is contained in:
parent
c215878777
commit
35f5e8472b
49 changed files with 0 additions and 0 deletions
1
old/_bin/desktop-env
Executable file
1
old/_bin/desktop-env
Executable file
|
@ -0,0 +1 @@
|
|||
#!/bin/sh
|
5
old/_bin/i3-clean-workspace
Executable file
5
old/_bin/i3-clean-workspace
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
WORKSPACES=$(i3-msg -t get_workspaces)
|
||||
# echo $WORKSPACES | jq
|
||||
|
||||
echo $WORKSPACES
|
35
old/_bin/i3exit
Executable file
35
old/_bin/i3exit
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
lock() {
|
||||
if [ -e "$(which i3lock)" ]; then
|
||||
i3lock
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
lock)
|
||||
~/bin/lockscreen
|
||||
;;
|
||||
logout)
|
||||
i3-msg exit
|
||||
;;
|
||||
suspend)
|
||||
lock && systemctl suspend
|
||||
;;
|
||||
hibernate)
|
||||
lock && systemctl hibernate
|
||||
;;
|
||||
blank)
|
||||
sleep 1; xset dpms force off
|
||||
;;
|
||||
reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {lock|logout|suspend|hibernate|blank|reboot|shutdown}"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit 0
|
15
old/_bin/import-gsettings
Executable file
15
old/_bin/import-gsettings
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# usage: import-gsettings
|
||||
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
|
||||
if [ ! -f "$config" ]; then exit 1; fi
|
||||
|
||||
gnome_schema="org.gnome.desktop.interface"
|
||||
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
|
||||
gsettings set "$gnome_schema" icon-theme "$icon_theme"
|
||||
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
|
||||
gsettings set "$gnome_schema" font-name "$font_name"
|
54
old/_bin/launcher
Executable file
54
old/_bin/launcher
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
|
||||
function prepend_alpha() {
|
||||
_rgb=$1
|
||||
_alpha=$2
|
||||
echo ${_rgb//\#/\#${_alpha}}
|
||||
}
|
||||
|
||||
function color() {
|
||||
_index=$1
|
||||
_alpha=${2:-}
|
||||
_color=${colors[$_index]}
|
||||
if [ "$_alpha" != "" ]; then
|
||||
echo $(prepend_alpha $_color $_alpha)
|
||||
else
|
||||
echo $_color
|
||||
fi
|
||||
}
|
||||
|
||||
# read colors from wal into array 'colors'
|
||||
if [ -f ~/.cache/wal/colors ]; then
|
||||
IFS=$'\n' read -d '' -r -a colors < ~/.cache/wal/colors
|
||||
fi
|
||||
|
||||
_bg=$(color 0 "aa")
|
||||
_bg2=$(color 0 "55")
|
||||
_fg=${colors[5]}
|
||||
_fg2=${colors[8]}
|
||||
_clear="#00000000"
|
||||
|
||||
|
||||
if command -v rofi &> /dev/null; then
|
||||
rofi -show drun -modi drun \
|
||||
-color-window "$_bg, $_bg, $_fg" \
|
||||
-color-normal "$_clear, $_fg, $_bg2, $_fg, $_bg" \
|
||||
-color-active "$_clear, $_fg, $_clear, $_fg, $_clear" \
|
||||
-opacity 10 \
|
||||
-width 80 \
|
||||
-padding 20 \
|
||||
-bw 2 \
|
||||
-separator-style none \
|
||||
-line-padding 3 \
|
||||
-icon-theme "Paper" \
|
||||
-location 0 \
|
||||
-hide-scrollbar \
|
||||
-show-icons true \
|
||||
-font "Abel 11" \
|
||||
-display-run ">" \
|
||||
-theme-str "#prompt-colon { enabled: false; }"
|
||||
elif command -v wofi &> /dev/null; then
|
||||
COMMAND=wofi
|
||||
$COMMAND --show drun --color=$HOME/.cache/wal/colors
|
||||
fi
|
||||
|
24
old/_bin/screengrab
Executable file
24
old/_bin/screengrab
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
with_maim() {
|
||||
mkdir -p ${HOME}/screenshot
|
||||
TARGET="${HOME}/screenshot/grab-$(date +'%Y%m%d%H%M%S').png"
|
||||
maim -s -n -o -p 1 -f png -m 10 -u | tee $TARGET | xclip -selection clipboard -t image/png
|
||||
[ -s ${TARGET} ] || rm ${TARGET}
|
||||
}
|
||||
|
||||
with_grim() {
|
||||
# requires: grim, wl-clipboard, and slurp.
|
||||
mkdir -p ${HOME}/screenshot
|
||||
TARGET="${HOME}/screenshot/grab-$(date +'%Y%m%d%H%M%S').png"
|
||||
grim -g "$(slurp)" $TARGET
|
||||
if [ -s $TARGET ]; then
|
||||
wl-copy < $TARGET
|
||||
fi
|
||||
}
|
||||
|
||||
case "${XDG_SESSION_TYPE}" in
|
||||
wayland) with_grim;;
|
||||
*) with_maim;;
|
||||
esac
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue