summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/config.json4
-rwxr-xr-xinstall/discord.fish6
-rwxr-xr-xinstall/scripts.fish4
-rwxr-xr-xscreenshot.fish18
4 files changed, 25 insertions, 7 deletions
diff --git a/data/config.json b/data/config.json
index 1d302b0..47f61e5 100644
--- a/data/config.json
+++ b/data/config.json
@@ -3,8 +3,8 @@
"communication": {
"apps": [
{
- "selector": ".class == \"equibop\"",
- "spawn": "equibop",
+ "selector": ".class == \"discord\"",
+ "spawn": "discord",
"action": "spawn move"
},
{
diff --git a/install/discord.fish b/install/discord.fish
index 39f2549..8042277 100755
--- a/install/discord.fish
+++ b/install/discord.fish
@@ -2,8 +2,8 @@
. (dirname (status filename))/util.fish
-install-deps git
-install-optional-deps 'arrpc (rich presence)'
+install-deps git discord equicord-installer-bin
+sudo Equilotl -install -install-openasar -location /opt/discord
set -l dist $C_DATA/discord
@@ -14,7 +14,7 @@ update-repo discord $dist
setup-systemd-monitor discord $dist
# Link themes to client configs
-set -l clients discord vesktop equibop legcord $argv
+set -l clients Vencord Equicord discord vesktop equibop legcord $argv
for client in $clients
if test -d $CONFIG/$client
log "Linking themes for $client"
diff --git a/install/scripts.fish b/install/scripts.fish
index 573a74c..5b5ac9b 100755
--- a/install/scripts.fish
+++ b/install/scripts.fish
@@ -2,8 +2,8 @@
. (dirname (status filename))/util.fish
-install-deps git hyprland-git hyprpaper-git imagemagick wl-clipboard fuzzel-git socat foot jq python xdg-user-dirs python-materialyoucolor-git app2unit-git
-install-optional-deps 'equibop-bin (discord client)' 'btop (system monitor)' 'wl-screenrec (screen recorder)' 'grim (screenshot tool)' 'zen-browser (web browser)'
+install-deps git hyprland-git hyprpaper-git imagemagick wl-clipboard fuzzel-git socat foot jq python xdg-user-dirs python-materialyoucolor-git app2unit-git grim wayfreeze-git wl-screenrec
+install-optional-deps 'discord (messaging app)' 'btop (system monitor)' 'zen-browser (web browser)'
set -l dist $C_DATA/scripts
diff --git a/screenshot.fish b/screenshot.fish
index 5274c67..ecabbc0 100755
--- a/screenshot.fish
+++ b/screenshot.fish
@@ -4,6 +4,24 @@
mkdir -p "$C_CACHE/screenshots"
set -l tmp_file "$C_CACHE/screenshots/$(date +'%Y%m%d%H%M%S')"
+
+if test "$argv[1]" = 'region'
+ if test "$argv[2]" = 'freeze'
+ wayfreeze --hide-cursor & set PID $last_pid
+ sleep .1
+ end
+
+ set -l ws (hyprctl -j activeworkspace | jq -r '.id')
+ set -l region (hyprctl -j clients | jq -r --argjson activeWsId $ws '.[] | select(.workspace.id == $activeWsId) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | slurp)
+ if test -n "$region"
+ grim -l 0 -g $region - | swappy -f - &
+ end
+
+ set -q PID && kill $PID
+
+ exit
+end
+
grim $argv $tmp_file; and wl-copy < $tmp_file; or exit 1
set -l action (notify-send -i 'image-x-generic-symbolic' -h "STRING:image-path:$tmp_file" \