Update dotfiles

This commit is contained in:
diego castillo salazar 2023-04-21 12:33:06 -05:00
parent c00a57474a
commit 9a82d82fd6
18 changed files with 83 additions and 2308 deletions

BIN
.local/bin/busybox.static Executable file

Binary file not shown.

BIN
.local/bin/fzf Executable file

Binary file not shown.

BIN
.local/bin/nnn Executable file

Binary file not shown.

View File

@ -19,7 +19,7 @@ if [ -d "$dr" ]
then
cd $dr
else
mkdir /home/$USER/ytdl-mpv
mkdir /home/$USER/Musica
cd $dr
fi

View File

@ -277,7 +277,7 @@ quick_menu_scripting () {
#the menu to use instead of fzf when -D is specified
external_menu () {
#dmenu extremely laggy when showing tabs
tr -d '\t' | remove_ansi_escapes | dmenu -i -l 30 -p "$1"
tr -d '\t' | remove_ansi_escapes | dmenu -i -p "$1"
}
search_prompt_menu () {

View File

@ -1,23 +0,0 @@
.Dd 2015-10-08
.Dt CRON 1
.Os sbase
.Sh NAME
.Nm cron
.Nd clock daemon
.Sh SYNOPSIS
.Nm
.Op Fl f Ar file
.Op Fl n
.Sh DESCRIPTION
.Nm
schedules commands to be run at specified dates and times.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl f Ar file
Use the specified
.Ar file
instead of the default
.Pa /etc/crontab .
.It Fl n
Do not daemonize.
.El

View File

@ -4,7 +4,7 @@ alias sx='startx'
# alias doas
alias ds='doas'
alias d='doas'
# alias xbps
@ -25,8 +25,8 @@ alias xbuh='doas xbps-pkgdb -m unhold'
# alias xbps-src
alias srclean='cd $HOME/Void-packages/ && ./xbps-src clean-repocache && ./xbps-src clean && ./xbps-src remove-autodeps && rm -rf hostdir/sources/* && xbps-rindex -r ~/Void-packages/hostdir/binpkgs && xbps-rindex -c ~/Void-packages/hostdir/binpkgs'
alias srcins='cd $HOME/Void-packages/ && doas xbps-install -R ./hostdir/binpkgs'
alias srcinf='cd $HOME/Void-packages/ && doas xbps-install -f ./hostdir/binpkgs'
alias srcins='cd $HOME/Void-packages/hostdir/binpkgs && doas xbps-install -R $HOME/Void-packages/hostdir/binpkgs'
alias srcinf='cd $HOME/Void-packages/ && doas xbps-install -f /hostdir/binpkgs'
alias srcin='doas xbps-install -fR home/diegofcs/Void-packages/hostdir/binpkgs/nonfree'
alias srcmp='cd $HOME/Void-packages/ && ./xbps-src -j $(nproc) pkg'
alias srcmf='cd $HOME/Void-packages/ && ./xbps-src -j $(nproc) -f pkg'
@ -37,7 +37,7 @@ alias xboc='cd $HOME/Void-packages./xbps-query -R --property=build-options'
# alias status services
alias svl='ds sv status /var/service/*'
alias svl='doas sv status /var/service/*'
# alias patch
@ -51,6 +51,8 @@ alias pss='passmenu2'
# alias varios
alias v='vi'
alias vm='vis'
alias dv='doas vis'
alias c='cd'
alias cl='clear'
alias chm='chmod +x'
@ -67,10 +69,11 @@ alias ......='cd ../../../../..'
alias top='top -d 1 -u diegofcs'
alias sf='scriptfetch'
alias gup='xbup && cd Void-packages && git pull && ./xbps-src bootstrap-update && xbclean && srclean'
alias n3='nnn'
alias yt='yt-dlp "$(ytfzf -I L "$1")" -o - | ffplay - -autoexit -loglevel quiet'
alias mu='yt-dlp "$(ytfzf -I L "$1")" -o - | ffplay - -nodisp -autoexit -loglevel quiet'
alias ping='ds ping -c 8 voidlinux.org'
alias n3='nnn -d'
alias yt='yt-dlp "$(ytfzf -D -I L "$1")" -o - | ffplay - -autoexit -loglevel quiet'
alias mu='yt-dlp "$(ytfzf -D -I L "$1")" -o - | ffplay - -nodisp -autoexit -loglevel quiet'
alias ping='doas ping -c 8 voidlinux.org'
alias bg='display -resize 1366x768! -window root '
#alias source shell & alias
@ -83,8 +86,3 @@ alias dt='doas vis /etc/wpa_supplicant/wpa_supplicant.conf'
alias ctw='doas wpa_supplicant -B -D wext -i wlp0s29u1u1 -c /etc/wpa_supplicant/wpa_supplicant.conf'
alias lwf='wpa_cli list_networks'
alias swf='wpa_cli select_networks'
#alias lugares usados
alias qt='cd $HOME/.config/qutebrowser'
alias vs='cd $HOME/.config/vis && vis visrc.lua'

View File

@ -6,7 +6,7 @@
# bright - to down brightness in 0.1 step
# Change the output name, use xrandr to know yours
output="LVDS1"
output="LVDS-1"
case "$1" in

View File

@ -1,134 +0,0 @@
#!/bin/sh
# Usage:
# `$0`: Ask for recording type via dmenu
# `$0 screencast`: Record both audio and screen
# `$0 video`: Record only screen
# `$0 audio`: Record only audio
# `$0 kill`: Kill existing recording
#
# If there is already a running instance, user will be prompted to end it.
updateicon() { \
echo "$1" > /tmp/recordingicon
pkill -RTMIN+9 "${STATUSBAR:?}"
}
killrecording() {
recpid="$(cat /tmp/recordingpid)"
# kill with SIGTERM, allowing finishing touches.
kill -15 "$recpid"
rm -f /tmp/recordingpid
updateicon ""
pkill -RTMIN+9 "${STATUSBAR:?}"
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
sleep 3
kill -9 "$recpid"
exit
}
screencast() { \
ffmpeg -y \
-f x11grab \
-framerate 24 \
-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-i $DISPLAY \
# -f alsa -i default \
-f sndio -i snd/0 \
-r 24 -async 1 -vsync -1 \
-c:v libx264rgb -crf 0 -preset ultrafast -c:a aac \
# -preset ultrafast -c:a libvorbis \
"$HOME/Videos/screencast-$(date '+%y%m%d-%H%M%S').mkv" &
echo $! > /tmp/recordingpid
updateicon "⏺️🎙️"
}
screencastmobile() { \
ffmpeg -y \
-f x11grab \
-framerate 60 \
-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-i $DISPLAY \
-f alsa -i default \
-r 30 \
-c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p -loglevel panic -c:a aac \
"$HOME/Videos/screencast-$(date '+%y%m%d-%H%M%S').mp4" &
echo $! > /tmp/recordingpid
updateicon "⏺️🎙️"
}
video() { ffmpeg \
-f x11grab \
-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-i $DISPLAY \
-c:v libx264 -qp 0 -r 30 \
"$HOME/Videos/video-$(date '+%y%m%d-%H%M%S').mkv" &
echo $! > /tmp/recordingpid
updateicon "⏺️"
}
videomobile() { \
ffmpeg -y \
-f x11grab \
-framerate 60 \
-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-i $DISPLAY \
-r 30 \
-c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p -loglevel panic\
"$HOME/Videos/video-$(date '+%y%m%d-%H%M%S').mp4" &
echo $! > /tmp/recordingpid
updateicon "⏺️🎙️"
}
webcamhidef() { ffmpeg \
-f v4l2 \
-i /dev/video0 \
-video_size 1920x1080 \
"$HOME/Videos/webcam-$(date '+%y%m%d-%H%M%S').mp4" &
echo $! > /tmp/recordingpid
updateicon "🎥"
}
webcam() { ffmpeg \
-f v4l2 \
-i /dev/video0 \
-video_size 640x480 \
"$HOME/Videos/webcam-$(date '+%y%m%d-%H%M%S').mp4" &
echo $! > /tmp/recordingpid
updateicon "🎥"
}
audio() { \
ffmpeg \
-f alsa -i default \
-c:a flac \
"$HOME/Videos/audio-$(date '+%y%m%d-%H%M%S').mp4" &
echo $! > /tmp/recordingpid
updateicon "🎙️"
}
askrecording() { \
choice=$(printf "screencast\\nvideo\\naudio\\nwebcam\\nscreencastmobile\\nvideomobile" | dmenu -i -sb "#252525" -p "Seleccione el modo de grabación:")
case "$choice" in
screencast) screencast;;
audio) audio;;
video) video;;
webcam) webcam;;
screencastmobile) screencastmobile;;
videomobile) videomobile;;
esac
}
asktoend() { \
response=$(printf "No\\nSí" | dmenu -i -sb "#252525" -p "Grabación activa.¿Desea finalizar?") &&
[ "$response" = "Sí" ] && killrecording
}
case "$1" in
screencast) screencast;;
audio) audio;;
video) video;;
kill) killrecording;;
*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
esac

