aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.nanorc1
-rw-r--r--.pluggins.vim8
-rw-r--r--.vimrc4
-rwxr-xr-x.xinitrc5
-rw-r--r--.zsh_aliases8
-rw-r--r--.zshrc4
-rwxr-xr-xbin/project-open9
-rwxr-xr-xbin/tag-music2
-rwxr-xr-xbin/touchpad-toggle7
-rwxr-xr-xinstall3
-rw-r--r--qutebrowser/config.py18
-rw-r--r--xmonad.hs3
-rw-r--r--zathura/zathurarc1
13 files changed, 52 insertions, 21 deletions
diff --git a/.nanorc b/.nanorc
new file mode 100644
index 0000000..38059df
--- /dev/null
+++ b/.nanorc
@@ -0,0 +1 @@
+include /usr/share/nano/c.nanorc
diff --git a/.pluggins.vim b/.pluggins.vim
index 49c501d..c60ab84 100644
--- a/.pluggins.vim
+++ b/.pluggins.vim
@@ -13,8 +13,10 @@ call plug#begin()
Plug 'junegunn/vim-easy-align' " align
Plug 'ludovicchabant/vim-gutentags' " generate tags in project root
Plug 'junegunn/goyo.vim' " generate tags in project root
- "
+
" Plug 'easymotion/vim-easymotion' " TODO very intresting
+ " Plug 'mhinz/vim-rfc' " RFC download/syntax/tags
+ Plug 'skammer/vim-css-color'
" markdown preview in browser
@@ -31,14 +33,14 @@ call plug#begin()
" themes
" Plug 'joshdick/onedark.vim' " onedark
- " Plug 'dracula/vim', {'as': 'vim'} " dracula
+ Plug 'dracula/vim', {'as': 'vim'} " dracula
Plug 'altercation/vim-colors-solarized' " solarized
" intresting but not used
" Plug 'sheerun/vim-polyglot' " better syntax highlight
" Plug 'unblevable/quick-scope' " highlight first char to jump to word
" Plug 'jez/vim-superman' " man pages in vim (too slow)
- " Plug 'vim-scripts/rfc-syntax' " rfc
+ Plug 'vim-scripts/rfc-syntax' " rfc
" Plug 'tacahiroy/ctrlp-funky' " extension to search function
Plug '/home/charles/git/c_formatter_42.vim'
Plug 'cacharle/doxy42.vim'
diff --git a/.vimrc b/.vimrc
index 6bbfe7f..fe017a1 100644
--- a/.vimrc
+++ b/.vimrc
@@ -249,7 +249,7 @@ autocmd BufReadPre *.md autocmd! BufWritePre
" filetype {{{
" real tab in c file for school projects
-autocmd BufReadPre,BufNewFile *.h,*.c set filetype=c
+let g:c_syntax_for_h = 1 " filetype=c in header files instead of filetype=cpp
autocmd Filetype c setlocal noexpandtab
" std::cout << ... << std::endl; shortcut
autocmd Filetype cpp nnoremap <leader>cout istd::cout << << std::endl;<ESC>2F<hi
@@ -304,3 +304,5 @@ let g:c_formatter_42_format_on_save = 0
let g:gutentags_ctags_exclude = ['doc/*', 'Makefile']
" let g:gutentags_ctags_exclude_wildignore = 1
+
+let g:goyo_height = 90
diff --git a/.xinitrc b/.xinitrc
index d1a873d..9259dbd 100755
--- a/.xinitrc
+++ b/.xinitrc
@@ -4,8 +4,5 @@ echo 'Starting redshift'
redshift -c /home/charles/.config/redshift.conf &
echo 'Starting dunst'
dunst &
-
-xset r rate 300 40
-
-echo 'Starting XMonad'
+xset r rate 200 50
exec xmonad
diff --git a/.zsh_aliases b/.zsh_aliases
index e11b209..7c59352 100644
--- a/.zsh_aliases
+++ b/.zsh_aliases
@@ -6,6 +6,7 @@
alias grep='grep --color=auto'
alias tree='tree -C'
alias pacman='pacman --color=auto'
+alias yay='yay --color=auto'
alias valgrindc='colour-valgrind'
# common commands
@@ -71,7 +72,7 @@ alias grv="git remote -v"
alias gra="git remote add"
gpa() {
branch="$1"
- [ -z "$1" ] && branch=master
+ [ -z "$branch" ] && branch=$(git branch | grep '^\* .*$' | cut -d ' ' -f 2)
git remote | xargs -I{} git push {} "$branch"
}
gpaf() {
@@ -103,7 +104,8 @@ alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
-alias norm='ruby ~/git/norminette/norminette.rb'
+alias norminette='ruby ~/git/norminette/norminette.rb'
+alias norm='norminette'
getrfc() {
curl "https://ietf.org/rfc/rfc$1.txt" > "$HOME/rfc/rfc$1.txt"
@@ -115,7 +117,7 @@ alias bton='echo power on | bluetoothctl'
alias btoff='echo power off | bluetoothctl'
# pdf selector
-alias openpdf='zathura `ls -1 *.pdf | dmenu` &'
+# alias pdf-open="zathura \$(echo $HOME/Documents/*.pdf | tr ' ' '\\n' | dmenu)"
alias cagob='RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo build'
alias cagor='RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo run'
diff --git a/.zshrc b/.zshrc
index 50e737f..a6f16b7 100644
--- a/.zshrc
+++ b/.zshrc
@@ -102,7 +102,7 @@ tabs 4
export LFS=/mnt
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:$DOTDIR/bin"
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:$DOTDIR/bin:$HOME/.local/bin"
# export PATH="$PATH:$HOME/.vim/plugged/vim-superman/bin"
export GPG_TTY=$(tty) # fixing gpg fatal error about tty
@@ -115,3 +115,5 @@ export MINISHELL_TEST_FLAGS=-DMINISHELL_TEST
export PATH="$PATH:/home/charles/git/c_formatter_42"
export MINIKUBE_IN_STYLE=false
+
+export WEBSERV_FLAGS=-DWEBSERV_CACHARLE
diff --git a/bin/project-open b/bin/project-open
index 955d31d..adb27a4 100755
--- a/bin/project-open
+++ b/bin/project-open
@@ -34,12 +34,13 @@ else
"clone")
while [ -z "$remote_choice" ]
do
- remote_choice=$(printf 'github.com\ncacharle.xyz\nother' | dmenu -p "Remote location")
+ remote_choice=$(printf 'github.com\ncacharle.xyz\nclipboard\nother' | dmenu -p "Remote location")
done
case "$remote_choice" in
- "github.com") prefix='git@github.com:cacharle/' ;;
- "cacharle.xyz") prefix='git@cacharle.xyz:/srv/git/' ;;
- "other") ;;
+ github.com) prefix='git@github.com:cacharle/' ;;
+ cacharle.xyz) prefix='git@cacharle.xyz:/srv/git/' ;;
+ clipboard) dest="$(xclip -selection clipboard -o)" ;;
+ other) ;;
esac
url="$prefix$(echo "$dest" | dmenu -p "Enter repository url: $prefix")"
st -e /bin/sh -c "git clone --recursive '$url' '$dest_path' && cd '$dest_path' && exec $SHELL" ||
diff --git a/bin/tag-music b/bin/tag-music
index e801132..826a83a 100755
--- a/bin/tag-music
+++ b/bin/tag-music
@@ -25,7 +25,7 @@ do
song="$(echo "$song" | cut -d '-' -f 2-)"
fi
# echo $track $song
- echo $song_file
+ # echo $song_file
taffy --artist "$artist" --album "$album" --title "$song" --track "$track" "$song_file"
done
done
diff --git a/bin/touchpad-toggle b/bin/touchpad-toggle
index f0a86a1..e4dc959 100755
--- a/bin/touchpad-toggle
+++ b/bin/touchpad-toggle
@@ -4,6 +4,9 @@ touchpad_name='ETPS/2 Elantech Touchpad'
active="$(xinput list-props "$touchpad_name" | grep 'Device Enabled' | cut -f 3)"
-[ "$active" -eq 1 ] &&
- xinput disable "$touchpad_name" ||
+if [ "$active" -eq 1 ]
+then
+ xinput disable "$touchpad_name"
+else
xinput enable "$touchpad_name"
+fi
diff --git a/install b/install
index 0dcf09c..fd557e2 100755
--- a/install
+++ b/install
@@ -23,6 +23,7 @@ create_dotfile_link_same()
create_dotfile_link_same .zshrc
create_dotfile_link_same .bashrc
create_dotfile_link_same .vimrc
+create_dotfile_link_same .nanorc
create_dotfile_link_same .pluggins.vim
create_dotfile_link grep.vim .vim/plugin/grep.vim
@@ -55,6 +56,8 @@ create_dotfile_link qutebrowser/config.py .config/qutebrowser/config.py
create_dotfile_link_same .moc/config
create_dotfile_link_same .moc/themes/solarized
+create_dotfile_link zathura/zathurarc .config/zathura/zathurarc
+
ln -sv "$DOTDIR/bin" "$HOME/bin"
###############################################################################
diff --git a/qutebrowser/config.py b/qutebrowser/config.py
index 61d5ae8..827d2eb 100644
--- a/qutebrowser/config.py
+++ b/qutebrowser/config.py
@@ -1,5 +1,7 @@
from qutebrowser.api import interceptor
+config.load_autoconfig(True)
+
# Youtube ad blocking
def filter_yt(info: interceptor.Request):
url = info.request_url
@@ -26,6 +28,8 @@ c.url.searchengines = {
'y': 'https://www.youtube.com/results?search_query={}',
'gh': 'https://github.com/search?q={}',
'h': 'https://hoogle.haskell.org/?hoogle={}',
+ 'cpp': 'http://cplusplus.com/search.do?q={}',
+ 'lar': 'https://www.larousse.fr/dictionnaires/francais/{}'
}
c.fonts.default_family = 'Fira Mono'
@@ -42,16 +46,28 @@ c.editor.command = [
c.messages.timeout = 4000
-config.bind(';v', 'hint links spawn /usr/bin/mpv {hint-url} ;;'
+config.bind(';v', 'hint links spawn /usr/bin/mpv --ytdl-format=best {hint-url} ;;'
'message-info "opening in video player"')
config.bind('<Ctrl-J>', 'completion-item-focus next', 'command')
config.bind('<Ctrl-K>', 'completion-item-focus prev', 'command')
+config.bind('J', 'tab-prev', 'normal')
+config.bind('K', 'tab-next', 'normal')
+
+config.bind('<F12>', 'devtools', 'normal')
+
c.colors.webpage.darkmode.enabled = True # Convert light themed sites to dark theme (very nice result)
c.colors.webpage.bg = 'black' # Disabling white flash before page loading
# c.content.proxy = 'socks://localhost:9050/' # tor
+c.content.autoplay = False
+c.content.notifications = False
+c.content.cookies.accept = 'no-3rdparty'
+
+c.auto_save.session = True
+c.session.lazy_restore = True
+
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
# Base16 qutebrowser template by theova
diff --git a/xmonad.hs b/xmonad.hs
index 578868b..03fb74f 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -24,7 +24,7 @@ main = xmonad $ desktopConfig
, focusedBorderColor = "#bbc5ff"
, terminal = "st"
, layoutHook = myLayouts
- , manageHook = myManageHook
+ , manageHook = myManageHook
, modMask = mod4Mask -- mod key to super
, borderWidth = 1
, focusFollowsMouse = False -- don't change window based on mouse position (need to click)
@@ -50,6 +50,7 @@ myKeys = [ ("<XF86AudioRaiseVolume>", spawn "~/bin/volume-ctl up")
, ("M-o", spawn "~/bin/project-open")
, ("M-m", spawn "st -e mocp")
, ("M-S-d", spawn "notify-send \"$(date +\"%H:%M %A %d/%m/%Y %B\")\"")
+ , ("M-S-b", spawn "notify-send \"battery: $(cat /sys/class/power_supply/BAT0/capacity)\"")
, ("M-q", spawn "notify-send Restart" >> spawn restartCmd)
, ("M-S-q", confirm "Are you sure you want to shutdown?" $ io (exitWith ExitSuccess))
]
diff --git a/zathura/zathurarc b/zathura/zathurarc
new file mode 100644
index 0000000..ea10740
--- /dev/null
+++ b/zathura/zathurarc
@@ -0,0 +1 @@
+set selection-clipboard clipboard