浏览代码

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

Hans Martin 3 年之前
父节点
当前提交
e3da75c144
共有 3 个文件被更改,包括 112 次插入1 次删除
  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

文件差异内容过多而无法显示
+ 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

部分文件因为文件数量过多而无法显示