Skip to content

Instantly share code, notes, and snippets.

@littletsu
littletsu / .zshrc
Last active April 27, 2022 19:39
personal zshrc aliases
alias sudo='doas'
alias sudoedit='doas rnano'
# only for arch repos
alias mirror='doas reflector --protocol https --latest 50 --number 20 --sort rate --save /etc/pacman.d/mirrorlist'
# Enable wayland for firefox
#export MOZ_ENABLE_WAYLAND=1
alias pls='doas $(fc -ln -1)'
# fix npm update
alias fixnpm='doas pacman -S npm --overwrite "/usr/lib/node_modules/npm/*"'
@littletsu
littletsu / .xinitrc
Last active December 14, 2022 06:27
personal xinitrc
# x funny
xset led named 'Scroll Lock'
# pipewire
pipewire&
pipewire-pulse&
sleep 2 # delay to ensure pipewire has started
wireplumber&
@littletsu
littletsu / hydraviz.js
Created January 9, 2022 03:49
Hydra visualizer
// credits to Asdrúbal Gomez for initial code snippet
noise(3,0.1,7)
.rotate(1,-1,-2).mask(shape(() => a.fft[4]*2 || 20))
.colorama(() => a.fft[0]*3 || 1)
.modulateScale(o0)
.modulateScale(o0,1,)
.scale(() => a.fft[3]*2 || 1)
.blend(o0)
.blend(o0)
@littletsu
littletsu / picom.conf
Last active August 28, 2022 05:35
personal picom.conf based on a minimal configuration
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
@littletsu
littletsu / dunstrc
Created January 12, 2022 02:38
personal dunst config
# See dunst(5) for all configuration options
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
@littletsu
littletsu / download.js
Created February 19, 2022 09:00
Bulk Download Urls in Node.js
import fs from 'fs';
import fetch from 'node-fetch';
// urls.txt should be a text file containing the urls separated by a new line
const file = fs.readFileSync('./urls.txt', {'encoding': 'utf8'}).split('\n');
file.forEach(url => {
fetch(url).then(res => {
// modify to whichever format the downloads are
let write = fs.createWriteStream(`./urls/${Date.now()}.webp`);
@littletsu
littletsu / download.js
Created February 19, 2022 09:01
Bulk Download Urls in Node.js
import fs from 'fs';
import fetch from 'node-fetch';
// urls.txt should be a text file containing the urls separated by a new line
const file = fs.readFileSync('./urls.txt', {'encoding': 'utf8'}).split('\n');
file.forEach(url => {
fetch(url).then(res => {
// modify to whichever format the downloads are
let write = fs.createWriteStream(`./urls/${Date.now()}.webp`);
@littletsu
littletsu / fonts.sh
Last active December 14, 2022 06:29
fonts
doas pacman --needed -S terminus-font ttf-croscore ttf-dejavu gnu-free-fonts ttf-liberation libertinus-font noto-fonts adobe-source-code-pro-fonts cantarell-fonts ttf-opensans noto-fonts-cjk noto-fonts-emoji ttf-jetbrains-mono
# Terminal: JetBrains Mono Regular 14.0
@littletsu
littletsu / config
Last active August 28, 2022 05:36
Sway config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod1
@littletsu
littletsu / config
Last active December 14, 2022 18:51
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!