Adding PC config stuff
This commit is contained in:
+12
@@ -4,3 +4,15 @@
|
|||||||
!.gitignore
|
!.gitignore
|
||||||
!README.md
|
!README.md
|
||||||
|
|
||||||
|
!bin/
|
||||||
|
bin/*
|
||||||
|
!bin/dmenuunicode
|
||||||
|
!bin/du_color
|
||||||
|
!bin/dwmbar_loop
|
||||||
|
!bin/dwmbar_refresh
|
||||||
|
!bin/fzf-nvim.sh
|
||||||
|
!bin/wallpaper.sh
|
||||||
|
|
||||||
|
!share/
|
||||||
|
share/*
|
||||||
|
!share/emoji
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# The famous "get a menu of emojis to copy" script.
|
||||||
|
|
||||||
|
# Get user selection via dmenu from emoji file.
|
||||||
|
chosen=$(cut -d ';' -f1 ~/.local/share/emoji | dmenu -i -l 30 | sed "s/ .*//")
|
||||||
|
|
||||||
|
# Exit if none chosen.
|
||||||
|
[ -z "$chosen" ] && exit
|
||||||
|
|
||||||
|
# If you run this command with an argument, it will automatically insert the
|
||||||
|
# character. Otherwise, show a message that the emoji has been copied.
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
xdotool type "$chosen"
|
||||||
|
else
|
||||||
|
printf "$chosen" | xclip -selection clipboard
|
||||||
|
notify-send "'$chosen' copied to clipboard." &
|
||||||
|
fi
|
||||||
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
du -hsc $(ls -A) | sort -h | while read size name; do
|
||||||
|
case $size in
|
||||||
|
*[kK]) size_color=32;; # green
|
||||||
|
*[mM]) size_color=33;; # yellow
|
||||||
|
*[gG]) size_color=31;; # red
|
||||||
|
*[0-9]) size_color=34;; # blue
|
||||||
|
*) size_color=0;; # reset color
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ -f ${name} ] && file_color=0 || file_color=34
|
||||||
|
|
||||||
|
echo -e "\e[${size_color}m${size}\e[0m\t\e[${file_color}m${name}\e[0m"
|
||||||
|
done
|
||||||
|
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
dwmbar_refresh
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
|
||||||
Executable
+48
@@ -0,0 +1,48 @@
|
|||||||
|
get_volume() { \
|
||||||
|
#echo "🔊"
|
||||||
|
pactl get-sink-volume 0 | awk '{print $5}'
|
||||||
|
}
|
||||||
|
|
||||||
|
get_thermals() { \
|
||||||
|
#echo ""
|
||||||
|
acpi -t | awk '{print $4}'
|
||||||
|
echo "糖"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_battery() { \
|
||||||
|
echo "🔋"
|
||||||
|
acpi | awk '{print $4}'
|
||||||
|
}
|
||||||
|
|
||||||
|
get_brightness() { \
|
||||||
|
#echo "盛"
|
||||||
|
xrandr --verbose | awk '/Brightness/ {print $2 * 100; exit}'
|
||||||
|
}
|
||||||
|
|
||||||
|
get_mem() { \
|
||||||
|
#echo "🧠"
|
||||||
|
free | grep Mem | awk '{ printf("%.4f%\n", $3/$2 * 100.0) }'
|
||||||
|
}
|
||||||
|
|
||||||
|
get_time() { \
|
||||||
|
#echo "⏰"
|
||||||
|
date | awk '{print $4}'
|
||||||
|
}
|
||||||
|
|
||||||
|
get_date() { \
|
||||||
|
#echo "📅"
|
||||||
|
date | awk '{printf("%s %s %s\n", $1, $2, $3)}'
|
||||||
|
}
|
||||||
|
|
||||||
|
status() { \
|
||||||
|
#get_thermals
|
||||||
|
get_mem
|
||||||
|
#get_brightness
|
||||||
|
#get_volume
|
||||||
|
#get_battery
|
||||||
|
get_date
|
||||||
|
get_time
|
||||||
|
}
|
||||||
|
|
||||||
|
xsetroot -name " $(status | tr '\n' ' ')"
|
||||||
|
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
selected=$(fzf)
|
||||||
|
|
||||||
|
[ -n "$selected" ] && nvim "$selected"
|
||||||
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Related:
|
||||||
|
# https://gist.github.com/xvzftube/6efabb66c8525eb6e237759ed4972e9c
|
||||||
|
|
||||||
|
WALLPAPER_DIR=~/pictures/wallpapers/
|
||||||
|
|
||||||
|
# Let user pick out wallpaper
|
||||||
|
WALLPAPER=$(sxiv -ftqro "$WALLPAPER_DIR")
|
||||||
|
|
||||||
|
[ -n "$WALLPAPER" ] && {
|
||||||
|
feh --no-feh --bg-fill "$WALLPAPER"
|
||||||
|
} || {
|
||||||
|
echo "No wallpaper selected. Wallpaper unchanged."
|
||||||
|
}
|
||||||
|
|
||||||
+1630
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user