summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2019-06-12 21:37:28 +0200
committerJulian T <julian@jtle.dk>2019-06-12 21:37:28 +0200
commit30c35bcc08e030aceee325b72d4a3b5c62d19cf9 (patch)
tree514a2fbe4cf9094face5df94070531031323ca3e
parenta17e7201980fd23fdd915d11717f23e85f772d0b (diff)
Moved, added and deleted scripts. Zsh corrections
-rwxr-xr-xdwm/Scripts/lc (renamed from dwm/lc)0
-rw-r--r--dwm/Scripts/runStat.sh6
-rw-r--r--initFolders.sh6
-rw-r--r--scripts/Scripts/passmenu28
-rw-r--r--setup.sh8
-rw-r--r--zsh/.zshrc6
6 files changed, 44 insertions, 10 deletions
diff --git a/dwm/lc b/dwm/Scripts/lc
index 9c21fb4..9c21fb4 100755
--- a/dwm/lc
+++ b/dwm/Scripts/lc
diff --git a/dwm/Scripts/runStat.sh b/dwm/Scripts/runStat.sh
new file mode 100644
index 0000000..52b0536
--- /dev/null
+++ b/dwm/Scripts/runStat.sh
@@ -0,0 +1,6 @@
+elements="ram.sh status.sh mic.sh"
+
+if [ $1 = "dmenu" ]; then
+ sh $(echo $elements | tr " " "\n" | dmenu -i -p ":")
+fi
+
diff --git a/initFolders.sh b/initFolders.sh
new file mode 100644
index 0000000..30cf3de
--- /dev/null
+++ b/initFolders.sh
@@ -0,0 +1,6 @@
+# Add folders that should not be symlinked by stow
+
+mkdir -p ~/Scripts
+mkdir -p ~/Scripts/enMenuScripts
+mkdir -p ~/.config/qutebrowser
+mkdir -p ~/.config/nvim
diff --git a/scripts/Scripts/passmenu b/scripts/Scripts/passmenu
new file mode 100644
index 0000000..0cc80e6
--- /dev/null
+++ b/scripts/Scripts/passmenu
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+shopt -s nullglob globstar
+
+typeit=0
+if [[ $1 == "--type" ]]; then
+ typeit=1
+ shift
+fi
+
+prefix=${PASSWORD_STORE_DIR-~/.password-store}
+password_files=( "$prefix"/**/*.gpg )
+password_files=( "${password_files[@]#"$prefix"/}" )
+password_files=( "${password_files[@]%.gpg}" )
+
+password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
+
+[[ -n $password ]] || exit
+
+if [[ $typeit -eq 0 ]]; then
+ pass show -c "$password" 2>/dev/null
+else
+ pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
+ xdotool type --clearmodifiers --file -
+fi
+
+notify-send "Done"
+pass $password | grep login | cut -d' ' -f2- | xclip -selection c
diff --git a/setup.sh b/setup.sh
deleted file mode 100644
index 7470d40..0000000
--- a/setup.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-# Install oh-my-zsh
-sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
-
-rm -rf ../.zshrc
-
-stow zsh
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 7e3cabb..929b2e0 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -32,10 +32,10 @@ ZSH_THEME="af-magic"
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
-# ENABLE_CORRECTION="true"
+ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
-# COMPLETION_WAITING_DOTS="true"
+COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
@@ -156,3 +156,5 @@ command_not_found_handler () {
# opam configuration
test -r /home/julian/.opam/opam-init/init.zsh && . /home/julian/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
export ANSIBLE_NOCOWS=1
+
+export PATH=$HOME/Scripts:$PATH