diff --git a/applications/youcompleteme.sh b/applications/youcompleteme.sh
index f9ca27b..65d5ffe 100755
--- a/applications/youcompleteme.sh
+++ b/applications/youcompleteme.sh
@@ -3,7 +3,7 @@
# Plug 'https://github.com/Valloric/YouCompleteMe'
pushd ~/.vim/plugged/YouCompleteMe
echo "Compiling with clang support..."
-ARGS="--clang completer"
+ARGS="--clang-completer"
if command -v cargo 2>&1 > /dev/null && command -v rustc 2>&1 > /dev/null; then
echo "Compiling with rust support..."
ARGS="$ARGS --racer-completer"
@@ -12,6 +12,6 @@ if command -v go 2>&1 > /dev/null; then
echo "Compiling with go support..."
ARGS="$ARGS --gocode-completer"
fi
-./install.py --clang-completer
+./install.py $ARGS
popd
echo "It should be done."
diff --git a/dunst/dunstrc b/dunst/dunstrc
new file mode 100644
index 0000000..f0f00c0
--- /dev/null
+++ b/dunst/dunstrc
@@ -0,0 +1,230 @@
+[global]
+ font = Monospace 9
+
+ # allow a small subset of html markup:
+ # bold
+ # italic
+ # strikethrough
+ # underline
+ #
+ # for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html
+ # If markup is not allowed, those tags will be stripped out of the message.
+ allow_markup = yes
+
+ # The format of the message. Possible variables are:
+ # %a appname
+ # %s summary
+ # %b body
+ # %i iconname (including its path)
+ # %I iconname (without its path)
+ # %p progress value if set ([ 0%] to [100%]) or nothing
+ # Markup is allowed
+ format = "%a: %s\n%b"
+
+ # Sort messages by urgency
+ sort = yes
+
+ # Show how many messages are currently hidden (because of geometry)
+ indicate_hidden = yes
+
+ # alignment of message text.
+ # Possible values are "left", "center" and "right"
+ alignment = left
+
+ # The frequency with wich text that is longer than the notification
+ # window allows bounces back and forth.
+ # This option conflicts with 'word_wrap'.
+ # Set to 0 to disable
+ bounce_freq = 0
+
+ # show age of message if message is older than show_age_threshold seconds.
+ # set to -1 to disable
+ show_age_threshold = 60
+
+ # split notifications into multiple lines if they don't fit into geometry
+ word_wrap = yes
+
+ # ignore newlines '\n' in notifications
+ ignore_newline = no
+
+
+ # the geometry of the window
+ # geometry [{width}]x{height}][+/-{x}+/-{y}]
+ # The geometry of the message window.
+ # The height is measured in number of notifications everything else in pixels. If the width
+ # is omitted but the height is given ("-geometry x2"), the message window
+ # expands over the whole screen (dmenu-like). If width is 0,
+ # the window expands to the longest message displayed.
+ # A positive x is measured from the left, a negative from the
+ # right side of the screen. Y is measured from the top and down respectevly.
+ # The width can be negative. In this case the actual width is the
+ # screen width minus the width defined in within the geometry option.
+ #geometry = "300x5-30+20"
+
+ # The transparency of the window. range: [0; 100]
+ # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..)
+ transparency = 0
+
+ # Don't remove messages, if the user is idle (no mouse or keyboard input)
+ # for longer than idle_threshold seconds.
+ # Set to 0 to disable.
+ idle_threshold = 120
+
+ # Which monitor should the notifications be displayed on.
+ monitor = 0
+
+ # Display notification on focused monitor. Possible modes are:
+ # mouse: follow mouse pointer
+ # keyboard: follow window with keyboard focus
+ # none: don't follow anything
+ #
+ # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property.
+ # This should be the case for almost all modern windowmanagers.
+ #
+ # If this option is set to mouse or keyboard, the monitor option will be
+ # ignored.
+ follow = keyboard
+
+ # should a notification popped up from history be sticky or
+ # timeout as if it would normally do.
+ sticky_history = yes
+
+ # The height of a single line. If the height is smaller than the font height,
+ # it will get raised to the font height.
+ # This adds empty space above and under the text.
+ line_height = 0
+
+ # Draw a line of 'separatpr_height' pixel height between two notifications.
+ # Set to 0 to disable
+ separator_height = 2
+
+ # padding between text and separator
+ padding = 8
+
+ # horizontal padding
+ horizontal_padding = 8
+
+ # Define a color for the separator.
+ # possible values are:
+ # * auto: dunst tries to find a color fitting to the background
+ # * foreground: use the same color as the foreground
+ # * frame: use the same color as the frame.
+ # * anything else will be interpreted as a X color
+ separator_color = frame
+
+ # print a notification on startup
+ # This is mainly for error detection, since dbus (re-)starts dunst
+ # automatically after a crash.
+ startup_notification = true
+
+ # dmenu path
+ dmenu = /usr/bin/dmenu -p dunst:
+
+ # browser for opening urls in context menu
+ browser = /usr/bin/firefox -new-tab
+
+[frame]
+ width = 3
+ color = "#FFFFFF"
+
+[shortcuts]
+ # shortcuts are specified as [modifier+][modifier+]...key
+ # available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3'
+ # and 'mod4' (windows-key)
+ # xev might be helpful to find names for keys
+
+ # close notification
+ close = mod4+m
+
+ # close all notifications
+ close_all = mod4+shift+m
+
+ # redisplay last message(s)
+ history = mod4+n
+
+ # context menu
+ context = mod4+shift+i
+
+[urgency_low]
+ # IMPORTANT: colors have to be defined in quotation marks.
+ # Otherwise the '#' and following would be interpreted as a comment.
+ background = "#121212"
+ foreground = "#FFFFFF"
+ timeout = 10
+
+[urgency_normal]
+ background = "#121212"
+ foreground = "#FFFFFF"
+ timeout = 10
+
+[urgency_critical]
+ background = "#FF0000"
+ foreground = "#FFFFFF"
+ timeout = 0
+
+
+# Every section that isn't one of the above is interpreted as a rules
+# to override settings for certain messages.
+# Messages can be matched by 'appname', 'summary', 'body' or 'icon'
+# and you can override the 'timeout', 'urgency', 'foreground', 'background'
+# and 'format'.
+# Shell-like globbing will get expanded.
+#
+# SCRIPTING
+# you can specify a script that gets run when the rule matches by setting
+# the 'script' option.
+# The script will be called as follows:
+# script appname summary body icon urgency
+# where urgency can be "LOW", "NORMAL" or "CRITICAL".
+#
+# NOTE: if you don't want a notification to be displayed, set the format to ""
+# NOTE: It might be helpful to run dunst -print in a terminal in order to find
+# fitting options for rules.
+
+#[espeak]
+# summary = "*"
+# script = dunst_espeak.sh
+
+#[script-test]
+# summary = "*script*"
+# script = dunst_test.sh
+
+#[ignore]
+## This notification will not be displayed
+# summary = "foobar"
+# format = ""
+
+[riot]
+ appname = "Electron"
+ format = "Riot: %s\n%b"
+
+[telegram]
+ appname = "Telegram Dektop"
+ format = "Telegram: %s\n%b"
+
+#[signed_on]
+# appname = Pidgin
+# summary = "*signed on*"
+# urgency = low
+#
+#[signed_off]
+# appname = Pidgin
+# summary = *signed off*
+# urgency = low
+#
+#[says]
+# appname = Pidgin
+# summary = *says*
+# urgency = critical
+# format = "%s "%b""
+#
+#[music]
+# appname = Amarok
+# summary = "Now playing"
+# urgency = low
+
+#[twitter]
+# appname = Pidgin
+# summary = *twitter.com*
+# urgency = normal
+#
diff --git a/git/gitconfig b/git/gitconfig
index 189af89..8c0d286 100644
--- a/git/gitconfig
+++ b/git/gitconfig
@@ -29,6 +29,7 @@
ignore = update-index --assume-unchanged
noignore = update-index --no-assume-unchanged
rename-branch = branch -m
+ find-file = "!for branch in $(git for-each-ref --format=\"%(refname)\" refs/heads); do if git ls-tree -r --name-only $branch | grep \"$1\" > /dev/null; then echo \"${branch}:\"; git ls-tree -r --name-only $branch | nl -bn -w3 | grep \"$1\"; fi; done; :"
[push]
default = matching
[core]
diff --git a/i3/config b/i3/config
index d237f70..8196adc 100644
--- a/i3/config
+++ b/i3/config
@@ -19,6 +19,10 @@ bindsym $mod+shift+apostrophe bar mode dock
bindsym $mod+shift+d exec i3-input -F 'rename workspace to "%s"' -P 'Rename to: '
# Rofi shortcuts
bindsym $mod+p exec "~/.i3/run.sh run"
+# Clipboard manager
+bindsym ctrl+Mod1+v exec "~/.i3/run.sh clip"
+# Pass shortcut
+#bindsym $mod+shift+p exec "keepass --auto-type"
bindsym $mod+shift+p exec "rofi-pass --last-used"
# Misc shortcuts
bindsym --release Num_Lock exec "xdotool key --clearmodifiers Shift+Insert;numlockx on"
diff --git a/i3/run.sh b/i3/run.sh
index b0274ff..bd5c25d 100755
--- a/i3/run.sh
+++ b/i3/run.sh
@@ -110,10 +110,10 @@ if [ "$1" = "copy" ]; then
fi
if [ "$1" = "screenshot" ]; then
\rm -f ~/last-photo/*(N)
+ sleep .2
#DISPLAY=:0.0 xfce4-screenshooter -r -s ~/last-photo
- #DISPLAY=:0.0 import "$HOME/last-photo/$(date +'%Y-%m-%d_%T').png"
- sleep .25
- DISPLAY=:0.0 scrot -s "$HOME/last-photo/$(date +'%Y-%m-%d_%T').png"
+ DISPLAY=:0.0 import "$HOME/last-photo/$(date +'%Y-%m-%d_%T').png"
+ #DISPLAY=:0.0 scrot -s "$HOME/last-photo/$(date +'%Y-%m-%d_%T').png"
\cp ~/last-photo/* ~/Pictures
fi
if [ "$1" = "shutdownprompt" ]; then
@@ -147,3 +147,11 @@ fi
if [ "$1" = "window" ]; then
rofi -show window
fi
+if [ "$1" = "clip" ]; then
+ # Get the rofi-selected index of what to paste
+ local INDEX="$(gpaste-client --oneline | colrm 80 | rofi -dmenu | perl -pe 's/:.*//')"
+ # If they made a selection, select it
+ if [[ ! -z "$INDEX" ]]; then
+ gpaste-client select "$INDEX"
+ fi
+fi
diff --git a/scripts/sync.sh b/scripts/sync.sh
index e33749a..3498e6e 100755
--- a/scripts/sync.sh
+++ b/scripts/sync.sh
@@ -23,11 +23,12 @@ while getopts ":shbc" VALUE "$@"; do
fi
echo "Syncing config files"
if command -v trash 2>&1 /dev/null; then
- trash ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
+ trash ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc ~/.config/dunstrc
else
- rm ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
+ rm ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc ~/.config/dunstrc
fi
# Install on all systems
+ ln -s $ABSPATH/dunst/dunstrc ~/.config/dunstrc
ln -s $ABSPATH/tmux/tmux.conf ~/.tmux.conf
ln -s $ABSPATH/python/pylintrc ~/.pylintrc
ln -s $ABSPATH/vimperator/vimperatorrc ~/.vimperatorrc
diff --git a/shells/zshrc b/shells/zshrc
index 5a05d47..3def0a3 100644
--- a/shells/zshrc
+++ b/shells/zshrc
@@ -22,7 +22,6 @@ export EDITOR='vim'
export FZF_COMPLETION_OPTS='--no-mouse -m -1 -x'
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.cache/zsh
-# Check if a command exists
compress(){
INFILE="${1:r}.tpxz"
if [ -f "$INFILE" ]; then
@@ -31,10 +30,18 @@ compress(){
fi
tar --xattrs -I pixz -cpf "$INFILE" $*
}
+# Check if a command exists
ex(){
command -v "$1" >/dev/null
return $?
}
+if ex firefox; then
+ export BROWSER="firefox"
+elif ex firefox-bin; then
+ export BROWSER="firefox-bin"
+else
+ export BROWSER="xdg-open"
+fi
# For pasting in commands that start with $
$ () {
$*
@@ -122,7 +129,7 @@ run(){
gcc -Wall -g -std=c99 "${1:r}.c" -o "${1:r}" && (echo "Running..." >&2;./"${1:r}")
}
upload() {
- tar -cf - "$1" | base64 | curl --data-urlencode text@- -d title="File uploaded at $(date '+%d/%h/%y %H:%M:%S') on $(hostname)" -d name=$USER -d expire="1440" https://austenwares.com/paste/api/create | sed -e 's/view/view\/raw/'
+ tar -cf - "$*" | base64 | curl --data-urlencode text@- -d title="File uploaded at $(date '+%d/%h/%y %H:%M:%S') on $(hostname)" -d name=$USER -d expire="1440" https://austenwares.com/paste/api/create | sed -e 's/view/view\/raw/'
}
download() {
URL="$(printf $1 | perl -pe 's/\/paste\/view(?!\/raw)/\/paste\/view\/raw/')"
@@ -171,12 +178,17 @@ update-tool() {
read RESP
done
}
+if ex rc-service; then
+ alias service='rc-service'
+fi
if ex ip; then
alias ip='ip -c'
fi
-alias apush="adb push -p"
-alias apull="adb pull -p"
-alias cleaner="sudo ~/run.sh 'perl-cleaner --reallyall' 'python-updater' 'haskell-updater -- --usepkg=n'"
+if ex adb; then
+ alias apush="adb push -p"
+ alias apull="adb pull -p"
+fi
+alias cleaner="sudo ~/run.sh 'perl-cleaner --reallyall' 'python-updater' 'haskell-updater -- --usepkg=n'"
alias jsonpretty='python -m json.tool'
alias nmrestart='nmcli radio wifi off;nmcli radio wifi on'
if ex mtr; then
@@ -212,7 +224,7 @@ fi
alias resource='. ~/.zshrc'
if [ "$(uname)" != "Darwin" ]; then
# Not Mac
- export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$HOME/bin:$HOME/.cargo/bin"
+ export PATH="$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$HOME/.cargo/bin"
alias ls='ls --color=always -F'
alias where="readlink -m"
else
@@ -362,6 +374,15 @@ paste() {
fi
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | curl --data-urlencode text@- $NAME -d name=$USER -d expire="40320" -d private="$PRIVATE" https://austenwares.com/paste/api/create
}
+linx() {
+ if [[ -z "$1" ]]; then
+ curl -T- -H "Linx-Randomize: yes" -H "Linx-Expiry: 2592000" https://austenwares.com/linx/upload | perl -pe 's/https:\/\/austenwares.com\/linx\/(\w+)/https:\/\/austenwares.com\/linx\/selif\/\1/'
+ elif (( $# == 1 )) && [[ -f "$1" ]]; then
+ linx < "$1"
+ else
+ tar -cf - $* | linx
+ fi
+}
grename() {
echo incomplete
return