From 687b4892eef2b1f3712cd8d0f32bc33db77281aa Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 7 Apr 2019 22:27:16 -0400 Subject: [PATCH 01/12] odt preview and epub open --- .config/vifm/vifmrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index c6dc1a34..c4844f77 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -50,12 +50,13 @@ fileviewer *.html w3m -dump %c filextype *.html,*.htm firefox %f 2>/dev/null & fileviewer *.docx docx2txt %c - +fileviewer *.odt odt2txt %c - filetype *.csv,*.xlsx sc-im %c fileviewer *.csv sed "s/,,,,/,,-,,/g;s/,,/ /g" %c | column -t | sed "s/ - / /g" | cut -c -%pw filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus mpv --no-audio-display --input-ipc-server=/tmp/mpvsoc$(date +%%s) %c -filextype *.pdf,*.ps,*.eps,*.ps.gz,*.djvu zathura %f 2>/dev/null &, +filextype *.pdf,*.ps,*.eps,*.ps.gz,*.djvu,*.epub zathura %f 2>/dev/null &, fileviewer *.pdf pdftotext -l 1 -nopgbrk %c - fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.qt,*.divx,*.as[fx],*mp3,*.flac mediafile %c filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,*.as[fx] mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) %f 2>/dev/null &, From cc7d1acd162cc6e46d60f961ab28e334f46276d3 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 10 Apr 2019 08:11:55 -0400 Subject: [PATCH 02/12] for crossfref vid --- .scripts/tools/getbib | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.scripts/tools/getbib b/.scripts/tools/getbib index bf02694f..ed441c56 100755 --- a/.scripts/tools/getbib +++ b/.scripts/tools/getbib @@ -1,21 +1,14 @@ #!/bin/sh +[ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit -# Give this script a .pdf and it will attempt -# to return a proper .bib citation via doi. -# Internet connection required. - -if [ -f "$1" ]; -then - # Get the doi from metadata, if not possible, get - # doi from pdftotext output, if not possible, exit. +if [ -f "$1" ]; then + # Try to get DOI from pdfinfo or pdftotext output. doi=$(pdfinfo "$1" | grep -io "doi:.*") || - doi=$(pdftotext "$1" 2>/dev/null - | grep -o "doi:.*" -m 1) || + doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) || exit 1 else - # If not given file, assume argument is doi doi="$1" fi # Check crossref.org for the bib citation. -curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n" | - sed -e "/^[^\\(\\t\\|@\\|}\\)]/d" +curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n" From dee459aacce635abae23d8424ac18eb605ca01b7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 10 Apr 2019 17:52:35 -0400 Subject: [PATCH 03/12] comments are bloat --- .config/calcurse/keys | 117 +++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 70 deletions(-) diff --git a/.config/calcurse/keys b/.config/calcurse/keys index f188702a..213a17bb 100644 --- a/.config/calcurse/keys +++ b/.config/calcurse/keys @@ -1,70 +1,47 @@ -# -# Calcurse keys configuration file -# -# This file sets the keybindings used by Calcurse. -# Lines beginning with "#" are comments, and ignored by Calcurse. -# To assign a keybinding to an action, this file must contain a line -# with the following syntax: -# -# ACTION KEY1 KEY2 ... KEYn -# -# Where ACTION is what will be performed when KEY1, KEY2, ..., or KEYn -# will be pressed. -# -# To define bindings which use the CONTROL key, prefix the key with 'C-'. -# The escape, space bar and horizontal Tab key can be specified using -# the 'ESC', 'SPC' and 'TAB' keyword, respectively. -# Arrow keys can also be specified with the UP, DWN, LFT, RGT keywords. -# Last, Home and End keys can be assigned using 'KEY_HOME' and 'KEY_END' -# keywords. -# -# A description of what each ACTION keyword is used for is available -# from calcurse online configuration menu. - -generic-cancel ESC -generic-select SPC -generic-credits @ -generic-help ? -generic-quit q Q -generic-save s S ^S -generic-reload R -generic-copy c -generic-paste p ^V -generic-change-view TAB -generic-import i I -generic-export x X -generic-goto g G -generic-other-cmd o O -generic-config-menu C -generic-redraw ^R -generic-add-appt ^A -generic-add-todo ^T -generic-prev-day T ^H -generic-next-day t ^L -generic-prev-week W ^K -generic-next-week w ^J -generic-prev-month M -generic-next-month m -generic-prev-year Y -generic-next-year y -generic-scroll-down ^N -generic-scroll-up ^P -generic-goto-today ^G -generic-command : -move-right l L RGT -move-left h H LFT -move-down j J DWN -move-up k K UP -start-of-week 0 -end-of-week $ -add-item a A -del-item d D -edit-item e E -view-item v V -pipe-item | -flag-item ! -repeat r -edit-note n N -view-note > -raise-priority + -lower-priority - +generic-cancel ESC +generic-select SPC +generic-credits @ +generic-help ? +generic-quit q Q +generic-save s S ^S +generic-reload R +generic-copy c +generic-paste p ^V +generic-change-view TAB +generic-import i I +generic-export x X +generic-goto g G +generic-other-cmd o O +generic-config-menu C +generic-redraw ^R +generic-add-appt ^A +generic-add-todo ^T +generic-prev-day T ^H +generic-next-day t ^L +generic-prev-week W ^K +generic-next-week w ^J +generic-prev-month M +generic-next-month m +generic-prev-year Y +generic-next-year y +generic-scroll-down ^N +generic-scroll-up ^P +generic-goto-today ^G +generic-command : +move-right l L RGT +move-left h H LFT +move-down j J DWN +move-up k K UP +start-of-week 0 +end-of-week $ +add-item a A +del-item d D +edit-item e E +view-item v V +pipe-item | +flag-item ! +repeat r +edit-note n N +view-note > +raise-priority + +lower-priority - From 954e5d2d0d11e225c6172537aa67e304008d99e0 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 10 Apr 2019 17:53:07 -0400 Subject: [PATCH 04/12] chomd -x user-dirs.dirs --- .config/user-dirs.dirs | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 .config/user-dirs.dirs diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs old mode 100755 new mode 100644 From cbbeb075fba3dd272875b2087c77231911fbebd6 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 10 Apr 2019 19:56:09 -0400 Subject: [PATCH 05/12] dmenu mount and umount fixes --- .scripts/i3cmds/dmenumount | 7 +++---- .scripts/i3cmds/dmenuumount | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount index 615e94a2..91296432 100755 --- a/.scripts/i3cmds/dmenumount +++ b/.scripts/i3cmds/dmenumount @@ -3,7 +3,6 @@ # If they're in /etc/fstab, they'll be mounted automatically. # Otherwise, you'll be prompted to give a mountpoint from already existsing directories. # If you input a novel directory, it will prompt you to create that directory. -pgrep -x dmenu && exit getmount() { \ [ -z "$chosen" ] && exit 1 @@ -17,7 +16,7 @@ getmount() { \ mountusb() { \ chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" - sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0 + sudo -A mount "$chosen" && notify-send "💻 USB mounting" "$chosen mounted." && exit 0 alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not \( -path *%s -prune \) \ \n",$3}') getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted" partitiontype="$(lsblk -no "fstype" "$chosen")" @@ -25,14 +24,14 @@ mountusb() { \ "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";; esac - notify-send "$chosen mounted to $mp." + notify-send "💻 USB mounting" "$chosen mounted to $mp." } mountandroid() { \ chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1) getmount "$HOME -maxdepth 3 -type d" simple-mtpfs --device "$chosen" "$mp" - notify-send "Android device mounted to $mp." + notify-send "🤖 Android Mounting" "Android device mounted to $mp." } asktype() { \ diff --git a/.scripts/i3cmds/dmenuumount b/.scripts/i3cmds/dmenuumount index 260c1c8d..dee53e7a 100755 --- a/.scripts/i3cmds/dmenuumount +++ b/.scripts/i3cmds/dmenuumount @@ -7,17 +7,17 @@ unmountusb() { [ -z "$drives" ] && exit chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}') [ -z "$chosen" ] && exit - sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted." + sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted." } unmountandroid() { \ chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?") [ -z "$chosen" ] && exit - sudo -A umount -l "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted." + sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted." } asktype() { \ - case $(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?") in + case "$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" in USB) unmountusb ;; Android) unmountandroid ;; esac From 64f26e1153101080c98cf62f7995ae8640cb0fa5 Mon Sep 17 00:00:00 2001 From: TomJansen Date: Sun, 14 Apr 2019 11:54:21 +0200 Subject: [PATCH 06/12] mod+shift+q forcekills selected window --- .config/i3/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/i3/config b/.config/i3/config index d47923c9..23283494 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -82,7 +82,8 @@ bindsym $mod+Insert exec --no-startup-id showclip # #---Letter Key Bindings---# # bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill -bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill +bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 `xdotool getwindowfocus getwindowpid` + bindsym $mod+w exec $term -e nmtui bindsym $mod+Shift+w exec --no-startup-id $BROWSER From 025169d49a645cbab606286b963a2a5fa3808079 Mon Sep 17 00:00:00 2001 From: TomJansen Date: Sun, 14 Apr 2019 12:02:46 +0200 Subject: [PATCH 07/12] Add force kill to guide --- .local/share/larbs/readme.mom | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.local/share/larbs/readme.mom b/.local/share/larbs/readme.mom index 09437588..20782a0c 100644 --- a/.local/share/larbs/readme.mom +++ b/.local/share/larbs/readme.mom @@ -114,7 +114,9 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik .ITEM \f(CWMod+Enter\fP \(en Spawn terminal (the default terminal is \f(CWst\fP; run \f(CWman st\fP for more.) .ITEM -\f(CWMod+q/Q\fP \(en Close window +\f(CWMod+q\fP \(en Close window +.ITEM +\f(CWMod+Q\fP \(en Force close window .ITEM \f(CWMod+d\fP \(en dmenu (For running commands or programs without shortcuts) .ITEM From 4473d8c3ad59cab15e7f4c7c6c8226e665033821 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 14 Apr 2019 08:08:09 -0400 Subject: [PATCH 08/12] tweaks --- .config/i3/config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 23283494..e001f533 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -84,7 +84,6 @@ bindsym $mod+Insert exec --no-startup-id showclip bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 `xdotool getwindowfocus getwindowpid` - bindsym $mod+w exec $term -e nmtui bindsym $mod+Shift+w exec --no-startup-id $BROWSER @@ -234,7 +233,7 @@ for_window [title="mpvfloat"] border pixel 0 no_focus [title="mpvfloat"] # #---Function Buttons---# # -bindsym $mod+F1 exec --no-startup-id groff -kejpt -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura - +bindsym $mod+F1 exec --no-startup-id groff -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura - bindsym $mod+F2 restart bindsym $mod+F3 exec --no-startup-id displayselect bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate" From a285afd07db91dfcdcb55bde629481a06bead634 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 15 Apr 2019 11:20:21 -0400 Subject: [PATCH 09/12] copy and paste dox --- .local/share/larbs/readme.mom | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.local/share/larbs/readme.mom b/.local/share/larbs/readme.mom index 20782a0c..e5754e8d 100644 --- a/.local/share/larbs/readme.mom +++ b/.local/share/larbs/readme.mom @@ -345,6 +345,13 @@ These settings may override your preferred settings, so you should open this fil Sometimes, PulseAudio can be finicky on initial installation and configuration. If you have no audio output, chances are your problems will be resolved by a reboot or manually killing and restarting PulseAudio. You may also need to set your preferred default output sink which you can do by the command line, or by selecting one with \f(CWpulsemixer\fP (\f(CWmod+A\fP). +.HEADING 2 "How do I copy and paste?" +.PP +Copying and pasting is always program-specific on any system. +In most graphical programs, copy and paste will be the same as they are on Windows: \f(CWctrl-c\fP and \f(CWctrl-v\fP. +In the Linux terminal, those binds have other more important purposes, so you can run \f(CWman st\fP to see how to copy and paste in my terminal build. +.PP +Additionally, I've set vim to use the clipboard as the default buffer, which means when you copy or delete something in vim, it will be in your system clipboard as well, so you can \f(CWctrl-v\fP it into your Firefox instance, etc. You can also paste material copied from other programs into vim with the typical vim bindings. .HEADING 2 "How do I change the background/wallpaper?" .PP The i3 configuration will always read the file \f(CW~/.config/wall.png\fP as the wallpaper. From 8d929dca9aeefafd76e316f0ef9259c56f6c632c Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 15 Apr 2019 11:20:33 -0400 Subject: [PATCH 10/12] xresources changes noted --- .local/share/larbs/readme.mom | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.local/share/larbs/readme.mom b/.local/share/larbs/readme.mom index e5754e8d..152eb4bb 100644 --- a/.local/share/larbs/readme.mom +++ b/.local/share/larbs/readme.mom @@ -359,14 +359,9 @@ The script \f(CWsetbg\fP, if run on an image will set it as the persistent backg When using the file manager, you can simply hover over an image name and type \f(CWbg\fP and this will run \f(CWsetbg\fP. .HEADING 2 "How I change the colorscheme?" .PP -You can edit \f(CW~/.Xresources\fP to change the colorscheme. -The terminal, status bar and other programs will automatically read the Xresources colors. -Check +LARBS no longer uses Xresource by default, but you can still add an \f(CW~/.Xdefaults\fP file and add color settings to change the theme of numerous programs, including the terminal. See .PDF_WWW_LINK "https://wiki.archlinux.org/index.php/X_resources" "the Arch Wiki's article" for more information. -LARBS is also compatible with pywal, but it is not installed or used by default anymore. -.PP -Do not remove \f(CW~/.Xresources\fP or the color settings specifically because some programs, especially the i3 bar read them and will display as blank if they are deleted. .HEADING 2 "How do I set up my email?" .LI .ITEM From 1805692614e7ed675d5d7778a8f738aff544691a Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 15 Apr 2019 11:20:40 -0400 Subject: [PATCH 11/12] build files dox --- .local/share/larbs/readme.mom | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.local/share/larbs/readme.mom b/.local/share/larbs/readme.mom index 152eb4bb..b193bb64 100644 --- a/.local/share/larbs/readme.mom +++ b/.local/share/larbs/readme.mom @@ -406,6 +406,10 @@ LARBS is deployed as a git repository in your home directory. You can use it as such to fetch, diff and merge changes from the remote repository. If you don't want to do that or don't know how to use git, you can actually just rerun the script (as root) and reinstall LARBS and it will automatically update an existing install if you select the same username. This will overwrite the original config files though, including changes you made for them, but this is an easier brute force approach that will also install any new dependencies. +.HEADING 2 "Where are the build files for st or AUR programs?" +.PP +They are only created in \f(CW/tmp/\fP and thus are likely deleted after installation as they are not necessary. +If you want to recompile a program, you will have to clone again. .HEADING 1 "Contact" .LI .ITEM From f9b524f23137f0b04ecf298f4654b074e6b919f6 Mon Sep 17 00:00:00 2001 From: AlbinAlbyl <33070061+AlbinAlbyl@users.noreply.github.com> Date: Wed, 17 Apr 2019 13:05:42 +0000 Subject: [PATCH 12/12] Fixed ifinstalled command after dunst update. --- .scripts/tools/ifinstalled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/tools/ifinstalled b/.scripts/tools/ifinstalled index 0305f4fb..b0d23e5c 100755 --- a/.scripts/tools/ifinstalled +++ b/.scripts/tools/ifinstalled @@ -1,3 +1,3 @@ #!/bin/sh # If $1 command is not available, error code and notify. -command -v "$1" >/dev/null || { notify-send "📦 $1 must be installed for this function." && exit 1 ;} +command -v "$1" >/dev/null || { notify-send "📦 $1" "must be installed for this function." && exit 1 ;}