1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2025-03-25 19:40:29 +00:00

Qute: config-cycle instead of userscripts

This commit is contained in:
Phantop 2020-08-24 14:39:20 -04:00
parent 0f1f53ad9b
commit d25a5d44fd
6 changed files with 20 additions and 27 deletions

View file

@ -1,23 +1,22 @@
# bindings
config.bind('<Ctrl-m>', 'spawn -m -d -v mpv {url}')
config.bind('<Ctrl-q>', 'close')
config.bind('<Ctrl-w>', 'tab-close')
config.bind('<Ctrl-r>', 'spawn -u readability')
config.bind('sa', 'open https://archive.is/?run=1&url={url}')
config.bind('sd', 'spawn -u downloads')
config.bind('<Ctrl-r>', 'spawn -u readability')
config.bind('<Ctrl-m>', 'spawn -m -d -v mpv {url}')
config.bind('sq', 'open qr {url}')
config.bind('sa', 'open https://archive.is/?run=1&url={url}')
config.bind('sw', 'open https://conifer.rhizome.org/record/{url}')
c.aliases['dotepub'] = "open javascript:(function()%7Btry%7Bvar%20d=document,w=window;if(!d.body%7C%7Cd.body.innerHTML=='')throw(0);var%20s=d.createElement('link'),h=d.getElementsByTagName('head')[0],i=d.createElement('div'),j=d.createElement('script');s.rel='stylesheet';s.href='//dotepub.com/s/dotEPUB-favlet.css';s.type='text/css';s.media='screen';h.appendChild(s);i.setAttribute('id','dotepub');i.innerHTML='%3Cdiv%20id=%22status%22%3E%3Cp%3EConversion%20in%20progress...%3C/p%3E%3C/div%3E';d.body.appendChild(i);j.type='text/javascript';j.charset='utf-8';j.src='//dotepub.com/j/dotepub.js?v=1.2&s=ask&t=epub&g=en';h.appendChild(j);%7Dcatch(e)%7Bw.alert('The%20page%20has%20no%20content%20or%20it%20is%20not%20fully%20loaded.%20Please,%20wait%20till%20the%20page%20is%20loaded.');%7D%7D)();"
config.bind('se', "dotepub")
c.aliases['remove-sticky'] = "open javascript:(function()%7B%20let%20i%2C%20elements%20%3D%20document.querySelectorAll('body%20*')%3B%20for%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7B%20if(getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'fixed'%20%7C%7C%20getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'sticky')%7B%20elements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%20%7D%20%7D%20%7D)()"
config.bind('sr', "remove-sticky")
config.bind('sca', 'spawn -u switchadapta')
config.bind('sd', 'spawn -u downloads')
config.bind('st', 'spawn -u switchtor')
config.bind('st', 'config-cycle -t content.proxy system socks://localhost:9050/')
config.bind('sca', 'config-cycle -t content.user_stylesheets normalize/normalize.css "[normalize/normalize.css, adapta.css]"')
# BEGIN MAIN CONFIGURATION #
c.url.default_page = "https://mangadex.org/follows"
@ -36,8 +35,9 @@ c.downloads.location.prompt = False
c.url.open_base_url = True
c.tabs.background = True
c.content.dns_prefetch = True
c.confirm_quit = ["downloads"]
c.content.user_stylesheets = ["/home/glados/.config/qutebrowser/normalize/normalize.css"]
c.content.user_stylesheets = ["normalize/normalize.css"]
c.content.host_blocking.lists.append("https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts")
c.content.host_blocking.lists.append("https://github.com/adversarialtools/apple-telemetry/raw/master/blacklist")

View file

@ -1,8 +0,0 @@
#!/usr/bin/fish
if test -e $QUTE_DATA_DIR/userscripts/adapta
echo 'set content.user_stylesheets \'["/home/glados/.config/qutebrowser/normalize/normalize.css"]\'' >> "$QUTE_FIFO"
rm $QUTE_DATA_DIR/userscripts/adapta
else
echo 'set content.user_stylesheets \'["/home/glados/.config/qutebrowser/normalize/normalize.css", "/home/glados/.config/qutebrowser/userscripts/adapta.css"]\'' >> "$QUTE_FIFO"
touch $QUTE_DATA_DIR/userscripts/adapta
end

View file

@ -1,8 +0,0 @@
#!/usr/bin/fish
if test -e $QUTE_DATA_DIR/userscripts/tor
echo "set content.proxy system" >> "$QUTE_FIFO"
rm $QUTE_DATA_DIR/userscripts/tor
else
echo "set content.proxy socks://localhost:9050/" >> "$QUTE_FIFO"
touch $QUTE_DATA_DIR/userscripts/tor
end

9
.config/rofi/config Normal file
View file

@ -0,0 +1,9 @@
rofi.drun-icon-theme: Haiku
rofi.show-icons: true
rofi.color-normal: argb:2c263238, #c4cbd4, argb:2c263238, #5294E2, #f9f9f9
rofi.color-urgent: argb:2c263238, #cc6666, argb:e54b5160, #a54242, #f9f9f9
rofi.color-active: argb:2c263238, #65acff, argb:e44b5160, #4491ed, #f9f9f9
rofi.color-window: argb:f2263238, #7c8389, #263238
rofi.separator-style: none
rofi.run-command: fish -c '{cmd}'
rofi.run-list-command: 'fish -c functions'

4
.setup
View file

@ -2,8 +2,8 @@
sudo eopkg it -c system.devel
sudo eopkg rm gnome-terminal libreoffice-common mate-terminal nautilus
desktop = "keepassx kitty mpv qutebrowser rofi zathura"
terminal = "aria2 autojump busybox fd fish jq ncdu neovim stow"
desktop="keepassx kitty mpv qutebrowser rofi zathura"
terminal="aria2 autojump busybox fd fish jq ncdu neovim stow"
sudo eopkg it $desktop $terminal
rm ~/.bashrc