From 29b7a611bd51376fff6ad8f4d25b395f6d640b86 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 20 Feb 2019 07:38:41 +0000 Subject: [PATCH] lots of changes --- bin/compiler | 10 +++++----- bin/dvdrip | 22 ++++++++++++++++------ bin/opout | 2 +- bin/siteEnv | 25 +++++++++++++++++++++++++ i3/configWork | 8 +++++++- pandoc/templates/fellowship.latex | 2 +- qutebrowser/autoconfig.yml | 4 ++-- shells/functions | 2 +- 8 files changed, 58 insertions(+), 17 deletions(-) create mode 100755 bin/siteEnv diff --git a/bin/compiler b/bin/compiler index 4b501a26..7a7fae6f 100755 --- a/bin/compiler +++ b/bin/compiler @@ -22,11 +22,11 @@ cd "$dir" || exit textype() { \ command="pdflatex" ( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex" - $command --output-directory="$dir" "$base" && - grep -i addbibresource "$file" >/dev/null && - biber --input-directory "$dir" "$base" && - $command --output-directory="$dir" "$base" && - $command --output-directory="$dir" "$base" + $command --output-directory="$dir" "$file" + #grep -i addbibresource "$file" >/dev/null && + #biber --input-directory "$dir" "$base" && + #$command --output-directory="$dir" "$base" && + #$command --output-directory="$dir" "$base" } mdtype(){ \ diff --git a/bin/dvdrip b/bin/dvdrip index f84c3d2d..2f732b9c 100755 --- a/bin/dvdrip +++ b/bin/dvdrip @@ -284,14 +284,19 @@ class DVD: pprint(task.title.info) 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) - subtitles = task.title.info['subtitle tracks'].keys() + #subtitles = task.title.info['subtitle tracks'].keys() + subtitles = english_subs.keys() args = [ HANDBRAKE, '--title', str(task.title.number), - '--preset', "High Profile", + '--preset', "Very Fast 1080p30", + '--vfr', '--encoder', 'x264', '--audio', ','.join(audio_tracks), '--aencoder', ','.join(audio_encoders), @@ -315,6 +320,7 @@ class DVD: print(' '.join(('\n ' + a) if a.startswith('-') else a for a in args)) print('-' * 78) + pprint( args ) if not dry_run: if verbose: subprocess.call(args) @@ -535,9 +541,13 @@ SubtitleTrack = namedtuple('SubtitleTrack', def ParseSubtitleTracks(d): for number, info in sorted(((int(n), info) for (n, info) in d.items())): m = SUB_TRACK_REGEX.match(info) - assert m, 'UNMATCHED %r' % info - name, iso639_2, extras = m.groups() - yield SubtitleTrack(number, name, iso639_2, extras) + if( m ): + assert m, 'UNMATCHED %r' % info + name, iso639_2, extras = m.groups() + yield SubtitleTrack(number, name, iso639_2, extras) + else: + yield SubtitleTrack(number, info, '', '') + def RenderBar(start, length, total, width): end = start + length diff --git a/bin/opout b/bin/opout index df343983..0b8ca1f9 100755 --- a/bin/opout +++ b/bin/opout @@ -5,7 +5,7 @@ basename="${1%.*}" 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 & ;; *.sent) setsid sent "$1" >/dev/null 2>&1 & ;; esac diff --git a/bin/siteEnv b/bin/siteEnv new file mode 100755 index 00000000..302b40b8 --- /dev/null +++ b/bin/siteEnv @@ -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" & diff --git a/i3/configWork b/i3/configWork index 7680e1e9..45e03aa8 100644 --- a/i3/configWork +++ b/i3/configWork @@ -197,6 +197,10 @@ bindsym XF86AudioPause exec playerctl pause bindsym XF86AudioNext exec playerctl next 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 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 bindsym $mod+shift+a exec --no-startup-id ddspawn dropdownnotepad -# B {{{3 +# B {{{2 # Opens DBeaver bindsym $mod+b exec dbeaver +# Opens sitee +bindsym $mod+Shift+b exec siteEnv # C {{{2 # Opens Chromium diff --git a/pandoc/templates/fellowship.latex b/pandoc/templates/fellowship.latex index 511de255..6c75f312 100644 --- a/pandoc/templates/fellowship.latex +++ b/pandoc/templates/fellowship.latex @@ -397,7 +397,7 @@ $endif$ } } \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}} } \fancyfoot[R]{% diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml index 2b4f3a9e..2f474871 100644 --- a/qutebrowser/autoconfig.yml +++ b/qutebrowser/autoconfig.yml @@ -3,5 +3,5 @@ config_version: 2 settings: - tabs.position: - global: left + tabs.show: + global: switching diff --git a/shells/functions b/shells/functions index 70adc740..b327278b 100644 --- a/shells/functions +++ b/shells/functions @@ -113,7 +113,7 @@ function ptheme() { } 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/wp ]; then wpPath=$public_html/wp;