summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdmenu_books19
-rwxr-xr-xdmenurecord132
-rwxr-xr-xdmenuunicode36
-rwxr-xr-xflatdark.sh19
-rwxr-xr-xflattheme.sh8
-rwxr-xr-xhotkeys.sh5
-rwxr-xr-ximport-gsettings11
-rwxr-xr-xnotifyprop5
-rwxr-xr-xsnd.sh3
-rwxr-xr-xtouchpad.sh26
10 files changed, 0 insertions, 264 deletions
diff --git a/dmenu_books b/dmenu_books
deleted file mode 100755
index 3b6f1fe..0000000
--- a/dmenu_books
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-printhelp () {
- exit
-}
-
-while getopts "hd:" o; do case "${o}" in
- d) ARGS="$ARGS$OPTARG " ;;
- *) printhelp ;;
-esac done
-
-DMENU="dmenu"
-DEFARGS="-l 15 -p"
-
-BOOK=`ls ~/Documents/shared | $DMENU $DEFARGS \"books\" $ARGS`
-
-[ -z "$BOOK" ] && exit 1
-
-zathura "~/Documents/shared/$BOOK"
diff --git a/dmenurecord b/dmenurecord
deleted file mode 100755
index e177b03..0000000
--- a/dmenurecord
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-
-# Usage:
-# `$0`: Ask for recording type via dmenu
-# `$0 screencast`: Record both audio and screen
-# `$0 video`: Record only screen
-# `$0 audio`: Record only audio
-# `$0 kill`: Kill existing recording
-#
-# If there is already a running instance, user will be prompted to end it.
-
-SCREENCAST_DIR="$HOME/Public/Videos"
-
-updateicon() { \
- echo "$1" > /tmp/recordingicon
- pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
- }
-
-killrecording() {
- recpid="$(cat /tmp/recordingpid)"
- # kill with SIGTERM, allowing finishing touches.
- kill -15 "$recpid"
- rm -f /tmp/recordingpid
- updateicon ""
- pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
- # even after SIGTERM, ffmpeg may still run, so SIGKILL it.
- sleep 3
- kill -9 "$recpid"
- notify-send "recording killed"
- exit
- }
-
-screencast() { \
- ffmpeg -y \
- -f x11grab \
- -framerate 60 \
- -s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
- -i "$DISPLAY" \
- -f pulse -i default \
- -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
- -r 30 \
- -c:v h264 -crf 0 -preset ultrafast -c:a aac \
- "$SCREENCAST_DIR/screencast-$(date '+%y%m%d-%H%M-%S').mp4" &
- echo $! > /tmp/recordingpid
- notify-send "recording started (screencast)"
- updateicon "⏺️🎙️"
- }
-
-video() { ffmpeg \
- -f x11grab \
- -s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
- -i "$DISPLAY" \
- -c:v libx264 -qp 0 -r 30 \
- "$SCREENCAST_DIR/video-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > /tmp/recordingpid
- notify-send "recording started (video)"
- updateicon "⏺️"
- }
-
-webcamhidef() { ffmpeg \
- -f v4l2 \
- -i /dev/video0 \
- -video_size 1920x1080 \
- "$SCREENCAST_DIR/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > /tmp/recordingpid
- notify-send "recording started (webcamhidef)"
- updateicon "🎥"
- }
-
-webcam() { ffmpeg \
- -f v4l2 \
- -i /dev/video0 \
- -video_size 640x480 \
- "$SCREENCAST_DIR/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > /tmp/recordingpid
- notify-send "recording started (webcam)"
- updateicon "🎥"
- }
-
-
-audio() { \
- ffmpeg \
- -f alsa -i default \
- -c:a flac \
- "$SCREENCAST_DIR/audio-$(date '+%y%m%d-%H%M-%S').flac" &
- echo $! > /tmp/recordingpid
- notify-send "recording started (audio)"
- updateicon "🎙️"
- }
-
-askrecording() { \
- choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:")
- case "$choice" in
- screencast) screencast;;
- audio) audio;;
- video) video;;
- *selected) videoselected;;
- webcam) webcam;;
- "webcam (hi-def)") webcamhidef;;
- esac
- }
-
-asktoend() { \
- response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") &&
- [ "$response" = "Yes" ] && killrecording
- }
-
-videoselected()
-{
- slop -f "%x %y %w %h" > /tmp/slop
- read -r X Y W H < /tmp/slop
- rm /tmp/slop
-
- ffmpeg \
- -f x11grab \
- -framerate 60 \
- -video_size "$W"x"$H" \
- -i :0.0+"$X,$Y" \
- -c:v libx264 -qp 0 -r 30 \
- "$SCREENCAST_DIR/box-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > /tmp/recordingpid
- updateicon "⏺️"
-}
-
-case "$1" in
- screencast) screencast;;
- audio) audio;;
- video) video;;
- *selected) videoselected;;
- kill) killrecording;;
- *) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
-esac
diff --git a/dmenuunicode b/dmenuunicode
deleted file mode 100755
index c843353..0000000
--- a/dmenuunicode
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-# The famous "get a menu of emojis to copy" script.
-
-printhelp () {
- exit
-}
-
-while getopts "hd:" o; do case "${o}" in
- d) ARGS="$ARGS$OPTARG " ;;
- *) printhelp ;;
-esac done
-
-if [ -n "$WAYLAND_DISPLAY" ]; then
- CLIP="wl-copy"
-elif [ -n "$DISPLAY" ]; then
- CLIP="xclip -selection clipboard"
-else
- print "Can't tell if Wayland or X; what gives?\n"
- exit 1
-fi
-
-# Get user selection via dmenu -i -l 30 from emoji file.
-chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | dmenu -l 15 $ARGS | sed "s/ .*//")
-
-# Exit if none chosen.
-[ -z "$chosen" ] && exit
-
-# If you run this command with an argument, it will automatically insert the
-# character. Otherwise, show a message that the emoji has been copied.
-if [ -n "$1" ]; then
- xdotool type "$chosen"
-else
- printf "$chosen" | $CLIP
- notify-send "'$chosen' copied to clipboard." &
-fi
diff --git a/flatdark.sh b/flatdark.sh
deleted file mode 100755
index ad2a2c7..0000000
--- a/flatdark.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-while true; do
- echo "Press 1 for light theme, 2 for dark theme and hit enter"
- read userInput
- userInput=$(echo "$userInput" | xargs)
- if [ "$userInput" -eq "1" ]; then
- theme="Adwaita"
- elif [ "$userInput" -eq "2" ]; then
- theme="Adwaita-dark"
- else
- clear
- echo "Invalid input, try again"
- continue
- fi
- sudo flatpak override --env=GTK_THEME=$theme; sudo flatpak override --env=QT_STYLE_OVERRIDE=$theme
- clear
- echo "Operation Complete"
-done
diff --git a/flattheme.sh b/flattheme.sh
deleted file mode 100755
index 82996ad..0000000
--- a/flattheme.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-
-for dir in $HOME/.var/app/*/
-do
- confdir="${dir}config/gtk-3.0"
- mkdir -p $confdir
- cp $HOME/.config/gtk-3.0/settings.ini $confdir/settings.ini
-done
diff --git a/hotkeys.sh b/hotkeys.sh
deleted file mode 100755
index 7a9c6c3..0000000
--- a/hotkeys.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-killall swhks
-swhks &
-pkexec swhkd
diff --git a/import-gsettings b/import-gsettings
deleted file mode 100755
index 99fe4b4..0000000
--- a/import-gsettings
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# usage: import-gsettings <gsettings key>:<settings.ini key> <gsettings key>:<settings.ini key> ...
-
-expression=""
-for pair in "$@"; do
- IFS=:; set -- $pair
- expressions="$expressions -e 's:^$2=(.*)$:gsettings set org.gnome.desktop.interface $1 \1:e'"
-done
-IFS=
-eval exec sed -E $expressions "${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini >/dev/null
diff --git a/notifyprop b/notifyprop
deleted file mode 100755
index ed5c86f..0000000
--- a/notifyprop
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-PROPS="$(xprop)"
-notify-send "notifyprop" "$PROPS"
-echo "$PROPS" >> /tmp/props.txt
diff --git a/snd.sh b/snd.sh
deleted file mode 100755
index 4d7f4c4..0000000
--- a/snd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-/usr/bin/pipewire & /usr/bin/pipewire-pulse & /usr/bin/wireplumber
diff --git a/touchpad.sh b/touchpad.sh
deleted file mode 100755
index bb864e9..0000000
--- a/touchpad.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$HOME/.local/share}"
-export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
-
-enable_touchpad() {
- printf "true" >"$STATUS_FILE"
- notify-send -u normal "Enabling touchpad"
- hyprctl keyword '$LAPTOP_TP_ENABLED' "true" -r
-}
-
-disable_touchpad() {
- printf "false" >"$STATUS_FILE"
- notify-send -u normal "Disabling touchpad"
- hyprctl keyword '$LAPTOP_TP_ENABLED' "false" -r
-}
-
-if ! [ -f "$STATUS_FILE" ]; then
- enable_touchpad
-else
- if [ $(cat "$STATUS_FILE") = "true" ]; then
- disable_touchpad
- elif [ $(cat "$STATUS_FILE") = "false" ]; then
- enable_touchpad
- fi
-fi