diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-08-30 19:22:59 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-08-30 19:22:59 +0200 |
| commit | 19120d4f9761c67d99ed1ce3da6084b83f5a49c9 (patch) | |
| tree | f234cad1bdad88114a63c9702144da487024967a /.local/bin | |
| parent | 5928998af5404ae2be84c6cecc10ebf84bd3f3ed (diff) | |
| download | dotfiles-19120d4f9761c67d99ed1ce3da6084b83f5a49c9.tar.gz dotfiles-19120d4f9761c67d99ed1ce3da6084b83f5a49c9.zip | |
Linux-specific dotfiles
Diffstat (limited to '.local/bin')
| -rwxr-xr-x | .local/bin/control-center | 31 | ||||
| -rwxr-xr-x | .local/bin/eww | bin | 22225024 -> 0 bytes | |||
| -rwxr-xr-x | .local/bin/ffmpeg | 24 | ||||
| -rwxr-xr-x | .local/bin/nitrogen | 63 | ||||
| -rwxr-xr-x | .local/bin/notification-center | 26 | ||||
| -rwxr-xr-x | .local/bin/xcolor-pick | 31 |
6 files changed, 0 insertions, 175 deletions
diff --git a/.local/bin/control-center b/.local/bin/control-center deleted file mode 100755 index d0b3320..0000000 --- a/.local/bin/control-center +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -LOCK_FILE="$HOME/.cache/eww-control-center.lock" -EWW_BIN="$HOME/.local/bin/eww" -ACTIVE_PLAYERS=$(playerctl -l | head -n 1) - -run() { - ${EWW_BIN} open control-center - sleep 0.2 - xdo raise -N eww-bar - ${EWW_BIN} update ccenter=true - - sleep 1 && [[ ! -z "$ACTIVE_PLAYERS" ]] && ${EWW_BIN} update mp=true -} - -# Run eww daemon if not running -if [[ ! `pidof eww` ]]; then - ${EWW_BIN} daemon - sleep 1 -else - if [[ ! -f "$LOCK_FILE" ]]; then - touch "$LOCK_FILE" - run - else - [[ ! -z "$ACTIVE_PLAYERS" ]] && ${EWW_BIN} update mp=false && sleep 0.4 - ${EWW_BIN} update ccenter=false - sleep 0.6 - ${EWW_BIN} close control-center - rm "$LOCK_FILE" - fi -fi diff --git a/.local/bin/eww b/.local/bin/eww Binary files differdeleted file mode 100755 index 585d6d2..0000000 --- a/.local/bin/eww +++ /dev/null diff --git a/.local/bin/ffmpeg b/.local/bin/ffmpeg deleted file mode 100755 index 2258fbd..0000000 --- a/.local/bin/ffmpeg +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# audio -A="$(pactl list sources | grep 'analog.*monitor' | awk '{print $2}')" -# screen size -S="$(xdpyinfo | grep dimensions | awk '{print $2}')" -# file name -N="$(date +"%m-%d-%Y_%I:%M%p").mp4" - -# Desktop audio + screen recording -ffmpeg \ --s "$S" -r 25 -f x11grab -i :0.0+0,0 \ --ac 2 ~/"$N" - -# ffmpeg can output high quality GIF. Before you start it is always recommended to use a recent version: download or compile. - -# ffmpeg -ss 30 -t 3 -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif - -# This example will skip the first 30 seconds (-ss 30) of the input and create a 3 second output (-t 3). -# fps filter sets the frame rate. A rate of 10 frames per second is used in the example. -# scale filter will resize the output to 320 pixels wide and automatically determine the height while preserving the aspect ratio. The lanczos scaling algorithm is used in this example. -# palettegen and paletteuse filters will generate and use a custom palette generated from your input. These filters have many options, so refer to the links for a list of all available options and values. Also see the Advanced options section below. -# split filter will allow everything to be done in one command and avoids having to create a temporary PNG file of the palette. -# Control looping with -loop output option but the values are confusing. A value of 0 is infinite looping, -1 is no looping, and 1 will loop once meaning it will play twice. So a value of 10 will cause the GIF to play 11 times. diff --git a/.local/bin/nitrogen b/.local/bin/nitrogen deleted file mode 100755 index b8afe27..0000000 --- a/.local/bin/nitrogen +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash - -# Wrapper for nitrogen setting the freedesktop.org AccountsService/BackgroundFile so LightDM wallpaper is synced. -# Inspired by <https://rafaelc.org/posts/sync-wm-wallpaper-with-lightdm-on-linux-mint/> - -key_value_retriever() { - KEY="${1}" - if [[ -z "$KEY" ]]; then - printf "ERROR: KEY should not be empty\n" - return - fi - FILE="${2}" - if [[ ! -f "$FILE" ]]; then - printf "ERROR: Cannot find FILE: %s\n" "$FILE" - return - fi - VALUE_VARNAME="${3}" - if [[ -z "$VALUE_VARNAME" ]]; then - printf "ERROR: VALUE_VARNAME should not be empty\n" - return - fi - MATCH=$(grep -m1 "^[[:space:]]*${KEY}=" "$FILE") - INDEX_OF_FIRST_EQUAL=$(expr index "$MATCH" =) - VALUE="${MATCH:${INDEX_OF_FIRST_EQUAL}}" - export "$VALUE_VARNAME"="$VALUE" -} - -/usr/bin/nitrogen "$@" -if [[ "${1:-}" == "--restore" ]]; then - exit $? -fi - -NITROGEN_BG_SAVED_CFG_FILE="${HOME}/.config/nitrogen/bg-saved.cfg" -if [[ ! -f "$NITROGEN_BG_SAVED_CFG_FILE" ]]; then - printf "!ERROR! Cannot find NITROGEN_BG_SAVED_CFG_FILE[%s]\n" "$NITROGEN_BG_SAVED_CFG_FILE" 1>&2 - exit 1 -fi - -key_value_retriever "file" "$NITROGEN_BG_SAVED_CFG_FILE" "NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE" - -if [[ -z "$NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE" ]]; then - printf "!ERROR! Cannot retrieve NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE from NITROGEN_BG_SAVED_CFG_FILE[%s]\n" "NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE" 1>&2 - exit 1 -fi - -if [[ ! -f "$NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE" ]]; then - printf "!ERROR! Cannot find NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE[%s]\n" "$NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE" 1>&2 - exit 1 -fi - -printf "Setting nitrogen background into freedesktop.org AccountsService...\n" -printf "NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE[%s]\n" "$NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE" - -"$HOME"/.scripts/lockscreen-wallpaper & -dbus-send \ - --print-reply \ - --system \ - --dest=org.freedesktop.Accounts \ - /org/freedesktop/Accounts/User"$(id -u)" \ - org.freedesktop.DBus.Properties.Set \ - string:org.freedesktop.DisplayManager.AccountsService \ - string:BackgroundFile \ - variant:string:"$NITROGEN_BG_SAVED_CFG_FIRST_BACKGROUND_FILE" diff --git a/.local/bin/notification-center b/.local/bin/notification-center deleted file mode 100755 index d785628..0000000 --- a/.local/bin/notification-center +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -LOCK_FILE="$HOME/.cache/eww-notification-center.lock" -EWW_BIN="$HOME/.local/bin/eww" - -run() { - "$EWW_BIN" open notification-center - sleep 0.2 - "$EWW_BIN" update noticenter=true -} - -# Run eww daemon if not running -if [[ ! $(pidof eww) ]]; then - "$EWW_BIN" daemon - sleep 1 -else - if [[ ! -f "$LOCK_FILE" ]]; then - touch "$LOCK_FILE" - run - else - "$EWW_BIN" update noticenter=false - sleep 0.8 - "$EWW_BIN" close notification-center - rm "$LOCK_FILE" - fi -fi diff --git a/.local/bin/xcolor-pick b/.local/bin/xcolor-pick deleted file mode 100755 index 459246f..0000000 --- a/.local/bin/xcolor-pick +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# ██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗ ██████╗ -# ╚██╗██╔╝██╔════╝██╔═══██╗██║ ██╔═══██╗██╔══██╗ -# ╚███╔╝ ██║ ██║ ██║██║ ██║ ██║██████╔╝ -# ██╔██╗ ██║ ██║ ██║██║ ██║ ██║██╔══██╗ -# ██╔╝ ██╗╚██████╗╚██████╔╝███████╗╚██████╔╝██║ ██║ -# ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝ -# color picker for X. -# Simple Script To Pick Color Quickly Using Gpick. -# Created By: rxyhn. - -TEMP_DIR=/tmp/xcolor -MSG=${XDG_CACHE_HOME:-$HOME/.cache}/xcolor.msg - -EXPIRE_TIME=5000 - -main() { - - HEX_COLOR=$(gpick -pso --no-newline) - mkdir -p $TEMP_DIR - HEX="${HEX_COLOR#\#}" - FNAME="$TEMP_DIR/$HEX.png" - convert -size 100x100 xc:"$HEX_COLOR" "$FNAME" - COLOR_CODE="$HEX_COLOR" - - printf %s "$COLOR_CODE" | xclip -sel c - notify-send -a XColor "$COLOR_CODE" --icon="$FNAME" --expire-time="$EXPIRE_TIME" -} - -main |
