Add files via upload
This commit is contained in:
parent
3353ed7611
commit
2c2466a30e
5 changed files with 117 additions and 0 deletions
9
.config/sway/gammastep.ini
Normal file
9
.config/sway/gammastep.ini
Normal file
|
@ -0,0 +1,9 @@
|
|||
[general]
|
||||
temp-day=6500
|
||||
temp-night=3500
|
||||
brightness-day=1
|
||||
brightness-night=0.8
|
||||
location-provider=manual
|
||||
[manual]
|
||||
lat=49.7
|
||||
lon=8.1
|
20
.config/sway/mako.conf
Normal file
20
.config/sway/mako.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
margin=10
|
||||
padding=2
|
||||
border-size=2
|
||||
border-radius=0
|
||||
icons=1
|
||||
markup=1
|
||||
icon-location=right
|
||||
sort=+time
|
||||
|
||||
[urgency=low]
|
||||
border-color=#000000
|
||||
default-timeout=5000
|
||||
|
||||
[urgency=normal]
|
||||
border-color=#8d00c4
|
||||
default-timeout=10000
|
||||
|
||||
[urgency=high]
|
||||
border-color=#c40000
|
||||
default-timeout=0
|
43
.config/sway/menu.sh
Normal file
43
.config/sway/menu.sh
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
# This script will open a little menu with different options
|
||||
# Dependencies: Sway, Bemenu, Unicode, systemd
|
||||
|
||||
screenshot () {
|
||||
case "$(echo -e "🖧 ...von allen Bildschirmen
|
||||
🗔 ...vom aktiven Fenster
|
||||
⌗ ...von Auswahl
|
||||
🖵 ...vom Bildschirm" |
|
||||
bemenu -p "Foto" "$@")" in
|
||||
|
||||
"🖧 ...von allen Bildschirmen") exec .config/sway/screenshot.sh all ;;
|
||||
"🗔 ...vom aktiven Fenster") exec .config/sway/screenshot.sh focus ;;
|
||||
"⌗ ...von Auswahl") exec .config/sway/screenshot.sh choice ;;
|
||||
"🖵 ...vom Bildschirm") exec .config/sway/screenshot.sh ;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
case "$(echo -e "🖼 Bildschirmfoto...
|
||||
🌘 gammastep umschalten
|
||||
🔒 ausloggen
|
||||
⏻ Herunterfahren
|
||||
↻ Neustarten
|
||||
⏾ Standby" |
|
||||
bemenu -p "Menü" "$@")" in
|
||||
|
||||
"🖼 Bildschirmfoto...")
|
||||
screenshot "$@";;
|
||||
"🌘 gammastep umschalten")
|
||||
exec ~/.config/sway/toggle_gammastep.sh ;;
|
||||
"🔒 ausloggen")
|
||||
loginctl terminate-user $USER ;;
|
||||
"⏻ Herunterfahren")
|
||||
shutdown now ;;
|
||||
"↻ Neustarten")
|
||||
reboot ;;
|
||||
"⏾ Standby")
|
||||
systemctl suspend ;;
|
||||
esac
|
||||
|
||||
exit 0
|
32
.config/sway/screenshot.sh
Normal file
32
.config/sway/screenshot.sh
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
# This script will take a screenshot
|
||||
# Dependencies: sway, grim, slurp, gnu-utils
|
||||
|
||||
FILENAME="$HOME/screenshot-$(date +'%Y-%m-%d-%H%M%S.png')"
|
||||
|
||||
case $1 in
|
||||
all) #Screenshot of all outputs
|
||||
grim -t jpeg -q 100 $FILENAME ;;
|
||||
|
||||
focus) # Screenshot of focused window
|
||||
geometry="$(
|
||||
swaymsg -p -t get_tree |
|
||||
grep -A 8 \"focused\"\:\ true |
|
||||
grep -o "[0-9]*" |
|
||||
awk '
|
||||
BEGIN{ RS = "" ; FS = "\n" }
|
||||
{printf "%d,%d %dx%d", $2+$1,$3+$1,$4-2*$1,$5-2*$1}')"
|
||||
grim -t jpeg -q 100 -g "$geometry" $FILENAME ;;
|
||||
|
||||
choice) #Screenshot von Auswahl
|
||||
grim -t jpeg -q 100 -g "$(slurp)" $FILENAME ;;
|
||||
|
||||
*) #Default: Screenshot of focused output
|
||||
focused_output="$(
|
||||
swaymsg -p -t get_outputs |
|
||||
grep focused |
|
||||
awk '{print $2}')"
|
||||
grim -t jpeg -q 100 -o $focused_output $FILENAME ;;
|
||||
esac
|
||||
|
||||
exit 0
|
13
.config/sway/toggle_gammastep.sh
Normal file
13
.config/sway/toggle_gammastep.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
# This script will toggle gammastep
|
||||
# Dependencies: sway, gammastep, gnu-utils
|
||||
|
||||
PID="$(ps -e | grep gammastep | awk -F ' ' '{print $1}')"
|
||||
|
||||
if [[ $PID > 0 ]]; then
|
||||
kill $PID
|
||||
else
|
||||
swaymsg exec "gammastep-indicator -c .config/sway/gammastep.ini"
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in a new issue