Compare commits

...

9 Commits

25 changed files with 23 additions and 122 deletions

View File

@@ -1 +1,2 @@
/ignore
/.vscode

View File

@@ -126,7 +126,7 @@ bind = $mainMod, D, exec, rofi -show drun -theme $XDG_CONFIG_HOME/rofi/launcher.
bind = $mainMod, M, exec, $XDG_CONFIG_HOME/waybar/mute-toggle.sh
#bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, F, fullscreen
bind =, Print, exec, $XDG_DATA_HOME/scripts/share-screenshot.sh
bind =, Print, exec, $XDG_DATA_HOME/scripts/save-screenshot.sh
# Audio buttons
binde =, XF86AudioRaiseVolume, exec, playerctl --player=spotify,%any volume 0.05+

View File

@@ -1 +0,0 @@
../share/scripts/arch-wiki.sh

View File

@@ -1 +0,0 @@
../share/scripts/del-pic.sh

View File

@@ -1 +0,0 @@
../share/scripts/nc-share.sh

View File

@@ -1 +0,0 @@
../share/scripts/pacman-browse.sh

View File

@@ -1 +0,0 @@
../share/scripts/pacman-install.sh

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=!/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

@@ -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"

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

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

View File

@@ -16,7 +16,7 @@ export XDG_PICTURES_DIR="$HOME/pictures"
# XDG_PUBLICSHARE_DIR="$HOME/public"
# XDG_TEMPLATES_DIR="$HOME/templates"
# XDG_VIDEOS_DIR="$HOME/videos"
#export XDG_DATA_DIRS="$XDG_DATA_HOME/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/"
# export XDG_DATA_DIRS="/etc:$XDG_CONFIG_DIRS"
export GOPATH="$XDG_DATA_HOME/go"
export VSCODE_EXTENSIONS="$XDG_DATA_HOME/vscode/extensions"
@@ -36,5 +36,3 @@ export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
#export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
export NO_AT_BRIDGE=1

20
.zshrc
View File

@@ -9,11 +9,7 @@
# #
############################
# Required packages:
# - nerd-font-hack (AUR)
# - trash-cli (with gvfs)
export PATH=$HOME/.local/bin:$HOME/.dotnet/tools:$XDG_DATA_HOME/npm_global/bin:$XDG_DATA_HOME/cargo/bin:$PATH
export PATH=$HOME/.local/bin:$XDG_DATA_HOME/npm_global/bin:$XDG_DATA_HOME/cargo/bin:$PATH
[[ $- != *i* ]] && return
[ -n $SSH_CONNECTION ] && source ~/.profile
@@ -25,20 +21,13 @@ source /etc/zshrc
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
[[ ! -f ~/.cache/p10k.zsh ]] || source ~/.cache/p10k.zsh
# wal subshell for terminal colors
if test -f $XDG_CACHE_HOME/wal/sequences; then
(cat $XDG_CACHE_HOME/wal/sequences &)
fi
plugins=(
git
last-working-dir
extract
z
)
# Variables
export MANPAGER="bat -l man -p"
@@ -54,11 +43,11 @@ alias vim="nvim"
alias please='sudo '
alias ls='exa --icons'
alias svim='sudoedit'
alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles-remastered --work-tree=$HOME" # dotfile config --local status.showUntrackedFiles no
alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles-remastered --work-tree=$HOME" # dotfiles config --local status.showUntrackedFiles no
alias open="xdg-open"
alias mixer="pulsemixer"
alias yt-dl-audio="yt-dlp --extract-audio --audio-format mp3 -o '%(title)s.%(ext)s'"
alias rm="trash"
#alias rm="trash" # broken autocompletion right now
alias modx="chmod +x"
alias mv="mv -iv"
alias cp="cp -riv"
@@ -71,4 +60,5 @@ alias ssh="TERM=xterm-256color ssh"
alias df="duf"
alias du="dust"
alias nom="npm"
alias code="codium"