Compare commits
5 Commits
3799873323
...
master
Author | SHA1 | Date | |
---|---|---|---|
a09d6e3b51 | |||
3fb163bb48 | |||
76adb5cd3a | |||
b09e68119f | |||
2970b6a63f |
72
mason/packages/pinephone-keyboard-tools.scm
Normal file
72
mason/packages/pinephone-keyboard-tools.scm
Normal file
@@ -0,0 +1,72 @@
|
||||
(define-module (mason packages pinephone-keyboard-tools)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (gnu packages php)
|
||||
#:use-module (gnu packages embedded))
|
||||
|
||||
(define-public pinephone-keyboard-tools
|
||||
(package
|
||||
(name "pinephone-keyboard-tools")
|
||||
(version "1.0")
|
||||
(home-page "https://xff.cz/git/pinephone-keyboard/")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url home-page)
|
||||
(commit version)
|
||||
(recursive? #t)))
|
||||
(sha256
|
||||
(base32
|
||||
"1jsshlid0yr2y9pi1qg66542c7jixclzq881r937fk0fa9bl21j5"))
|
||||
(file-name (git-file-name name version))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("php" ,php)
|
||||
("sdcc" ,sdcc)))
|
||||
(arguments
|
||||
`(#:tests? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda _
|
||||
(setenv "CC" "gcc")
|
||||
(substitute* "Makefile"
|
||||
(("VERSION := ")
|
||||
(string-append "VERSION = " ,version "#")))))
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(invoke "mkdir" "-p"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
(invoke "cp" "build/ppkb-i2c-charger-ctl"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
(invoke "cp" "build/ppkb-i2c-debugger"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
(invoke "cp" "build/ppkb-i2c-flasher"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
(invoke "cp" "build/ppkb-i2c-inputd"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
(invoke "cp" "build/ppkb-i2c-selftest"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
(invoke "cp" "build/ppkb-usb-debugger"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
(invoke "cp" "build/ppkb-usb-flasher"
|
||||
(string-append (assoc-ref %outputs "out")
|
||||
"/bin"))
|
||||
#t)))))
|
||||
(synopsis "FOSS Pinephone Keyboard Firmware and Tools")
|
||||
(description
|
||||
"FOSS Pinephone Keyboard Firmware and Tools")
|
||||
(license license:gpl3+)))
|
||||
|
||||
pinephone-keyboard-tools
|
45
mason/packages/screenshot2app.scm
Normal file
45
mason/packages/screenshot2app.scm
Normal file
@@ -0,0 +1,45 @@
|
||||
(define-module (mason packages screenshot2app)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix build-system copy)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (gnu packages gtk)
|
||||
#:use-module (gnu packages image))
|
||||
|
||||
(define-public screenshot2app
|
||||
(package
|
||||
(name "screenshot2app")
|
||||
(version "0.0.1")
|
||||
(home-page "https://wiki.mobian-project.org/doku.php?id=tweaks#taking-screenshots-v3")
|
||||
(source
|
||||
(local-file "scripts/screenshot2app" #:recursive? #t))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
'(#:install-plan
|
||||
'(("screenshot2app" "bin/")
|
||||
("screenshot2app.desktop" "share/applications/"))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(substitute* (list "screenshot2app")
|
||||
(("@EXTRA_PATH@")
|
||||
(string-append (assoc-ref inputs "grim")
|
||||
"/bin:"
|
||||
(assoc-ref inputs "yad")
|
||||
"/bin")))
|
||||
(substitute* (list "screenshot2app.desktop")
|
||||
(("@EXEC@")
|
||||
(string-append (assoc-ref outputs "out")
|
||||
"/bin/screenshot2app")))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("yad" ,yad)
|
||||
("grim" ,grim)))
|
||||
(synopsis "")
|
||||
(description
|
||||
"")
|
||||
(license license:gpl2+)))
|
||||
|
||||
screenshot2app
|
79
mason/packages/scripts/screenshot2app/screenshot2app
Executable file
79
mason/packages/scripts/screenshot2app/screenshot2app
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script make a screen shot
|
||||
#
|
||||
# Authors: Kyle Rankin & @mo2mo:matrix.org
|
||||
# https://puri.sm/posts/easy-librem-5-app-development-take-a-screenshot/
|
||||
# https://wiki.mobian-project.org/doku.php?id=tweaks#taking-screenshots-v3
|
||||
#
|
||||
# dependencies: grim libnotify-bin yad
|
||||
#
|
||||
# License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
|
||||
# This is free software: you are free to change and redistribute it.
|
||||
# There is NO WARRANTY, to the extent permitted by law."
|
||||
|
||||
|
||||
# make the info
|
||||
LNG=$(echo $LANG | cut -d_ -f1)
|
||||
case $LNG in
|
||||
de) INFO="Ein Bildschirmfoto nach X Sekunden machen:\nName (auch mit Pfad)" ;;
|
||||
es) INFO="Tomar una captura de pantalla después de X segundos:\nnombre (también con la ruta)" ;;
|
||||
fr) INFO="Prendre une capture d'écran après X secondes:\nnom (également avec le chemin)" ;;
|
||||
it) INFO="Scatta lo screenshot dopo X secondi:\nnome (anche con percorso)" ;;
|
||||
ru) INFO="Снимок экрана через X секунд:\nимя (также с указанием пути)" ;;
|
||||
*) INFO="Take screenshot after X seconds:\nname (also with path)"
|
||||
esac
|
||||
|
||||
export PATH="$PATH:@EXTRA_PATH@"
|
||||
|
||||
# start with yad
|
||||
INPUT=`yad --title Screenshot --text="$INFO" --form --field=filename:SFL --field=seconds:NUM "Screenshot" "5" --focus-field=1`
|
||||
SCREENSHOT=`echo $INPUT | cut -d '|' -f1`
|
||||
SECONDS=`echo $INPUT | cut -d '|' -f2`
|
||||
[ "$SECONDS" -eq 0 ] && exit 1
|
||||
|
||||
# check & make a folder
|
||||
if [ -f "${HOME}/.config/user-dirs.dirs" ]
|
||||
then PICTURE_DIR=$(cat ${HOME}/.config/user-dirs.dirs | grep PICTURES | cut -d/ -f2 | cut -d\" -f1)
|
||||
else PICTURE_DIR="Pictures"
|
||||
fi
|
||||
if [ -d "${HOME}/$PICTURE_DIR" ]
|
||||
then FOLDER="$PICTURE_DIR/Screenshot"
|
||||
else FOLDER="Screenshot"
|
||||
fi
|
||||
[ ! -d "${HOME}/$FOLDER" ] && mkdir "${HOME}/$FOLDER"
|
||||
|
||||
# check the target
|
||||
if [ -d "$(echo ${SCREENSHOT%/*} | grep '/')" ]
|
||||
then INFO=${SCREENSHOT##*/}
|
||||
elif [ ! "$(echo "$SCREENSHOT" | grep "/home/")" ]
|
||||
then SCREENSHOT="${HOME}/$FOLDER/${SCREENSHOT##*/}"
|
||||
INFO="\n~/$FOLDER/${SCREENSHOT##*/}"
|
||||
else exit 2
|
||||
fi
|
||||
|
||||
# check the extensions
|
||||
EXT="${SCREENSHOT##*.}"
|
||||
case "$EXT" in
|
||||
png|ppm) SCREENSHOT="$SCREENSHOT" ;;
|
||||
*) EXT="png"
|
||||
SCREENSHOT="$SCREENSHOT.$EXT" ;;
|
||||
esac
|
||||
|
||||
# make a screenshot
|
||||
sleep $SECONDS
|
||||
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
|
||||
if [ -f "$SCREENSHOT" ]
|
||||
then SCREENSHOT="${SCREENSHOT%.*}_$TIMESTAMP.$EXT"
|
||||
INFO="${INFO%.*}_$TIMESTAMP"
|
||||
fi
|
||||
grim -t $EXT "$SCREENSHOT"
|
||||
case $LNG in
|
||||
de) info="Bildschirmfoto gespeichert unter:" ;;
|
||||
es) info="Captura de pantalla almacenada en:" ;;
|
||||
fr) info="Capture d'écran stockée à:" ;;
|
||||
it) info="Screenshot memorizzato su:" ;;
|
||||
ru) info="Скриншот, сохраненный в:" ;;
|
||||
*) info="Screenshot stored at:"
|
||||
esac
|
||||
notify-send screenshot "$info\n$INFO.$EXT"
|
14
mason/packages/scripts/screenshot2app/screenshot2app.desktop
Normal file
14
mason/packages/scripts/screenshot2app/screenshot2app.desktop
Normal file
@@ -0,0 +1,14 @@
|
||||
[Desktop Entry]
|
||||
Name=Screen Shot
|
||||
Name[de]=Bildschirmfoto
|
||||
Name[en_CA]=Screen Shot
|
||||
Name[en_GB]=Screen Shot
|
||||
Name[es]=Captura de pantalla
|
||||
Name[fr]=Capture d'écran
|
||||
Name[it]=Schermata
|
||||
Type=Application
|
||||
Icon=applets-screenshooter
|
||||
Exec=@EXEC@
|
||||
Terminal=false
|
||||
Keywords=screenshooter;Bildschirmfoto;screen;
|
||||
Categories=Utility;
|
8
mason/packages/scripts/toggle-keyboard/toggle-keyboard
Executable file
8
mason/packages/scripts/toggle-keyboard/toggle-keyboard
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
KEYBOARD_ENABLED=$(gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled)
|
||||
if [ "$KEYBOARD_ENABLED" = "true" ]; then
|
||||
KEYBOARD_ENABLED="false"
|
||||
else
|
||||
KEYBOARD_ENABLED="true"
|
||||
fi
|
||||
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled $KEYBOARD_ENABLED
|
@@ -0,0 +1,5 @@
|
||||
[Desktop Entry]
|
||||
Name=Toggle Keyboard
|
||||
Type=Application
|
||||
Exec=@EXEC@
|
||||
Categories=Utility;
|
34
mason/packages/toggle-keyboard.scm
Normal file
34
mason/packages/toggle-keyboard.scm
Normal file
@@ -0,0 +1,34 @@
|
||||
(define-module (mason packages toggle-keyboard)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix build-system copy)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix gexp))
|
||||
|
||||
(define-public toggle-keyboard
|
||||
(package
|
||||
(name "toggle-keyboard")
|
||||
(version "0.0.1")
|
||||
(home-page "https://forge.monarch-pass.net/malacoda/mason")
|
||||
(source
|
||||
(local-file "scripts/toggle-keyboard" #:recursive? #t))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
'(#:install-plan
|
||||
'(("toggle-keyboard" "bin/")
|
||||
("toggle-keyboard.desktop" "share/applications/"))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(substitute* (list "toggle-keyboard.desktop")
|
||||
(("@EXEC@")
|
||||
(string-append (assoc-ref outputs "out")
|
||||
"/bin/toggle-keyboard")))
|
||||
#t)))))
|
||||
(synopsis "Toggle keyboard")
|
||||
(description
|
||||
"Toggle keyboard")
|
||||
(license license:gpl3+)))
|
||||
|
||||
toggle-keyboard
|
Reference in New Issue
Block a user