From: Samir Benmendil Date: Wed, 7 Jan 2015 02:49:21 +0000 (+0000) Subject: Merge branch 'flexget' X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/ca89775db49fd0376f920e77487e0485e98e787f?hp=131878f7c9837bed9f02c5942119315a5eb3a987 Merge branch 'flexget' --- diff --git a/.gitmodules b/.gitmodules index ed6c2a9..b274d06 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "awesome/vicious"] - path = awesome/vicious - url = http://git.sysphere.org/vicious [submodule "awesome/awesome-freedesktop"] path = awesome/awesome-freedesktop url = https://github.com/terceiro/awesome-freedesktop.git diff --git a/Makefile b/Makefile index 3d01524..3c9162d 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ APATH := $(realpath .) FILES := bin DOTFILES := conky* git* goobookrc msmtp* mutt ncmpcpp profile weechat xbindkeysrc Xresources xprofile zprofile zshenv zshrc -CONFIGFILES := aliases compton.conf git mimeo.conf mpd offlineimap ranger retroarch systemd vim xkb zsh +CONFIGFILES := aliases compton.conf git mimeo.conf mpd mpv offlineimap ranger retroarch systemd vim xkb zsh .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES) install: $(FILES) $(DOTFILES) $(CONFIGFILES) diff --git a/awesome/bindings.lua b/awesome/bindings.lua index 5ff504e..af2426e 100644 --- a/awesome/bindings.lua +++ b/awesome/bindings.lua @@ -70,8 +70,8 @@ globalkeys = awful.util.table.join(globalkeys, -- Prompt awful.key({ modkey }, "space", function () mypromptbox[mouse.screen]:run() end), -- switch layout - awful.key({ modkey }, "]", function () awful.layout.inc( 1, mouse.screen, layouts) end), - awful.key({ modkey }, "[", function () awful.layout.inc(-1, mouse.screen, layouts) end), + awful.key({ modkey }, "]", function () awful.layout.inc(layouts, 1) end), + awful.key({ modkey }, "[", function () awful.layout.inc(layouts, -1) end), -- resize slave awful.key({ modkey, "Control" }, "j", function () awful.client.incwfact( 0.05) end), awful.key({ modkey, "Control" }, "k", function () awful.client.incwfact(-0.05) end), diff --git a/awesome/rules.lua b/awesome/rules.lua index a78a85f..2d07e9d 100644 --- a/awesome/rules.lua +++ b/awesome/rules.lua @@ -3,17 +3,17 @@ local utils = require("utils") -- {{{ Rules local sc = screen.count() +if sc == 1 then mediatag = tags[1][9] end if sc == 2 then mediatag = tags[2][3] end -if sc == 1 then mediatag = tags[1][4] end -if sc == 2 then wwwtag = tags[2][1] end if sc == 1 then wwwtag = tags[1][2] end +if sc == 2 then wwwtag = tags[2][1] end -if sc == 2 then imtag = tags[2][2] end if sc == 1 then imtag = tags[1][3] end +if sc == 2 then imtag = tags[2][2] end +if sc == 1 then socialtag = tags[1][4] end if sc == 2 then socialtag = tags[2][4] end -if sc == 1 then socialtag = tags[1][5] end awful.rules.rules = { -- All clients will match this rule. diff --git a/bin/old/ubuntu-minimal-install b/bin/old/ubuntu-minimal-install deleted file mode 100755 index 1786615..0000000 --- a/bin/old/ubuntu-minimal-install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -####################################################################### -# Ubuntu-Desktop-Minimal: Post-install script to install only the bare -# essentials of an Ubuntu Desktop. -####################################################################### -echo "[*] Installing Gnome Essentials" -sudo apt-get -y install gnome-core gdm network-manager-gnome fast-user-switch-applet \ -human-theme x11-xserver-utils tangerine-icon-theme gnome-themes-ubuntu ubuntu-artwork \ -jockey-gtk gnome-screensaver gnome-utils -echo "[*] Installing Application Essentials" -sudo apt-get install -y gcalctool tsclient diff --git a/dwb/forms b/dwb/forms index b38119e..acec770 100644 Binary files a/dwb/forms and b/dwb/forms differ diff --git a/dwb/userscripts/extension_loader.js b/dwb/userscripts/extension_loader.js index da30a4a..f00518d 100644 --- a/dwb/userscripts/extension_loader.js +++ b/dwb/userscripts/extension_loader.js @@ -109,6 +109,7 @@ domains : { "facebook.com" : { "user-stylesheet-uri" : "file:///home/ramsi/.config/dwb/userstyles/facebook.com.css" }, "github.com" : { "user-stylesheet-uri" : "file:///home/ramsi/.config/dwb/userstyles/github.com.css" }, "humblebundle.com" : { "user-stylesheet-uri" : "" }, + "imgur.com" : { "user-stylesheet-uri" : "file:///home/ramsi/.config/dwb/userstyles/imgur.com.css" }, "reddit.com" : { "user-stylesheet-uri" : "file:///home/ramsi/.config/dwb/userstyles/reddit.com.css" }, "soundcloud.com" : { "user-stylesheet-uri" : "file:///home/ramsi/.config/dwb/userstyles/soundcloud.com.css" }, "stackexchange.com" : { "user-stylesheet-uri" : "file:///home/ramsi/.config/dwb/userstyles/stackoverflow.com.css" }, diff --git a/dwb/userstyles/imgur.com.css b/dwb/userstyles/imgur.com.css new file mode 100644 index 0000000..5a9c096 --- /dev/null +++ b/dwb/userstyles/imgur.com.css @@ -0,0 +1,4 @@ +/* make sure background is set when viewing only image */ +body { + background-color : #1c1c1c !important +} diff --git a/mpd/mpd.conf b/mpd/mpd.conf index 7e1d303..38f2a3d 100644 --- a/mpd/mpd.conf +++ b/mpd/mpd.conf @@ -10,10 +10,17 @@ state_file "~/.local/share/mpd/state" sticker_file "~/.local/share/mpd/sticker.sql" input { - plugin "curl" + plugin "curl" } audio_output { - type "pulse" - name "My Pulse Output" + type "pulse" + name "My Pulse Output" +} + +audio_output { + type "fifo" + name "fifo" + path "/tmp/mpd.fifo" + format "44100:16:2" } diff --git a/mpv/.gitignore b/mpv/.gitignore new file mode 100644 index 0000000..e4c9514 --- /dev/null +++ b/mpv/.gitignore @@ -0,0 +1 @@ +watch_later diff --git a/mpv/config b/mpv/config new file mode 100644 index 0000000..3c5e101 --- /dev/null +++ b/mpv/config @@ -0,0 +1,9 @@ +# default +ytdl +cache=auto +cache-default=50000 +cache-initial=100 + +# profiles +[mimeo] +quiet diff --git a/mpv/input.conf b/mpv/input.conf new file mode 100644 index 0000000..a11924f --- /dev/null +++ b/mpv/input.conf @@ -0,0 +1 @@ +a cycle_values video-aspect "16:9" "16:10" "4:3" "2.35:1" "-1" diff --git a/ncmpcpp/bindings b/ncmpcpp/bindings new file mode 100644 index 0000000..14878a7 --- /dev/null +++ b/ncmpcpp/bindings @@ -0,0 +1,75 @@ +# don't quit +def_key "q" + dummy + +def_key "ctrl_c" + quit + +def_key "k" + scroll_up + +def_key "K" + move_sort_order_up + +def_key "K" + move_selected_items_up + +def_key "j" + scroll_down + +def_key "J" + move_sort_order_down + +def_key "J" + move_selected_items_down + +def_key "l" + next_column + +def_key "l" + slave_screen + +def_key "l" + volume_up + +def_key "h" + previous_column + +def_key "h" + master_screen + +def_key "h" + volume_down + +def_key "!" + show_playlist + +def_key "@" + show_browser + +def_key "@" + change_browse_mode + +def_key "#" + show_search_engine + +def_key "#" + reset_search_engine + +def_key "$" + show_media_library + +def_key "$" + toggle_media_library_columns_mode + +def_key "%" + show_playlist_editor + +def_key "^" + show_tag_editor + +def_key "&" + show_outputs + +def_key "*" + show_visualizer diff --git a/ncmpcpp/config b/ncmpcpp/config index d311c3e..aeea0b6 100644 --- a/ncmpcpp/config +++ b/ncmpcpp/config @@ -15,4 +15,10 @@ playlist_editor_display_mode = "columns" autocenter_mode = "yes" user_interface = "alternative" -media_library_left_column = "A" +media_library_primary_tag = "album_artist" + +visualizer_fifo_path = "/tmp/mpd.fifo" +visualizer_output_name = "fifo" +visualizer_sync_interval = "30" +visualizer_in_stereo = "yes" +visualizer_type = "spectrum" (spectrum/wave) diff --git a/vim/filetype.vim b/vim/filetype.vim index e62ec35..17b1a26 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -2,12 +2,12 @@ if exists("did_load_filetypes") finish endif augroup filetypedetect - autocmd! BufNewFile,BufRead *.launch setfiletype roslaunch - autocmd! BufNewFile,BufRead PKGBUILD* setfiletype PKGBUILD + autocmd! BufNewFile,BufRead PKGBUILD setfiletype PKGBUILD augroup END augroup ft_ros autocmd! BufNewFile,BufRead */ros/*.cpp setfiletype cpp.roscpp autocmd! BufNewFile,BufRead */ros/*.h setfiletype cpp.roscpp + autocmd! BufNewFile,BufRead *.launch setfiletype roslaunch autocmd! BufNewFile,BufRead package.xml setfiletype rospackage augroup END diff --git a/vim/ftplugin/PKGBUILD.vim b/vim/ftplugin/PKGBUILD.vim index 9de99f6..68cd5da 100644 --- a/vim/ftplugin/PKGBUILD.vim +++ b/vim/ftplugin/PKGBUILD.vim @@ -6,6 +6,6 @@ setlocal makeprg=makepkg\ -s setlocal errorformat=%f:\ line\ %l:\ %m nnoremap u :UpdPkgSums -nnoremap r O# Maintainer: Samir Benmendil +nnoremap r O# Maintainer: Samir Benmendil " vim: ft=vim diff --git a/vim/ftplugin/roscpp.vim b/vim/ftplugin/roscpp.vim index e69de29..c43b32e 100644 --- a/vim/ftplugin/roscpp.vim +++ b/vim/ftplugin/roscpp.vim @@ -0,0 +1,9 @@ +augroup fs_roscpp + autocmd! + autocmd BufEnter *.cpp let b:fswitchdst = 'h' + autocmd BufEnter *.cpp let b:fswitchlocs = 'reg:|src$|include/**|' + autocmd BufEnter *.h let b:fswitchdst = 'cpp' + autocmd BufEnter *.h let b:fswitchlocs = 'reg:/include.*/src/' +augroup END + +set makeprg=catkin_make\ -C$ROS_WORKSPACE diff --git a/vim/ultisnips/PKGBUILD.snippets b/vim/ultisnips/PKGBUILD.snippets new file mode 100644 index 0000000..ef52592 --- /dev/null +++ b/vim/ultisnips/PKGBUILD.snippets @@ -0,0 +1,23 @@ +snippet prep "prepare() function" b +prepare() { + cd ${1:$pkgname-$pkgver} + $0 +} +endsnippet + +snippet build "build() function" b +build() { + cd ${1:$pkgname-$pkgver} + ./configure \ + --prefix=/usr $2 + $0 +} +endsnippet + +snippet pack "package() function" b +package() { + cd ${1:$pkgname-$pkgver} + make DESTDIR="$pkgdir" install + $0 +} +endsnippet diff --git a/vim/ultisnips/c.snippets b/vim/ultisnips/c.snippets index 618bfe3..d535228 100644 --- a/vim/ultisnips/c.snippets +++ b/vim/ultisnips/c.snippets @@ -67,16 +67,14 @@ snippet once "Include header once only guard" #ifndef ${1:`!p if not snip.c: import random, string - name = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper() - rand = ''.join(random.sample(string.ascii_letters+string.digits, 8)) - snip.rv = ('%s_%s' % (name,rand)).upper() + snip.rv = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper() else: snip.rv = snip.c`} #define $1 ${VISUAL}${0} -#endif /* end of include guard: $1 */ +#endif // $1 endsnippet snippet td "Typedef" diff --git a/vim/vimrc b/vim/vimrc index 23e9b8a..17e2a1e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -42,9 +42,9 @@ Plugin 'derekwyatt/vim-fswitch' " Plugin 'powerman/vim-plugin-viewdoc' Plugin 'airblade/vim-gitgutter' -Plugin 'Raimondi/delimitMate' -Plugin 'SirVer/ultisnips' -Plugin 'Lokaltog/vim-easymotion' +Plugin 'raimondi/delimitmate' +Plugin 'sirver/ultisnips' +Plugin 'lokaltog/vim-easymotion' Plugin 'junegunn/vim-easy-align' Plugin 'chrisbra/checkattach' @@ -232,12 +232,6 @@ augroup cursor_pos \ endif augroup END -" auto source vimrc when saved {{{2 -augroup source_vimrc - au! - autocmd bufwritepost vimrc source $MYVIMRC -augroup END - " bindings {{{1 " allow both and / to be @@ -400,6 +394,13 @@ let g:checkattach_filebrowser = 'ranger' " Gundo {{{2 nnoremap :GundoToggle +" fswitch {{{2 +nnoremap ff :FSHere +nnoremap fl :FSRight +nnoremap fh :FSLeft +nnoremap fL :FSSplitRight +nnoremap fH :FSSplitLeft + " fugitive {{{2 nmap dd :tab split \| Gdiff \| wincmd h " delete fugitive buffers when closed @@ -457,9 +458,9 @@ let g:ycm_autoclose_preview_window_after_insertion = 1 "let g:ycm_extra_conf_vim_data = ['%:p'] nnoremap jd :YcmCompleter GoTo -" vim-easy-align +" vim-easy-align {{{2 " start interactive EasyAlign in visual mode -vnoremap (EasyAlign) +vnoremap (EasyAlign) " vim-json {{{2 let g:vim_json_syntax_conceal = 0 diff --git a/vim/ycm_extra_conf.py b/vim/ycm_extra_conf.py index ba18821..ac15c22 100644 --- a/vim/ycm_extra_conf.py +++ b/vim/ycm_extra_conf.py @@ -19,19 +19,14 @@ def FlagsForFile( filename, **kwargs ): # '-fexceptions', # '-DNDEBUG', '-std=c++11', - '-stdlib=libc++', + '-stdlib=libstdc++', '-x', 'c++', '-I', '.', '-I', './include', - '-isystem', '/usr/include/c++/4.9.0', - '-isystem', '/usr/include/c++/4.9.0/x86_64-unknown-linux-gnu', - '-isystem', '/usr/include/c++/4.9.0/backward', - '-isystem', '/usr/lib/clang/3.4.1/include' ] flags += rospack() relative_to = cwd final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) - print flags return { 'flags': final_flags, diff --git a/xkb/symbols/dvorak b/xkb/symbols/dvorak index ff8e363..74219ca 100644 --- a/xkb/symbols/dvorak +++ b/xkb/symbols/dvorak @@ -124,6 +124,9 @@ xkb_symbols "default" { //{{{1 key { [ Right ] }; modifier_map Control { , }; + + // includes {{{2 + include "shift(both_capslock)" }; //}}}1 partial diff --git a/zsh/aliases/pacman.zsh b/zsh/aliases/pacman.zsh index 8cb322c..988902d 100644 --- a/zsh/aliases/pacman.zsh +++ b/zsh/aliases/pacman.zsh @@ -16,6 +16,8 @@ alias pacexp='sudo pacman -D --asexplicit' # Mark package as explicit alias pacinsd='sudo pacman -S --asdeps' # Install given package(s) as dependencies of another package alias pacmir='sudo pacman -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist +[[ -x /usr/bin/packer ]] && alias aur='packer' + # https://bbs.archlinux.org/viewtopic.php?id=93683 paclist() { pacman -Qei | awk 'BEGIN {FS=": "}/^Name/{printf("\033[1;36m%s\033[0m ",$2)}/^Description/{print $2}' @@ -28,7 +30,7 @@ alias pacro='sudo pacman -Rnscu $(pacman -Qtdq)' # Display information about given packages (merges output of -Sii and -Qii) paci() { for p in $@; do - if [[ -n "$(pacman -Qq "$p" 2>/dev/null)" ]]; then + if [[ -n "$(pacman -Qq "$p" 2>/dev/null)" ]]; then diff -u100 <(pacman -Qii "$p") <(pacman -Sii "$p" | sed '/^$/,$ d') | sed -e '1,3 d' -e 's/[-+ ]//' else pacman -Sii "$p" @@ -52,8 +54,17 @@ pacdisowned() { pacman -Qlq | sort -u > "$db" - find /bin /etc /lib /sbin /usr \ - ! \( -name lost+found -o -name local \) \ + local -a d + if [[ -z $@ ]]; then + d=(/etc /usr) + else + d=($@) + fi + find ${d[@]} \ + ! \( -name lost+found \ + -o -path '*/local/*' \ + -o -path "*/share/mime/*" \ + \) \ \( -type d -printf '%p/\n' -o -print \) | sort > "$fs" comm -23 "$fs" "$db" diff --git a/zsh/lib/ranger.zsh b/zsh/lib/ranger.zsh index 1fab1ae..64a94e6 100644 --- a/zsh/lib/ranger.zsh +++ b/zsh/lib/ranger.zsh @@ -8,6 +8,7 @@ function ranger { /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" test -f "$tempfile" && if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then + echo "$(cat "$tempfile")" cd -- "$(cat "$tempfile")" fi rm -f -- "$tempfile"