Merge pull request 'nix is now the master' (#1) from nix into master

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2024-06-01 19:12:43 +00:00
38 changed files with 67 additions and 2723 deletions

View File

@@ -1,2 +1,2 @@
[Context]
filesystems=!xdg-run/app/com.discordapp.Discord;!xdg-documents;!xdg-desktop;xdg-config/MangoHud:ro;/srv/sdb2/home/niklas
filesystems=!xdg-run/app/com.discordapp.Discord;!xdg-desktop;!xdg-documents;/srv/bulk/home/niklas;xdg-config/MangoHud:ro

View File

@@ -0,0 +1,2 @@
[Context]
filesystems=/srv/bulk/home/niklas/games

View File

@@ -1,5 +1,5 @@
[Context]
filesystems=!xdg-music;!xdg-pictures;!xdg-run/app/com.discordapp.Discord;/run/user/1000/pipewire-0;xdg-config/MangoHud:ro;/srv/sdb2/home/niklas
filesystems=!xdg-music;!xdg-pictures;!xdg-run/app/com.discordapp.Discord;/srv/bulk/home/niklas;xdg-config/MangoHud:ro;/run/user/1000/pipewire-0
[Environment]
MANGOHUD=1

View File

@@ -1,5 +1,5 @@
[Context]
filesystems=!/run/media;!/media;/srv/sdb2/home/niklas;!home
filesystems=!/run/media;!/media;/srv/bulk/home/niklas;!home
[Session Bus Policy]
org.gnome.Mutter.DisplayConfig=none

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env sh
# required packages:
# - fzf
# - arch-wiki-docs
set -e
DOC_DIR="/usr/share/doc/arch-wiki/html/en/"
cd "$DOC_DIR"
selected=$(find . -type f | cut -c3- | rev | cut -c6- | rev | tr _ ' ' | fzf -q "$1")
selected_file=$(echo "$selected" | tr ' ' _ | awk -v var="$DOC_DIR" '{print var $0 ".html"}')
xdg-open "$selected_file"
#if [[ $# -eq 0 ]]; then
# # No arguments supplied
# xdg-open "$DOC_DIR"
#else
# grep -rwc '/usr/share/doc/arch-wiki/html/en/' -e 'xorg' | grep -v ":0" | awk -F":" '{print $2,$1}' | sort
#fi

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env sh
WEIRD_NUMBER="115748555" #steamID3
find "$HOME/.local/share/Steam/userdata/$WEIRD_NUMBER/760" -type f -name "*.jpg" -not -path "*/thumbnails/*" -printf "%T@ %p\n" | sort --reverse | cut -d' ' -f2

View File

@@ -2,4 +2,4 @@
git add -A
git commit -m "$(curl http://whatthecommit.com/index.txt)"
git push

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
# requires: expac
pacman -Qqm | sort | fzf --preview 'pacman -Qil {}' --bind 'enter:execute(pacman -Qil {} | less)'

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
# requires: expac
pacman -Qqe | fzf --preview 'pacman -Qil {}' --bind 'enter:execute(pacman -Qil {} | less)'

View File

@@ -1,6 +0,0 @@
#!/usr/bin/env sh
PKG=$(pacman -Slq | fzf --preview 'pacman -Si {1}')
if [ -n "$PKG" ]; then
sudo pacman -S "$PKG"
fi

View File

@@ -1,12 +0,0 @@
#!/usr/bin/env sh
# required packages:
# - wget
# - jq
set -e
# There are 2 subreddits "wallpapers" and "wallpaper" the 2nd one is bigger.
SUB="${1:-wallpaper}"
wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" -O - "http://www.reddit.com/r/$SUB/top/.json?t=day" 2> /dev/null | jq -r ".data.children[0].data.url"

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env sh
# Make a screenshots and save it in ~/pictures/screenshots
set -e
SCRIPT=$(readlink -f "$0")

View File

@@ -13,9 +13,6 @@ LAST_BG_LOCATION="$XDG_CACHE_HOME/last-bg"
ln -sf $1 $LAST_BG_LOCATION
swww img $1
#hyprctl hyprpaper preload "$1"
#hyprctl hyprpaper wallpaper "HDMI-A-1,$1"
#hyprctl hyprpaper unload all
$SCRIPTPATH/wal.sh "$1"

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env sh
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
URL=$($SCRIPTPATH/reddit-wp.sh $1)
NAME=$(basename "$URL")
FILENAME=~/pictures/wallpapers/"$NAME"
wget "$URL" -nc -O "$FILENAME"
sleep 1
$SCRIPTPATH/set-bg.sh $FILENAME

View File

@@ -1,8 +1,6 @@
#!/usr/bin/env sh
# makes a selection screenshot and prints out the filename in a date format
# not intended for direct use. Dosn't remove tmp dir
# required packages:
# - deepin-screenshot
# Make a selection of the screen and take a screenshot. Save it to tmp and print its path.
set -e

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env sh
# index=$(pacmd list-sources | grep -oP '\* index: \d+' | awk '{ print $3 }')
# TODO default source not hardcoded
# pactl set-source-mute $index toggle
# Use the alsa approach
# amixer -q -D pulse set Capture toggle
pactl set-source-mute alsa_input.pci-0000_28_00.3.analog-stereo toggle

View File

@@ -1,12 +0,0 @@
#!/usr/bin/env sh
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
$SCRIPTPATH/last-steam-screenshot.sh \
| head -n1 \
| $SCRIPTPATH/share-s3.sh \
| xclip -i -selection "clipboard"
notify-send -u low "Upload complete"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env sh
set -e

5
.local/share/scripts/webp.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env sh
filename="${1%.*}"
magick "$1" "$filename.jpeg"