mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
Merge remote-tracking branch 'origin/master' into surface
This commit is contained in:
commit
ea51f79785
@ -20,6 +20,24 @@ xrandr --output eDP1 --primary
|
||||
setxkbmap -option caps:none
|
||||
xset r rate 200 18
|
||||
|
||||
|
||||
export TERMINAL="termite"
|
||||
export BROWSER="chromium"
|
||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
|
||||
export QT_QPA_PLATFORMTHEME=gtk2
|
||||
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open
|
||||
|
||||
# Merge system clipboards
|
||||
if [ -n "$DISPLAY" ] && exists autocutsel && ! pidof autocutsel 1>/dev/null; then
|
||||
autocutsel -fork
|
||||
autocutsel -selection PRIMARY -fork
|
||||
fi
|
||||
|
||||
# Start the gnome-keyring if it's installed
|
||||
if exists gnome-keyring-daemon; then
|
||||
export $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gnupg)
|
||||
fi
|
||||
|
||||
~/.local/share/surface-scripts/pend &
|
||||
~/.local/share/surface-scripts/rotationd &
|
||||
|
||||
|
@ -25,17 +25,14 @@ inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacit
|
||||
opacity-rule = [
|
||||
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
];
|
||||
alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
|
||||
alpha-step = 0.02; # XRender backend: Step size for alpha pictures. Increasing
|
||||
# it may result in less X resource usage,
|
||||
# Yet f ading may look bad.
|
||||
# inactive-dim = 0.2; # Dim inactive windows. (0.0 - 1.0)
|
||||
#inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
|
||||
inactive-opacity-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
|
||||
blur-background = true; # Blur background of transparent windows.
|
||||
blur-background-exclude = [ "class_g = 'Peek'", "class_g = 'Onboard'", "class_g = 'slop'" ];
|
||||
blur-background-frame = false; # Blur background of opaque windows with transparent
|
||||
# frames as well.
|
||||
blur-background-fixed = true; # Do not let blur radius adjust based on window opacity.
|
||||
blur-background-fixed = false; # Do not let blur radius adjust based on window opacity.
|
||||
# Exclude conditions for background blur.
|
||||
blur-kern = "5,5,0.894839,0.932912,0.945959,0.932912,0.894839,0.932912,0.972604,0.986207,0.972604,0.932912,0.945959,0.986207,0.986207,0.945959,0.932912,0.972604,0.986207,0.972604,0.932912,0.894839,0.932912,0.945959,0.932912,0.894839"
|
||||
|
||||
@ -44,7 +41,7 @@ blur-kern = "5,5,0.894839,0.932912,0.945959,0.932912,0.894839,0.932912,0.972604,
|
||||
# Fading
|
||||
fading = true; # Fade windows during opacity changes.
|
||||
# fade-delta = 16; # The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-in-step = 0.025; # Opacity change between steps while fading in. (default 0.028).
|
||||
fade-in-step = 0.022; # Opacity change between steps while fading in. (default 0.028).
|
||||
fade-out-step = 0.02; # Opacity change between steps while fading out. (default 0.03).
|
||||
# no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
|
||||
# fade-exclude = [ ]; # Exclude conditions for fading.
|
||||
@ -79,7 +76,7 @@ invert-color-include = [ ]; # Conditions for windows to be painted with inverte
|
||||
glx-no-stencil = true; # Recommended.
|
||||
glx-copy-from-front = false; # Useful with --glx-swap-method,
|
||||
# glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
|
||||
# glx-no-rebind-pixmap = true; # Recommended if it works.
|
||||
glx-no-rebind-pixmap = true; # Recommended if it works.
|
||||
glx-swap-method = "undefined"; # See man page.
|
||||
|
||||
# Window type settings
|
||||
|
24
.config/gopass/config.yml
Normal file
24
.config/gopass/config.yml
Normal file
@ -0,0 +1,24 @@
|
||||
root:
|
||||
askformore: false
|
||||
autoimport: true
|
||||
autosync: true
|
||||
cliptimeout: 45
|
||||
noconfirm: false
|
||||
nopager: false
|
||||
path: /home/frebib/.local/share/pass
|
||||
safecontent: false
|
||||
usesymbols: false
|
||||
nocolor: false
|
||||
mounts:
|
||||
spritsail:
|
||||
askformore: false
|
||||
autoimport: true
|
||||
autosync: true
|
||||
cliptimeout: 45
|
||||
noconfirm: false
|
||||
nopager: false
|
||||
path: /home/frebib/.local/share/pass-spritsail
|
||||
safecontent: false
|
||||
usesymbols: false
|
||||
nocolor: false
|
||||
version: 1.6.10
|
@ -171,8 +171,8 @@ bindsym XF86MonBrightnessDown exec xbacklight -dec 5 && pkill -RTMIN+12 i3blocks
|
||||
exec --no-startup-id "ip monitor | while read; do pkill -RTMIN+15 i3blocks; done"
|
||||
|
||||
# app launch shortcuts
|
||||
exec --no-startup-id ~/.fehbg
|
||||
exec --no-startup-id ~/.config/i3/disable-standby-fs.py
|
||||
exec --no-startup-id feh --no-fehbg --no-xinerama --bg-fill ~/pictures/lakesidesunrise.jpg
|
||||
exec --no-startup-id xautolock -time 5 -locker ~/.config/i3/lock.sh -nocloseout -nocloseerr
|
||||
|
||||
# startup programs
|
||||
|
9
.config/vim/.gitignore
vendored
9
.config/vim/.gitignore
vendored
@ -1,7 +1,8 @@
|
||||
/bundle/
|
||||
/.netrwhist
|
||||
/autoload/plug.vim
|
||||
/plug/
|
||||
/spell/
|
||||
/swapfiles/
|
||||
/viminfo
|
||||
/viminf*.tmp
|
||||
/vim-latex
|
||||
/.netrwhist
|
||||
/viminf*.tmp
|
||||
/viminfo
|
||||
|
@ -1,14 +1,13 @@
|
||||
set nocompatible " be iMproved, required
|
||||
|
||||
" Reconfigure Vim to be clean!
|
||||
set undodir=$XDG_CACHE_HOME/vim/undo
|
||||
set directory=$XDG_CACHE_HOME/vim/swap
|
||||
set backupdir=$XDG_CACHE_HOME/vim/backup
|
||||
set undodir=$XDG_CACHE_HOME/vim/undo//
|
||||
set directory=$XDG_CACHE_HOME/vim/swap//
|
||||
set backupdir=$XDG_CACHE_HOME/vim/backup//
|
||||
set viminfo+='1000,n$XDG_CACHE_HOME/vim/viminfo
|
||||
set runtimepath+=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
|
||||
|
||||
syntax enable
|
||||
filetype plugin on
|
||||
silent !mkdir -p $XDG_CACHE_HOME/vim/swap $XDG_CACHE_HOME/vim/undo $XDG_CACHE_HOME/vim/backup
|
||||
|
||||
set tabstop=4
|
||||
set shiftwidth=0 " Use tabstop
|
||||
@ -78,34 +77,37 @@ set cul cuc
|
||||
highlight CursorLine cterm=NONE ctermbg=8
|
||||
highlight CursorColumn cterm=NONE ctermbg=8
|
||||
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.config/vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
call vundle#rc('~/.config/vim/bundle')
|
||||
if empty(glob('$XDG_CONFIG_HOME/vim/autoload/plug.vim'))
|
||||
silent !curl -fsSLo $XDG_CONFIG_HOME/vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $VIMRC
|
||||
endif
|
||||
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
Plugin 'Valloric/YouCompleteMe'
|
||||
Plugin 'scrooloose/syntastic'
|
||||
Plugin 'scrooloose/nerdtree'
|
||||
Plugin 'tpope/vim-sensible'
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
Plugin 'tpope/vim-rhubarb'
|
||||
Plugin 'tpope/vim-abolish'
|
||||
Plugin 'tpope/vim-surround'
|
||||
Plugin 'tpope/vim-repeat'
|
||||
Plugin 'tpope/vim-commentary'
|
||||
Plugin 'majutsushi/tagbar'
|
||||
Plugin 'airblade/vim-gitgutter'
|
||||
Plugin 'ryanoasis/vim-devicons'
|
||||
Plugin 'vim-airline/vim-airline'
|
||||
Plugin 'vim-airline/vim-airline-themes'
|
||||
Plugin 'chr4/nginx.vim'
|
||||
Plugin 'PotatoesMaster/i3-vim-syntax'
|
||||
Plugin 'lervag/vimtex'
|
||||
Plugin 'JamshedVesuna/vim-markdown-preview'
|
||||
Plugin 'junegunn/fzf.vim'
|
||||
call plug#begin('$XDG_CONFIG_HOME/vim/plug')
|
||||
|
||||
call vundle#end()
|
||||
Plug 'Valloric/YouCompleteMe'
|
||||
Plug 'scrooloose/syntastic'
|
||||
Plug 'scrooloose/nerdtree', { 'on': 'NERTreeToggle' }
|
||||
Plug 'tpope/vim-sensible'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-rhubarb'
|
||||
Plug 'tpope/vim-abolish'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-repeat'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'majutsushi/tagbar'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'chr4/nginx.vim'
|
||||
Plug 'PotatoesMaster/i3-vim-syntax'
|
||||
Plug 'lervag/vimtex'
|
||||
Plug 'JamshedVesuna/vim-markdown-preview'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||
|
||||
call plug#end()
|
||||
|
||||
" Change to dvorak-mapped keys
|
||||
let g:use_dvorak = 1
|
||||
|
@ -17,14 +17,14 @@ SAVEHIST=999999
|
||||
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
|
||||
|
||||
# Only set tty if running interactively
|
||||
if exists tty && tty -s; then
|
||||
if exists tty && tty -s 1>/dev/null 2>/dev/null; then
|
||||
# Resolve at shell runtime
|
||||
export GPG_TTY="$(tty)"
|
||||
fi
|
||||
|
||||
# Set some useful ZSH/Bash options
|
||||
setopt sharehistory histignorealldups histignorespace histreduceblanks
|
||||
setopt pathdirs autocd autopushd extendedglob alwaystoend dvorak
|
||||
setopt pathdirs autocd autopushd extendedglob nullglob alwaystoend dvorak
|
||||
|
||||
# Completion initialisation
|
||||
autoload -U compinit ; compinit
|
||||
|
2
.fehbg
2
.fehbg
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
'feh' '--no-xinerama' '--bg-fill' '/home/frebib/pictures/lakesidesunrise.jpg'
|
49
.profile
49
.profile
@ -6,7 +6,8 @@ export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||
export XDG_LOCAL_HOME="$HOME/.local"
|
||||
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open
|
||||
|
||||
mkdir -p "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_DATA_HOME" "$XDG_LOCAL_HOME"
|
||||
|
||||
case "$(basename "$(readlink -f /proc/$$/exe)")" in
|
||||
zsh) thisfile="$(readlink -f "${(%):-%N}")";;
|
||||
@ -16,31 +17,41 @@ esac
|
||||
export DOTFILES="$(dirname "${thisfile:-$XDG_CONFIG_HOME/dotfiles}")"
|
||||
export PATH="${PATH}:$DOTFILES/scripts:$HOME/.local/share/surface-scripts"
|
||||
|
||||
# Allow Vim to load from ~/.config/vim
|
||||
# Override paths for non-compliant programs
|
||||
# https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
|
||||
# Vim
|
||||
export VIMDIR="$XDG_CONFIG_HOME/vim"
|
||||
export VIMRC="$VIMDIR/vimrc"
|
||||
export VIMINIT=":so $VIMRC"
|
||||
export EDITOR="vim"
|
||||
export VISUAL="vim"
|
||||
|
||||
# Allow ZSH to load from ~/.config/zsh
|
||||
# ZSH
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
|
||||
# Configure X11 config file paths
|
||||
# Gnupg
|
||||
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
|
||||
# X11
|
||||
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
|
||||
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
|
||||
# GTK2
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/settings.ini
|
||||
# Cargo/Rust
|
||||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||
# Pass
|
||||
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
|
||||
|
||||
export MANPAGER="less -+N"
|
||||
export TERMINAL="termite"
|
||||
export BROWSER="chromium"
|
||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
|
||||
export QT_QPA_PLATFORMTHEME=gtk2
|
||||
export GOPATH="$XDG_LOCAL_HOME/go"
|
||||
# Go configuration
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export PATH="$PATH:$GOPATH/bin"
|
||||
|
||||
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
|
||||
|
||||
# Configure less and add colours
|
||||
export LESS="-RI"
|
||||
export PAGER="less $LESS"
|
||||
export MANPAGER="less -+N"
|
||||
# Disable histfile
|
||||
export LESSHISTFILE=-
|
||||
|
||||
if exists tput; then
|
||||
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
|
||||
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
|
||||
@ -64,21 +75,9 @@ if [ -f "$XDG_CONFIG_HOME/secrets" ]; then
|
||||
set +o allexport
|
||||
fi
|
||||
|
||||
# Merge system clipboards
|
||||
if [ -n "$DISPLAY" ] && exists autocutsel && ! pidof autocutsel 1>/dev/null; then
|
||||
autocutsel -fork
|
||||
autocutsel -selection PRIMARY -fork
|
||||
fi
|
||||
|
||||
# Start a dbus session daemon for programs that require it
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && exists dbus-launch; then
|
||||
eval $(dbus-launch --sh-syntax --exit-with-session)
|
||||
dbus-update-activation-environment --systemd DISPLAY
|
||||
fi
|
||||
|
||||
# Start the gnome-keyring if it's installed
|
||||
if exists gnome-keyring-daemon; then
|
||||
export $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gnupg)
|
||||
fi
|
||||
|
||||
# Always add SSH key to the running agent; local or remote
|
||||
#ssh-add
|
||||
|
21
README.md
21
README.md
@ -1,17 +1,10 @@
|
||||
These are the configs I use on my Arch Linux installation at home. They can be use and changed as much or as little as you please
|
||||
# frebib/dotfiles
|
||||
|
||||
## Usage
|
||||
To quickly get started, clone this repo and run the setup scripts.
|
||||
To get started, clone this repo and link the relevant files/directories
|
||||
|
||||
git clone https://github.com/frebib/dotfiles.git ~/.config/dotfiles --recursive
|
||||
cd ~/.config/dotfiles
|
||||
|
||||
You can put the `dotfiles` directory anywhere, just be sure to update the `$DOTFILES` envvar in `.profile`
|
||||
|
||||
To link all the configuration files, run the init-dotfiles script:
|
||||
|
||||
**Be warned that this will destroy your current configs without warning**
|
||||
|
||||
scripts/init-dotfiles.sh
|
||||
|
||||
To install all of my packages & programs, check out my other repo <https://github.com/frebib/arch-install/> and the [`userinstall`](https://github.com/frebib/arch-install/blob/master/userinstall) script
|
||||
```shell
|
||||
git clone https://github.com/frebib/dotfiles.git ~/.config/dotfiles
|
||||
ln -sfv .config/dotfiles/.config/* .config/
|
||||
ln -sfv .config/dotfiles/.profile .zprofile
|
||||
```
|
||||
|
5
aliases
5
aliases
@ -56,9 +56,10 @@ alias pacaur='pacaur --color=always'
|
||||
alias tree='tree --dirsfirst -C -F'
|
||||
alias make="make -j$(nproc)"
|
||||
alias dd='dd status=progress'
|
||||
alias env='env | sort'
|
||||
alias env='env | sort | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g"'
|
||||
alias ssh="ssh -tt"
|
||||
alias vim="vim --servername vim -p"
|
||||
vim --version 2>/dev/null | command grep -q +clientserver && \
|
||||
alias vim="vim --servername vim -p"
|
||||
alias vi=vim
|
||||
alias grip='grip --user=frebib --pass=$GRIP_API_KEY'
|
||||
alias acme.sh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log'
|
||||
|
@ -27,24 +27,4 @@ done
|
||||
cd $HOME
|
||||
mkdir -p .local/share/ && cd .local/share
|
||||
echo cd `pwd`
|
||||
ln -sfv $DOTFILES/fonts .
|
||||
ln -sfv $DOTFILES/surfacetools .
|
||||
|
||||
sudo -s << EOF
|
||||
cd ~
|
||||
echo -n "cd "
|
||||
pwd
|
||||
|
||||
ln -sfv $DOTFILES .config/
|
||||
ln -sfv $userhome/.zshrc .
|
||||
ln -sfv $userhome/.profile .
|
||||
ln -sfv $userhome/.zprofile .
|
||||
ln -sfv $userhome/.vimrc .
|
||||
ln -sfv $userhome/.vim/ .
|
||||
ln -sfv $userhome/.gtkrc-2.0 .
|
||||
|
||||
mkdir -p .config && cd .config/
|
||||
echo -n "cd "
|
||||
pwd
|
||||
ln -sfv $userhome/.config/gtk-3.0 .
|
||||
EOF
|
||||
|
@ -97,13 +97,13 @@ function display() {
|
||||
|
||||
quantifier="${last:${#last}-1:1}"
|
||||
echo "$quantifier" | egrep -q '^[0-9]+$' || quantifier=1
|
||||
emoijs="$(repeat "${line[0]}" "$quantifier")"
|
||||
emojis="$(repeat "${line[0]}" "$quantifier")"
|
||||
|
||||
if [ $exit_code == 0 ]; then
|
||||
xdotool type --clearmodifiers "$emoijs"
|
||||
echo -n "$emoijs" | xclip -i
|
||||
xdotool type --clearmodifiers "$emojis"
|
||||
echo -n "$emojis" | xclip -i
|
||||
elif [ $exit_code == 10 ]; then
|
||||
echo -n "$emoijs" | xclip -i
|
||||
echo -n "$emojis" | xclip -i
|
||||
fi
|
||||
}
|
||||
|
||||
|
94
scripts/rofi-fontawesome
Executable file
94
scripts/rofi-fontawesome
Executable file
@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Use rofi to pick fontawesome because that's what this
|
||||
# century is about apparently...
|
||||
#
|
||||
# Requirements:
|
||||
# rofi, xclip, xdotool, curl, xmllint
|
||||
#
|
||||
# Usage:
|
||||
# 1. Download all fontawesome
|
||||
# $ rofi-fontawesome --download
|
||||
#
|
||||
# 2. Run it!
|
||||
# $ rofi-fontawesome
|
||||
#
|
||||
# Notes:
|
||||
# * You'll need a fontawesome font like "Noto fontawesome" or "fontawesomeOne".
|
||||
# * Confirming an item will automatically paste it WITHOUT
|
||||
# writing it to your clipboard.
|
||||
# * Ctrl+C will copy it to your clipboard WITHOUT pasting it.
|
||||
#
|
||||
|
||||
# Where to save the fontawesomes file.
|
||||
FONTAWESOME_FILE="${XDG_CACHE_DIR:-$HOME/.cache}/fontawesome.txt"
|
||||
|
||||
function download() {
|
||||
notify "$(basename "$0")" 'Downloading all Font Awesome for your pleasure'
|
||||
|
||||
echo -n > "$FONTAWESOME_FILE"
|
||||
|
||||
curl https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/advanced-options/metadata/icons.json | \
|
||||
jq '.[] | "\\u" + .unicode + "\t" + .label' -r | \
|
||||
xargs -0 printf \
|
||||
> "$FONTAWESOME_FILE"
|
||||
|
||||
notify "$(basename "$0")" "We're all set!"
|
||||
}
|
||||
|
||||
function toclip() {
|
||||
xclip -i -selection primary
|
||||
xclip -o -selection primary | xclip -i -selection clipboard
|
||||
}
|
||||
|
||||
function repeat() {
|
||||
local rplc str="$1" count="$2"
|
||||
rplc="$(printf "%${count}s")"
|
||||
echo "${rplc// /"$str"}"
|
||||
}
|
||||
|
||||
function notify() {
|
||||
if which notify-send 1>/dev/null 2>/dev/null; then
|
||||
notify-send "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
function display() {
|
||||
fontawesome=$(cat "$FONTAWESOME_FILE" | grep -v '#' | grep -v '^[[:space:]]*$')
|
||||
update=""$'\t'"Update Font Awesome cache"
|
||||
fontawesome=$(printf "$fontawesome\n$update")
|
||||
line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -kb-custom-1 Ctrl+c -kb-row-tab '' -kb-row-select Tab $@)
|
||||
exit_code=$?
|
||||
|
||||
if [ "${line[@]}" == "$update" ]; then
|
||||
download
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#IFS=$'\t'
|
||||
line=($line)
|
||||
last=${line[${#line[@]}-1]}
|
||||
|
||||
quantifier="${last:${#last}-1:1}"
|
||||
echo "$quantifier" | egrep -q '^[0-9]+$' || quantifier=1
|
||||
icons="$(repeat "${line[0]}" "$quantifier")"
|
||||
|
||||
if [ $exit_code == 0 ]; then
|
||||
xdotool type --clearmodifiers "$icons"
|
||||
echo -n "$icons" | xclip -i
|
||||
elif [ $exit_code == 10 ]; then
|
||||
echo -n "$icons" | xclip -i
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [[ "$1" =~ -D|--download ]]; then
|
||||
download
|
||||
exit 0
|
||||
elif [[ "$1" =~ -h|--help ]]; then
|
||||
echo "usage: $0 [-D|--download]"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ ! -f "$FONTAWESOME_FILE" ] && download
|
||||
display
|
@ -26,4 +26,4 @@ vim +PluginUpdate +qall
|
||||
#########################
|
||||
cd "$VIMDIR/bundle/YouCompleteMe"
|
||||
git submodule update --init --recursive
|
||||
./install.py --system-libclang --clang-completer
|
||||
./install.py --system-libclang --clang-completer --go-completer --rust-completer --js-completer --java-completer
|
||||
|
Loading…
Reference in New Issue
Block a user