bringing up to date since long time

This commit is contained in:
2019-09-24 16:39:40 +02:00
parent 566ce3fef4
commit 68f697fafe
27 changed files with 614 additions and 26 deletions

16
anaconda_bernina_env Normal file
View File

@@ -0,0 +1,16 @@
# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/sf/bernina/anaconda/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/sf/bernina/anaconda/anaconda3/etc/profile.d/conda.sh" ]; then
. "/sf/bernina/anaconda/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/sf/bernina/anaconda/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup

View File

@@ -5,12 +5,13 @@
# exit 1
#fi
dest=/sf/bernina/anaconda/4.4.0
#dest=/sf/bernina/anaconda/ahl
default=/sf/bernina/anaconda/bernina36
dest=${1:-$default}
echo Loading PSI Anaconda Python distribution 3.6
module load psi-python36/4.4.0
echo Activating BERNINA Conda environment
source activate $dest
echo Activating Conda environment ${1:-$dest}
source activate ${1:-$dest}
#source activate $dest

View File

@@ -5,11 +5,11 @@
# exit 1
#fi
dest=/sf/bernina/anaconda/ahl
dest=/sf/bernina/anaconda/bernina36_test
echo Loading PSI Anaconda Python distribution 3.6
module load psi-python36/4.4.0
echo Activating BERNINA Conda environment
echo Activating BERNINA Conda test environment
source activate $dest

View File

@@ -1 +1,5 @@
/afs/psi.ch/intranet/SF/Photonics/SW/bin/mydm -x /afs/psi.ch/intranet/SF/Photonics/SW/adl/Aramis.adl
#!/bin/bash
cd /afs/psi.ch/intranet/SF/Photonics/AramisOverview
caqtdm -stylefile sfop.qss -macro chargelim=15,ES-DISPLAY=SAROP-CPCL-ARAMIS-UI:ARAMIS-ES.BB S_PH_Aramis_Overview.ui

5
bernina-jupyter Executable file
View File

@@ -0,0 +1,5 @@
#! /bin/bash
cd /sf/bernina/config/src/bernina-scripts
source /sf/bernina/bin/anaconda_env
jupyter notebook

View File

@@ -6,5 +6,7 @@
-home=/sf/bernina/config/pshell_be \
-data=/sf/bernina/config/pshell_data \
-l -d -k -q -b \
-p=Correlation.java $@
-p=Correlation.java \
-version=v1_10 \
$@

6
eco
View File

@@ -1,6 +1,8 @@
#/bin/bash
#source /opt/gfa/python
source anaconda_env
export PYTHONPATH=$PYTHONPATH:/sf/bernina/config/src/python/eco
python /sf/bernina/config/src/python/eco/startup.py -s bernina "$@" -l
ipython --pylab --profile=eco --no-banner -i -c "run /sf/bernina/config/src/python/eco/startup_inline.py -l -s bernina"
#python /sf/bernina/config/src/python/eco/startup.py -s bernina "$@" -l

8
eco-dev Executable file
View File

@@ -0,0 +1,8 @@
#/bin/bash
#source /opt/gfa/python
source anaconda_env
ipython --profile=eco --no-banner -i -c "run /sf/bernina/config/src/python/eco_dev/startup_inline.py -l -s bernina"
#python /sf/bernina/config/src/python/eco/startup.py -s bernina "$@" -l

View File

@@ -1,13 +1,8 @@
#/bin/bash
PS1=$PS1"\[\e]2;eco_dev - Bernina \a\]"
source anaconda_env
export PYTHONPATH=$PYTHONPATH:/sf/bernina/config/src/python/devel
ipython --pylab --no-banner -c "\
print(' ___ _______\n / -_) __/ _ \ \n Experiment Control \__/\__/\___/ \n\n');\
import h5py;\
h5py.enable_ipython_completer();\
import IPython.utils as _ipy_utils;\
_ipy_utils.terminal.set_term_title('eco_dev Bernina');\
from eco.instruments import bernina;\
from eco.instruments.bernina import *;\
" -i

7
eco_new Executable file
View File

@@ -0,0 +1,7 @@
#/bin/bash
#source /opt/gfa/python
source anaconda_env
ipython --profile=eco
#python /sf/bernina/config/src/python/eco/startup.py -s bernina "$@" -l

5
eco_noenv Executable file
View File

@@ -0,0 +1,5 @@
#/bin/bash
#source /opt/gfa/python
export PYTHONPATH=$PYTHONPATH:/sf/bernina/config/src/python/eco
python /sf/bernina/config/src/python/eco/startup.py -s bernina "$@" -l

