This is a child page on Bradley Taunt's blog

Wiki

This is a living document that will expand alongside my own personal experiences and knowledge. Topics range from device settings, computer configurations, household product serial numbers / expiry dates, and so on. Hopefully this can end up being helpful to others as well.

Garuda Linux

Set Default Applications

browser

[Default Applications]
x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/ftp=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/chrome=org.qutebrowser.qutebrowser.desktop
text/html=org.qutebrowser.qutebrowser.desktop
application/x-extension-htm=org.qutebrowser.qutebrowser.desktop
application/x-extension-html=org.qutebrowser.qutebrowser.desktop
application/x-extension-shtml=org.qutebrowser.qutebrowser.desktop
application/xhtml+xml=org.qutebrowser.qutebrowser.desktop
application/x-extension-xhtml=org.qutebrowser.qutebrowser.desktop
application/x-extension-xht=org.qutebrowser.qutebrowser.desktop

image viewer

xdg-mime default org.qutebrowser.qutebrowser.desktop image/png

waybar

{
    "layer": "top", // Waybar at top layer
    "position": "top", // Waybar position (top|bottom|left|right)
    "height": 30,
    //"width": 1350, // Waybar width
    // Choose the order of the modules idle_inhibitor
    "modules-left": ["custom/launcher","sway/workspaces", "sway/mode", "sway/window"],
    "modules-right": ["custom/pacman", "backlight", "cpu", "memory", "battery", "pulseaudio","tray", "idle_inhibitor", "clock","custom/power"], 
    
 // Modules configuration
 
    "sway/workspaces": {
        "disable-scroll": true,
        "all-outputs": true,
        "format": "{icon}",
        "format-icons": {
		"3": "3",
		"4": "4",
		"5": "5",
		"6": "6",
		"7": "7",
		"8": "8",
		"9": "9",
		"10": "10",
        }
    },
    "sway/mode": {
        "format": "<span style=\"italic\">{}</span>"
    },
    "sway/window": {
        "format": "{}"
    },
    "idle_inhibitor": {
        "format": "{icon}",
       "format-icons": {
            "activated": "",
            "deactivated": ""
        }
    },
    "tray": {
        "icon-size": 14,
        "spacing": 5
    },
    "clock": {
        "tooltip-format": "{:%A %B %d %Y | %H:%M}",
        "format": " {:%a %d %b  %I:%M %p}",	//12 hour format
        //"format": " {:%a %d %b  %H:%M}",	//24 hour format
        "format-alt": " {:%d/%m/%Y  %H:%M:%S}",
        //"timezones": [ "Kolkata" ],
        //"max-length": 200
        "interval": 1
    },
    "cpu": {
        "format": "﬙ {usage: >3}%",
        "on-click": "alacritty -e htop"
    },
    "memory": {
        "format": " {: >3}%",
        "on-click": "alacritty -e htop"
    },
    "temperature": {
        // "thermal-zone": 2,
        // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
        "critical-threshold": 80,
        // "format-critical": "{temperatureC}°C ",
        "format": "{temperatureC}°C "
    },
    "backlight": {
        // "device": "acpi_video1",
        "format": "{icon} {percent: >3}%",
        "format-icons": ["", ""],
        "on-scroll-down": "brightnessctl -c backlight set 5%-",
        "on-scroll-up": "brightnessctl -c backlight set +5%"
    },
    "battery": {
        "states": {
            // "good": 95,
            "warning": 30,
            "critical": 15
        },       
        "format": "{icon} {capacity: >3}%",
        // "format-good": "", // An empty format will hide the module
        // "format-full": "",
        "format-icons": ["", "", "", "", ""]
        //"format-icons": ["", "", "", "", "", "", "", "", "", ""]
    },
     "network": {
        // "interface": "wlp2s0", // (Optional) To force the use of this interface
        "format": "⚠ Disabled",
        "format-wifi": " {essid}",
        // "format-ethernet": " {ifname}: {ipaddr}/{cidr}",
        "format-ethernet": " {ifname}",
        "format-disconnected": "⚠ Disconnected",
        "on-click": "alacritty -e nmtui"
    },
    "pulseaudio": {
        "scroll-step": 5,
        "format": "{icon} {volume: >3}%",
        "format-bluetooth": "{icon} {volume: >3}%",
        "format-muted":" muted",
        "format-icons": {
            "headphones": "",
            "handsfree": "",
            "headset": "",
            "phone": "",
            "portable": "",
            "car": "",
            "default": ["", ""]
        },
        "on-click": "pavucontrol"
    },
     "custom/pacman": {
        "format": " {}",
        "interval": 7200,                     // every two hours
        "exec": "i=$(checkupdates); echo \"$i\" |wc -l; echo \"$i\" |column -t |tr '\n' '\r'",       // # of updates and tooltip details
        "exec-if": "exit 0",                  // always run; consider advanced run conditions
        "on-click": "alacritty -e sudo pacman -Syu", // update system
        "signal": 8
    },
    "custom/power": {
      	"format":"⏻",
       	"on-click": "nwg-bar",
      	"tooltip": false,
   },
   "custom/keyboard-layout": {
      	"exec": "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4",
      	// Interval set only as a fallback, as the value is updated by signal
      	"interval": 30,
      	"format": "  {}", // Icon: keyboard
      	// Signal sent by Sway key binding (~/.config/sway/key-bindings)
      	"signal": 1, // SIGHUP
      	"tooltip": false,
        "on-click": "~/.config/waybar/scripts/keyhint.sh",
},
     "custom/launcher": {
    	"format":" ",
    	"on-click": "exec nwg-drawer -c 7 -is 70 -spacing 23",
    	"tooltip": false,
},
}

