summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--]scripts/serch6
-rwxr-xr-x[-rw-r--r--]scripts/setbg16
-rwxr-xr-x[-rw-r--r--]scripts/setdef4
-rw-r--r--scripts/spotifyvoldec.py24
-rw-r--r--scripts/spotifyvolinc.py25
5 files changed, 16 insertions, 59 deletions
diff --git a/scripts/serch b/scripts/serch
index fa0ea2f..0e2acfe 100644..100755
--- a/scripts/serch
+++ b/scripts/serch
@@ -1,7 +1,5 @@
#!/bin/sh
-
-sudo -A find / -type f -o -type d |
+sudo -A find / -type f -o -type d -path '/proc/*' -prune|
dmenu -i -p 'Directories/Files to search:' -l 15 |
-awk '{printf("\"%s\"\n", $0);}' |
+sed "s/.*/'&'/" |
xclip -sel c
-
diff --git a/scripts/setbg b/scripts/setbg
index d94e64b..f267a3a 100644..100755
--- a/scripts/setbg
+++ b/scripts/setbg
@@ -1,11 +1,17 @@
#!/bin/sh
-echo "Chosing a random wallpaper..."
-wall=$(find $HOME/Pictures/Wallpaper/w/wow -type f | shuf -n 1)
-echo "Setting up the wallpaper: $(echo $wall|cut -d '/' -f 8)"
-xwallpaper --zoom $wall
+if [ -z "$1" ]; then
+ echo "Chosing a random wallpaper..."
+ wall=$(find $HOME/Pictures/Wallpaper/w/wow -type f | shuf -n 1)
+ echo "Setting up the wallpaper: $(echo $wall|cut -d '/' -f 8)"
+else
+ wall="$1"
+fi
+
+echo "Setting up the wallpaper: $(echo $wall)"
+xwallpaper --zoom $wall &&
echo "Generating pywal color schemes..."
-wal -n -i $wall >/dev/null
+wal -n -i $wall >/dev/null &&
echo "dwm reading Xresources color values at runtime"
xdotool key super+F5
pywal-discord
diff --git a/scripts/setdef b/scripts/setdef
index b2460a9..ed02376 100644..100755
--- a/scripts/setdef
+++ b/scripts/setdef
@@ -2,4 +2,6 @@
#To retuen dwm and st to their default vanilla state
xwallpaper --clear
xrdb -remove
-xdotool key super+shift+q
+xdotool key alt+shift+q
+sleep 5
+picom --experimental-backends
diff --git a/scripts/spotifyvoldec.py b/scripts/spotifyvoldec.py
deleted file mode 100644
index a00e06f..0000000
--- a/scripts/spotifyvoldec.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python3
-import subprocess
-import os
-x=0
-y=0
-env = os.environ
-env['LANG'] = 'en_US'
-app = '"Spotify"'
-pactl = subprocess.check_output(['pactl', 'list', 'sink-inputs'], env=env).decode().strip().split()
-if app in pactl:
- for e in pactl:
- x += 1
- if e == app:
- break
- for i in pactl[0 : x -1 ]:
- y += 1
- if i == 'Sink' and pactl[y] == 'Input' and '#' in pactl[y + 1]:
- sink_id = pactl[y+1]
- if i == 'Volume:' and '%' in pactl[y + 3]:
- volume = pactl[y + 3]
- sink_id = sink_id[1: ]
- volume = volume[ : -1 ]
- if int(volume) < 100:
- subprocess.run(['pactl', 'set-sink-input-volume', sink_id, '-1%'])
diff --git a/scripts/spotifyvolinc.py b/scripts/spotifyvolinc.py
deleted file mode 100644
index f4d04b4..0000000
--- a/scripts/spotifyvolinc.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python3
-#Author: Marcin Kocur, attribution license: https://creativecommons.org/licenses/by/4.0/
-import subprocess
-import os
-x=0
-y=0
-env = os.environ
-env['LANG'] = 'en_US'
-app = '"Spotify"'
-pactl = subprocess.check_output(['pactl', 'list', 'sink-inputs'], env=env).decode().strip().split()
-if app in pactl:
- for e in pactl:
- x += 1
- if e == app:
- break
- for i in pactl[0 : x -1 ]:
- y += 1
- if i == 'Sink' and pactl[y] == 'Input' and '#' in pactl[y + 1]:
- sink_id = pactl[y+1]
- if i == 'Volume:' and '%' in pactl[y + 3]:
- volume = pactl[y + 3]
- sink_id = sink_id[1: ]
- volume = volume[ : -1 ]
- if int(volume) < 100:
- subprocess.run(['pactl', 'set-sink-input-volume', sink_id, '+1%'])