From 6088e22cd89a6ef092ef649dd3f24a1c539bc667 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Fri, 22 May 2020 09:57:50 +0200 Subject: [PATCH] Add 'search' script + Change Transmission client to stig + Edit Xresources colors + Edit nvim colors + Change pdf viewer in vifmrc to zathura + Bind 'search' script in sxhkdrc --- .config/Xresources | 2 +- .config/nvim/colors/biual.vim | 4 ++-- .config/sxhkd/sxhkdrc | 6 ++++-- .config/vifm/vifmrc | 2 +- .local/bin/scripts/search | 17 +++++++++++++++++ .local/bin/scripts/tuirent | 2 +- 6 files changed, 26 insertions(+), 7 deletions(-) create mode 100755 .local/bin/scripts/search diff --git a/.config/Xresources b/.config/Xresources index 7977998..b0bb81b 100644 --- a/.config/Xresources +++ b/.config/Xresources @@ -40,7 +40,7 @@ st.font: Monospace:pixelsize=13:antialias=true:autohint=true:hintstyle=hintmediu *.color11: #c9895b ! blue -*.color4: #6f97b8 +*.color4: #385872 *.color12: #6f97b8 ! magenta diff --git a/.config/nvim/colors/biual.vim b/.config/nvim/colors/biual.vim index 1b26e24..ecfd835 100644 --- a/.config/nvim/colors/biual.vim +++ b/.config/nvim/colors/biual.vim @@ -55,7 +55,7 @@ hi PmenuThumb ctermfg=8 ctermbg=8 hi PmenuSbar ctermfg=0 ctermbg=0 hi StatusLineNC ctermfg=8 ctermbg=NONE cterm=bold hi StatusLine ctermfg=14 ctermbg=NONE cterm=NONE -hi MyStatuslineFilename ctermfg=4 ctermbg=NONE +hi MyStatuslineFilename ctermfg=12 ctermbg=NONE hi MyStatuslineFiletype ctermfg=9 ctermbg=none cterm=italic hi MyStatuslineLineCol ctermfg=1 ctermbg=none cterm=none @@ -99,7 +99,7 @@ hi Constant ctermfg=3 cterm=none hi Identifier ctermfg=180 hi Statement ctermfg=13 cterm=italic hi PreProc ctermfg=13 -hi Type ctermfg=4 cterm=bold +hi Type ctermfg=12 cterm=bold hi Special ctermfg=135 " hi Error ctermfg=0 diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 01028cf..6d9a688 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -1,8 +1,10 @@ super + Return $TERMINAL -super + b - $BROWSER super + shift + b + $BROWSER +super + b + search +super + ctrl + b torbrowser-launcher super + d rofi -show run diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index e73124a..7da9aeb 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -110,7 +110,7 @@ filetype *.ftp \ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %CLEAR, " Pdf -filextype *.pdf mupdf %c %i &, apvlv %c, xpdf %c +filextype *.pdf zathura %c %i &, apvlv %c, xpdf %c fileviewer *.pdf pdftotext -nopgbrk %c - " PostScript diff --git a/.local/bin/scripts/search b/.local/bin/scripts/search new file mode 100755 index 0000000..98e1d20 --- /dev/null +++ b/.local/bin/scripts/search @@ -0,0 +1,17 @@ +#!/bin/sh + +# Search in $BROWSER or use bookmarks from file. + +bmfile="$HOME/.config/bookmarks" + +m() { rofi -dmenu -width 600 -i -p "Search" -l "$(wc -l "$bmfile")" ;} + +chosen="$( + sed 's/http.*\/ //g' "$bmfile" | m +)" +[ ! "$chosen" ] && exit 0 + +url="$(grep "$chosen" "$bmfile" | awk '{ print $1 }')" +[ ! "$url" ] && url="https://duckduckgo.com/?q=$chosen" + +"$BROWSER" "$url" diff --git a/.local/bin/scripts/tuirent b/.local/bin/scripts/tuirent index 05ea7b3..7fa3e9a 100755 --- a/.local/bin/scripts/tuirent +++ b/.local/bin/scripts/tuirent @@ -2,4 +2,4 @@ # Run torrent client. -"$TERMINAL" -e tremc +"$TERMINAL" -e stig