View File

@ -1,27 +1,22 @@
#!/bin/sh
RET=$(printf "Turn off\nReboot\nBlock\nSuspend\nHibernate\nCancel" | dmenu -c -l 7 )
RET=$(printf "Apagar\nReiniciar\nBloquear\nSuspender\nHibernar\nCancelar" | dmenu)
#RET=$(echo "" Apagar"\n" Reiniciar"\n" Bloquear"\n" Suspender"\n" logout"\ncancel" | dmenu -l 7 -p " Logout")
case $RET in
"Turn off")
st -T "warning" -g "42x8+480+300" -f "Hack Nerd Font:size=8" -e su - root -c 'shutdown -h now'
#urxvtc -T 'warning' -geometry '42x8-540-320' -imfont 'liberationmono:bold:pixelsize=12' -e su - root -c 'shutdown -h now'
"Apagar")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfont:pixelsize=8' -e su - root -c 'shutdown -h now'
;;
"Reboot")
st -T "warning" -g "42x8+480+300" -f "Hack Nerd Font:size=8" -e su - root -c 'shutdown -r now'
#urxvtc -T 'warning' -geometry '42x8-540-320' -imfont 'liberationmono:bold:pixelsize=12' -e su - root -c 'shutdown -r now'
"Reiniciar")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfont:pixelsize=8' -e su - root -c 'shutdown -r now'
;;
"Block")
"Bloquear")
slock
;;
"Suspend")
st -T 'warning' -g '42x8+480+300' -f 'Hack Nerd Font:size=8' -e su - root -c zzz && slock
#urxvtc -T 'warning' -geometry '42x8-540-320' -imfont 'liberationmono:bold:pixelsize=12' -e su - root -c 'zzz && slock'
"Suspender")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfontd:pixelsize=8' -e su - root -c 'zzz && slock'
;;
"Hibernate")
st -T "warning" -g "42x8+480+300" -f "Hack Nerd Font:size=8" -e su - root -c ZZZ && slock
#urxvtc -T 'warning' -geometry '42x8-540-320' -imfont 'liberationmono:bold:pixelsize=12' -e su - root -c 'ZZZ && slock'
;;
"Hibernar")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfont:pixelsize=8' -e su - root -c 'ZZZ && slock'
;;
*) ;;
esac

