From a76aa8c932030a64ba277ed9a9cbeadb8dd910d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Tue, 14 Sep 2021 11:04:04 +0300 Subject: Trying out vimb as main browser --- dotfiles/.config/mimeapps.list | 16 ++++++------- dotfiles/.config/sway/config | 14 ++++------- dotfiles/.config/vimb/config | 51 +++++++++++++++++++++++++++++++++++++++++ dotfiles/.config/vimb/style.css | 25 ++++++++++++++++++++ dotfiles/.local/bin/menuwebsurf | 16 ++++++++----- dotfiles/.profile | 2 +- 6 files changed, 99 insertions(+), 25 deletions(-) create mode 100644 dotfiles/.config/vimb/config create mode 100644 dotfiles/.config/vimb/style.css (limited to 'dotfiles') diff --git a/dotfiles/.config/mimeapps.list b/dotfiles/.config/mimeapps.list index a64163f..9d207f7 100644 --- a/dotfiles/.config/mimeapps.list +++ b/dotfiles/.config/mimeapps.list @@ -1,9 +1,9 @@ [Default Applications] application/pdf=org.pwmt.zathura-pdf-mupdf.desktop; application/epub+zip=org.pwmt.zathura-pdf-mupdf.desktop; -application/rdf+xml=org.qutebrowser.qutebrowser.desktop; -application/xhtml+xml=org.qutebrowser.qutebrowser.desktop; -application/xml=org.qutebrowser.qutebrowser.desktop; +application/rdf+xml=vimb.desktop; +application/xhtml+xml=vimb.desktop; +application/xml=vimb.desktop; audio/mpeg=mpv.desktop; audio/x-xm=mpv.desktop; audio/x-mod=mpv.desktop; @@ -12,13 +12,13 @@ image/jpeg=sxiv.desktop; image/png=sxiv.desktop; image/webp=sxiv.desktop; image/svg+xml=org.inkscape.Inkscape.desktop -text/html=org.qutebrowser.qutebrowser.desktop; +text/html=vimb.desktop; text/xml=nvim.desktop; text/plain=nvim.desktop; x-scheme-handler/discord-589393213723246592=discord-589393213723246592.desktop; -x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop; -x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop; +x-scheme-handler/http=vimb.desktop; +x-scheme-handler/https=vimb.desktop; x-scheme-handler/qute=org.qutebrowser.qutebrowser.desktop; x-scheme-handler/discord-455712169795780630=discord-455712169795780630.desktop -x-scheme-handler/mailto=aerc.desktop -x-scheme-handler/tg=userapp-Telegram Desktop-0V8IZ0.desktop +x-scheme-handler/mailto=neomutt.desktop +x-scheme-handler/tg=userapp-Telegram Desktop-I9W870.desktop diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index 47a2e74..8127c5f 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -6,7 +6,7 @@ set $mod Mod4 set $alt Mod1 set $term foot -set $browser qutebrowser +set $browser `$BROWSER` # set default desktop layout (default is tiling) # workspace_layout tabbed @@ -97,10 +97,6 @@ no_focus [title="mpvfloat"] # Dropdown-like windows -# VK Messenger -for_window [instance="vk" window_role="browser-window"] floating enable, sticky enable -# for_window [class="VK"] move scratchpad - # Telegram Desktop for_window [app_id="telegramdesktop"] floating enable, sticky enable # for_window [class="TelegramDesktop"] move scratchpad @@ -171,8 +167,8 @@ bindsym --to-code { $mod+Ctrl+Shift+space exec "makoctl restore" # Start Applications - $mod+Shift+w exec $browser - $mod+Ctrl+w exec chromium -enable-features=UseOzonePlatform -ozone-platform=wayland + $mod+Shift+w exec menuwebsurf + $mod+Ctrl+w exec menuwebsurf paste $mod+F1 exec menuman $mod+F2 exec menumako $mod+F3 exec menudisplay @@ -184,12 +180,10 @@ bindsym --to-code { $mod+s exec "xway steam" $mod+m exec $term ncmpcpp $mod+n exec $term -T "newsboat" newsboat && killall -42 waybar - $mod+a exec $term -T "aerc" aerc + $mod+a exec $term -T "neomutt" neomutt $mod+o exec notistats $mod+c exec camtoggle $mod+grave exec menuemoji - $mod+Ctrl+grave exec menuwebsurf - $mod+Shift+grave exec menuwebsurf paste $mod+apostrophe exec menupass $mod+Shift+apostrophe exec "menupass -l" $mod+Ctrl+apostrophe exec "menupass -f" diff --git a/dotfiles/.config/vimb/config b/dotfiles/.config/vimb/config new file mode 100644 index 0000000..1bdce52 --- /dev/null +++ b/dotfiles/.config/vimb/config @@ -0,0 +1,51 @@ +#set home-page=https://srx.yaroslavps.com/ +set home-page=about:blank + +set download-path=~/dls + +set editor-command=foot nvim %s + +set input-autohide=true + +set spell-checking=true +set spell-checking-languages=en,es,ru + +set webgl=true + +set incsearch=true + +set default-font=monospace + +shortcut-add s=https://srx.yaroslavps.com/search?q=$0 +shortcut-add d=http://dict.cc/?s=$0 +shortcut-add y=http://www.youtube.com/results?search_query=$0 +shortcut-add duck=https://duckduckgo.com/?q=$0 + +shortcut-default s + +nmap + zI +nmap - zO +nmap = zz + +set hint-keys-same-length=true +set hint-keys=asdfghjkl +set hint-timeout=0 + +set x-hint-command=:sh! xdg-open ; + +set geolocation=never + +set prevent-newwindow=true + +set cookie-accept=origin + +# GUI color settings +# Color scheme: Base16 Eighties (https://github.com/chriskempson/base16) +set completion-css=color:#6d974b;background-color:#151517;font:10pt monospace; +set completion-hover-css=color:#6d974b;background-color:#232328;font:10pt monospace; +set completion-selected-css=color:#6d974b;background-color:#515151;font:10pt monospace; +set input-css=color:#6d974b;background-color:#393939;font:10pt monospace; +set input-error-css=color:#b73030;background-color:#393939;font:10pt monospace; +set status-css=color:#faf6e5;background-color:#393939;font:10pt monospace; +set status-ssl-css=color:#99cc99;background-color:#393939;font:10pt monospace; +set status-ssl-invalid-css=color:#f2777a;background-color:#393939;font:10pt monospace; diff --git a/dotfiles/.config/vimb/style.css b/dotfiles/.config/vimb/style.css new file mode 100644 index 0000000..3e3d0b4 --- /dev/null +++ b/dotfiles/.config/vimb/style.css @@ -0,0 +1,25 @@ +/* Hint mode color styling + * + * The precedence of the user style is lower than that of the website so you + * have to mark your style definition to have higher priority. + */ +span[vimbhint^='label'] { + background-color: #5b8277 !important; + border: 0 !important; + color: #151517 !important; + font: bold 10pt monospace !important; + opacity: 1 !important; + padding: .1em .4em !important; + text-transform: uppercase !important; +} +span[vimbhint='label focus'] { + font: bold 13pt monospace !important; +} +*[vimbhint^='hint'] { + background-color: #e6e3d6 !important; + color: #151517 !important; +} +*[vimbhint='hint focus'] { + background-color: #e2b55a !important; + color: #151517 !important; +} diff --git a/dotfiles/.local/bin/menuwebsurf b/dotfiles/.local/bin/menuwebsurf index bef9890..cb32299 100755 --- a/dotfiles/.local/bin/menuwebsurf +++ b/dotfiles/.local/bin/menuwebsurf @@ -5,18 +5,22 @@ # Source settings from .bemenurc . ~/.config/bemenurc -prompt="🌐" +searchurl="https://srx.yaroslavps.com/search?q=" +histf="$HOME/.config/vimb/history" # Have to use this "hack" because bemenu doesn't know how to paste if [ "$1" = "paste" ]; then - prompt="$(wl-paste)" + prompt="$(wl-paste)" +else + prompt="$(cat "$histf")" fi -choice=$(echo "$prompt" | bemenu -i -p "Enter link or query:" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR") || exit 1 +choice=$(printf "%s" "$prompt" | bemenu -i -l 25 -p "Enter link or query:" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR") || exit 1 -if [ "$choice" = "🌐" ]; then - $BROWSER +if echo "$choice" | egrep ".*://.*" >/dev/null 2>&1; then + choice="$(echo "$choice" | cut -f 1)" + mimeo "$choice" else - mimeo "$choice" + $BROWSER "$choice" fi diff --git a/dotfiles/.profile b/dotfiles/.profile index 7d6f809..4db0bac 100644 --- a/dotfiles/.profile +++ b/dotfiles/.profile @@ -17,7 +17,7 @@ export LANG=en_US.UTF-8 export TERMINAL=foot export EDITOR="nvim" export PAGER="less -R -j.5" -export BROWSER=qutebrowser +export BROWSER=vimb # Sanely export XDG Base dir variables eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)" -- cgit v1.2.3