This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to automate the installation of system updates with appropriate safeguards from ZFS boot environments | |
#temporary log files and state flags | |
_checklog="/tmp/trident-update-check.log" | |
_uplog="/tmp/trident-update.log" | |
showUsage(){ | |
echo "Usage: | |
trident-update <-update | -check> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get the list of connected monitors | |
connected_monitors=$(xrandr --query | grep " connected" | awk '{print $1}') | |
declare -A monitor_max_res | |
for monitor in $connected_monitors; do | |
# Get the preferred mode for this monitor | |
preferred_mode=$(xrandr --query | sed -n "/^$monitor connected/,/^[^ ]/p" | grep -Eo '[0-9]+x[0-9]+\s+\S+\s+\*' | head -n1 | awk '{print $1}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local intro_video_url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" | |
local has_prepended = false -- A flag to prevent repeated prepending | |
mp.register_event("file-loaded", function() | |
-- Check if we've already prepended the URL | |
if not has_prepended then | |
-- Insert the YouTube video at the beginning of the playlist | |
mp.commandv("loadfile", intro_video_url, "append-play") | |
-- Wait for the video to be properly appended |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get the initial gamma values for red, green, and blue | |
initial_gamma=$(xrandr --verbose | grep -m 1 'Gamma:' | awk '{print $2}') | |
initial_red=$(echo $initial_gamma | cut -d: -f1) | |
initial_green=$(echo $initial_gamma | cut -d: -f2) | |
initial_blue=$(echo $initial_gamma | cut -d: -f3) | |
# Define the display output, omitting the header "Monitors: 3" | |
output=$(xrandr --listmonitors | grep -v "Monitors:" | awk '{print $4}' | head -n 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new systemd service file: | |
sudo nano /etc/systemd/system/brightness.service | |
Add the following to the file: | |
================================ | |
[Unit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#tabbrowser-tabs { visibility: collapse !important; } | |
#nav-bar { | |
background-color: black !important; | |
color: white !important; | |
} | |
#nav-bar toolbarbutton .toolbarbutton-icon { | |
fill: white !important; /* Change icon color */ | |
background-color: black !important; /* Change background color */ | |
} | |
#urlbar { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color_0 = ffff ffff ffff | |
color_1 = 4e4e 4e4e 4e4e | |
color_2 = a8a8 ffff 6060 | |
color_3 = ffff 7373 fdfd | |
color_4 = 9696 cbcb fefe | |
color_5 = 7777 5454 3e3e | |
color_6 = 94bc 5925 ffff | |
color_7 = eaea 9595 1f1f | |
color_8 = ffff ffff b6b6 | |
color_9 = a6a6 e2e2 2e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd /some/cool/directory | |
./executable | |
# This is a comment its not run | |
# this too | |
# now chmod +x /full/path/to/me |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# free -h | |
total used free shared buff/cache available | |
Mem: 39Gi 23Gi 15Gi 866Mi 1.4Gi 15Gi | |
# Inxi -mxxx | |
Memory: | |
System RAM: total: 80 GiB available: 39.11 GiB used: 23.94 GiB (61.2%) | |
Array-1: capacity: 128 GiB slots: 4 modules: 4 EC: None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
monitors=$(xrandr --listactivemonitors | tail -n +2 | awk '{print $4}') | |
# Get the current hour | |
if [ "$#" -eq 1 ]; then | |
current_hour="$1" | |
else |
NewerOlder