View File

@ -1,24 +0,0 @@
#!/bin/sh
MDIR="$HOME/Musica"
INPUT=$(echo "Add\nPlay\nPause\nContinue\nNext\nExit" | dmenu -p "Ffplay reproductor:")
case $INPUT in
Add)
find $MDIR$(ls $MDIR | dmenu -i -l 8)
;;
Play)
for f in "$MDIR"/*; do herbe $f | ffplay -x 800 -nodisp -loglevel quiet -autoexit $f; done
;;
Pause)
kill -STOP $(pgrep ffplay)
;;
Continue)
kill -CONT $(pgrep ffplay)
;;
Next)
kill $(pgrep ffplay)
;;
Exit)
pkill music && pkill ffplay
;;
esac

27
scripts/musica Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
MDIR="$HOME/Musica"
INPUT=$(echo "ADD\nPLAY\nPAUSE\nCONTINUE\nNEXT\nSTOP\nEXIT" | dmenu )
case $INPUT in
ADD)
find $MDIR$(ls $MDIR | dmenu -i -l 8)
;;
PLAY)
for f in "$MDIR"/*; do herbe $f | ffplay -x 800 -nodisp -loglevel quiet -autoexit $f; done
;;
PAUSE)
kill -STOP $(pgrep ffplay)
;;
CONTINUE)
kill -CONT $(pgrep ffplay)
;;
NEXT)
kill $(pgrep ffplay)
;;
STOP)
kill $(pgrep ffplay)
;;
EXIT)
kill $(pgrep ffplay)
;;
esac

File diff suppressed because it is too large Load Diff

View File

@ -4,11 +4,14 @@
kernel="$(uname -r)"
os="$(awk -F'"' '/PRETTY/ {print ($2)}' /etc/os-release)"
cpu="$(lscpu | awk '/Nombre/ {print $4, $5, $7, $8, $9}')"
cpu="$(lscpu | awk '/Nombre/ {print $4, $5}')"
cpuinfo="$(lscpu | awk '/Nombre/ {print $6, $7, $8, $9}')"
name="${USER:-`id -nu`}@${HOSTNAME:-`hostname`}"
sys="$(echo $(uname) | awk '{print toupper($0)}')"
st=$(df -h / | awk '/dev/{print $3" / "$2}')
mem=$(free -m | awk '/^Mem:/ {print $3 "MiB / " $2 "MiB"}')
sh=$(df -h /home | awk '/dev/{print $3" / "$2}')
mem=$(free -m | awk '/^Mem:/ {print $3 "M / " $2 "M"}')
sw=$(swapon | awk '/dev/{print $4" / "$3}')
shell=$(printf "$(basename $SHELL)" | awk '{print ($0)}')
init=$(awk '{print ($0)}' /proc/1/comm)
pkg="$(xbps-query -l | wc -l)"
@ -16,42 +19,32 @@ manager=$(which xbps-query 2>/dev/null) && manager=${manager##*/}
wm="$(awk 'END {print $2}' "$HOME"/.xinitrc)"
tr="$(printf "$TERM" | awk '{print ($0)}')"
uptime="$(uptime -p | sed 's/up //')"
#iv="$(printf "$IMAGEVIEWER" | awk '{print toupper($0)}')"
#file="$(printf "$FILE" | awk '{print toupper($0)}')"
#ed="$(printf "$EDITOR" | awk '{print toupper($0)}')"
#br="$(printf "$BROWSER" | awk '{print toupper($0)}')"
#mn="$(printf "$MENU" | awk '{print toupper($0)}')"
#font="$(awk -F'"' '/font/ {print toupper($2)}' "${HOME}/.gtkrc-2.0")"
iv="$(printf "$IMAGEVIEWER" | awk '{print($0)}')"
file="$(printf "$FILE" | awk '{print($0)}')"
ed="$(printf "$EDITOR" | awk '{print($0)}')"
br="$(printf "$BROWSER" | awk '{print($0)}')"
mn="$(printf "$MENU" | awk '{print($0)}')"
## Void-Linux
#echo "
#┌────────────────────────────────────────────────────┐
#│ │
# Host  ${name}${reset}
# ------- Os  ${os}${reset}
# _ \______ - Cpu  ${cpu}${reset}
# | \ ___ \ | Wm  ${wm}${reset}
# | | / \ | | Packages  ${pkg} (${manager})${reset}
# | | \___/ | | Kernel  ${kernel}${reset}
# | \______ \_| Shell  ${shell}${reset}
# -_______\ Init  ${init}${reset}
# Memory  ${mem}${reset}
# Uptime  ${uptime}
#│ │
#└────────────────────────────────────────────────────┘
#"
echo "
Host: ${name}
Os: ${os}
Kernel: ${kernel}
Init: ${init}
Pkgs: ${pkg} (${manager})
Shell: ${shell}
Term: ${tr}
Wm: ${wm}
Cpu: ${cpu}
Ram: ${mem}
Store: ${st}
Uptime: ${uptime}
\033[1;36m\033[34mHost..........\033[00m ${name}
\033[1;36m\033[34mOs............\033[00m ${os}
\033[1;36m\033[34mCpu...........\033[00m ${cpu}
\033[1;36m\033[34mCpu info......\033[00m ${cpuinfo}
\033[1;36m\033[34mWm............\033[00m ${wm}
\033[1;36m\033[34mPackages......\033[00m ${pkg} (${manager})
\033[1;36m\033[34mTerminal......\033[00m ${tr}
\033[1;36m\033[34mKernel........\033[00m ${kernel}
\033[1;36m\033[34mShell.........\033[00m ${shell}
\033[1;36m\033[34mInit..........\033[00m ${init}
\033[1;36m\033[34mRam used......\033[00m ${mem}
\033[1;36m\033[34mSwap used.....\033[00m ${sw}
\033[1;36m\033[34mStore root....\033[00m ${st}
\033[1;36m\033[34mStore home....\033[00m ${sh}
\033[1;36m\033[34mImagen Viewer.\033[00m ${iv}
\033[1;36m\033[34mFile viewer...\033[00m ${file}
\033[1;36m\033[34mEditor........\033[00m ${ed}
\033[1;36m\033[34mBrowser.......\033[00m ${br}
\033[1;36m\033[34mMenu..........\033[00m ${mn}
\033[1;36m\033[34mUptime........\033[00m ${uptime}
"

View File

@ -1,8 +0,0 @@
#!/bin/sh
SCRATCHPAD_NAME=$1
[ -z $SCRATCHPAD_NAME ] && SCRATCHPAD_NAME="sctpad"
xdotool search --onlyvisible --classname $SCRATCHPAD_NAME windowunmap \
|| xdotool search --classname $SCRATCHPAD_NAME windowmap \
|| $1 &

View File

@ -1,3 +1,3 @@
#!/bin/sh
urxvtc -T "nnn - terminal file manager" -e nnn -d
urxvtc -T "nnn - terminal file manager" -e nnn -d