Livecode & Cover
This commit is contained in:
parent
8ae0cef391
commit
b287e51f7a
|
@ -82,7 +82,7 @@ set draw_progress_bar_in_status_bar true
|
|||
set draw_borders false
|
||||
|
||||
# Display the directory name in tabs?
|
||||
set dirname_in_tabs false
|
||||
set dirname_in_tabs true
|
||||
|
||||
# Enable the mouse support?
|
||||
set mouse_enabled true
|
||||
|
@ -218,7 +218,7 @@ alias mark scout -mr
|
|||
alias unmark scout -Mr
|
||||
alias search scout -rs
|
||||
alias search_inc scout -rts
|
||||
alias travel scout -aefklst
|
||||
alias travel scout -aefiklst
|
||||
|
||||
# == Define keys for the browser
|
||||
# Basic
|
||||
|
@ -228,6 +228,7 @@ copymap q ZZ ZQ
|
|||
|
||||
map R reload_cwd
|
||||
map F set freeze_files!
|
||||
map <A-l> redraw_window
|
||||
map <C-r> reset
|
||||
map <C-c> abort
|
||||
map <esc> change_mode normal
|
||||
|
@ -307,9 +308,9 @@ copymap K <C-U>
|
|||
# Jumping around
|
||||
map H history_go -1
|
||||
map L history_go 1
|
||||
map ] move_parent 1
|
||||
map [ move_parent -1
|
||||
map } traverse
|
||||
map } move_parent 1
|
||||
map { move_parent -1
|
||||
map ] traverse
|
||||
map ) jump_non
|
||||
|
||||
map gh cd ~
|
||||
|
@ -321,17 +322,16 @@ map g. cd ~/.config
|
|||
map gT cd ~/.local/share/Trash/files/
|
||||
map gm cd ~/Music/Albums
|
||||
map gM cd /media
|
||||
map gr cd /
|
||||
map gR eval fm.cd(ranger.RANGERDIR)
|
||||
map gR cd /
|
||||
map gr eval fm.cd(ranger.RANGERDIR)
|
||||
map g? cd /usr/share/doc/ranger
|
||||
map gl cd -r .
|
||||
map gL cd -r %f
|
||||
|
||||
# External Programs
|
||||
map E edit
|
||||
map du shell -p du --max-depth=1 -h --apparent-size
|
||||
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
|
||||
#map yp yank path
|
||||
#map yd yank dir
|
||||
#map yn yank name
|
||||
map yp shell -f echo -n %%d/%%f | xsel -i; xsel -o | xsel -i -b
|
||||
map yd shell -f echo -n %%d | xsel -i; xsel -o | xsel -i -b
|
||||
map yn shell -f echo -n %%f | xsel -i; xsel -o | xsel -i -b
|
||||
|
@ -488,7 +488,7 @@ cmap <tab> eval fm.ui.console.tab()
|
|||
cmap <s-tab> eval fm.ui.console.tab(-1)
|
||||
cmap <ESC> eval fm.ui.console.close()
|
||||
cmap <CR> eval fm.ui.console.execute()
|
||||
cmap <C-l> redraw_window
|
||||
cmap <A-l> redraw_window
|
||||
|
||||
copycmap <ESC> <C-c>
|
||||
copycmap <CR> <C-j>
|
||||
|
@ -554,7 +554,7 @@ copypmap <PAGEDOWN> n f <C-F> <Space>
|
|||
copypmap <PAGEUP> p b <C-B>
|
||||
|
||||
# Basic
|
||||
#pmap <C-l> redraw_window
|
||||
pmap <A-l> redraw_window
|
||||
pmap <ESC> pager_close
|
||||
copypmap <ESC> q Q i <F3>
|
||||
pmap E edit_file
|
||||
|
@ -587,7 +587,7 @@ tmap <pageup> eval -q fm.ui.taskview.task_move(0)
|
|||
tmap <delete> eval -q fm.ui.taskview.task_remove()
|
||||
|
||||
# Basic
|
||||
#tmap <C-l> redraw_window
|
||||
tmap <A-l> redraw_window
|
||||
tmap <ESC> taskview_close
|
||||
copytmap <ESC> q Q w <C-c>
|
||||
|
||||
|
@ -596,7 +596,7 @@ map xc shell chmod -x %s
|
|||
map mkd console mkdir%space
|
||||
map sc console shell ln -sT%space
|
||||
map bg shell hsetroot -fill %f
|
||||
map rec shell ~/bin/video.sh
|
||||
map rec shell ~/bin/screenit.sh
|
||||
map Ma shell mpc add "%s"
|
||||
map Ms shell mpc play
|
||||
map Mp shell mpc toggle
|
||||
|
|
|
@ -35,7 +35,7 @@ FILE_EXTENSION_LOWER="${FILE_EXTENSION,,}"
|
|||
|
||||
# Settings
|
||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
||||
HIGHLIGHT_TABWIDTH=8
|
||||
HIGHLIGHT_TABWIDTH=4
|
||||
HIGHLIGHT_STYLE='pablo'
|
||||
PYGMENTIZE_STYLE='autumn'
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ configuration {
|
|||
display-drun: "Activate";
|
||||
display-run: "Execute";
|
||||
display-window: "Window";
|
||||
show-icons: true;
|
||||
show-icons: false;
|
||||
drun-icon-theme: "papirus";
|
||||
sidebar-mode: true;
|
||||
sidebar-mode: true;
|
||||
}
|
||||
|
||||
* {
|
||||
|
|
2
.zshrc
2
.zshrc
|
@ -505,7 +505,7 @@ source ~/.local/share/icons-in-terminal/icons_bash.sh
|
|||
alias p='pacui'
|
||||
alias sr='sr -browser=links' # open in cli browser
|
||||
alias surfraw='surfraw -browser=$BROWSER' # open in gui browser
|
||||
#alias foxdot='python -m FoxDot'
|
||||
alias foxdot='python -m FoxDot'
|
||||
alias ex='exercism'
|
||||
|
||||
# MAXIMUM VERBOSITY YIELDS MAXIMUM RESULTS
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
sleep 5
|
||||
xdotool search --class polybar windowunmap
|
||||
xdotool search --name "Polybar tray window" windowunmap
|
||||
bspc config top_padding $((0-8))
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
xdotool search --class polybar windowmap
|
||||
xdotool search --onlyvisible --name "Polybar tray window" windowmap
|
||||
bspc config top_padding $((20-8))
|
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash
|
||||
# Video demo at: http://www.youtube.com/watch?v=TyDX50_dC0M
|
||||
|
||||
# by: Rhomboid
|
||||
# http://www.reddit.com/r/commandline/comments/18yp5b/bash_script_to_update_multiple_blocklists/c8j6v5a
|
||||
|
||||
# Edit by: gotbletu
|
||||
# https://www.youtube.com/user/gotbletu
|
||||
# https://twitter.com/gotbletu
|
||||
|
||||
# Transmission does not allow multiple blocklist by default or is not simple.
|
||||
# This script merges multiple blocklist into one file.
|
||||
# Be sure to restart your bt client/daemon to use the new iplist.
|
||||
# Make sure to enable the blocklist and keep the url empty in your config file.
|
||||
# Example:
|
||||
# "blocklist-enabled": true,
|
||||
# "blocklist-url": "",
|
||||
|
||||
# Do P2P Blocklists Keep You Safe?
|
||||
# http://torrentfreak.com/do-p2p-blocklists-keep-you-safe/
|
||||
# TLDR: 75-80% safe; not 100% foolproof
|
||||
|
||||
# Some suggested blocklist:
|
||||
# http://www.iblocklist.com/lists.php
|
||||
|
||||
# Bluetack list
|
||||
# level1 # General default list.
|
||||
# level2 # Labs or researchers.
|
||||
# level3 # The paranoids list.
|
||||
# bt_bogon # Unallocated addresses.
|
||||
# bt_dshield # known hackers
|
||||
# bt_hijacked # spammers
|
||||
# bt_microsoft # bill gates
|
||||
# bt_templist # Suspected bad peers.
|
||||
# bt_spyware # Suspected spy/malware.
|
||||
|
||||
# TBG list
|
||||
# ijfqtofzixtwayqovmxn # primary threat; anti p2p company
|
||||
# ecqbsykllnadihkdirsh # General Corporate Ranges
|
||||
# ewqglwibdgjttwttrinl # Bogon by TBG; Unallocated addresses
|
||||
# tbnuqfclfkemqivekikv # Hijacked by TBG; spammers
|
||||
## jcjfaxgyyshvdbceroxf # Business ISPs
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
# blocklist to download from
|
||||
URLS=(
|
||||
http://list.iblocklist.com/?list=bt_level1
|
||||
http://list.iblocklist.com/?list=bt_level2
|
||||
http://list.iblocklist.com/?list=bt_level3
|
||||
http://list.iblocklist.com/?list=bt_bogon
|
||||
http://list.iblocklist.com/?list=bt_dshield
|
||||
http://list.iblocklist.com/?list=bt_hijacked
|
||||
http://list.iblocklist.com/?list=bt_microsoft
|
||||
http://list.iblocklist.com/?list=bt_templist
|
||||
http://list.iblocklist.com/?list=bt_spyware
|
||||
http://list.iblocklist.com/?list=ijfqtofzixtwayqovmxn
|
||||
http://list.iblocklist.com/?list=ecqbsykllnadihkdirsh
|
||||
http://list.iblocklist.com/?list=tbnuqfclfkemqivekikv
|
||||
http://list.iblocklist.com/?list=ewqglwibdgjttwttrinl
|
||||
)
|
||||
|
||||
# blocklist directory
|
||||
DIR="$HOME/.config/transmission-daemon/blocklists"
|
||||
|
||||
# remove old blocklist
|
||||
rm -f $DIR/extras*
|
||||
|
||||
# download new blocklist
|
||||
wget "${URLS[@]}" -O - | gunzip | LC_ALL=C sort -u > "$DIR/extras.txt"
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Hacked together from various bits and pieces from github, r/unixporn, and the awesome help from people in #bash, #zsh, and #archlinux-newbie on freenode.
|
||||
# This script assumes your music library is organized like so:
|
||||
# $music_dir/artist/album
|
||||
# Steal it, use it, mod it, share it.
|
||||
|
||||
# CONFIG ----------------------------------------------------
|
||||
music_dir="$HOME/Music/Albums" # This needs to be the same as in mpd.conf
|
||||
cover_resize="100" # What should the covers be resized to
|
||||
img_reg=".*/(cover|front|folder|art).(jpg|jpeg|png|gif)$" # What is the cover file called?
|
||||
artist_color="##a1b56c"
|
||||
album_color="##ad7fa8"
|
||||
song_color="##34e2e2"
|
||||
|
||||
# What do we want the notification to look like?
|
||||
form="\n<b>Artist:</b>\t<span color='$artist_color'>%artist%</span>\n<b>Track:</b>\t<span color='$song_color'>%title%</span>\n<b>Album:</b>\t<span color='$album_color'>%album%</span>"
|
||||
# END CONFIG ----------------------------------------------------
|
||||
|
||||
# These are some variables we need for things to work
|
||||
song="$(mpc --format %file% current)"
|
||||
album="$(mpc --format %album% current)"
|
||||
artist="$(mpc --format %artist% current)"
|
||||
albart="$(mpc --format %albumartist% current)"
|
||||
dir="$music_dir/$artist/$album/"
|
||||
temp_path="/tmp/current_cover.png"
|
||||
message="$(mpc current -f "$form" | sed "s:&:&:g" )"
|
||||
|
||||
[[ -z $song ]] && exit 1 # Is there music on
|
||||
|
||||
if [[ -d "$dir" ]] ; then # Where to look for album covers
|
||||
album_dir="$dir"
|
||||
elif [[ -z "$album_dir" ]] ; then
|
||||
album_dir="$music_dir/$album/"
|
||||
else
|
||||
album_dir="$music_dir/$albart/$album/"
|
||||
fi
|
||||
|
||||
[[ -z "$album_dir" ]] && exit 1 # No cover if the folder isn't found
|
||||
|
||||
# But if it is found, look for only one of the specified files
|
||||
cover="$(find "$album_dir" -maxdepth 1 -type f -regextype egrep -regex "$img_reg" 2>/dev/null)"
|
||||
|
||||
if [[ -n $cover ]]; then # Resize the cover
|
||||
ffmpeg -hide_banner -loglevel panic -nostats -y -i "$cover" -vf scale="$cover_resize":-2 "$temp_path"
|
||||
cover="$temp_path"
|
||||
fi
|
||||
|
||||
# Send the notification
|
||||
dunstify -a MPD -r 1337 -u low -t 8000 -i "$cover" " ♫ Now Playing ♫ " "$message"
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
session="livecode"
|
||||
foxpid=$(pidof python -m FoxDot)
|
||||
|
||||
# set up tmux
|
||||
tmux start-server
|
||||
|
||||
# create a new tmux session, starting vim from a saved session in the new window
|
||||
tmux new-session -d -s $session
|
||||
|
||||
# Select pane 1, start scsynth
|
||||
tmux selectp -t 1
|
||||
tmux send-keys "scsynth -u 57110" C-m
|
||||
|
||||
sleep 3s
|
||||
|
||||
# Split pane 1 horizontal by 50%, start sclang
|
||||
tmux splitw -v -p 50
|
||||
tmux send-keys "sclang -D ~/Music/LiveCoding/foxy.scd" C-m
|
||||
|
||||
sleep 5s
|
||||
|
||||
# Create new window, launch foxdot
|
||||
tmux new-window -t $session:2
|
||||
tmux selectp -t 1
|
||||
tmux send-keys "foxdot" C-m
|
||||
|
||||
# Attach to the session
|
||||
tmux attach-session -t $session
|
||||
|
||||
if [[ ! $foxpid ]]; then
|
||||
pkill -9 -f scsynth
|
||||
pkill -9 -f sclang\ -D\ /home/deadguy/Music/LiveCoding/foxy.scd
|
||||
sleep 5s
|
||||
tmux kill-session -t livecode
|
||||
fi
|
Reference in New Issue