Skip to content

Instantly share code, notes, and snippets.

@shellheim
shellheim / ydotool.md
Created April 29, 2024 14:59
How to Use ydotool on Linux?

How to Use ydotool on Linux.

ydotool requires the program ydotoold to be running in the background. Now to make this easier the developer ships a systemd unit file with the project. If ydotoold isn't running the program won't work.

A systemd unit file basically calls programs in the background which are needed for the OS to run. In this case we will use this file to run ydotoold in the background as soon as we boot our device. If your distro packages ydotool sensibly then the service (the background program run by the file) should already be running.

To check, run:

@shellheim
shellheim / fastfetch.jsonc
Created April 25, 2024 16:15
Fastfetch config
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"modules": [
"title",
"separator",
{
"type": "os",
"key": " "
},
{
@shellheim
shellheim / starship.toml
Created April 24, 2024 08:58
Starship fedora prompt config
format = """
[░▒▓](#a3aed2)\
[  ](bg:#a2aed2 fg:#090c0c)\
[](bg:#769ff0 fg:#a3aed2)\
$directory\
[](fg:#769ff0 bg:#394260)\
$git_branch\
$git_status\
[](fg:#394260 bg:#212736)\
$nodejs\
@shellheim
shellheim / change_wallpaper.sh
Last active March 19, 2024 12:21
Change the wallpaper according to the time of the day. (KDE only)
#!/usr/bin/env bash
time=$(date +%H | numfmt)
night=true
day_wallpaper="/path/to/image"
night_wallpaper="/path/to/image"
if [[ "$time" -ge 6 ]] && [[ "$time" -lt 17 ]]; then
night=false
@shellheim
shellheim / cava-config
Created March 12, 2024 19:02
catppuccin-moch-cava-config
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
## This file colors the waves produced by cava in a gradient which follow the colors in : https://github.com/catppuccin/cava/blob/main/mocha.cava
[general]
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'.
mode = normal
# Accepts only non-negative values.
@shellheim
shellheim / trim-audio.sh
Last active March 7, 2024 12:26
Trim audio files interactively. This script asks for a start and end time and cuts the specified part out and deleted the old file.
#!/bin/bash
echo "This program clips audio files"
read -r -e -p "Enter the song name: " song
read -r -e -p "Start: " start
# Color variables
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # Clear the text after colored text
@shellheim
shellheim / change_kitty_background.sh
Last active March 7, 2024 12:20
Change kitty terminal's background image with a shortcut
#!/usr/bin/bash
kitty_config="$HOME/.config/kitty/"
kitty_conf_file="$HOME/.config/kitty/kitty.conf"
# Change these as per your liking
dark_image="$HOME/Pictures/Saved Pictures/Wallpapers/dark_house.png"
light_image="$HOME/Pictures/Saved Pictures/Wallpapers/sunrise.png"
cd "$kitty_config" || exit 1