qutebrowser

Greasemonkey

All of these scripts should be added under ~/.local/share/qutebrowser/greasemonkey/. Then be sure to run the proper command within qutebrowser: :greasemonkey-reload

Auto Skip YouTube Ads

This script was originally posted on the /r/qutebrowser subreddit here.

// ==UserScript==
// @name         Auto Skip YouTube Ads 
// @version      1.0.0
// @description  Speed up and skip YouTube ads automatically 
// @author       jso8910
// @match        *://*.youtube.com/*
// @exclude      *://*.youtube.com/subscribe_embed?*
// ==/UserScript==
setInterval(() => {
    const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')
    if (btn) {
        btn.click()
    }
    const ad = [...document.querySelectorAll('.ad-showing')][0];
    if (ad) {
        document.querySelector('video').playbackRate = 10;
    }
}, 50)

Alacritty

alacritty.yml

Place content in /home/$user/.config/alacritty/alacritty.yml

# Copyright (c) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
# Copyright (c) 2017-present Sven Greb <code@svengreb.de>

# Project:    Nord Alacritty
# Version:    0.1.0
# Repository: https://github.com/arcticicestudio/nord-alacritty
# License:    MIT
# References:
#   https://github.com/alacritty/alacritty

colors:
  primary:
    background: '#282c34'
    foreground: '#d8dee9'
    dim_foreground: '#282c34'
  cursor:
    text: '#2e3440'
    cursor: '#d8dee9'
  vi_mode_cursor:
    text: '#2e3440'
    cursor: '#d8dee9'
  selection:
    text: CellForeground
    background: '#4c566a'
  search:
    matches:
      foreground: CellBackground
      background: '#88c0d0'
    footer_bar:
      background: '#434c5e'
      foreground: '#d8dee9'
  normal:
    black: '#434c5e'
    red: '#f9929b'
    green: '#98c379'
    yellow: '#ebcb8b'
    blue: '#81a1c1'
    magenta: '#b48ead'
    cyan: '#88c0d0'
    white: '#d8dee9'
  bright:
    black: '#4c566a'
    red: '#bf616a'
    green: '#8fbcbb'
    yellow: '#fbdf90'
    blue: '#81a1c1'
    magenta: '#d2b8ed'
    cyan: '#8fbcbb'
    white: '#d8dee9'
  dim:
    black: '#373e4d'
    red: '#94545d'
    green: '#809575'
    yellow: '#b29e75'
    blue: '#68809a'
    magenta: '#8c738c'
    cyan: '#6d96a5'
    white: '#aeb3bb'
key_bindings:
    - { key: Return,   mods: Control|Shift, action: SpawnNewInstance }
window.opacity: 1.00
window:
  padding:
    x: 20
    y: 20
font:
  normal:
    family: JetbrainsMonoNL
    style: Regular
  size: 16
live_config_reload: true
dynamic_padding: true
shell:
   program: /bin/bash