Fuxx
This commit is contained in:
parent
8268fba83d
commit
7ed2a6e110
9565 changed files with 1315332 additions and 90 deletions
2
home/.local/bin/scripts/bluelight
Executable file
2
home/.local/bin/scripts/bluelight
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
killall redshift
|
20
home/.local/bin/scripts/chwall
Executable file
20
home/.local/bin/scripts/chwall
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Wallpaper Directory :
|
||||
walldir="/mnt/Data/Pictures/Wallpaper/"
|
||||
|
||||
# Choose Wallpaper Dirs :
|
||||
chosen="$(echo -e "$(ls $walldir | rofi -dmenu -i -selected-row 1 -p "Choose a Dir :" )")"
|
||||
|
||||
# Choose Wallpaper :
|
||||
chosenwall="$(echo -e "$(ls $walldir$chosen/ | rofi -dmenu -i -selected-row 1 -p "Choose a Wallpaper :" )")"
|
||||
|
||||
# Set Wallpaper :
|
||||
wallset=$(feh --bg-fill "$walldir$chosen/$chosenwall")
|
||||
#echo "feh --bg-fill $walldir$chosen/$chosenwall &" >> ~/.xprofile
|
||||
|
||||
# xprofile :
|
||||
sed -i "/\# Wallpaper :/a feh --bg-fill $walldir$chosen/$chosenwall &" ~/.xprofile
|
||||
|
||||
# xinitrc :
|
||||
sed -i "/\# Wallpaper :/a feh --bg-fill $walldir$chosen/$chosenwall &" ~/.xinitrc
|
17
home/.local/bin/scripts/color
Executable file
17
home/.local/bin/scripts/color
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
## Simple Script To Pick Color Quickly.
|
||||
|
||||
color=$(gpick -pso --no-newline)
|
||||
|
||||
main() {
|
||||
if [[ "$color" ]]; then
|
||||
# copy color code to clipboard
|
||||
echo "$color" | tr -d "\n" | xclip -selection clipboard
|
||||
# notify about it
|
||||
dunstify -u low --replace=69 -i /usr/share/icons/Papirus-Dark/symbolic/status/notification-symbolic.svg "$color, copied to clipboard."
|
||||
fi
|
||||
}
|
||||
|
||||
# Run the script
|
||||
main
|
18
home/.local/bin/scripts/demoji
Executable file
18
home/.local/bin/scripts/demoji
Executable file
|
@ -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 20 | 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
|
72
home/.local/bin/scripts/dmenumount
Executable file
72
home/.local/bin/scripts/dmenumount
Executable file
|
@ -0,0 +1,72 @@
|
|||
#!/bin/sh
|
||||
#===============================================================================
|
||||
# FILE: dmenumount
|
||||
#
|
||||
# ORIGINAL AUTHOR: Luke Smith
|
||||
# AUTHOR: Gavin Jaeger-Freeborn gavinfreeborn@gmail.com
|
||||
#===============================================================================
|
||||
|
||||
# Gives a dmenu prompt to mount unmounted drives and Android phones. If
|
||||
# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll
|
||||
# be prompted to give a mountpoint from already existsing directories. If you
|
||||
# input a novel directory, it will prompt you to create that directory.
|
||||
|
||||
getmount() { \
|
||||
[ -z "$chosen" ] && exit 1
|
||||
# shellcheck disable=SC2086
|
||||
mp="$(find $1 2>/dev/null | dmenu -i -l 10 -p "Type in mount point.")" || exit 1
|
||||
[ "$mp" = "" ] && exit 1
|
||||
if [ ! -d "$mp" ]; then
|
||||
mkdiryn=$(printf "No\\nYes" | dmenu -i -l 10 -p "$mp does not exist. Create it?") || exit 1
|
||||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
|
||||
fi
|
||||
}
|
||||
|
||||
mountusb() { \
|
||||
chosen="$(echo "$usbdrives" | dmenu -i -l 10 -p "Mount which drive?")" || exit 1
|
||||
chosen="$(echo "$chosen" | awk '{print $1}')"
|
||||
sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
|
||||
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
|
||||
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
|
||||
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
||||
case "$partitiontype" in
|
||||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
||||
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
|
||||
esac
|
||||
notify-send "💻 USB mounting" "$chosen mounted to $mp."
|
||||
}
|
||||
|
||||
mountandroid() { \
|
||||
chosen="$(echo "$anddrives" | dmenu -i -l 10 -p "Which Android device?")" || exit 1
|
||||
chosen="$(echo "$chosen" | cut -d : -f 1)"
|
||||
getmount "$HOME -maxdepth 3 -type d"
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
notify-send "🤖 Android Mounting" "Android device mounted to $mp."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
choice="$(printf "USB\\nAndroid" | dmenu -i -l 10 -p "Mount a USB drive or Android device?")" || exit 1
|
||||
case $choice in
|
||||
USB) mountusb ;;
|
||||
Android) mountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
anddrives=$(simple-mtpfs -l 2>/dev/null)
|
||||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
|
||||
|
||||
if [ -z "$usbdrives" ]; then
|
||||
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
|
||||
echo "Android device(s) detected."
|
||||
mountandroid
|
||||
else
|
||||
if [ -z "$anddrives" ]; then
|
||||
echo "USB drive(s) detected."
|
||||
mountusb
|
||||
else
|
||||
echo "Mountable USB drive(s) and Android device(s) detected."
|
||||
asktype
|
||||
fi
|
||||
fi
|
120
home/.local/bin/scripts/dpass
Executable file
120
home/.local/bin/scripts/dpass
Executable file
|
@ -0,0 +1,120 @@
|
|||
#!/bin/sh
|
||||
|
||||
# path: /home/klassiker/.local/share/repos/dmenu/scripts/dmenu_pass.sh
|
||||
# author: klassiker [mrdotx]
|
||||
# github: https://github.com/mrdotx/dmenu
|
||||
# date: 2022-01-28T21:44:18+0100
|
||||
|
||||
# config
|
||||
password_store="${PASSWORD_STORE_DIR-~/.password-store}"
|
||||
file_type=".gpg"
|
||||
clipboard_timeout=45
|
||||
generate_password_chars=16
|
||||
|
||||
select=$(printf "== Generate Password ==\n%s" \
|
||||
"$(find "$password_store" -iname "*$file_type" -printf "%P\n" \
|
||||
| sed "s/$file_type$//" \
|
||||
| sort)" \
|
||||
| dmenu -l 15 -c -bw 2 -r -i -p "pass »" \
|
||||
)
|
||||
|
||||
[ -z "$select" ] \
|
||||
&& exit 0
|
||||
|
||||
get_entry() {
|
||||
entry=$(gpg --quiet --decrypt "$password_store/$select$file_type")
|
||||
|
||||
username() {
|
||||
printf "%s" "$entry" \
|
||||
| grep "^username:" \
|
||||
| sed "s/^username://; s/^[ \t]*//; s/[ \t]*$//" \
|
||||
| tr -d "\n"
|
||||
}
|
||||
|
||||
password() {
|
||||
printf "%s" "$entry" \
|
||||
| head -n 1 \
|
||||
| tr -d "\n"
|
||||
}
|
||||
|
||||
generate_password() {
|
||||
printf "%s" "$(tr -dc A-Za-z0-9 < /dev/urandom \
|
||||
| head -c"$generate_password_chars")"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
type)
|
||||
# workaround for mismatched keyboard layouts
|
||||
setxkbmap -synch
|
||||
|
||||
eval "$2" \
|
||||
| xdotool type \
|
||||
--clearmodifiers \
|
||||
--file -
|
||||
;;
|
||||
copy)
|
||||
eval "$2" \
|
||||
| xsel \
|
||||
--input \
|
||||
--selectionTimeout "$((clipboard_timeout * 1000))" \
|
||||
--clipboard
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case "$select" in
|
||||
"== Generate Password ==")
|
||||
case $(printf "%s\n" \
|
||||
"1) copy password ($clipboard_timeout sec)" \
|
||||
"2) type password" \
|
||||
| dmenu -l 2 -c -bw 2 -r -i -p "Generate Password »" \
|
||||
) in
|
||||
"1) copy password ($clipboard_timeout sec)")
|
||||
get_entry "copy" "generate_password"
|
||||
;;
|
||||
"2) type password")
|
||||
get_entry "type" "generate_password"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
case $(printf "%s\n" \
|
||||
"1) copy username ($clipboard_timeout sec)" \
|
||||
"2) copy password ($clipboard_timeout sec)" \
|
||||
"3) type username, tab, password" \
|
||||
"4) type username, 2xtab, password" \
|
||||
"5) type username" \
|
||||
"6) type password" \
|
||||
| dmenu -l 6 -c -bw 2 -r -i -p "$select »" \
|
||||
) in
|
||||
"1) copy username ($clipboard_timeout sec)")
|
||||
get_entry "copy" "username"
|
||||
;;
|
||||
"2) copy password ($clipboard_timeout sec)")
|
||||
get_entry "copy" "password"
|
||||
;;
|
||||
"3) type username, tab, password")
|
||||
get_entry "type" "username"
|
||||
xdotool key Tab
|
||||
get_entry "type" "password"
|
||||
;;
|
||||
"4) type username, 2xtab, password")
|
||||
get_entry "type" "username"
|
||||
xdotool key Tab Tab
|
||||
get_entry "type" "password"
|
||||
;;
|
||||
"5) type username")
|
||||
get_entry "type" "username"
|
||||
;;
|
||||
"6) type password")
|
||||
get_entry "type" "password"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
37
home/.local/bin/scripts/dpassmenu
Executable file
37
home/.local/bin/scripts/dpassmenu
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
|
||||
shopt -s nullglob globstar
|
||||
|
||||
typeit=0
|
||||
if [[ $1 == "--type" ]]; then
|
||||
typeit=1
|
||||
shift
|
||||
fi
|
||||
|
||||
if [[ -n $WAYLAND_DISPLAY ]]; then
|
||||
dmenu=dmenu-wl
|
||||
xdotool="ydotool type --file -"
|
||||
elif [[ -n $DISPLAY ]]; then
|
||||
dmenu=dmenu
|
||||
xdotool="xdotool type --clearmodifiers --file -"
|
||||
else
|
||||
echo "Error: No Wayland or X11 display detected" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
|
||||
password=$(printf '%s\n' "${password_files[@]}" | "$dmenu" "$@")
|
||||
|
||||
[[ -n $password ]] || exit
|
||||
|
||||
if [[ $typeit -eq 0 ]]; then
|
||||
pass show -c "$password" 2>/dev/null
|
||||
else
|
||||
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool
|
||||
fi
|
||||
|
||||
|
18
home/.local/bin/scripts/dwifi
Executable file
18
home/.local/bin/scripts/dwifi
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Sending Notification With dunst :
|
||||
notify-send "listing available Wi-Fi networks..."
|
||||
|
||||
status=$(nmcli -fields WIFI g)
|
||||
if [[ "$status" =~ "enabled" ]]; then
|
||||
toggle="睊 Disable Wi-Fi"
|
||||
elif [[ "$status" =~ "disabled" ]]; then
|
||||
toggle="直 Enable Wi-Fi"
|
||||
fi
|
||||
|
||||
|
||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | sed -E "s/WPA*.?\S/ /g" | sed "s/^--/ /g" | sed "s/ //g" | sed "/--/d"| dmenu -i -l 20 -h 25 -p "Select Wifi 直:" | cut -d' ' -f1)
|
||||
|
||||
pass=$(echo"" | dmenu -l 20 -h 30 -i -p "Enter the password :")
|
||||
|
||||
nmcli device wifi connect $bssid password $pass
|
3
home/.local/bin/scripts/kldwm
Executable file
3
home/.local/bin/scripts/kldwm
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
killall -9 xcompmgr dwm dwmbar
|
||||
|
23
home/.local/bin/scripts/now
Executable file
23
home/.local/bin/scripts/now
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Colors
|
||||
Black='\033[1;30m' # Black
|
||||
Red='\033[1;31m' # Red
|
||||
Yellow='\033[1;32m' # Yellow
|
||||
Yellow='\033[1;33m' # Yellow
|
||||
Blue='\033[1;34m' # Blue
|
||||
Purple='\033[1;35m' # Purple
|
||||
Cyan='\033[1;36m' # Cyan
|
||||
White='\033[1;37m' # White
|
||||
|
||||
echo -e "$Yellow Date :$Cyan" $(date +"%a %d %b %H:%M"| sed 's/ / /g')
|
||||
echo -e "$Yellow User :$Cyan" $(id -un)
|
||||
echo -e "$Yellow OS : $Cyan" $(distro | grep "Name" | sed "s/Name\: //")
|
||||
echo -e "$Yellow kernel :$Cyan" $(uname -r)
|
||||
echo -e "$Yellow Disk :$Cyan" $(df -h "/" | awk ' /[0-9]/ {print $3 "/" $2}')
|
||||
echo -e "$Yellow CPU : $Cyan" $(grep 'model name' /proc/cpuinfo | uniq | sed "s/model name[[:blank:]]:[[:blank:]]//")
|
||||
echo -e "$Yellow CPU Temp :$Cyan" $(sensors | awk '/Core 0/ {print "" $3}' | sed "s/\.0//")
|
||||
echo -e "$Yellow Memory :$Cyan" $(free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}')
|
||||
echo -e "$Yellow Temp :$Cyan" $(curl -s wttr.in/Algeria\?format=1)
|
||||
|
||||
|
5
home/.local/bin/scripts/passgen
Executable file
5
home/.local/bin/scripts/passgen
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
passg=$(openssl rand -base64 $(($RANDOM % 6 + 15)))
|
||||
printf $passg | xclip -selection clipboard
|
||||
notify-send "🔒Generated Password copied to clipboard."
|
1975
home/.local/bin/scripts/pfetch
Executable file
1975
home/.local/bin/scripts/pfetch
Executable file
File diff suppressed because it is too large
Load diff
47
home/.local/bin/scripts/powermenu
Executable file
47
home/.local/bin/scripts/powermenu
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
dir="~/.config/rofi/themes"
|
||||
uptime=$(uptime -p | sed -e 's/up //g')
|
||||
|
||||
rofi_command="rofi -theme $dir/powermenu.rasi"
|
||||
|
||||
# Options
|
||||
shutdown=" Shutdown"
|
||||
reboot=" Reboot"
|
||||
lock=" Lock"
|
||||
suspend="鈴 Sleep"
|
||||
hibernate=" Hibernate"
|
||||
logout=" Logout"
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$lock\n$logout\n$suspend\n$hibernate\n$reboot\n$shutdown"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
notify-send "👉 Powering Off " && sleep 1 &&
|
||||
systemctl poweroff
|
||||
;;
|
||||
$reboot)
|
||||
notify-send "👉 Rebooting " && sleep 1 &&
|
||||
systemctl reboot
|
||||
;;
|
||||
$lock)
|
||||
notify-send "👉 Locking the screen " && sleep 1 &&
|
||||
if [[ -f /usr/local/bin/slock ]]; then
|
||||
slock
|
||||
fi
|
||||
;;
|
||||
$suspend)
|
||||
mpc -q pause
|
||||
amixer set Master mute
|
||||
systemctl suspend
|
||||
;;
|
||||
$hibernate)
|
||||
notify-send "👉 Hibernateing " && sleep 1 &&
|
||||
systemctl hibernate
|
||||
;;
|
||||
$logout)
|
||||
loginctl terminate-session ${XDG_SESSION_ID-}
|
||||
;;
|
||||
esac
|
2
home/.local/bin/scripts/redlight
Executable file
2
home/.local/bin/scripts/redlight
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
redshift -l 0:0 -t 4500:4500 -r &>/dev/null &
|
18
home/.local/bin/scripts/remoji
Executable file
18
home/.local/bin/scripts/remoji
Executable file
|
@ -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 | rofi -dmenu -i -selected-row 1 | 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
|
295
home/.local/bin/scripts/rofi-bluetooth
Executable file
295
home/.local/bin/scripts/rofi-bluetooth
Executable file
|
@ -0,0 +1,295 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Constants
|
||||
divider="---------"
|
||||
goback="Back"
|
||||
|
||||
# Checks if bluetooth controller is powered on
|
||||
power_on() {
|
||||
if bluetoothctl show | grep -q "Powered: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles power state
|
||||
toggle_power() {
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
fi
|
||||
bluetoothctl power on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is scanning for new devices
|
||||
scan_on() {
|
||||
if bluetoothctl show | grep -q "Discovering: yes"; then
|
||||
echo "Scan: on"
|
||||
return 0
|
||||
else
|
||||
echo "Scan: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles scanning state
|
||||
toggle_scan() {
|
||||
if scan_on; then
|
||||
kill $(pgrep -f "bluetoothctl scan on")
|
||||
bluetoothctl scan off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
sleep 5
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is able to pair to devices
|
||||
pairable_on() {
|
||||
if bluetoothctl show | grep -q "Pairable: yes"; then
|
||||
echo "Pairable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Pairable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles pairable state
|
||||
toggle_pairable() {
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is discoverable by other devices
|
||||
discoverable_on() {
|
||||
if bluetoothctl show | grep -q "Discoverable: yes"; then
|
||||
echo "Discoverable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Discoverable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles discoverable state
|
||||
toggle_discoverable() {
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is connected
|
||||
device_connected() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Connected: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_connection() {
|
||||
if device_connected $1; then
|
||||
bluetoothctl disconnect $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is paired
|
||||
device_paired() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Paired: yes"; then
|
||||
echo "Paired: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Paired: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device paired state
|
||||
toggle_paired() {
|
||||
if device_paired $1; then
|
||||
bluetoothctl remove $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl pair $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is trusted
|
||||
device_trusted() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Trusted: yes"; then
|
||||
echo "Trusted: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Trusted: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_trust() {
|
||||
if device_trusted $1; then
|
||||
bluetoothctl untrust $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl trust $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints a short string with the current bluetooth status
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
printf ''
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
for device in "${paired_devices[@]}"; do
|
||||
if device_connected $device; then
|
||||
device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-)
|
||||
|
||||
if [ $counter -gt 0 ]; then
|
||||
printf ", %s" "$device_alias"
|
||||
else
|
||||
printf " %s" "$device_alias"
|
||||
fi
|
||||
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# A submenu for a specific device that allows connecting, pairing, and trusting
|
||||
device_menu() {
|
||||
device=$1
|
||||
|
||||
# Get device name and mac address
|
||||
device_name=$(echo $device | cut -d ' ' -f 3-)
|
||||
mac=$(echo $device | cut -d ' ' -f 2)
|
||||
|
||||
# Build options
|
||||
if device_connected $mac; then
|
||||
connected="Connected: yes"
|
||||
else
|
||||
connected="Connected: no"
|
||||
fi
|
||||
paired=$(device_paired $mac)
|
||||
trusted=$(device_trusted $mac)
|
||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$connected)
|
||||
toggle_connection $mac
|
||||
;;
|
||||
$paired)
|
||||
toggle_paired $mac
|
||||
;;
|
||||
$trusted)
|
||||
toggle_trust $mac
|
||||
;;
|
||||
$goback)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Opens a rofi menu with current bluetooth status and options to connect
|
||||
show_menu() {
|
||||
# Get menu options
|
||||
if power_on; then
|
||||
power="Power: on"
|
||||
|
||||
# Human-readable names of devices, one per line
|
||||
# If scan is off, will only list paired devices
|
||||
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
|
||||
|
||||
# Get controller flags
|
||||
scan=$(scan_on)
|
||||
pairable=$(pairable_on)
|
||||
discoverable=$(discoverable_on)
|
||||
|
||||
# Options passed to rofi
|
||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||
else
|
||||
power="Power: off"
|
||||
options="$power\nExit"
|
||||
fi
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$power)
|
||||
toggle_power
|
||||
;;
|
||||
$scan)
|
||||
toggle_scan
|
||||
;;
|
||||
$discoverable)
|
||||
toggle_discoverable
|
||||
;;
|
||||
$pairable)
|
||||
toggle_pairable
|
||||
;;
|
||||
*)
|
||||
device=$(bluetoothctl devices | grep "$chosen")
|
||||
# Open a submenu if a device is selected
|
||||
if [[ $device ]]; then device_menu "$device"; fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Rofi command to pipe into, can add any options here
|
||||
rofi_command="rofi -dmenu -no-fixed-num-lines -yoffset -100 -i -p $@"
|
||||
|
||||
case "$1" in
|
||||
--status)
|
||||
print_status
|
||||
;;
|
||||
*)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
72
home/.local/bin/scripts/rofi-mount
Executable file
72
home/.local/bin/scripts/rofi-mount
Executable file
|
@ -0,0 +1,72 @@
|
|||
#!/bin/sh
|
||||
#===============================================================================
|
||||
# FILE: dmenumount
|
||||
#
|
||||
# ORIGINAL AUTHOR: Luke Smith
|
||||
# AUTHOR: Gavin Jaeger-Freeborn gavinfreeborn@gmail.com
|
||||
#===============================================================================
|
||||
|
||||
# Gives a dmenu prompt to mount unmounted drives and Android phones. If
|
||||
# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll
|
||||
# be prompted to give a mountpoint from already existsing directories. If you
|
||||
# input a novel directory, it will prompt you to create that directory.
|
||||
|
||||
getmount() { \
|
||||
[ -z "$chosen" ] && exit 1
|
||||
# shellcheck disable=SC2086
|
||||
mp="$(find $1 2>/dev/null | rofi -dmenu -i -selected-row 1 -p "Type in mount point.")" || exit 1
|
||||
[ "$mp" = "" ] && exit 1
|
||||
if [ ! -d "$mp" ]; then
|
||||
mkdiryn=$(printf "No\\nYes" | rofi -dmenu -i -selected-row 1 -p "$mp does not exist. Create it?") || exit 1
|
||||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
|
||||
fi
|
||||
}
|
||||
|
||||
mountusb() { \
|
||||
chosen="$(echo "$usbdrives" | rofi -dmenu -i -selected-row 1 -p "Mount which drive?")" || exit 1
|
||||
chosen="$(echo "$chosen" | awk '{print $1}')"
|
||||
sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
|
||||
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
|
||||
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
|
||||
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
||||
case "$partitiontype" in
|
||||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
||||
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
|
||||
esac
|
||||
notify-send "💻 USB mounting" "$chosen mounted to $mp."
|
||||
}
|
||||
|
||||
mountandroid() { \
|
||||
chosen="$(echo "$anddrives" | rofi -dmenu -i -selected-row 1 -p "Which Android device?")" || exit 1
|
||||
chosen="$(echo "$chosen" | cut -d : -f 1)"
|
||||
getmount "$HOME -maxdepth 3 -type d"
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
notify-send "🤖 Android Mounting" "Android device mounted to $mp."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
choice="$(printf "USB\\nAndroid" | rofi -dmenu -i -selected-row 1 "Mount a USB drive or Android device?")" || exit 1
|
||||
case $choice in
|
||||
USB) mountusb ;;
|
||||
Android) mountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
anddrives=$(simple-mtpfs -l 2>/dev/null)
|
||||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
|
||||
|
||||
if [ -z "$usbdrives" ]; then
|
||||
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
|
||||
echo "Android device(s) detected."
|
||||
mountandroid
|
||||
else
|
||||
if [ -z "$anddrives" ]; then
|
||||
echo "USB drive(s) detected."
|
||||
mountusb
|
||||
else
|
||||
echo "Mountable USB drive(s) and Android device(s) detected."
|
||||
asktype
|
||||
fi
|
||||
fi
|
38
home/.local/bin/scripts/rwifi
Executable file
38
home/.local/bin/scripts/rwifi
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
notify-send "Getting list of available Wi-Fi networks..."
|
||||
# Get a list of available wifi connections and morph it into a nice-looking list
|
||||
wifi_list=$(nmcli --fields "SECURITY,SSID" device wifi list | sed 1d | sed 's/ */ /g' | sed -E "s/WPA*.?\S/ /g" | sed "s/^--/ /g" | sed "s/ //g" | sed "/--/d")
|
||||
|
||||
connected=$(nmcli -fields WIFI g)
|
||||
if [[ "$connected" =~ "enabled" ]]; then
|
||||
toggle="睊 Disable Wi-Fi"
|
||||
elif [[ "$connected" =~ "disabled" ]]; then
|
||||
toggle="直 Enable Wi-Fi"
|
||||
fi
|
||||
|
||||
# Use rofi to select wifi network
|
||||
chosen_network=$(echo -e "$toggle\n$wifi_list" | uniq -u | rofi -dmenu -i -selected-row 1 -p "Wi-Fi SSID: " )
|
||||
# Get name of connection
|
||||
chosen_id=$(echo "${chosen_network:3}" | xargs)
|
||||
|
||||
if [ "$chosen_network" = "" ]; then
|
||||
exit
|
||||
elif [ "$chosen_network" = "直 Enable Wi-Fi" ]; then
|
||||
nmcli radio wifi on
|
||||
elif [ "$chosen_network" = "睊 Disable Wi-Fi" ]; then
|
||||
nmcli radio wifi off
|
||||
else
|
||||
# Message to show when connection is activated successfully
|
||||
success_message="You are now connected to the Wi-Fi network \"$chosen_id\"."
|
||||
# Get saved connections
|
||||
saved_connections=$(nmcli -g NAME connection)
|
||||
if [[ $(echo "$saved_connections" | grep -w "$chosen_id") = "$chosen_id" ]]; then
|
||||
nmcli connection up id "$chosen_id" | grep "successfully" && notify-send "Connection Established" "$success_message"
|
||||
else
|
||||
if [[ "$chosen_network" =~ "" ]]; then
|
||||
wifi_password=$(rofi -dmenu -p "Password: " )
|
||||
fi
|
||||
nmcli device wifi connect "$chosen_id" password "$wifi_password" | grep "successfully" && notify-send "Connection Established" "$success_message"
|
||||
fi
|
||||
fi
|
29
home/.local/bin/scripts/screenshot
Executable file
29
home/.local/bin/scripts/screenshot
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
MONITORS=$(xrandr | grep -o '[0-9]*x[0-9]*[+-][0-9]*[+-][0-9]*')
|
||||
# Get the location of the mouse
|
||||
XMOUSE=$(xdotool getmouselocation | awk -F "[: ]" '{print $2}')
|
||||
YMOUSE=$(xdotool getmouselocation | awk -F "[: ]" '{print $4}')
|
||||
|
||||
path="$HOME/Pictures/screenshots/$(date +%Y.%m.%d_%H:%M.%S).png"
|
||||
|
||||
for mon in ${MONITORS}; do
|
||||
# Parse the geometry of the monitor
|
||||
MONW=$(echo ${mon} | awk -F "[x+]" '{print $1}')
|
||||
MONH=$(echo ${mon} | awk -F "[x+]" '{print $2}')
|
||||
MONX=$(echo ${mon} | awk -F "[x+]" '{print $3}')
|
||||
MONY=$(echo ${mon} | awk -F "[x+]" '{print $4}')
|
||||
# Use a simple collision check
|
||||
if (( ${XMOUSE} >= ${MONX} )); then
|
||||
if (( ${XMOUSE} <= ${MONX}+${MONW} )); then
|
||||
if (( ${YMOUSE} >= ${MONY} )); then
|
||||
if (( ${YMOUSE} <= ${MONY}+${MONH} )); then
|
||||
# We have found our monitor!
|
||||
maim -g "${MONW}x${MONH}+${MONX}+${MONY}" $path && xclip -selection clipboard -t image/png $path && paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga
|
||||
notify-send -i $path "Screenshot " "Screenshot captured\nand copied to clipboard!"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
exit 1
|
3
home/.local/bin/scripts/screenshot-select
Executable file
3
home/.local/bin/scripts/screenshot-select
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
#date +"%a_%d_%b_%H:%M"
|
||||
maim -m 10 --select | tee ~/Pictures/screenshots/$(date +%Y.%m.%d_%H:%M.%S).png | xclip -sel c -t image/png
|
2
home/.local/bin/scripts/session
Executable file
2
home/.local/bin/scripts/session
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
/mnt/Data/Downloads/Linux/Arch/AppImages/session-desktop-linux-x86_64-1.8.6.AppImage
|
2
home/.local/bin/scripts/stacer
Executable file
2
home/.local/bin/scripts/stacer
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
/mnt/Data/Downloads/Linux/Arch/AppImages/Stacer-1.1.0-x64.AppImage
|
22
home/.local/bin/scripts/todaypray
Executable file
22
home/.local/bin/scripts/todaypray
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Colors :
|
||||
Green='\033[1;32m' # Green
|
||||
Cyan='\033[1;36m' # Cyan
|
||||
No='\e[0m'
|
||||
|
||||
url="https://www.islamicfinder.org"
|
||||
|
||||
# Today Prayer Time:
|
||||
#Today=$(curl $url -s | sed -n -e '/todayPrayerName/{N;N;N;N;N;N;N;s/<[^>]*>//g;s/\s\s*/ /g;p}')
|
||||
|
||||
# Upcoming Prayer :
|
||||
Upcoming=$(curl $url -s | sed -n -e '/Upcoming Prayer/{N;N;N;N;N;N;N;s/<[^>]*>//g;s/\s\s*/ /g;p}')
|
||||
|
||||
# Notfication :
|
||||
upray=$(echo -e $Upcoming)
|
||||
notify-send "📿 $upray"
|
||||
|
||||
echo -e "📿${Green}${Upcoming}${No}"
|
||||
echo -e "📿 ${Cyan}Today Prayer Time :${No}"
|
||||
curl $url -s | sed -n -e '/todayPrayerName/{N;N;N;N;N;N;N;s/<[^>]*>//g;s/\s\s*/ /g;p}'
|
3
home/.local/bin/scripts/weather
Executable file
3
home/.local/bin/scripts/weather
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
curl https://wttr.in/Algeria
|
2
home/.local/bin/scripts/webcam
Executable file
2
home/.local/bin/scripts/webcam
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
mpv av://v4l2:/dev/video0 --profile=low-latency --untimed
|
6
home/.local/bin/scripts/ytlist
Executable file
6
home/.local/bin/scripts/ytlist
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "Enter url : "
|
||||
read url
|
||||
|
||||
yt-dlp -f 'bv*[height=1080][ext=mp4]+ba*[ext=m4a]/best[ext=mp4]/best' --download-archive videos.txt $url -o '%(channel_id)s/%(playlist_id)s/%(title)s.%(ext)s'
|
4
home/.local/bin/scripts/ytm
Executable file
4
home/.local/bin/scripts/ytm
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
search=$(printf '%s' "$*" | tr ' ' '+')
|
||||
mpv --no-video "https://youtube.com/$(curl -s "https://vid.puffyan.us/search?q=$search" | grep -Eo "watch\?v=.{11}" | head -n 1 )"
|
6
home/.local/bin/scripts/ytmp3
Executable file
6
home/.local/bin/scripts/ytmp3
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "Enter url : "
|
||||
read url
|
||||
|
||||
yt-dlp -f 'ba' -x --embed-thumbnail --audio-format mp3 $url -o '%(title)s.%(ext)s'
|
4
home/.local/bin/scripts/ytp
Executable file
4
home/.local/bin/scripts/ytp
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
search=$(printf '%s' "$*" | tr ' ' '+')
|
||||
mpv "https://youtube.com/$(curl -s "https://vid.puffyan.us/search?q=$search" | grep -Eo "watch\?v=.{11}" | head -n 1 )"
|
6
home/.local/bin/scripts/ytvid
Executable file
6
home/.local/bin/scripts/ytvid
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "Enter url : "
|
||||
read url
|
||||
|
||||
yt-dlp -f 'bv*[height=1080][ext=mp4]+ba*[ext=m4a]/best[ext=mp4]/best' $url -o '%(title)s.%(ext)s'
|
159
home/.local/bin/statusbar/dwmbar
Executable file
159
home/.local/bin/statusbar/dwmbar
Executable file
|
@ -0,0 +1,159 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
#source ~/.local/bin/statusbar/themes/sweetmars
|
||||
#source ~/.local/bin/statusbar/themes/dracula
|
||||
#source ~/.local/bin/statusbar/themes/sweetdracula
|
||||
#source ~/.local/bin/statusbar/themes/tomorrow-night
|
||||
source ~/.local/bin/statusbar/themes/tomorrow-dark
|
||||
#source ~/.local/bin/statusbar/themes/tomorrow
|
||||
#source ~/.local/bin/statusbar/themes/vacuous
|
||||
#source ~/.local/bin/statusbar/themes/doom
|
||||
|
||||
interval=0
|
||||
|
||||
# Battery :
|
||||
bat(){
|
||||
for battery in /sys/class/power_supply/BAT?*; do
|
||||
# If non-first battery, print a space separator.
|
||||
[ -n "${capacity+x}" ] && printf " "
|
||||
# Sets up the status and capacity
|
||||
case "$(cat "$battery/status" 2>&1)" in
|
||||
"Full") status=" " ;;
|
||||
"Discharging") status=" " ;;
|
||||
"Charging") status=" " ;;
|
||||
"Not charging") status=" " ;;
|
||||
"Unknown") status=" " ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
capacity="$(cat "$battery/capacity" 2>&1)"
|
||||
# Will make a warn variable if discharging and low
|
||||
[ "$status" = " " ] && [ "$capacity" -le 25 ] && warn=" "
|
||||
# Prints the info
|
||||
printf "%s%s%d%%" "^c$cyan^$status" "$warn" "$capacity"; unset warn
|
||||
done && printf "^d^\\n"
|
||||
}
|
||||
|
||||
# Date && clock :
|
||||
dat(){
|
||||
date="$(date +"%a %d %b %H:%M"| sed 's/ / /g')"
|
||||
#echo -e " $date"
|
||||
echo -e "^c$blue^ $date^d^"
|
||||
|
||||
}
|
||||
|
||||
# Cpu Temp :
|
||||
tmp(){
|
||||
ctmp=$(sensors | awk '/Core 0/ {print$3}' | sed 's/+//')
|
||||
echo -e "^c$red^ $ctmp^d^"
|
||||
}
|
||||
|
||||
# Cpu Usage :
|
||||
cpu(){
|
||||
read cpu a b c previdle rest < /proc/stat
|
||||
prevtotal=$((a+b+c+previdle))
|
||||
sleep 0.5
|
||||
read cpu a b c idle rest < /proc/stat
|
||||
total=$((a+b+c+idle))
|
||||
cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) ))
|
||||
#echo -e " $cpu%"
|
||||
echo -e "^c$cyan^ $cpu%^d^"
|
||||
}
|
||||
|
||||
# Keybord Layout :
|
||||
key(){
|
||||
kb="$(xkb-switch)" || exit 1
|
||||
#echo " $kb"
|
||||
echo -e "^c$green^ $kb^d^"
|
||||
|
||||
}
|
||||
|
||||
# Screen Light :
|
||||
lit(){
|
||||
#lit="$(xbacklight | sed 's/\..*//g')"
|
||||
#echo " $lit%"
|
||||
lit="$(brightnessctl | grep -oP '[^()]+%')"
|
||||
#echo " $lit"
|
||||
echo -e "^c$yellow^ $lit^d^"
|
||||
}
|
||||
|
||||
# Memory :
|
||||
mem(){
|
||||
mem="$(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
|
||||
echo -e "^c$green^ $mem^d^"
|
||||
}
|
||||
|
||||
# Volume :
|
||||
vol(){
|
||||
[ $(pamixer --get-mute) = true ] && echo && exit
|
||||
|
||||
vol="$(pamixer --get-volume)"
|
||||
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "30" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "0" ]; then
|
||||
icon=""
|
||||
else
|
||||
echo "" && exit
|
||||
fi
|
||||
echo "^c$magenta^$icon $vol%^d^"
|
||||
}
|
||||
|
||||
|
||||
net() {
|
||||
connected=$(cat /sys/class/net/e*/operstate 2>/dev/null)
|
||||
if [[ "$connected" =~ "up" ]]; then
|
||||
printf "^c$green^ ^d^%s"
|
||||
elif [[ "$connected" =~ "down" ]]; then
|
||||
check_wifi=$(cat /sys/class/net/wl*/operstate 2>/dev/null)
|
||||
if [[ "$check_wifi" =~ "up" ]]; then
|
||||
printf "^c$green^ ^d^%s"
|
||||
elif [[ "$check_wifi" =~ "down" ]]; then
|
||||
printf "^c$green^睊 ^d^%s"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Network traffic
|
||||
nettrf(){
|
||||
|
||||
update() {
|
||||
sum=0
|
||||
for arg; do
|
||||
read -r i < "$arg"
|
||||
sum=$(( sum + i ))
|
||||
done
|
||||
cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/}
|
||||
[ -f "$cache" ] && read -r old < "$cache" || old=0
|
||||
printf %d\\n "$sum" > "$cache"
|
||||
printf %d\\n $(( sum - old ))
|
||||
}
|
||||
|
||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
|
||||
printf "^c$magenta^ %4sB %4sB^d^\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
}
|
||||
|
||||
# Updates
|
||||
pkg_updates() {
|
||||
#updates=$(xbps-install -un | wc -l) # void
|
||||
updates=$(pacman -Qu | grep -Fcv "[ignored]" | sed "s/^//;s/^0$//g") # arch , needs pacman contrib
|
||||
# updates=$(aptitude search '~U' | wc -l) # apt (ubuntu,debian etc)
|
||||
|
||||
if [ "$updates" == "0" ]; then
|
||||
printf "^c$green^ Fully Updated^d^"
|
||||
else
|
||||
printf "^c$green^ $updates"" updates^d^"
|
||||
fi
|
||||
}
|
||||
while true; do
|
||||
[ $interval = 0 ] || [ $(($interval % 3600)) = 0 ] && updates=$(pkg_updates)
|
||||
interval=$((interval + 1))
|
||||
space=" "
|
||||
range="^c$red^|"
|
||||
|
||||
xsetroot -name "$range$space$updates$space$(nettrf)$space$(tmp)$space$(cpu)$space$(mem)$space$(vol)$space$(lit)$space$(bat)$space$(key)$space$(dat)$space$(net)$range"
|
||||
sleep 0.2
|
||||
done &
|
161
home/.local/bin/statusbar/dwmbar-colored
Executable file
161
home/.local/bin/statusbar/dwmbar-colored
Executable file
|
@ -0,0 +1,161 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
#source ~/.local/bin/statusbar/themes/sweetmars
|
||||
#source ~/.local/bin/statusbar/themes/dracula
|
||||
#source ~/.local/bin/statusbar/themes/sweetdracula
|
||||
#source ~/.local/bin/statusbar/themes/tomorrow-night
|
||||
source ~/.local/bin/statusbar/themes/tomorrow-dark
|
||||
#source ~/.local/bin/statusbar/themes/tomorrow
|
||||
#source ~/.local/bin/statusbar/themes/vacuous
|
||||
#source ~/.local/bin/statusbar/themes/doom
|
||||
|
||||
|
||||
interval=0
|
||||
|
||||
# Battery :
|
||||
bat(){
|
||||
for battery in /sys/class/power_supply/BAT?*; do
|
||||
# If non-first battery, print a space separator.
|
||||
[ -n "${capacity+x}" ] && printf " "
|
||||
# Sets up the status and capacity
|
||||
case "$(cat "$battery/status" 2>&1)" in
|
||||
"Full") status="" ;;
|
||||
"Discharging") status="" ;;
|
||||
"Charging") status="" ;;
|
||||
"Not charging") status="" ;;
|
||||
"Unknown") status="" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
capacity="$(cat "$battery/capacity" 2>&1)"
|
||||
# Will make a warn variable if discharging and low
|
||||
[ "$status" = " " ] && [ "$capacity" -le 25 ] && warn=" "
|
||||
# Prints the info
|
||||
printf "%s%s%d%%" "^c$cyan^^c$black^^b$cyan^ $status" "^c$black^^b$cyan^ $warn" "$capacity"; unset warn
|
||||
done && printf " \\n"
|
||||
}
|
||||
|
||||
# Date && clock :
|
||||
dat(){
|
||||
date="$(date +"%a %d %b %H:%M"| sed 's/ / /g')"
|
||||
#echo -e " $date"
|
||||
echo -e "^c$blue^^c$black^^b$blue^ $date "
|
||||
|
||||
}
|
||||
|
||||
# Cpu Temp :
|
||||
tmp(){
|
||||
ctmp=$(sensors | awk '/Core 0/ {print$3}' | sed 's/+//')
|
||||
echo -e "^c$red^^c$black^^b$red^ $ctmp "
|
||||
}
|
||||
|
||||
# Cpu Usage :
|
||||
cpu(){
|
||||
read cpu a b c previdle rest < /proc/stat
|
||||
prevtotal=$((a+b+c+previdle))
|
||||
sleep 0.5
|
||||
read cpu a b c idle rest < /proc/stat
|
||||
total=$((a+b+c+idle))
|
||||
cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) ))
|
||||
#echo -e " $cpu%"
|
||||
echo -e "^c$cyan^^c$black^^b$cyan^ $cpu% "
|
||||
}
|
||||
|
||||
# Keybord Layout :
|
||||
key(){
|
||||
kb="$(xkb-switch)" || exit 1
|
||||
#echo " $kb"
|
||||
echo -e "^c$green^^b$green^^c$black^^b$green^ $kb "
|
||||
|
||||
}
|
||||
|
||||
# Screen Light :
|
||||
lit(){
|
||||
#lit="$(xbacklight | sed 's/\..*//g')"
|
||||
#echo " $lit%"
|
||||
lit="$(brightnessctl | grep -oP '[^()]+%')"
|
||||
#echo " $lit"
|
||||
echo -e "^c$yellow^^b$yellow^^c$black^^b$yellow^ $lit "
|
||||
}
|
||||
|
||||
# Memory :
|
||||
mem(){
|
||||
mem="$(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
|
||||
echo -e "^c$green^^b$green^^c$black^^b$green^ $mem "
|
||||
}
|
||||
|
||||
# Volume :
|
||||
vol(){
|
||||
[ $(pamixer --get-mute) = true ] && echo && exit
|
||||
|
||||
vol="$(pamixer --get-volume)"
|
||||
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "30" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "0" ]; then
|
||||
icon=""
|
||||
else
|
||||
echo "" && exit
|
||||
fi
|
||||
echo "^c$magenta^^b$magenta^^c$black^^b$magenta^ $icon $vol% "
|
||||
}
|
||||
|
||||
|
||||
net() {
|
||||
connected=$(cat /sys/class/net/e*/operstate 2>/dev/null)
|
||||
if [[ "$connected" =~ "up" ]]; then
|
||||
printf "^c$green^^b$green^^c$black^ %s"
|
||||
elif [[ "$connected" =~ "down" ]]; then
|
||||
check_wifi=$(cat /sys/class/net/wl*/operstate 2>/dev/null)
|
||||
if [[ "$check_wifi" =~ "up" ]]; then
|
||||
printf "^b$green^^c$black^ %s"
|
||||
elif [[ "$check_wifi" =~ "down" ]]; then
|
||||
printf "^c$green^^b$green^^c$black^ 睊 %s"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Network traffic
|
||||
nettrf(){
|
||||
|
||||
update() {
|
||||
sum=0
|
||||
for arg; do
|
||||
read -r i < "$arg"
|
||||
sum=$(( sum + i ))
|
||||
done
|
||||
cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/}
|
||||
[ -f "$cache" ] && read -r old < "$cache" || old=0
|
||||
printf %d\\n "$sum" > "$cache"
|
||||
printf %d\\n $(( sum - old ))
|
||||
}
|
||||
|
||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
|
||||
printf "^c$magenta^^b$magenta^^c$black^ ^c$black^^b$magenta^ %4sB ^b$magenta^^c$black^ ^c$black^^b$magenta^ %4sB \\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
}
|
||||
|
||||
# Updates
|
||||
pkg_updates() {
|
||||
#updates=$(xbps-install -un | wc -l) # void
|
||||
updates=$(pacman -Qu | grep -Fcv "[ignored]" | sed "s/^//;s/^0$//g") # arch , needs pacman contrib
|
||||
# updates=$(aptitude search '~U' | wc -l) # apt (ubuntu,debian etc)
|
||||
|
||||
if [ "$updates" == "0" ]; then
|
||||
printf "^c$green^^b$green^^c$black^ ^c$green^^b$black^Fully Updated^d^"
|
||||
else
|
||||
printf "^c$green^^b$green^^c$black^ $updates " "^c$green^^b$black^updates ^d^"
|
||||
fi
|
||||
}
|
||||
while true; do
|
||||
[ $interval = 0 ] || [ $(($interval % 3600)) = 0 ] && updates=$(pkg_updates)
|
||||
interval=$((interval + 1))
|
||||
space=" "
|
||||
range="|"
|
||||
|
||||
#xsetroot -name "$updates$(nettrf)$(tmp)$(cpu)$(mem)$(vol)$(lit)$(bat)$(key)$(dat)$(net)"
|
||||
xsetroot -name "$(cpu)$(mem)$(vol)$(lit)$(bat)$(key)$(dat)$(net)"
|
||||
sleep 0.2
|
||||
done &
|
125
home/.local/bin/statusbar/dwmbar-emoji
Executable file
125
home/.local/bin/statusbar/dwmbar-emoji
Executable file
|
@ -0,0 +1,125 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Battery :
|
||||
bat(){
|
||||
for battery in /sys/class/power_supply/BAT?*; do
|
||||
# If non-first battery, print a space separator.
|
||||
[ -n "${capacity+x}" ] && printf " "
|
||||
# Sets up the status and capacity
|
||||
case "$(cat "$battery/status" 2>&1)" in
|
||||
"Full") status="⚡" ;;
|
||||
"Discharging") status="🔋" ;;
|
||||
"Charging") status="🔌" ;;
|
||||
"Not charging") status="🛑" ;;
|
||||
"Unknown") status="♻️" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
capacity="$(cat "$battery/capacity" 2>&1)"
|
||||
# Will make a warn variable if discharging and low
|
||||
[ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗"
|
||||
# Prints the info
|
||||
printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn
|
||||
done && printf "\\n"
|
||||
}
|
||||
|
||||
# Date && clock :
|
||||
dat(){
|
||||
clock=$(date '+%I')
|
||||
case "$clock" in
|
||||
"00") icon="🕛" ;;
|
||||
"01") icon="🕐" ;;
|
||||
"02") icon="🕑" ;;
|
||||
"03") icon="🕒" ;;
|
||||
"04") icon="🕓" ;;
|
||||
"05") icon="🕔" ;;
|
||||
"06") icon="🕕" ;;
|
||||
"07") icon="🕖" ;;
|
||||
"08") icon="🕗" ;;
|
||||
"09") icon="🕘" ;;
|
||||
"10") icon="🕙" ;;
|
||||
"11") icon="🕚" ;;
|
||||
"12") icon="🕛" ;;
|
||||
esac
|
||||
date "+📅%a %d %b %Y|$icon%I:%M%p"
|
||||
}
|
||||
|
||||
# Cpu Temp :
|
||||
tmp(){
|
||||
sensors | awk '/Core 0/ {print "🌡" $3}'
|
||||
}
|
||||
|
||||
# Cpu Usage :
|
||||
cpu(){
|
||||
cpu=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{printf "%02.1f%%" , 100 - $1}')
|
||||
echo -e "💻$cpu"
|
||||
}
|
||||
|
||||
# Keybord Layout :
|
||||
key(){
|
||||
kb="$(xkb-switch)" || exit 1
|
||||
echo "🔤$kb"
|
||||
}
|
||||
|
||||
# Screen Light :
|
||||
lit(){
|
||||
#lit="$(xbacklight | sed 's/\..*//g')"
|
||||
#echo "💡$lit%"
|
||||
lit="$(brightnessctl | grep -oP '[^()]+%')"
|
||||
echo "💡$lit"
|
||||
}
|
||||
|
||||
# Memory :
|
||||
mem(){
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf ("🧠%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
|
||||
}
|
||||
|
||||
# Volume :
|
||||
vol(){
|
||||
[ $(pamixer --get-mute) = true ] && echo 🔇 && exit
|
||||
|
||||
vol="$(pamixer --get-volume)"
|
||||
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon="🔊"
|
||||
elif [ "$vol" -gt "30" ]; then
|
||||
icon="🔉"
|
||||
elif [ "$vol" -gt "0" ]; then
|
||||
icon="🔈"
|
||||
else
|
||||
echo 🔇 && exit
|
||||
fi
|
||||
echo "$icon$vol%"
|
||||
}
|
||||
net(){
|
||||
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||
wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
|
||||
elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||
grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="📡 " || wifiicon="❌ "
|
||||
fi
|
||||
|
||||
printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)"
|
||||
}
|
||||
nettrf(){
|
||||
|
||||
update() {
|
||||
sum=0
|
||||
for arg; do
|
||||
read -r i < "$arg"
|
||||
sum=$(( sum + i ))
|
||||
done
|
||||
cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/}
|
||||
[ -f "$cache" ] && read -r old < "$cache" || old=0
|
||||
printf %d\\n "$sum" > "$cache"
|
||||
printf %d\\n $(( sum - old ))
|
||||
}
|
||||
|
||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
|
||||
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
}
|
||||
|
||||
while true; do
|
||||
xsetroot -name "|$(nettrf)|$(net)|$(tmp)|$(cpu)|$(mem)|$(vol)|$(lit)|$(bat)|$(key)|$(dat) |"
|
||||
sleep 0.2
|
||||
done &
|
110
home/.local/bin/statusbar/simplebar
Executable file
110
home/.local/bin/statusbar/simplebar
Executable file
|
@ -0,0 +1,110 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Battery :
|
||||
bat(){
|
||||
for battery in /sys/class/power_supply/BAT?*; do
|
||||
# If non-first battery, print a space separator.
|
||||
[ -n "${capacity+x}" ] && printf " "
|
||||
# Sets up the status and capacity
|
||||
case "$(cat "$battery/status" 2>&1)" in
|
||||
"Full") status="" ;;
|
||||
"Discharging") status="" ;;
|
||||
"Charging") status="" ;;
|
||||
"Not charging") status="" ;;
|
||||
"Unknown") status="" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
capacity="$(cat "$battery/capacity" 2>&1)"
|
||||
# Will make a warn variable if discharging and low
|
||||
[ "$status" = "" ] && [ "$capacity" -le 25 ] && warn=" "
|
||||
# Prints the info
|
||||
printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn
|
||||
done && printf "\\n"
|
||||
}
|
||||
|
||||
# Date && clock :
|
||||
dat(){
|
||||
date="$(date +"%a %d %b %H:%M"| sed 's/ / /g')"
|
||||
echo -e " $date"
|
||||
}
|
||||
|
||||
# Cpu Temp :
|
||||
tmp(){
|
||||
sensors | awk '/Core 0/ {print "" $3}'
|
||||
}
|
||||
|
||||
# Cpu Usage :
|
||||
cpu(){
|
||||
read cpu a b c previdle rest < /proc/stat
|
||||
prevtotal=$((a+b+c+previdle))
|
||||
sleep 0.5
|
||||
read cpu a b c idle rest < /proc/stat
|
||||
total=$((a+b+c+idle))
|
||||
cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) ))
|
||||
echo -e " $cpu%"
|
||||
}
|
||||
|
||||
# Keybord Layout :
|
||||
key(){
|
||||
kb="$(xkb-switch)" || exit 1
|
||||
echo " $kb"
|
||||
}
|
||||
|
||||
# Screen Light :
|
||||
lit(){
|
||||
#lit="$(xbacklight | sed 's/\..*//g')"
|
||||
#echo " $lit%"
|
||||
lit="$(brightnessctl | grep -oP '[^()]+%')"
|
||||
echo " $lit"
|
||||
}
|
||||
|
||||
# Memory :
|
||||
mem(){
|
||||
mem="$(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
|
||||
echo -e " $mem"
|
||||
}
|
||||
|
||||
# Volume :
|
||||
vol(){
|
||||
[ $(pamixer --get-mute) = true ] && echo 🔇 && exit
|
||||
|
||||
vol="$(pamixer --get-volume)"
|
||||
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "30" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "0" ]; then
|
||||
icon=""
|
||||
else
|
||||
echo && exit
|
||||
fi
|
||||
echo "$icon $vol%"
|
||||
}
|
||||
|
||||
# Network traffic
|
||||
nettrf(){
|
||||
|
||||
update() {
|
||||
sum=0
|
||||
for arg; do
|
||||
read -r i < "$arg"
|
||||
sum=$(( sum + i ))
|
||||
done
|
||||
cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/}
|
||||
[ -f "$cache" ] && read -r old < "$cache" || old=0
|
||||
printf %d\\n "$sum" > "$cache"
|
||||
printf %d\\n $(( sum - old ))
|
||||
}
|
||||
|
||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
|
||||
printf " %4sB %4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
}
|
||||
|
||||
while true; do
|
||||
|
||||
xsetroot -name "[$(nettrf)][$(tmp)][$(cpu)][$(mem)][$(vol)][$(lit)][$(bat)][$(key)][$(dat)]"
|
||||
sleep 0.2
|
||||
done &
|
11
home/.local/bin/statusbar/themes/doom
Executable file
11
home/.local/bin/statusbar/themes/doom
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#1c1f24
|
||||
red=#ff6c6b
|
||||
green=#98be65
|
||||
yellow=#da8548
|
||||
blue=#51afef
|
||||
magenta=#c678dd
|
||||
cyan=#5699af
|
||||
white=#202328
|
11
home/.local/bin/statusbar/themes/dracula
Executable file
11
home/.local/bin/statusbar/themes/dracula
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#21222c
|
||||
red=#ff5555
|
||||
green=#50fa7b
|
||||
yellow=#f1fa8c
|
||||
blue=#bd93f9
|
||||
magenta=#ff79c6
|
||||
cyan=#8be9fd
|
||||
white=#f8f8f2
|
12
home/.local/bin/statusbar/themes/sweetdracula
Executable file
12
home/.local/bin/statusbar/themes/sweetdracula
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#1a1e21
|
||||
red=#ff6c6b
|
||||
green=#50fa7b
|
||||
yellow=#f1fa8c
|
||||
blue=#bd93f9
|
||||
magenta=#ff6c6b
|
||||
cyan=#8be9fd
|
||||
white=#f8f8f2
|
||||
|
11
home/.local/bin/statusbar/themes/sweetmars
Executable file
11
home/.local/bin/statusbar/themes/sweetmars
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#1a1e21
|
||||
red=#cc241d
|
||||
green=#98971a
|
||||
yellow=#d79921
|
||||
blue=#458588
|
||||
magenta=#b16286
|
||||
cyan=#689d6a
|
||||
white=#a89984
|
11
home/.local/bin/statusbar/themes/tomorrow
Executable file
11
home/.local/bin/statusbar/themes/tomorrow
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#1D1F21
|
||||
red=#fb4934
|
||||
green=#98971a
|
||||
yellow=#d7992a
|
||||
blue=#458588
|
||||
magenta=#b16286
|
||||
cyan=#689d6a
|
||||
white=#373b41
|
11
home/.local/bin/statusbar/themes/tomorrow-dark
Executable file
11
home/.local/bin/statusbar/themes/tomorrow-dark
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#1D1F21
|
||||
red=#a54242
|
||||
green=#8c9440
|
||||
yellow=#de935f
|
||||
blue=#5f819d
|
||||
magenta=#85678f
|
||||
cyan=#5e8d87
|
||||
white=#707880
|
11
home/.local/bin/statusbar/themes/tomorrow-night
Executable file
11
home/.local/bin/statusbar/themes/tomorrow-night
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#1d1f21
|
||||
red=#cc6666
|
||||
green=#b5bd68
|
||||
yellow=#e6c547
|
||||
blue=#81a2be
|
||||
magenta=#b294bb
|
||||
cyan=#70c0ba
|
||||
white=#373b41
|
11
home/.local/bin/statusbar/themes/vacuous
Executable file
11
home/.local/bin/statusbar/themes/vacuous
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# colors
|
||||
|
||||
black=#202020
|
||||
red=#b91e2e
|
||||
green=#81957c
|
||||
yellow=#f9bb80
|
||||
blue=#356579
|
||||
magenta=#87314e
|
||||
cyan=#0b3452
|
||||
white=#909090
|
1630
home/.local/share/emoji
Normal file
1630
home/.local/share/emoji
Normal file
File diff suppressed because it is too large
Load diff
10
home/.local/share/file-manager/actions/terminal.desktop
Normal file
10
home/.local/share/file-manager/actions/terminal.desktop
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Type=Action
|
||||
Name=terminal
|
||||
Profiles=1;
|
||||
|
||||
Icon=gnome-terminal
|
||||
|
||||
[X-Action-Profile 1]
|
||||
Exec=alacritty
|
||||
MimeTypes=inode/directory;
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
202
home/.local/share/fonts/Roboto-Condensed/LICENSE.txt
Normal file
202
home/.local/share/fonts/Roboto-Condensed/LICENSE.txt
Normal file
|
@ -0,0 +1,202 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Flex/RobotoFlex-Regular.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Flex/RobotoFlex-Regular.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Bold.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Bold.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-BoldItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-ExtraLight.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-ExtraLight.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Italic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Italic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Light.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Light.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-LightItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-LightItalic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Medium.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Medium.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-MediumItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Regular.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Regular.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-SemiBold.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-SemiBold.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Thin.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-Thin.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-ThinItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Mono/RobotoMono-ThinItalic.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Black.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Black.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-BlackItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-BlackItalic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Bold.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Bold.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-BoldItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-ExtraBold.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-ExtraBold.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-ExtraLight.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-ExtraLight.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Italic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Italic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Light.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Light.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-LightItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-LightItalic.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Medium.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Medium.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Regular.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Regular.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-SemiBold.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-SemiBold.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Thin.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-Thin.ttf
Normal file
Binary file not shown.
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-ThinItalic.ttf
Normal file
BIN
home/.local/share/fonts/Roboto-Serif/RobotoSerif-ThinItalic.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue