diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-01-09 18:19:11 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-01-09 18:19:11 +0530 |
| commit | ed00ebd71d3910b3b8b88d18ccc71bae79d8508c (patch) | |
| tree | effba52afb27579c999395170913698a1871dc12 | |
| parent | b2348ede8bef85e8ebf9ed49bab81defafd7a8a4 (diff) | |
| download | nixos-config-ed00ebd71d3910b3b8b88d18ccc71bae79d8508c.tar.gz nixos-config-ed00ebd71d3910b3b8b88d18ccc71bae79d8508c.zip | |
config sync
| m--------- | config/nvim | 0 | ||||
| -rw-r--r-- | config/qutebrowser/config.py | 22 | ||||
| -rw-r--r-- | config/qutebrowser/security.py | 18 | ||||
| -rwxr-xr-x | config/qutebrowser/userscripts/pick_useragent | 20 | ||||
| -rw-r--r-- | config/vimium/vimium-options.json | 6 | ||||
| -rw-r--r-- | config/zsh/aliases/git.zsh | 5 | ||||
| -rw-r--r-- | config/zsh/aliases/system.zsh | 32 | ||||
| -rw-r--r-- | configuration.nix | 13 | ||||
| m--------- | extras/notes | 0 | ||||
| -rw-r--r-- | home.nix | 13 |
10 files changed, 87 insertions, 42 deletions
diff --git a/config/nvim b/config/nvim -Subproject f4e3d643384cb9e0d40329e8ce8eb6c64c9d544 +Subproject 0d9ac9f04656a0a92c719f2d78676dc970196a1 diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index 119c5ba..98d350e 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -94,12 +94,13 @@ lf_file_picker = ['sensible-terminal', '-c', 'lf-selector', '-g', '170x40+50+50' c.fileselect.handler = 'external' c.fileselect.single_file.command = lf_file_picker c.fileselect.multiple_files.command = lf_file_picker +c.fileselect.folder.command = lf_file_picker # Hints c.hints.auto_follow = 'always' -c.hints.chars = 'azsxdclmknjb' +c.hints.chars = 'asdfhjklqwpei1290' c.hints.auto_follow = 'unique-match' -c.hints.mode = 'number' # letter +c.hints.mode = 'number' # number | letter nunmap('m') nunmap('M') @@ -257,15 +258,22 @@ c.content.notifications.presenter = 'libnotify' c.content.notifications.enabled = 'ask' c.content.desktop_capture = 'ask' -config.set('content.notifications.enabled', True, '*://reddit.com') -config.set('content.notifications.enabled', True, '*://www.reddit.com') +# Disable +config.set('content.notifications.enabled', False, '*://reddit.com') +config.set('content.notifications.enabled', False, '*://www.reddit.com') + +# general config.set('content.notifications.enabled', True, '*://web.whatsapp.com') +config.set('content.notifications.enabled', True, '*://*.basecamp.com') +config.set('content.notifications.enabled', True, '*://app.slack.com') +# google config.set('content.notifications.enabled', True, '*://mail.google.com') config.set('content.notifications.enabled', True, '*://chat.google.com') -config.set('content.notifications.enabled', True, '*://*.basecamp.com') +config.set('content.notifications.enabled', True, '*://calendar.google.com') +config.set('content.register_protocol_handler', True, '*://calendar.google.com') +config.set('content.notifications.enabled', True, '*://meet.google.com') -# Google meet -config.set('content.notifications.enabled', False, '*://meet.google.com') +# Media config.set('content.media.audio_video_capture', True, '*://meet.google.com') config.set('content.media.audio_capture', True, '*://meet.google.com') config.set('content.media.video_capture', True, '*://meet.google.com') diff --git a/config/qutebrowser/security.py b/config/qutebrowser/security.py index 930368a..7e87f54 100644 --- a/config/qutebrowser/security.py +++ b/config/qutebrowser/security.py @@ -21,23 +21,23 @@ def random_version(a, b): return rand_numstr(a, b) + '.' + rand_numstr(0, 100) def random_useragent(): - chrome_version = random_version(90, 99) + chrome_version = random_version(108, 112) # firefox_version = random_version(77, 80) build_version = random_version(1000, 3000) agents = [ 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML; like Gecko) Chromium/' + chrome_version + '.0.4044.138 Chrome/' + chrome_version + '.' + build_version + ' Safari/{webkit_version}', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' + chrome_version + '.0.4147.89 Safari/{webkit_version} Hola/1.173.900', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' + chrome_version + '.0.2623.112 Safari/{webkit_version}' + # 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' + chrome_version + '.0.2623.112 Safari/{webkit_version}' # 'Mozilla/5.0 (Linux x86_64; rv:78.0) Gecko/20100101 Firefox/' + firefox_version, ] - return agents[random.randint(0, 2)] + return agents[random.randint(0, len(agents) - 1)] c.content.cookies.accept = 'no-3rdparty' c.content.geolocation = 'ask' c.content.headers.do_not_track = True c.content.headers.referer = 'never' -c.content.headers.user_agent = random_useragent() +# c.content.headers.user_agent = random_useragent() c.content.blocking.enabled = True c.content.media.audio_capture = 'ask' c.content.media.video_capture = 'ask' @@ -55,8 +55,8 @@ c.aliases['tor-disable'] = 'config-unset content.proxy' c.aliases['tor-change'] = 'spawn --userscript tor_identity' # Fingerprinting feature switches -c.aliases['clipboard-disable'] = disable('content.javascript.can_access_clipboard') -c.aliases['clipboard-enable'] = enable('content.javascript.can_access_clipboard') +c.aliases['clipboard-disable'] = disable('content.javascript.clipboard') +c.aliases['clipboard-enable'] = enable('content.javascript.clipboard') c.aliases['canvas-disable'] = disable('content.canvas_reading') c.aliases['canvas-enable'] = enable('content.canvas_reading') c.aliases['webgl-disable'] = disable('content.webgl') @@ -67,9 +67,9 @@ c.aliases['location-enable'] = enable('content.geolocation', ask=True) # Incognito identity switch c.aliases['change-identity'] = compose('config-source', c.aliases['tor-change']) -def set_incognito(mode): - tor = 'enable' if mode else 'disable' - features = 'disable' if mode else 'enable' +def set_incognito(enable): + tor = 'enable' if enable else 'disable' + features = 'disable' if enable else 'enable' return compose( 'config-source', c.aliases['tor-' + tor], diff --git a/config/qutebrowser/userscripts/pick_useragent b/config/qutebrowser/userscripts/pick_useragent index dce67e7..e7a1f1d 100755 --- a/config/qutebrowser/userscripts/pick_useragent +++ b/config/qutebrowser/userscripts/pick_useragent @@ -2,21 +2,13 @@ trim() { sed '/^$/ d'; } -useragents=`echo " -Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0 -Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 -Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0 -Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 - -Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36 -Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 -Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36 -Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Brave Chrome/76.0.3809.132 Safari/537.36 - -Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 -Mozilla/5.0 (Linux; Android 6.0.1; RedMi Note 5 Build/RB3N5C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3440.91 Mobile Safari/537.36 -Mozilla/5.0 (Linux; Android 7.0; K10000 Max) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Mobile Safari/537.36 Brave/74 +chromium_version="112"; +useragents=`echo " +Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/$chromium_version.0.3729.169 Safari/537.36 +Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/$chromium_version.0.3987.163 Safari/537.36 +Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/$chromium_version.0.4103.61 Chrome/$chromium_version.0.4103.61 Safari/537.36 +Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Brave Chrome/$chromium_version.0.3809.132 Safari/537.36 " | trim`; ua=`echo -e "$useragents" | dmenu -p "User-agent ::"`; diff --git a/config/vimium/vimium-options.json b/config/vimium/vimium-options.json new file mode 100644 index 0000000..0505880 --- /dev/null +++ b/config/vimium/vimium-options.json @@ -0,0 +1,6 @@ +{ + "filterLinkHints": true, + "keyMappings": "# Insert your preferred key mappings here.\nmap o Vomnibar.activateInNewTab\nmap O Vomnibar.activate\nmap b Vomnibar.activateBookmarksInNewTab\nmap B Vomnibar.activateBookmarks\nmap p openCopiedUrlInNewTab\nmap P openCopiedUrlInCurrentTab\n\nmap yu copyCurrentUrl\nmap u restoreTab\n\nmap <space>b Vomnibar.activateTabSelection\n\nunmap x\nunmap X\n\nmap J scrollDown\nmap K scrollUp\nmap <c-k> previousTab\nmap <c-j> nextTab\nmap <c-J> moveTabRight\nmap <c-K> moveTabLeft\n\n# map dd removeTab", + "settingsVersion": "2.0.5", + "userDefinedLinkHintCss": "div > .vimiumHintMarker {\n /* linkhint boxes */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFF785),\n color-stop(100%, #FFC542));\n border: 1px solid #E3BE23;\n}\n\ndiv > .vimiumHintMarker span {\n /* linkhint text */\n color: black;\n font-weight: bold;\n font-size: 12px;\n}\n\ndiv > .vimiumHintMarker > .matchingCharacter {\n}\n\n#vomnibar .vomnibarInput {\n font-size: 14px;\n}\n\n#vomnibar ul {\n margin: 0 !important;\n padding: 0 !important;\n}\n\n#vomnibar ul li * {\n font-size: 14px !important;\n}\n#vomnibar .vomnibarTopHalf .vomnibarSource {\n color: #5a5c5f;\n}" +} diff --git a/config/zsh/aliases/git.zsh b/config/zsh/aliases/git.zsh index 47d8c0c..3bbdefa 100644 --- a/config/zsh/aliases/git.zsh +++ b/config/zsh/aliases/git.zsh @@ -44,6 +44,11 @@ alias gl='git log' alias gp='git push' +alias gr='git rebase' +alias gri='git rebase -i' +alias grm='git rebase -i origin/master' +alias grc='git rebase --continue' + grename() { if [[ -z "$1" || -z "$2" ]]; then echo "Usage: $0 old_branch new_branch" diff --git a/config/zsh/aliases/system.zsh b/config/zsh/aliases/system.zsh index bc1b247..4123e19 100644 --- a/config/zsh/aliases/system.zsh +++ b/config/zsh/aliases/system.zsh @@ -23,18 +23,30 @@ nix-rollback() { #sv_disable() { sudo unlink /run/runit/service/$1; } setup_webcam_day() { - v4l2-ctl -d /dev/video2 --set-ctrl exposure_absolute=300 - v4l2-ctl -d /dev/video2 --set-ctrl gamma=180 - v4l2-ctl -d /dev/video2 --set-ctrl saturation=15 - v4l2-ctl -d /dev/video2 --set-ctrl contrast=11 - v4l2-ctl -d /dev/video2 --set-ctrl brightness=1 + v4l2-ctl -d /dev/video2 \ + --set-ctrl saturation=17 \ + --set-ctrl contrast=11 \ + --set-ctrl exposure_absolute=300 \ + --set-ctrl exposure_auto=1 \ + --set-ctrl brightness=1 \ + --set-ctrl sharpness=4 \ + --set-ctrl gamma=190 \ + --set-ctrl power_line_frequency=1 \ + --set-ctrl backlight_compensation=1 \ + --set-ctrl gain=30 } setup_webcam_night() { - v4l2-ctl -d /dev/video2 --set-ctrl exposure_absolute=460 - v4l2-ctl -d /dev/video2 --set-ctrl gamma=230 - v4l2-ctl -d /dev/video2 --set-ctrl saturation=14 - v4l2-ctl -d /dev/video2 --set-ctrl contrast=10 - v4l2-ctl -d /dev/video2 --set-ctrl brightness=1 + v4l2-ctl -d /dev/video2 \ + --set-ctrl saturation=18 \ + --set-ctrl contrast=11 \ + --set-ctrl exposure_absolute=500 \ + --set-ctrl exposure_auto=1 \ + --set-ctrl brightness=1 \ + --set-ctrl sharpness=6 \ + --set-ctrl gamma=230 \ + --set-ctrl power_line_frequency=1 \ + --set-ctrl backlight_compensation=1 \ + --set-ctrl gain=64 } diff --git a/configuration.nix b/configuration.nix index b2eb3e0..928e69d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -74,7 +74,7 @@ in hostName = "smartfridge"; firewall = { enable = true; - allowedTCPPorts = [ 8080 3000 3001 ]; + allowedTCPPorts = [ 8080 8081 3000 3001 ]; allowedUDPPorts = [ 41641 ]; }; nameservers = [ "100.100.100.100" "8.8.8.8" "1.1.1.1" ]; @@ -100,7 +100,7 @@ in services.flatpak.enable = true; xdg.portal = { enable = true; - xdgOpenUsePortal = true; + xdgOpenUsePortal = false; extraPortals = (with pkgs; [ xdg-desktop-portal xdg-desktop-portal-gtk @@ -140,6 +140,15 @@ in noto-fonts-emoji ]; + # programs.firefox = { + # enable = true; + # preferences = { + # "browser.uidensity" = 1; + # "browser.compactmode.show" = true; + # "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + # }; + # }; + nix.settings = { experimental-features = [ "nix-command" "flakes" ]; auto-optimise-store = true; diff --git a/extras/notes b/extras/notes -Subproject 986072e287aca47c5715f9be7f80be97a5d2b97 +Subproject 9087dda585e22ed7a488820bfaea4622afae9a7 @@ -102,4 +102,17 @@ in ".wyrdrc".source = ./config/remind/.wyrdrc; "scripts".source = ./scripts; }; + + # programs.chromium = { + # enable = true; + # package = pkgs.brave; + # commandLineArgs = [ "--enable-devtools-experiments" "" ]; + # # --file_chooser, --enable-devtools-experiments --enabled-features --disabled-features --flag-switches-begin --flag-switches-end + # extensions = [ + # { id = "fmkadmapgofadopljbjfkapdkoienihi"; } # React devtools + # { id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # Vimium + # { id = "iohjgamcilhbgmhbnllfolmkmmekfmci"; } # Jam recording + # { id = "jnkmfdileelhofjcijamephohjechhna"; } # GA debugger + # ]; + # }; } |
