Man, am I the greatest
This commit is contained in:
parent
696dcd1d27
commit
0b4e7f9185
13 changed files with 163 additions and 163 deletions
|
@ -1,22 +0,0 @@
|
||||||
wallpaper="%%wallpaper%%"
|
|
||||||
background="%%background.hex%%"
|
|
||||||
foreground="%%foreground.hex%%"
|
|
||||||
curstor="%%cursor.hex%%"
|
|
||||||
border="%%border.hex%%"
|
|
||||||
|
|
||||||
color0="%%color0.hex%%"
|
|
||||||
color1="%%color1.hex%%"
|
|
||||||
color2="%%color2.hex%%"
|
|
||||||
color3="%%color3.hex%%"
|
|
||||||
color4="%%color4.hex%%"
|
|
||||||
color5="%%color5.hex%%"
|
|
||||||
color6="%%color6.hex%%"
|
|
||||||
color7="%%color7.hex%%"
|
|
||||||
color8="%%color8.hex%%"
|
|
||||||
color9="%%color9.hex%%"
|
|
||||||
color10="%%color10.hex%%"
|
|
||||||
color11="%%color11.hex%%"
|
|
||||||
color12="%%color12.hex%%"
|
|
||||||
color13="%%color13.hex%%"
|
|
||||||
color14="%%color14.hex%%"
|
|
||||||
color15="%%color15.hex%%"
|
|
|
@ -1,8 +1,15 @@
|
||||||
profile {
|
profile {
|
||||||
output eDP-1 disable
|
output "eDP-1" {
|
||||||
output "LG Electronics MP59G 0x000672C5" mode 1920x1080 position 0,0 scale 1.0
|
disable
|
||||||
|
}
|
||||||
|
output "LG Electronics MP59G 0x000672C5" {
|
||||||
|
mode 1920x1080
|
||||||
|
position 0,0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
profile {
|
profile {
|
||||||
output eDP-1 enable scale 1.0
|
output "eDP-1" {
|
||||||
|
enable
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,30 +11,13 @@ set cleaner ctpvclear
|
||||||
# show hidden files
|
# show hidden files
|
||||||
set hidden true
|
set hidden true
|
||||||
|
|
||||||
# interpreter for shell commands
|
|
||||||
set shell sh
|
set shell sh
|
||||||
|
|
||||||
# set '-eu' options for shell commands
|
|
||||||
# These options are used to have safer shell commands. Option '-e' is used to
|
|
||||||
# exit on error and option '-u' is used to give error for unset variables.
|
|
||||||
# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
|
|
||||||
# $fx variables contain names with '*' or '?' characters. However, this option
|
|
||||||
# is used selectively within individual commands as it can be limiting at
|
|
||||||
# times.
|
|
||||||
set shellopts '-eu'
|
set shellopts '-eu'
|
||||||
|
|
||||||
# set internal field separator (IFS) to "\n" for shell commands
|
|
||||||
# This is useful to automatically split file names in $fs and $fx properly
|
|
||||||
# since default file separator used in these variables (i.e. 'filesep' option)
|
|
||||||
# is newline. You need to consider the values of these options and create your
|
|
||||||
# commands accordingly.
|
|
||||||
set ifs "\n"
|
set ifs "\n"
|
||||||
|
|
||||||
# leave some space at the top and the bottom of the screen
|
|
||||||
set scrolloff 10
|
set scrolloff 10
|
||||||
|
|
||||||
# Use the `dim` attribute instead of underline for the cursor in the preview pane
|
|
||||||
set cursorpreviewfmt "\033[7;2m"
|
set cursorpreviewfmt "\033[7;2m"
|
||||||
|
set drawbox
|
||||||
|
|
||||||
# use enter for shell commands
|
# use enter for shell commands
|
||||||
map <enter> shell
|
map <enter> shell
|
||||||
|
@ -68,14 +51,6 @@ map a :push %mkdir<space>
|
||||||
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
||||||
map r push :rename<space>
|
map r push :rename<space>
|
||||||
|
|
||||||
# make sure trash folder exists
|
|
||||||
# %mkdir -p ~/.trash
|
|
||||||
|
|
||||||
# move current file or selected files to trash folder
|
|
||||||
# (also see 'man mv' for backup/overwrite options)
|
|
||||||
# cmd trash %set -f; mv $fx ~/.trash
|
|
||||||
|
|
||||||
# define a custom 'delete' command
|
|
||||||
cmd delete ${{
|
cmd delete ${{
|
||||||
set -f
|
set -f
|
||||||
printf "$fx\n"
|
printf "$fx\n"
|
||||||
|
@ -84,8 +59,6 @@ cmd delete ${{
|
||||||
[ "$ans" = "y" ] && rm -rf $fx
|
[ "$ans" = "y" ] && rm -rf $fx
|
||||||
}}
|
}}
|
||||||
|
|
||||||
# use '<delete>' key for either 'trash' or 'delete' command
|
|
||||||
# map <delete> trash
|
|
||||||
map <delete> delete
|
map <delete> delete
|
||||||
|
|
||||||
# extract the current file with the right command
|
# extract the current file with the right command
|
||||||
|
@ -97,28 +70,17 @@ cmd extract ${{
|
||||||
*.tar.gz|*.tgz) tar xzvf $f;;
|
*.tar.gz|*.tgz) tar xzvf $f;;
|
||||||
*.tar.xz|*.txz) tar xJvf $f;;
|
*.tar.xz|*.txz) tar xJvf $f;;
|
||||||
*.zip) unzip $f;;
|
*.zip) unzip $f;;
|
||||||
*.rar) unrar x $f;;
|
#*.rar) unrar x $f;;
|
||||||
*.7z) 7z x $f;;
|
#*.7z) 7z x $f;;
|
||||||
esac
|
esac
|
||||||
}}
|
}}
|
||||||
|
|
||||||
# compress current file or selected files with tar and gunzip
|
map E extract
|
||||||
cmd tar ${{
|
|
||||||
set -f
|
cmd mkexec ${{
|
||||||
mkdir $1
|
chmod u+x $fx
|
||||||
cp -r $fx $1
|
printf "$fx is now executable"
|
||||||
tar czf $1.tar.gz $1
|
|
||||||
rm -rf $1
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
# compress current file or selected files with zip
|
map V mkexec
|
||||||
cmd zip ${{
|
|
||||||
set -f
|
|
||||||
mkdir $1
|
|
||||||
cp -r $fx $1
|
|
||||||
zip -r $1.zip $1
|
|
||||||
rm -rf $1
|
|
||||||
}}
|
|
||||||
|
|
||||||
cmd setbg "$1"
|
|
||||||
map b $setbg $f
|
|
||||||
|
|
|
@ -11,3 +11,10 @@ max-icon-size=64
|
||||||
default-timeout=5000
|
default-timeout=5000
|
||||||
ignore-timeout=1
|
ignore-timeout=1
|
||||||
font=Inconsolata 11
|
font=Inconsolata 11
|
||||||
|
|
||||||
|
|
||||||
|
[app-name=spotify_player]
|
||||||
|
border-color=#1ed760
|
||||||
|
background-color=#191414
|
||||||
|
text-color=#ffffff
|
||||||
|
default-timeout=2048
|
||||||
|
|
|
@ -70,12 +70,44 @@ zle -N zle-line-init
|
||||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
||||||
|
|
||||||
|
# Use lf to switch directories and bind it to ctrl-o
|
||||||
|
lfcd () {
|
||||||
|
tmp="$(mktemp -uq)"
|
||||||
|
trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT
|
||||||
|
lf -last-dir-path="$tmp" "$@"
|
||||||
|
if [ -f "$tmp" ]; then
|
||||||
|
dir="$(cat "$tmp")"
|
||||||
|
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
bindkey -s '^o' '^ulfcd\n'
|
||||||
|
|
||||||
|
bindkey -s '^a' '^ubc -lq\n'
|
||||||
|
|
||||||
|
bindkey -s '^f' '^ucd "$(dirname "$(fzf)")"\n'
|
||||||
|
|
||||||
|
bindkey '^[[P' delete-char
|
||||||
|
|
||||||
|
# Edit line in vim with ctrl-e:
|
||||||
|
autoload edit-command-line; zle -N edit-command-line
|
||||||
|
bindkey '^e' edit-command-line
|
||||||
|
bindkey -M vicmd '^[[P' vi-delete-char
|
||||||
|
bindkey -M vicmd '^e' edit-command-line
|
||||||
|
bindkey -M visual '^[[P' vi-delete
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias sudo='doas'
|
alias sudo='doas'
|
||||||
alias neofetch='fastfetch'
|
alias neofetch='fastfetch'
|
||||||
alias ls='ls -lah'
|
alias ls='ls -lah'
|
||||||
alias vim='nvim'
|
alias vim='nvim'
|
||||||
alias wal='hellwal -q'
|
alias wal='hellwal -q'
|
||||||
|
alias patch='bwroot patch'
|
||||||
|
alias tcc='bwroot tcc'
|
||||||
|
alias g++='bwroot g++'
|
||||||
|
alias gcc='bwroot gcc'
|
||||||
|
alias git='bwroot git'
|
||||||
|
alias clang='bwroot clang'
|
||||||
|
alias make='bwroot make'
|
||||||
|
|
||||||
# Commands
|
# Commands
|
||||||
fastfetch
|
fastfetch
|
||||||
|
|
77
.local/bin/abman
Executable file
77
.local/bin/abman
Executable file
|
@ -0,0 +1,77 @@
|
||||||
|
#!/bin/sh -x
|
||||||
|
|
||||||
|
scandevices() {
|
||||||
|
# https://github.com/bluez/bluez/issues/826
|
||||||
|
notify-send "abman" "Scanning for devices"
|
||||||
|
if [ "$(bluetoothctl show | grep "Powered: no")" ]; then
|
||||||
|
bluetoothctl power on
|
||||||
|
fi
|
||||||
|
devices="$(bluetoothctl --timeout 5 scan on | \
|
||||||
|
awk '/Device/ {if (NF > 3) {for (i=4; i<=NF; i++) printf $i " "; print ""} else print $3}')"
|
||||||
|
if [ -z "$devices" ]; then
|
||||||
|
notify-send "abman" "Error: No devices were found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
selection="$(printf "%s\n" "$devices" | fuzzel -d -p "Available devices: ")"
|
||||||
|
if [ -n "$selection" ]; then
|
||||||
|
mac=$(bluetoothctl devices | grep "$selection" | awk '{print $2}')
|
||||||
|
bluetoothctl connect "$mac" & notify-send "abman" "Connecting to $selection"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pc_device(){
|
||||||
|
devices="$(bluetoothctl devices | awk '{$1=$2=""; print substr($0,3)}')"
|
||||||
|
if [ -z "$devices" ]; then
|
||||||
|
notify-send "abman" "No previously connected devices"
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
selection="$(printf "%s\n" "$devices" | fuzzel -d -p "Device list: ")"
|
||||||
|
if [ -n "$selection" ]; then
|
||||||
|
if [ "$(bluetoothctl show | grep "Powered: no")" ]; then
|
||||||
|
bluetoothctl power on
|
||||||
|
fi
|
||||||
|
mac=$(bluetoothctl devices | grep "$selection" | awk '{print $2}')
|
||||||
|
bluetoothctl connect "$mac" & notify-send "abman" "Reconnecting to $selection"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
toggledisc() {
|
||||||
|
if [ "$(bluetoothctl show | grep "Discoverable: yes")" ]; then
|
||||||
|
bluetoothctl discoverable off
|
||||||
|
notify-send "abman" "Discoverable off"
|
||||||
|
else
|
||||||
|
bluetoothctl discoverable on
|
||||||
|
notify-send "abman" "Set device as discoverable for 3 minutes"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
togglepair() {
|
||||||
|
if [ "$(bluetoothctl show | grep "Pairable: yes")" ]; then
|
||||||
|
bluetoothctl pairable off
|
||||||
|
notify-send "abman" "Pairable off"
|
||||||
|
else
|
||||||
|
bluetoothctl pairable on
|
||||||
|
notify-send "abman" "Device is now pairable"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
switchstate() {
|
||||||
|
if [ "$(bluetoothctl show | grep "Powered: yes")" ]; then
|
||||||
|
bluetoothctl power off
|
||||||
|
notify-send "abman" "Bluetooth is disabled"
|
||||||
|
elif [ "$(bluetoothctl show | grep "Powered: no")" ]; then
|
||||||
|
bluetoothctl power on
|
||||||
|
notify-send "abman" "Bluetooth is enabled"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case $(printf "%s\n" " Connect Device" " Reconnect device" " Toggle discoverable" " Toggle Pairable" " Change State" | fuzzel -d -l 5) in
|
||||||
|
" Connect Device") scandevices ;;
|
||||||
|
" Reconnect device") pc_device ;;
|
||||||
|
" Toggle discoverable") toggledisc ;;
|
||||||
|
" Toggle Pairable") togglepair ;;
|
||||||
|
" Change State") switchstate ;;
|
||||||
|
*) exit ;;
|
||||||
|
esac
|
|
@ -1,9 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
|
||||||
# Show icon in slstatus:
|
|
||||||
# Video [ REC ]
|
|
||||||
# Audio [ REC ]
|
|
||||||
#
|
|
||||||
# amolinae's recording tool
|
# amolinae's recording tool
|
||||||
screencast(){
|
screencast(){
|
||||||
case $(printf "%s\n" " Mic ON" " Mic OFF" | fuzzel -d -l 3) in
|
case $(printf "%s\n" " Mic ON" " Mic OFF" | fuzzel -d -l 3) in
|
||||||
|
|
|
@ -9,6 +9,6 @@ img="$HOME/Pictures/$(date +"%d_%m_%y-%H_%M_%S").png"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-f) grim "$img" && wl-copy -t image/png < "$img" && notify ;;
|
-f) grim "$img" && wl-copy -t image/png < "$img" && notify ;;
|
||||||
-r) grim -g "$(slurp)" "$img" && wl-copy -t image/png < "$img" && notify ;;
|
-r) grim -g "$(slurp </dev/null)" "$img" && wl-copy -t image/png < "$img" && notify ;;
|
||||||
-h|*) echo "usage: aws [-f] [-r]" >&2; exit 1; ;;
|
-h|*) echo "usage: aws [-f] [-r]" >&2; exit 1; ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
#!/bin/sh -x
|
|
||||||
# Created by λmolinae
|
|
||||||
|
|
||||||
checkstate() {
|
|
||||||
if [ "$(bluetoothctl show | grep "Powered: yes")" ]; then
|
|
||||||
echo " Bluetooth ON"
|
|
||||||
else
|
|
||||||
echo " Bluetooth OFF"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
switchstate() {
|
|
||||||
case "$(checkstate | fuzzel -d)" in
|
|
||||||
" ON")
|
|
||||||
bluetoothctl power off
|
|
||||||
notify-send "Bluetooth" "Bluetooth is disabled"
|
|
||||||
;;
|
|
||||||
" OFF")
|
|
||||||
bluetoothctl power on
|
|
||||||
notify-send "Bluetooth" "Bluetooth is enabled"
|
|
||||||
;;
|
|
||||||
*) exit ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
scandevices() {
|
|
||||||
# https://github.com/bluez/bluez/issues/826
|
|
||||||
notify-send "Bluetooth" "Scanning for devices"
|
|
||||||
bluetoothctl --timeout 5 scan on
|
|
||||||
devices=$(bluetoothctl devices | awk '{$1=$2=""; print substr($0,3)}')
|
|
||||||
if [ -z "$devices" ]; then
|
|
||||||
notify-send "Bluetooth" "Error: No devices were found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: Remove previously connected devices.
|
|
||||||
selection="$(printf "%s\n" "$devices" | fuzzel -d -p "Available devices: ")"
|
|
||||||
if [ -n "$selection" ]; then
|
|
||||||
mac=$(bluetoothctl devices | grep "$selection" | awk '{print $2}')
|
|
||||||
bluetoothctl connect "$mac"
|
|
||||||
notify-send "Bluetooth" "Connecting to $selection"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
toggledisc() {
|
|
||||||
if [ "$(bluetoothctl show | grep "Discoverable: yes")" ]; then
|
|
||||||
bluetoothctl discoverable off
|
|
||||||
notify-send "Bluetooth" "Discoverable off"
|
|
||||||
else
|
|
||||||
bluetoothctl discoverable on
|
|
||||||
notify-send "Bluetooth" "Set device as discoverable for 3 minutes"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
togglepair() {
|
|
||||||
if [ "$(bluetoothctl show | grep "Pairable: yes")" ]; then
|
|
||||||
bluetoothctl pairable off
|
|
||||||
notify-send "Bluetooth" "Pairable off"
|
|
||||||
else
|
|
||||||
bluetoothctl pairable on
|
|
||||||
notify-send "Bluetooth" "Device is now pairable"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case $(printf "%s\n" " Connect Device" " Toggle discoverable" " Toggle Pairable" " Change State" | fuzzel -d) in
|
|
||||||
" Connect Device") scandevices ;;
|
|
||||||
" Toggle discoverable") toggledisc ;;
|
|
||||||
" Toggle Pairable") togglepair ;;
|
|
||||||
" Change State") switchstate ;;
|
|
||||||
*) exit ;;
|
|
||||||
esac
|
|
|
@ -1,17 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ROOT=""$HOME"/Documents/Miscellaneous/alpchroot"
|
ROOT="${HOME:-/home/amolinae}/Documents/Miscellaneous/alpchroot"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"") echo "usage: bwroot ARGUMENT" >&2; exit 1; ;;
|
|
||||||
*)
|
*)
|
||||||
bwrap \
|
bwrap \
|
||||||
--bind "$ROOT" / \
|
--bind "$ROOT" / \
|
||||||
--bind /proc /proc \
|
--bind /proc /proc \
|
||||||
--dev-bind /dev /dev \
|
--bind /sys /sys \
|
||||||
--bind "$PWD" "$PWD" \
|
--dev-bind /dev /dev \
|
||||||
--bind "$HOME" "$HOME" \
|
--bind "$PWD" "$PWD" \
|
||||||
--unshare-all \
|
--bind "$HOME" "$HOME" \
|
||||||
--share-net \
|
--unshare-all \
|
||||||
"$@" ;;
|
--share-net \
|
||||||
esac
|
"$@" ;;
|
||||||
|
"") echo "usage: bwroot ARGUMENT" >&2; exit 1; ;;
|
||||||
|
esac
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Get user selection via fuzzel from emoji file.
|
# Get user selection via fuzzel from emoji file.
|
||||||
chosen="$(cut -d ';' -f1 ~/.local/share/misc/chars/* | fuzzel -d -l 16 -w 32 | sed "s/ .*//")"
|
chosen="$(cut -d ';' -f1 ~/.local/share/misc/chars/* | fuzzel -d | sed "s/ .*//")"
|
||||||
|
|
||||||
# Exit if none chosen.
|
# Exit if none chosen.
|
||||||
[ -z "$chosen" ] && exit
|
[ -z "$chosen" ] && exit
|
||||||
|
|
7
.local/bin/rec
Executable file
7
.local/bin/rec
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [[ ! -z "$(pgrep wf-recorder)" ]]; then
|
||||||
|
printf " [ REC ] \n"
|
||||||
|
else
|
||||||
|
printf " \n"
|
||||||
|
fi
|
|
@ -5,7 +5,11 @@ case $(printf "%s\n" " Lock session" " Log out" " Kill process" "
|
||||||
swaylock
|
swaylock
|
||||||
;;
|
;;
|
||||||
" Log out")
|
" Log out")
|
||||||
kill "$(pidof dwl)"
|
if pidof dwl > /dev/null; then
|
||||||
|
kill "$(pidof dwl)"
|
||||||
|
elif pidof river > /dev/null; then
|
||||||
|
kill "$(pidof river)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
" Kill process")
|
" Kill process")
|
||||||
ps -o pid,comm,user | \
|
ps -o pid,comm,user | \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue