Browse Source

added pandoc template (github.html) and easy unmount scruipt for i3

Hans Martin 3 years ago
parent
commit
e3da75c144
3 changed files with 112 additions and 1 deletions
  1. 1 1
      .config/i3/config
  2. 83 0
      .pandoc/templates/github.html
  3. 28 0
      .scripts/tools/umount.sh

+ 1 - 1
.config/i3/config

@@ -100,7 +100,7 @@ set $dropdownnotes "alacritty --class ddnotes -e /bin/bash -ic 'vim $HOME/projec
 bindsym $mod+n exec $dropdownnotes
 
 # unicode emoji finder
-bindsym $mod+u exec $HOME/.scripts/i3/unicode.sh
+bindsym $mod+u exec $HOME/.scripts/tools/umount.sh
 
 # yt-mpv
 bindsym $mod+y exec $HOME/.scripts/tools/yt-viewer.sh

File diff suppressed because it is too large
+ 83 - 0
.pandoc/templates/github.html


+ 28 - 0
.scripts/tools/umount.sh

@@ -0,0 +1,28 @@
+#!/bin/sh
+
+mounted_devices=()
+for devlink in /dev/disk/by-id/usb*; do
+    dev=`readlink -f ${devlink}`
+    is_mounted=$(mount | grep $dev)
+
+    if [[ "$is_mounted" != "" ]]; then
+        echo "Device $dev mounted"
+        mounted_devices+=($dev)
+    fi
+done
+
+
+if [ ${#mounted_devices[@]} -eq 0 ];
+then
+    echo "Nothing to do, exiting"
+    exit 1
+fi
+IFS=$'\n';
+umount=$(printf "%s\n" ${mounted_devices[@]} | dmenu -l 3)
+
+if [ "$umount" != "" ]; then
+    echo "unmounting device $umount"
+    udiskie-umount $umount
+else
+    echo "Nothing to do, exiting"
+fi

Some files were not shown because too many files changed in this diff