major update: added screenshots, first-run and a mango configurator.
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f ~/.config/firstrun.state ]; then
|
||||
dms ipc call settings open
|
||||
dms ipc call keybinds openWithPath mangowc ~/.config/mango/binds.conf
|
||||
touch ~/.config/firstrun.state
|
||||
fi
|
||||
exit 0
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONFDIR="/home/$(whoami)/.config/mango"
|
||||
echo "confdir is $CONFDIR"
|
||||
|
||||
app=micro
|
||||
|
||||
selected=$(ls -1 $CONFDIR | fzf --layout=reverse --preview="bat $CONFDIR/{}")
|
||||
|
||||
echo "selected is $selected"
|
||||
|
||||
$app $CONFDIR/$selected
|
||||
|
||||
echo "opened $CONFDIR/$selected in $app"
|
||||
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -e ~/.config/screenshot-state ]; then
|
||||
state=$(cat ~/.config/screenshot-state)
|
||||
case $state in
|
||||
file)
|
||||
mkdir -p ~/Screenshots
|
||||
grim $HOME/Screenshots/$(date +%Y%m%d%H%M%S).png
|
||||
notify-send -t 3000 -a "Screenshots" -i $HOME/Screenshots/$(date +%Y%m%d%H%M%S).png "screenshot taken" "screenshot taken and saved to file in $HOME/screenshots"
|
||||
;;
|
||||
clipboard)
|
||||
f=$(mktemp -t screenshot-XXXXXX.png) && grim "$f" && wl-copy < "$f" && rm -f "$f"
|
||||
notify-send -t 3000 -a "Screenshots" -i $f "screenshot taken" "screenshot taken and saved to clipboard"
|
||||
;;
|
||||
editor)
|
||||
f=$HOME/Screenshots/$(date +%Y%m%d%H%M%S).png && grim "$f" && satty --filename "$f" --output-filename "$f" --actions-on-enter save-to-file --early-exit &
|
||||
notify-send -t 3000 -a "Screenshots" -i "$f" "screenshot taken" "screenshot taken and opened in editor"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "clipboard" > ~/.config/screenshot-state
|
||||
notify-send -t 3000 -a "Screenshots" "screenshot mode" 'No mode detected, set mode to "Save to Clipboard". re-run your screenshot'
|
||||
fi
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
if [ -e ~/.config/screenshot-state ]; then
|
||||
state=$(cat ~/.config/screenshot-state)
|
||||
case $state in
|
||||
file)
|
||||
echo "clipboard" > ~/.config/screenshot-state
|
||||
notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nSave to Clipboard"
|
||||
echo "detected file, set to clipboard"
|
||||
;;
|
||||
clipboard)
|
||||
echo "editor" > ~/.config/screenshot-state
|
||||
notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nOpen in Editor"
|
||||
echo "detected clipboard, set to editor"
|
||||
;;
|
||||
editor)
|
||||
echo "file" > ~/.config/screenshot-state
|
||||
notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nSave to File"
|
||||
echo "detected editor, set to file"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "clipboard" > ~/.config/screenshot-state
|
||||
notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nSave to Clipboard"
|
||||
echo "detected no file ,set to clipboard"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
if [ -e ~/.config/screenshot-state ]; then
|
||||
state=$(cat ~/.config/screenshot-state)
|
||||
case $state in
|
||||
file)
|
||||
mkdir -p ~/Screenshots
|
||||
hyprshot -m region --output-folder ~/Screenshots
|
||||
;;
|
||||
clipboard)
|
||||
hyprshot -m region --clipboard-only
|
||||
;;
|
||||
editor)
|
||||
hyprshot -m region --raw | satty --filename -
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "clipboard" > ~/.config/screenshot-state
|
||||
notify-send -t 3000 -a "Screenshots" "screenshot mode" 'No mode detected, set mode to "Save to Clipboard". re-run your screenshot'
|
||||
fi
|
||||
Reference in New Issue
Block a user