lots of changes

master
Jonathan Hodgson 6 years ago
parent 19bee17823
commit 29b7a611bd
  1. 10
      bin/compiler
  2. 22
      bin/dvdrip
  3. 2
      bin/opout
  4. 25
      bin/siteEnv
  5. 8
      i3/configWork
  6. 2
      pandoc/templates/fellowship.latex
  7. 4
      qutebrowser/autoconfig.yml
  8. 2
      shells/functions

@ -22,11 +22,11 @@ cd "$dir" || exit
textype() { \ textype() { \
command="pdflatex" command="pdflatex"
( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex" ( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex"
$command --output-directory="$dir" "$base" && $command --output-directory="$dir" "$file"
grep -i addbibresource "$file" >/dev/null && #grep -i addbibresource "$file" >/dev/null &&
biber --input-directory "$dir" "$base" && #biber --input-directory "$dir" "$base" &&
$command --output-directory="$dir" "$base" && #$command --output-directory="$dir" "$base" &&
$command --output-directory="$dir" "$base" #$command --output-directory="$dir" "$base"
} }
mdtype(){ \ mdtype(){ \

@ -284,14 +284,19 @@ class DVD:
pprint(task.title.info) pprint(task.title.info)
print('-' * 78) print('-' * 78)
audio_tracks = task.title.info['audio tracks'].keys() english_audio = {k: v for k, v in task.title.info['audio tracks'].items() if 'english' in v.lower() }
english_subs = {k: v for k, v in task.title.info['subtitle tracks'].items() if 'english' in v.lower() }
#audio_tracks = task.title.info['audio tracks'].keys()
audio_tracks = english_audio.keys()
audio_encoders = ['faac'] * len(audio_tracks) audio_encoders = ['faac'] * len(audio_tracks)
subtitles = task.title.info['subtitle tracks'].keys() #subtitles = task.title.info['subtitle tracks'].keys()
subtitles = english_subs.keys()
args = [ args = [
HANDBRAKE, HANDBRAKE,
'--title', str(task.title.number), '--title', str(task.title.number),
'--preset', "High Profile", '--preset', "Very Fast 1080p30",
'--vfr',
'--encoder', 'x264', '--encoder', 'x264',
'--audio', ','.join(audio_tracks), '--audio', ','.join(audio_tracks),
'--aencoder', ','.join(audio_encoders), '--aencoder', ','.join(audio_encoders),
@ -315,6 +320,7 @@ class DVD:
print(' '.join(('\n ' + a) print(' '.join(('\n ' + a)
if a.startswith('-') else a for a in args)) if a.startswith('-') else a for a in args))
print('-' * 78) print('-' * 78)
pprint( args )
if not dry_run: if not dry_run:
if verbose: if verbose:
subprocess.call(args) subprocess.call(args)
@ -535,9 +541,13 @@ SubtitleTrack = namedtuple('SubtitleTrack',
def ParseSubtitleTracks(d): def ParseSubtitleTracks(d):
for number, info in sorted(((int(n), info) for (n, info) in d.items())): for number, info in sorted(((int(n), info) for (n, info) in d.items())):
m = SUB_TRACK_REGEX.match(info) m = SUB_TRACK_REGEX.match(info)
assert m, 'UNMATCHED %r' % info if( m ):
name, iso639_2, extras = m.groups() assert m, 'UNMATCHED %r' % info
yield SubtitleTrack(number, name, iso639_2, extras) name, iso639_2, extras = m.groups()
yield SubtitleTrack(number, name, iso639_2, extras)
else:
yield SubtitleTrack(number, info, '', '')
def RenderBar(start, length, total, width): def RenderBar(start, length, total, width):
end = start + length end = start + length

@ -5,7 +5,7 @@
basename="${1%.*}" basename="${1%.*}"
case "$1" in case "$1" in
*.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;; *.tex|*.latex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
*.html) setsid "$TRUEBROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;; *.html) setsid "$TRUEBROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;;
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;; *.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
esac esac

@ -0,0 +1,25 @@
#!/usr/bin/env zsh
source "$HOME/.dotfiles/shells/functions"
sitesDir="$HOME/Sites/"
chosen="$(ls -d ${sitesDir}*/ | sed "s+$sitesDir++g; s/\/$//" | rofi -dmenu -i -p "Site")"
siteDir="${sitesDir}${chosen}/"
cd "$siteDir"
theme
setsid "$TERMINAL" &
setsid "$TERMINAL" &
setsid "$TERMINAL" &
sleep 1
i3-msg "move down"
i3-msg "resize shrink height"
i3-msg "resize shrink height"
i3-msg "resize shrink height"
i3-msg "split horizontal"
setsid "$TERMINAL" &

@ -197,6 +197,10 @@ bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous bindsym XF86AudioPrev exec playerctl previous
# Screen Brightness {{{3
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
#calculator button #calculator button
bindsym XF86Calculator exec galculator bindsym XF86Calculator exec galculator
@ -221,9 +225,11 @@ bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
# Opens Vim in Terminal in Scratchpad # Opens Vim in Terminal in Scratchpad
bindsym $mod+shift+a exec --no-startup-id ddspawn dropdownnotepad bindsym $mod+shift+a exec --no-startup-id ddspawn dropdownnotepad
# B {{{3 # B {{{2
# Opens DBeaver # Opens DBeaver
bindsym $mod+b exec dbeaver bindsym $mod+b exec dbeaver
# Opens sitee
bindsym $mod+Shift+b exec siteEnv
# C {{{2 # C {{{2
# Opens Chromium # Opens Chromium

@ -397,7 +397,7 @@ $endif$
} }
} }
\fancyfoot[L]{% \fancyfoot[L]{%
{\vspace{0.5cm}\parbox{0.8\textwidth}{\tiny Registered Office: Greenwood House, Greenwood Court, Skyliner Way, Bury Saint Edmunds IP32 7GY\\[0.1cm] {\vspace{0.5cm}\parbox{0.8\textwidth}{\tiny Registered Office: Fosters Barn, Shimpling Road, Hartest, Bury St Edmunds, ***REMOVED***, IP29 4ET\\[0.1cm]
Registered in England and Wales. Company Registration Number: 4479565}} Registered in England and Wales. Company Registration Number: 4479565}}
} }
\fancyfoot[R]{% \fancyfoot[R]{%

@ -3,5 +3,5 @@
config_version: 2 config_version: 2
settings: settings:
tabs.position: tabs.show:
global: left global: switching

@ -113,7 +113,7 @@ function ptheme() {
} }
function get_theme() { function get_theme() {
public_html=${${PWD%/public_html*}%/wiki*}/public_html public_html="${${PWD%/public_html*}%/wiki*}/public_html"
if [ -d $public_html ]; then if [ -d $public_html ]; then
if [ -d $public_html/wp ]; then if [ -d $public_html/wp ]; then
wpPath=$public_html/wp; wpPath=$public_html/wp;

Loading…
Cancel
Save