File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change 19801980c .url .start_pages = ['about:blank' ]
19811981c .url .default_page = 'https://grok.com/'
19821982c .url .searchengines = {
1983- 'DEFAULT' : 'https://google.com/search?q=before:2023 {}' ,
1983+ 'DEFAULT' : 'https://google.com/search?q={}' ,
1984+ 'old' : 'https://google.com/search?q=before:2023 {}' ,
19841985 'ggl' : 'https://google.com/search?q={}' ,
19851986 'ddg' : 'https://duckduckgo.com/?q={}' ,
19861987 'gpt' : 'https://chatgpt.com/?q={}' ,
Original file line number Diff line number Diff line change 1111 unst = import ./nixpkgs-unstable.nix ;
1212 rocm = olds . rocmPackages_5 ;
1313 vibe = import ./vibe.nix { inherit pkgs ; } ;
14+ qute = import ./qute.nix { inherit pkgs ; } ;
1415 lockCmd = "${ pkgs . swaylock } /bin/swaylock --color=000000" ;
1516 home-manager = builtins . fetchTarball {
1617 url = "https://github.com/nix-community/home-manager/archive/8d5e27b4807d25308dfe369d5a923d87e7dbfda3.tar.gz" ;
@@ -773,10 +774,10 @@ in {
773774 pulsemixer
774775 neovim
775776 vibe
777+ qute
776778 ( import ./vidmaker.nix )
777779 ( import ./clipmaker.nix )
778780 ( import ./bar.nix { inherit pkgs ; } )
779- ( import ./qute.nix { inherit pkgs ; } )
780781 ( import ./bip39-wordlist.nix )
781782 ] ;
782783 programs . git = {
979980 cfgProgrKeys = {
980981 "${ mod } +Return" = "exec ${ vibe } /bin/vibe" ;
981982 "${ mod } +y" = "exec ${ alacritty } /bin/alacritty -e ${ pkgs . yewtube } /bin/yt" ;
982- "${ mod } +b" = "exec ${ qutebrowser } /bin/qutebrowser " ;
983+ "${ mod } +b" = "exec ${ qute } /bin/qute " ;
983984 } ;
984985 cfgBasicKeys = {
985986 "Ctrl+Mod1+q" = wmEx lockCmd ;
Original file line number Diff line number Diff line change 1111 -C ${ ../cfg/qutebrowser.py } "$@"
1212 '' ;
1313 } ;
14+ ytb = pkgs . writeTextFile {
15+ name = "ytb.js" ;
16+ text = ''
17+ // ==UserScript==
18+ // @name Youtube Enhancements
19+ // @match *://*.youtube.com/*
20+ // ==/UserScript==
21+
22+ (function() {
23+ 'use strict';
24+
25+ function skipAds() {
26+ const skipBtn = document.querySelector('.videoAdUiSkipButton, .ytp-ad-skip-button-modern, .ytp-skip-ad-button');
27+ if (skipBtn) skipBtn.click();
28+ const adVideo = document.querySelector('.ad-showing .video-stream');
29+ if (adVideo && adVideo.duration > 0 && adVideo.currentTime < adVideo.duration) {
30+ adVideo.currentTime = adVideo.duration;
31+ }
32+ }
33+
34+ function removeSponsored() {
35+ document.querySelectorAll('ytd-in-feed-ad-layout-renderer').forEach(el => el.remove());
36+ document.querySelectorAll('ytd-engagement-panel-section-list-renderer[target-id="engagement-panel-ads"]').forEach(el => el.remove());
37+ }
38+
39+ function observer() {
40+ skipAds();
41+ removeSponsored();
42+ }
43+
44+ window.addEventListener('load', observer);
45+ new MutationObserver(observer).observe(document.body, { childList: true, subtree: true });
46+ })();
47+ '' ;
48+ } ;
1449 sandbox = mkNixPak {
1550 config = { sloth , ...} : {
1651 app . package = app ;
2358 network = true ;
2459 sockets . pulse = true ;
2560 sockets . wayland = true ;
61+ bind . ro = [
62+ [
63+ ( toString ytb )
64+ (
65+ sloth . concat'
66+ sloth . homeDir
67+ "/.config/qutebrowser/greasemonkey/ytb.js"
68+ )
69+ ]
70+ ] ;
2671 bind . rw = [
2772 [
2873 ( sloth . mkdir ( sloth . concat' sloth . homeDir "/qute" ) )
You can’t perform that action at this time.
0 commit comments