3
firefox Executable file
View File

@@ -0,0 +1,3 @@
#/bin/bash
/usr/bin/firefox -P $HOSTNAME "$@"

3
firefox-create-hostprofile Executable file
View File

@@ -0,0 +1,3 @@
#/bin/bash
firefox --CreateProfile $HOSTNAME

3
firefox-hostprofile Executable file
View File

@@ -0,0 +1,3 @@
#/bin/bash
/usr/bin/firefox -P $HOSTNAME "$@"

13
firefox_as Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
#function set-title() {
# if [[ -z "$ORIG" ]]; then
# ORIG=$PS1
# fi
# TITLE="\[\e]2;$*\a\]"
# PS1=${ORIG}${TITLE}
#}
#set-title "chrome terminal"
#gnome-terminal -x sh -c "export XDG_RUNTIME_DIR=/run/user/$UID; su - $1 -c chrome"
gnome-terminal -x sh -c "su - $1 -c /usr/bin/firefox"

4
go2daq Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
ssh jf@sf-daq-3 -i ~/.ssh/daq3.key

418
gogh Executable file
View File

@@ -0,0 +1,418 @@
#!/usr/bin/env bash
# Define traps and trapfunctions early in case any errors before script exits
GLOBAL_VAR_CLEANUP(){
[[ -n "$(command -v TILIX_TMP_CLEANUP)" ]] && TILIX_TMP_CLEANUP
unset PROFILE_NAME
unset PROFILE_SLUG
unset TILIX_RES
unset TERMINAL
}
trap 'GLOBAL_VAR_CLEANUP; trap - EXIT' EXIT HUP INT QUIT PIPE TERM
declare -a THEMES=(
'3024-day.sh'
'3024-night.sh'
'aci.sh'
'aco.sh'
'adventuretime.sh'
'afterglow.sh'
'alien-blood.sh'
'argonaut.sh'
'arthur.sh'
'atom.sh'
'azu.sh'
'belafonte-day.sh'
'belafonte-night.sh'
'bim.sh'
'birds-of-paradise.sh'
'blazer.sh'
'borland.sh'
'broadcast.sh'
'brogrammer.sh'
'c64.sh'
'cai.sh'
'chalkboard.sh'
'chalk.sh'
'ciapre.sh'
'clone-of-ubuntu.sh'
'clrs.sh'
'cobalt2.sh'
'cobalt-neon.sh'
'crayon-pony-fish.sh'
'dark-pastel.sh'
'darkside.sh'
'desert.sh'
'dimmed-monokai.sh'
'dracula.sh'
'earthsong.sh'
'elemental.sh'
'elementary.sh'
'elic.sh'
'elio.sh'
'espresso-libre.sh'
'espresso.sh'
'fishtank.sh'
'flatland.sh'
'flat.sh'
'foxnightly.sh'
'freya.sh'
'frontend-delight.sh'
'frontend-fun-forrest.sh'
'frontend-galaxy.sh'
'github.sh'
'gooey.sh'
'google-dark.sh'
'google-light.sh'
'grape.sh'
'grass.sh'
'gruvbox-dark.sh'
'gruvbox.sh'
'hardcore.sh'
'harper.sh'
'hemisu-dark.sh'
'hemisu-light.sh'
'highway.sh'
'hipster-green.sh'
'homebrew.sh'
'hurtado.sh'
'hybrid.sh'
'ic-green-ppl.sh'
'ic-orange-ppl.sh'
'idle-toes.sh'
'ir-black.sh'
'jackie-brown.sh'
'japanesque.sh'
'jellybeans.sh'
'jup.sh'
'kibble.sh'
'later-this-evening.sh'
'lavandula.sh'
'liquid-carbon.sh'
'liquid-carbon-transparent.sh'
'maia.sh'
'man-page.sh'
'mar.sh'
'material.sh'
'mathias.sh'
'medallion.sh'
'misterioso.sh'
'miu.sh'
'molokai.sh'
'mona-lisa.sh'
'monokai-dark.sh'
'monokai-soda.sh'
'n0tch2k.sh'
'neopolitan.sh'
'nep.sh'
'neutron.sh'
'nightlion-v1.sh'
'nightlion-v2.sh'
'nighty.sh'
'nord-light.sh'
'nord.sh'
'novel.sh'
'obsidian.sh'
'ocean-dark.sh'
'oceanic-next.sh'
'ocean.sh'
'ollie.sh'
'one-dark.sh'
'one-half-black.sh'
'one-light.sh'
'pali.sh'
'paraiso-dark.sh'
'paul-millr.sh'
'pencil-dark.sh'
'pencil-light.sh'
'peppermint.sh'
'pnevma.sh'
'pro.sh'
'red-alert.sh'
'red-sands.sh'
'rippedcasts.sh'
'royal.sh'
'sat.sh'
'seafoam-pastel.sh'
'sea-shells.sh'
'seti.sh'
'shaman.sh'
'shel.sh'
'slate.sh'
'smyck.sh'
'snazzy.sh'
'soft-server.sh'
'solarized-darcula.sh'
'solarized-dark-higher-contrast.sh'
'solarized-dark.sh'
'solarized-light.sh'
'spacedust.sh'
'spacegray-eighties-dull.sh'
'spacegray-eighties.sh'
'spacegray.sh'
'spring.sh'
'square.sh'
'srcery.sh'
'sundried.sh'
'symphonic.sh'
'teerb.sh'
'terminal-basic.sh'
'terminix-dark.sh'
'thayer-bright.sh'
'tin.sh'
'tomorrow-night-blue.sh'
'tomorrow-night-bright.sh'
'tomorrow-night-eighties.sh'
'tomorrow-night.sh'
'tomorrow.sh'
'toy-chest.sh'
'treehouse.sh'
'twilight.sh'
'ura.sh'
'urple.sh'
'vag.sh'
'vaughn.sh'
'vibrant-ink.sh'
'warm-neon.sh'
'wez.sh'
'wild-cherry.sh'
'wombat.sh'
'wryan.sh'
'zenburn.sh'
)
# Allow developer to change url to forked url for easier testing
BASE_URL=${BASE_URL:-"https://raw.githubusercontent.com/Mayccoll/Gogh/master"}
PROGRESS_URL="https://raw.githubusercontent.com/phenonymous/shell-progressbar/1.0/progress.sh"
capitalize() {
local ARGUMENT=$1
local RES=""
local STR=""
local RES_NO_TRAIL_SPACE=""
for CHAR in $ARGUMENT; do
STR=$(echo "${CHAR:0:1}" | tr "[:lower:]" "[:upper:]")"${CHAR:1} "
RES="${RES}${STR}"
RES_NO_TRAIL_SPACE="$(echo -e "${RES}" | sed -e 's/[[:space:]]*$//')"
done
echo "${RES_NO_TRAIL_SPACE}"
}
set_gogh() {
string=$1
string_r="${string%???}"
string_s=${string_r//\./_}
result=$(capitalize "${string_s}")
url="${BASE_URL}/themes/$1"
export {PROFILE_NAME,PROFILE_SLUG}="$result"
# Evaluate if Gogh was called from local source - i.e cloned repo
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ -e "${SCRIPT_PATH}/themes/$1" ]]; then
bash "${SCRIPT_PATH}/themes/$1"
else
if [[ "$(uname)" = "Darwin" ]]; then
# OSX ships with curl
bash -c "$(curl -sLo- "${url}")"
else
# Linux ships with wget
bash -c "$(wget -qO- "${url}")"
fi
fi
}
remove_file_extension (){
echo "${1%.*}"
}
### Get length of an array
ARRAYLENGTH=${#THEMES[@]}
NUM=1
# |
# | ::::::: Print logo
# |
tput clear
if [[ ${COLUMNS:-$(tput cols)} -ge 80 ]]; then
gogh_str=""
gogh_str+=" \n"
gogh_str+=" █████████ █████ \n"
gogh_str+=" ███ ███ ███ \n"
gogh_str+=" ███ ██████ ███████ ███████ \n"
gogh_str+=" ███ ███ ███ ███ ███ ███ ███ \n"
gogh_str+=" ███ █████ ███ ███ ███ ███ ███ ███ \n"
gogh_str+=" ███ ███ ███ ███ ███ ███ ███ ███ \n"
gogh_str+=" █████████ ██████ ███████ ████ █████ \n"
gogh_str+=" $(tput setaf 0)█████████$(tput setaf 1)█████████$(tput setaf 2)█████████$(tput setaf 3)█████████$(tput setaf 4)█████$(tput sgr 0)███$(tput setaf 4)█$(tput setaf 5)█████████$(tput setaf 6)█████████$(tput setaf 7)█████████ \n"
gogh_str+=" $(tput setaf 0)█████████$(tput setaf 1)█████████$(tput setaf 2)█████████$(tput setaf 3)█████████$(tput sgr 0)███$(tput setaf 4)██$(tput sgr 0)███$(tput setaf 4)█$(tput setaf 5)█████████$(tput setaf 6)█████████$(tput setaf 7)█████████ \n"
gogh_str+=" $(tput setaf 0)█████████$(tput setaf 1)█████████$(tput setaf 2)█████████$(tput setaf 3)█████████$(tput setaf 4)█$(tput sgr0)██████$(tput setaf 4)██$(tput setaf 5)█████████$(tput setaf 6)█████████$(tput setaf 7)█████████ \n"
gogh_str+=" $(tput setaf 8)█████████$(tput setaf 9)█████████$(tput setaf 10)█████████$(tput setaf 11)█████████$(tput setaf 12)█████████$(tput setaf 13)█████████$(tput setaf 14)█████████$(tput setaf 15)█████████$(tput sgr 0) \n"
gogh_str+=" $(tput setaf 8)█████████$(tput setaf 9)█████████$(tput setaf 10)█████████$(tput setaf 11)█████████$(tput setaf 12)█████████$(tput setaf 13)█████████$(tput setaf 14)█████████$(tput setaf 15)█████████$(tput sgr 0) \n"
gogh_str+=" $(tput setaf 8)█████████$(tput setaf 9)█████████$(tput setaf 10)█████████$(tput setaf 11)█████████$(tput setaf 12)█████████$(tput setaf 13)█████████$(tput setaf 14)█████████$(tput setaf 15)█████████$(tput sgr 0) \n"
gogh_str+=" "
printf '%b\n' "${gogh_str}"
sleep 2.5
else
echo -e "\nGogh\n"
for c in {0..15}; do
echo -n "$(tput setaf $c)█████$(tput sgr0)"
[[ $c == 7 ]] && echo # new line
done
echo
fi
# |
# | ::::::: Print Themes
# |
echo -e "\nThemes:\n"
for TH in "${THEMES[@]}"; do
KEY=$(printf "%02d" $NUM)
FILENAME=${TH::$((${#TH}-3))}
FILENAME_SPACE=${FILENAME//-/ }
echo -e " ($(tput setaf 4) $KEY $(tput sgr0)) $(capitalize "${FILENAME_SPACE}")"
((NUM++))
done
echo -e " ($(tput setaf 4) ALL $(tput sgr0)) All themes"
# |
# | ::::::: Select Option
# |
echo -e "\nUsage : Enter Desired Themes Numbers ($(tput setaf 4)OPTIONS$(tput sgr0)) Separated By A Blank Space"
echo -e " Press $(tput setaf 4)ENTER$(tput sgr0) without options to Exit\n"
read -r -p 'Enter OPTION(S) : ' -a OPTION
# Automagically generate options if user opts for all themes
[[ "$OPTION" == ALL ]] && OPTION=($(seq -s " " $ARRAYLENGTH))
# |
# | ::::::: Get terminal
# |
if [[ -z "${TERMINAL:-}" ]]; then
# |
# | Check for the terminal name (depening on os)
# | ===========================================
OS="$(uname)"
if [[ "$OS" = "Darwin" ]]; then
TERMINAL=$TERM_PROGRAM
elif [[ "${OS#CYGWIN}" != "${OS}" ]]; then
TERMINAL="mintty"
else
# |
# | Depending on how the script was invoked, we need
# | to loop until pid is no longer a subshell
# | ===========================================
pid="$$"
TERMINAL="$(ps -h -o comm -p $pid)"
while [[ "${TERMINAL:(-2)}" == "sh" ]]; do
pid="$(ps -h -o ppid -p $pid)"
TERMINAL="$(ps -h -o comm -p $pid)"
done
fi
fi
# |
# | ::::::: Fancy progressbar for lengthy operations
# |
if [[ ${#OPTION[@]} -gt 5 ]]; then
# Note: We use eval here because we want the functions to be available in this script
if [[ "$(uname)" = "Darwin" ]]; then
eval "$(curl -so- ${PROGRESS_URL})" 2> /dev/null
else
eval "$(wget -qO- ${PROGRESS_URL})" 2> /dev/null
fi
fi
# |
# | Tilix supports fg/bg in color schemes - ask wether user wants to go that route
# | This is to avoid creating multiple profiles just for colors
# | ===========================================
if [[ "$TERMINAL" = "tilix" ]] && [[ ${#OPTION[@]} -gt 0 ]]; then
echo
read -r -p "Tilix detected - use color schemes instead of profiles? [y/N] " -n 1 TILIX_RES
echo
# |
# | When selecting multiple themes and user opts for color schemes, we save all themes
# | in a tmpdir and copy the files once all themes has been processed.. If a user
# | desides to abort before all themes has been processed this section will cleanup the tmpdir
# | =======================================
if [[ ${TILIX_RES::1} =~ ^(y|Y)$ ]]; then
TILIX_TMP_CLEANUP() {
echo
echo "Cleaning up"
rm -rf "$scratchdir"
unset LOOP OPTLENGTH scratchdir
echo "Done..."
exit 0
}
scratchdir=$(mktemp -d -t tmp.XXXXXXXX)
export scratchdir
fi
fi
# |
# | ::::::: Export one-off variables
# |
[[ -n "${TILIX_RES:-}" ]] && export TILIX_RES
export TERMINAL LOOP OPTLENGTH=${#OPTION[@]}
# |
# | ::::::: Apply Theme
# |
declare color_dot_str
for c in {0..15}; do
color_dot_str+="$(tput setaf $c)•$(tput sgr0)"
[[ $c == 7 ]] && color_dot_str+=" "
done
# Note:
# Constants with a leading 0 are interpreted as octal numbers
# Hence option 08 and 09 will not work
# Solution is to remove the leading 0 from the parsed options
command -v bar::start > /dev/null && bar::start
for OP in "${OPTION[@]#0}"; do
# See appy_tilixschemes in apply-colors.sh for usage of LOOP
LOOP=$((${LOOP:-0}+1))
command -v bar::status_changed > /dev/null && bar::status_changed $LOOP ${#OPTION[@]}
if [[ OP -le ARRAYLENGTH && OP -gt 0 ]]; then
FILENAME=$(remove_file_extension "${THEMES[((OP-1))]}")
FILENAME_SPACE="${FILENAME//-/ }"
echo -e "\nTheme: $(capitalize "${FILENAME_SPACE}")"
echo "${color_dot_str}"
echo
SET_THEME="${THEMES[((OP-1))]}"
set_gogh "${SET_THEME}"
else
echo -e "$(tput setaf 1) ~ INVALID OPTION! ~$(tput sgr0)"
exit 1
fi
done
# If you skip || : and the command does not exist the script will exit with code 1
# this will always return exit code 0 if we got this far
command -v bar::stop > /dev/null && bar::stop || :

View File

@@ -1,4 +1,4 @@
#!/bin/bash
module add HDFView
HDFView $@
HDFView "$@"

View File

@@ -1,2 +1,3 @@
#!/bin/bash
caput SLAAR21-LTIM01-EVR0:FrontUnivOut3_SOURCE2 "HIGH"
caput SLAAR21-LPSYS-ESB:SHUT_TRANS "ON"

View File

@@ -1,2 +1,3 @@
#!/bin/bash
caput SLAAR21-LTIM01-EVR0:FrontUnivOut3_SOURCE2 "LOW"
caput SLAAR21-LPSYS-ESB:OPEN_TRANS "ON"

View File

@@ -8,5 +8,6 @@
-home=/sf/bernina/config/pshell_be \
-data=/sf/bernina/config/pshell_data \
-strh=/sf/bernina/config/pshell_be/stripchart \
-version=v1_10 \
$@

View File

@@ -1,15 +1,55 @@
#!/bin/bash
export SP_VER=5
for i in "$@"
do
case $i in
-spv=*|--version=*)
export SP_VER="${i#*=}"
#shift
;;
-spt)
export SP_VER=5
#shift
;;
*) # unknown option
;;
esac
done
echo "ScreenPanel" ${SP_VER}
/opt/gfa/pshell/pshell \
-jvmarg="-Duser.home=/sf/bernina/data" \
-jvmarg="-Duser.home=/sf/data/measurements" \
-dlaf \
-home=/sf/bernina/config/pshell_be \
-data=/sf/bernina/config/pshell_data \
-l -d -k -q -b -e -g -n -buf=10 -poll=250 -clog=SEVERE \
-p=SfCamera.java \
-p=Inventory.java \
-p=CameraCalibrationDialog.java \
-p=ScreenPanel3.java \
-srv_url=sf-daqsync-01:8889 -cam_srv_url=sf-daqsync-01:8888 $@
-home=/afs/psi.ch/intranet/SF/Applications/config/pshell_op \
-data=/sf/data/measurements -l -d -k -q -b -e -g -n -buf=10 -poll=250 -clog=SEVERE -p=SfCamera.java -p=Inventory.java -p=CameraCalibrationDialog.java -p=ScreenPanel${SP_VER}.java -srv_url=sf-daqsync-01:8889 -cam_srv_url=sf-daqsync-01:8888 \
$@
#/opt/gfa/pshell/pshell \
#-jvmarg="-Duser.home=/sf/data/measurements" \
#-dlaf \
#-home=/sf/bernina/config/pshell_be \
#-data=/sf/bernina/config/pshell_data -l -d -k -q -b -e -g -n -buf=10 -poll=250 -clog=SEVERE -p=SfCamera.java -p=Inventory.java -p=CameraCalibrationDialog.java -p=ScreenPanel${SP_VER}.java -srv_url=sf-daqsync-01:8889 -cam_srv_url=sf-daqsync-01:8888 \
#$@
# old 2019-09-23
#/opt/gfa/pshell/pshell \
#-jvmarg="-Duser.home=/sf/bernina/data" \
#-dlaf \
#-home=/sf/bernina/config/pshell_be \
#-data=/sf/bernina/config/pshell_data \
#-l -d -k -q -b -e -g -n -buf=10 -poll=250 -clog=SEVERE \
#-p=SfCamera.java \
#-persist \
#-p=Inventory.java \
#-p=CameraCalibrationDialog.java \
#-p=ScreenPanel4.java \
#-srv_url=sf-daqsync-01:8889 -cam_srv_url=sf-daqsync-01:8888 \
#-version=v1_10 \
#$@

34
set_gnome_keyboard_shortcut Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
import subprocess
import sys
# defining keys & strings to be used
key = "org.gnome.settings-daemon.plugins.media-keys custom-keybindings"
subkey1 = key.replace(" ", ".")[:-1]+":"
item_s = "/"+key.replace(" ", "/").replace(".", "/")+"/"
firstname = "custom"
# get the current list of custom shortcuts
get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
array_str = get("gsettings get "+key)
# in case the array was empty, remove the annotation hints
command_result = array_str.lstrip("@as")
current = eval(command_result)
# make sure the additional keybinding mention is no duplicate
n = 1
while True:
new = item_s+firstname+str(n)+"/"
if new in current:
n = n+1
else:
break
# add the new keybinding to the list
current.append(new)
# create the shortcut, set the name, command and shortcut key
cmd0 = 'gsettings set '+key+' "'+str(current)+'"'
cmd1 = 'gsettings set '+subkey1+new+" name '"+sys.argv[1]+"'"
cmd2 = 'gsettings set '+subkey1+new+" command '"+sys.argv[2]+"'"
cmd3 = 'gsettings set '+subkey1+new+" binding '"+sys.argv[3]+"'"
for cmd in [cmd0, cmd1, cmd2, cmd3]:
subprocess.call(["/bin/bash", "-c", cmd])

7
snapshot_bernina Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
source /opt/gfa/python 3.5
snapshot -b /sf/bernina/config/snapshot/req \
-d /sf/bernina/config/snapshot \
--config /sf/bernina/config/snapshot/cfg/config_bernina_snapshot \
$@

10
startup_bernina_terminal Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
set_gnome_keyboard_shortcut 'eco' 'gnome-terminal -- eco' '<Alt><Control>c'
set_gnome_keyboard_shortcut 'browser' 'firefox' '<Alt><Control>b'
set_gnome_keyboard_shortcut 'stop_laser' 'laseroff' '<F4>'
set_gnome_keyboard_shortcut 'open_laser' 'laseron' '<Super><F4>'
set_gnome_keyboard_shortcut 'stop_fel' 'feloff' '<F8>'
set_gnome_keyboard_shortcut 'open_fel' 'felon' '<Super><F8>'

View File

@@ -1,5 +1,6 @@
#!/bin/bash
#-strh=/sf/bernina/config/pshell_be/stripchart \
/opt/gfa/pshell/pshell \
-jvmarg="-Duser.home=/sf/bernina/config/pshell_be/stripchart" \
@@ -8,4 +9,6 @@
-l -b \
-dlaf \
-strp \
-strh=/sf/bernina/config/pshell_be/stripchart $@
-strh=/sf/bernina/config/strip_chart \
-version=v1_10 \
$@

2
vesta Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
/sf/bernina/config/usr/VESTA-x86_64/VESTA