Skip to content

Instantly share code, notes, and snippets.

View marcusscomputer's full-sized avatar

marcus-s marcusscomputer

View GitHub Profile
@marcusscomputer
marcusscomputer / i3 config
Last active November 9, 2024 16:11
marcus-s i3 config
# Modifier Key (Super)
set $mod Mod4
# No mouse focus
focus_follows_mouse no
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Noto Sans 11
align=left
separator=false
separator_block_width=10
color=#fefefe
[window]
markup=pango
command=echo "<span background='#2b3948'>  $(/home/marcus-s/Private/Scripts/xfcetweaks/windowtitle) </span>"
interval=1
#!/bin/bash
free | awk '/Mem/{printf("RAM Usage: %.2f%\n"), $3/$2*100}' | awk '{print $3}'
#!/usr/bin/env python
"""
small script to check for unread count on imap inbox
"""
import imaplib
IMAPSERVER = 'YOUR.IMAP-SERVER.COM'
USER = 'EMAIL@NUTZERNAME'
PASSWORD = 'ACCOUNT-PASSWORT'
@marcusscomputer
marcusscomputer / updateApt.sh
Created October 1, 2020 09:27
Script for systemd service to start at boot
#!/bin/bash
while :
do
apt update
apt -t buster-backports update
sleep 3600
done
@marcusscomputer
marcusscomputer / updateInfo.sh
Created October 1, 2020 09:28
Script that shows number of updates in i3blocks
#!/bin/bash
rm -rf /tmp/apt
APTU=`apt list --upgradable | wc -l`
APT=`expr $APTU - 1 > /tmp/apt`
cat /tmp/apt
@marcusscomputer
marcusscomputer / aptupdate.service
Last active October 1, 2020 09:51
Service for APT Caches in SystemD
[Unit]
Description=Update APT caches every hour
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/home/marcus-s/Private/Scripts/updateApt.sh
[Install]
#!/bin/bash
xdotool getactivewindow getwindowname
@marcusscomputer
marcusscomputer / firefox_pisync.sh
Created October 19, 2020 18:42
Raspberry Sync for Firefox
#!/bin/bash
HOMEDIR="/home/YOUR_USERNAME"
BROWSERSYNC="/mnt/PI_MOUNTPOINT_TO_DESIRED_FOLDER"
TMPSYNC="/tmp/browsersync"
rm -rf $TMPSYNC
mkdir $TMPSYNC
unlink $HOMEDIR/.mozilla
@marcusscomputer
marcusscomputer / ed_voiceattack.py
Created April 26, 2021 19:48
A modified test_microphone.py example script to do something in Elite Dangerous - can be adjusted to do just about anything you want.
#!/usr/bin/env python3
import argparse
import os
import queue
import sounddevice as sd
import vosk
import sys
import json
import subprocess