various changes
modified: .config/coc/history.json modified: .config/gtk-2.0/gtkfilechooser.ini modified: .config/newsboat/config modified: .config/nvim/init.vim modified: .config/qutebrowser/autoconfig.yml modified: .config/qutebrowser/qsettings/QtProject.conf modified: .config/zsh/.zshrc modified: .local/bin/castscreen modified: .local/bin/dmenuvpn modified: .local/bin/statusbar/internet deleted: .local/bin/tools/bright modified: .local/bin/tools/ce modified: .local/bin/tools/hover modified: .local/bin/tools/ripper modified: .local/bin/tools/startmpv modified: .zprofile
This commit is contained in:
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
case $1 in
|
||||
"set") printf %0.f $( echo "scale=0; $2 * 9.37" | bc -l ) > /sys/class/backlight/intel_backlight/brightness;;
|
||||
"add") current=$( </sys/class/backlight/intel_backlight/brightness )
|
||||
new=$( printf %.0f $(echo "$current + $2 * 9.37" | bc -l ) )
|
||||
[ $new -gt 936 ] && bright set 937 || ( [ $new -lt 0 ] && bright set 0 || bright set "$(( new + 1 ))" ) ;;
|
||||
"del") bright add "-$2";;
|
||||
esac
|
@ -1,4 +1,18 @@
|
||||
#!/bin/bash
|
||||
currentdir="$(pwd)"
|
||||
file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | fzf -e --query="$*")"
|
||||
[ "$file" = "" ] || ( cd "$( dirname "$file" )" && $EDITOR "$file" && cd "$currentdir" )
|
||||
#file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | fzf -e --query="$*")"
|
||||
#[ "$file" = "" ] || ( cd "$( dirname "$file" )" && $EDITOR "$file" && cd "$currentdir" )
|
||||
ppid () { ps -p ${1:-$$} -o ppid=; }
|
||||
shell="$(ps aux | grep $( ppid ) | head -n1 | awk '{print $11}' )"
|
||||
#/bin/sh probably means we're in dmenu_run
|
||||
if [ "$shell" = "/bin/sh" ]; then
|
||||
file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | dmenu -l 10 -p 'open what file?' )"
|
||||
[ -z "$file" ] && exit
|
||||
## NEEDS TO BE WORKED ON
|
||||
cd "$( dirname "$file" )" && st $EDITOR "$file"
|
||||
else
|
||||
currentdir="$(pwd)"
|
||||
file="$( du -a ~/.config/* ~/.local/src/* ~/.local/bin/* | awk '{print $2}' | fzf -e --query="$*")"
|
||||
[ -z "$file" ] && exit
|
||||
cd "$( dirname "$file" )" && rifle "$file" && cd "$currentdir"
|
||||
fi
|
||||
|
@ -12,5 +12,7 @@ case "$1" in
|
||||
right) horizontal=$(($(xdotool getdisplaygeometry | awk '{print $1}') - newwidth - 2 * borderwidth ))
|
||||
vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newheight - 2 * borderwidth )) ;;
|
||||
esac
|
||||
xdotool windowsize "$current" $newwidth $newheight
|
||||
xdotool windowmove "$current" $horizontal $vertical
|
||||
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
|
||||
wmctrl -r :ACTIVE: -e 0,$horizontal,$vertical,$newwidth,$newheight
|
||||
#xdotool windowsize "$current" $newwidth $newheight
|
||||
#xdotool windowmove "$current" $horizontal $vertical
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#needed if run as cronjob
|
||||
export XDG_VIDEOS_DIR=$HOME/vids
|
||||
|
||||
echo $XDG_VIDEOS_DIR
|
||||
DLARCHIVE=$XDG_VIDEOS_DIR/.downloaded
|
||||
DLLOC=$XDG_VIDEOS_DIR
|
||||
CHANNELSFILE=$XDG_VIDEOS_DIR/.channels
|
||||
|
@ -6,9 +6,7 @@ js_playlist_index_loc="$HOME/src/youtube-playlist-video-ids"
|
||||
# I've saved my API key in my password manager, I reccomend you to do something similar.
|
||||
API_key="$(pass show 'Misc/Youtube Data API v3')"
|
||||
if echo "$1" | grep -qE 'youtube.*list'; then
|
||||
echo "$1"
|
||||
playlist_id="$( echo "$1" | perl -pe "s|^.*?(\?\|&)list=(.*?)|\2|; s|&index=[0-9]+||" )"
|
||||
echo PL_id:$playlist_id
|
||||
notify-send "startmpv" "Searching for all videos in playlist..."
|
||||
npm start --prefix "$js_playlist_index_loc" -- --api-key "$API_key" --playlist-id $playlist_id | sed 's/^/https:\/\/www.youtube.com\/watch?v=/' | xargs mpv || notify-send "startmpv" "An error has occured with playlist $playlist_id"
|
||||
else
|
||||
|
Reference in New Issue
Block a user