Commit before push.
This commit is contained in:
parent
0891a8b7c8
commit
bcd1ad7963
|
|
@ -19,10 +19,10 @@ chmod +x ${DEST}/.xinitrc.d/setxkbmap.sh
|
|||
# Keyboard configuration adjustments
|
||||
config_file="/etc/default/keyboard"
|
||||
|
||||
typeset -A rules
|
||||
declare -A rules
|
||||
rules=(
|
||||
"XKBMODEL" "pc105"
|
||||
"XKBLAYOUT" "extd"
|
||||
"XKBLAYOUT" "gb"
|
||||
"XKBVARIANT" ""
|
||||
"XKBOPTIONS" "caps:swapescape"
|
||||
"BACKSPACE" "guess"
|
||||
|
|
|
|||
|
|
@ -3,77 +3,98 @@
|
|||
# https://thesynack.com/posts/persistent-capslock-behavior/
|
||||
DEST=${1:-/etc/skel}
|
||||
# xmodmap
|
||||
#cat > ~/.Xmodmap << 'EOF'
|
||||
#! Swap caps lock and escape
|
||||
#remove Lock = Caps_Lock
|
||||
#keysym Escape = Caps_Lock
|
||||
#keysym Caps_Lock = Escape
|
||||
#add Lock = Caps_Lock
|
||||
#EOF
|
||||
# cat <-'EOF' | tee ~/.Xmodmap
|
||||
# # ! Swap caps lock and escape
|
||||
# remove Lock = Caps_Lock
|
||||
# keysym Escape = Caps_Lock
|
||||
# keysym Caps_Lock = Escape
|
||||
# add Lock = Caps_Lock
|
||||
# EOF
|
||||
#
|
||||
#xmodmap ~/.Xmodmap
|
||||
|
||||
#cat <<EOF | sudo tee ${HOME}/.config/autostart/xmodmap.desktop >/dev/null
|
||||
#[Desktop Entry]
|
||||
#Name=Xmodmap
|
||||
#Exec=/usr/bin/xmodmap ${HOME}/.Xmodmap
|
||||
#Terminal=false
|
||||
#Type=Application
|
||||
#X-GNOME-Autostart-enabled=true
|
||||
#EOF
|
||||
# cat <<-EOF | sudo tee ${HOME}/.config/autostart/xmodmap.desktop >/dev/null
|
||||
# [Desktop Entry]
|
||||
# Name=Xmodmap
|
||||
# Exec=/usr/bin/xmodmap ${HOME}/.Xmodmap
|
||||
# Terminal=false
|
||||
# Type=Application
|
||||
# X-GNOME-Autostart-enabled=true
|
||||
# EOF
|
||||
#
|
||||
#chmod +x ~/.config/autostart/xmodmap.desktop
|
||||
|
||||
# Console tty
|
||||
#cat <<EOF | sudo loadkeys
|
||||
#keycode 1 = Caps_Lock
|
||||
#keycode 58 = Escape
|
||||
#EOF
|
||||
# cat <<-EOF | sudo tee loadkeys
|
||||
# keycode 1 = Caps_Lock
|
||||
# keycode 58 = Escape
|
||||
# EOF
|
||||
|
||||
#setxkbmap -model pc104 -layout gb,us -variant ,dvorak -option caps:swapecape
|
||||
mkdir -p ${DEST}/.xinitrc.d
|
||||
cat <<EOF | sudo tee ${DEST}/.xinitrc.d/setxkbmap.sh >/dev/null
|
||||
#!/usr/bin/env bash
|
||||
## current XKN settings
|
||||
# setxkbmap -v 9
|
||||
#
|
||||
# Setting verbose level to 9
|
||||
# locale is C
|
||||
# Trying to load rules file ./rules/evdev...
|
||||
# Trying to load rules file /usr/share/X11/xkb/rules/evdev...
|
||||
# Success.
|
||||
# Applied rules from evdev:
|
||||
# rules: evdev
|
||||
# model: pc104
|
||||
# layout: gb
|
||||
# options: caps:swapescape
|
||||
# Trying to build keymap using the following components:
|
||||
# keycodes: evdev+aliases(qwerty)
|
||||
# types: complete
|
||||
# compat: complete
|
||||
# symbols: pc+gb+inet(evdev)+capslock(swapescape)
|
||||
# geometry: pc(pc104)
|
||||
|
||||
setxkbmap -model pc104 -layout gb,us -option caps:swapecape
|
||||
EOF
|
||||
|
||||
chmod +x ${DEST}/.xinitrc.d/setxkbmap.sh
|
||||
# setxkbmap -model pc104 -layout gb,us -variant ,dvorak -option caps:swapecape
|
||||
# setxkbmap -v 9 -option "" -option "misc:extend,lv5:caps_switch_lock,compose:menu".
|
||||
# mkdir -p ${DEST}/.xinitrc.d
|
||||
#
|
||||
# cat <<-EOF | tee ${DEST}/.xinitrc.d/setxkbmap.sh >/dev/null
|
||||
# #!/usr/bin/env bash
|
||||
#
|
||||
# setxkbmap -model pc104 -layout gb,us -option "caps:swapescape"
|
||||
# EOF
|
||||
#
|
||||
# chmod +x ${DEST}/.xinitrc.d/setxkbmap.sh
|
||||
|
||||
# default keyboard layout is described in /etc/default/keyboard and it is shared between X and the console.
|
||||
|
||||
# FIXME:man keyboard says to use VARIABLE=VALUE not the space separated below.
|
||||
|
||||
# "lv3:lwin_switch,caps:swapescape,compose:caps"
|
||||
|
||||
config_file="/etc/default/keyboard"
|
||||
|
||||
typeset -A rules
|
||||
rules=(
|
||||
"XKBMODEL" "pc105"
|
||||
"XKBLAYOUT" "extd"
|
||||
"XKBMODEL" "pc104"
|
||||
"XKBLAYOUT" "gb"
|
||||
"XKBVARIANT" ""
|
||||
"XKBOPTIONS" "caps:swapescape"
|
||||
"BACKSPACE" "guess"
|
||||
"BACKSPACE" "guess"
|
||||
)
|
||||
|
||||
for rule in "${(@k)rules}"; do
|
||||
regex="s/^#\?\(${rule}\s*\).*$/\1 ${rules[${rule}]}/"
|
||||
# regex="s/^#\?\(${rule}\s*\).*$/\1=${rules[${rule}]}/"
|
||||
sudo sed -i "${regex}" ${config_file};
|
||||
regex="s|^#\?\(${rule}\s*\).*$|\1\=\"${rules[${rule}]}\"|"
|
||||
sudo sed -i "${regex}" ${config_file};
|
||||
done
|
||||
|
||||
|
||||
sudo udevadm trigger --subsystem-match=input --action=change
|
||||
|
||||
#cat <<EOF | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf > /dev/null
|
||||
#Section "InputClass"
|
||||
# Identifier "system-keyboard"
|
||||
# MatchIsKeyboard "on"
|
||||
# Option "XkbLayout" "gb,us"
|
||||
# Option "XkbModel" "pc104"
|
||||
# Option "XkbVariant" ""
|
||||
# Option "XkbOptions" "caps:swapescape"
|
||||
#EndSection
|
||||
#EOF
|
||||
# cat <<-EOF | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf > /dev/null
|
||||
# Section "InputClass"
|
||||
# Identifier "system-keyboard"
|
||||
# MatchIsKeyboard "on"
|
||||
# Option "XkbLayout" "gb,us"
|
||||
# Option "XkbModel" "pc104"
|
||||
# Option "XkbVariant" ""
|
||||
# Option "XkbOptions" "caps:swapescape"
|
||||
# EndSection
|
||||
# EOF
|
||||
|
||||
|
||||
#echo "enlightenment desktop settings-input-keyboard allowd swapping esc with caps."
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
wget \
|
||||
https://github.com/Apsu/Canary/releases/download/v1.0/canary \
|
||||
-O /usr/share/X11/xkb/symbols/canary
|
||||
|
||||
# setxkbmap canary
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Installs colmak keyboard layout and keyboard layers using alt-GR as a modifier
|
||||
|
||||
# See DREYMAR'S BigBag XKB topic on the Colemak Forums.
|
||||
# There are plenty of explanations and further links in there.
|
||||
# http://forum.colemak.com/viewtopic.php?id=1438
|
||||
|
||||
sudo apt install -y debconf-utils
|
||||
|
||||
# Checkinstall to produce a deb package
|
||||
cd /var/tmp || exit
|
||||
|
||||
GITHUB_USER=DreymaR
|
||||
PROJECT=BigBagKbdTrixXKB
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
# RELEASE=$(lastversion --format="tag" "${GITHUB_USER}/${PROJECT}") #$(lastversion --form "${PROJECT}")
|
||||
# LATEST_URL="https://api.github.com/repos/${GITHUB_USER}/${PROJECT}/releases/latest"
|
||||
# RELEASE=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | grep -Po '"tag_name": "v\K[^"]*')
|
||||
# GIT_TAG=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | jq -r .tag_name)
|
||||
# DOWNLOAD_DIR=/tmp
|
||||
RELEASE=git
|
||||
|
||||
RSS_FEED="https://github.com/${GIT_USER}/${PROJECT}/releases.atom"
|
||||
# xdg-open ${RSS_FEED}
|
||||
echo ${RSS_FEED}
|
||||
|
||||
# make a containing directory
|
||||
mkdir -p /var/tmp/${PROJECT}-"${RELEASE}"
|
||||
echo "git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-${RELEASE}"
|
||||
git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-"${RELEASE}"
|
||||
cd /var/tmp/${PROJECT}-"${RELEASE}" || exit
|
||||
|
||||
cat <<-EOF | tee ./description-pak
|
||||
DreymaR's Big Bag of Keyboard Tricks
|
||||
EOF
|
||||
|
||||
cat <<-EOF | tee ./checkinstall_it.sh
|
||||
|
||||
echo "ENTERING CHECKINSTALL"
|
||||
|
||||
BASE_URL='https://raw.githubusercontent.com/'
|
||||
BASE_USER=${GITHUB_USER}
|
||||
BASE_REPO=${PROJECT}
|
||||
LICENSE_URL="${BASE_URL}/${BASE_USER}/${BASE_REPO}"/master/LICENSE.md
|
||||
# wget -c ${LICENSE_URL}
|
||||
|
||||
VERSION=$(date +%Y-%m-%d_)git
|
||||
# VERSION=${RELEASE}
|
||||
RELEASE="1"
|
||||
LICENSE=MIT
|
||||
LOCAL_USER=${USER}
|
||||
|
||||
# make a new temporary directory for this use
|
||||
BASE_TMP_DIR=~/tmptmp/checkinstall_tmp
|
||||
mkdir -p \${BASE_TMP_DIR}
|
||||
|
||||
# do your work
|
||||
sudo checkinstall -y --fstrans \
|
||||
--exclude=/root/.sudo_as_admin_successful \
|
||||
--exclude=/home/\${LOCAL_USER}/.sudo_as_admin_successful \
|
||||
--pkgname=\${PROJECT} \
|
||||
--pkgversion=\${VERSION}\
|
||||
--pkgrelease="\${RELEASE}" \
|
||||
--pkgarch=${ARCH} \
|
||||
--pkggroup=development \
|
||||
--pkglicense=MIT \
|
||||
--pkgsource=${LATEST_URL} \
|
||||
--maintainer=cyteen@ring-zero.co.uk \
|
||||
--requires=vim,git \
|
||||
-D \
|
||||
sudo bash ./install.sh
|
||||
EOF
|
||||
|
||||
# HelpStr=
|
||||
# Usage: bash ${MyNAME} [optional args] [<kbd> [<loc> <sym>]]
|
||||
# Run this from the directory containing the x-mod dir
|
||||
# ===========================================================
|
||||
# [-#] Functionality - 'default'
|
||||
# ===========================================================
|
||||
# [-i] <Install path> - ${InstDir}
|
||||
# [-c] Change path to X11 - ${X11DIR}
|
||||
# [-o] Override install path w/ X11 - ${WriteSys}
|
||||
# [-b] Force backup | location - ${X11DIR}
|
||||
# [-n] Force no backup | default - ${DoBackup}
|
||||
# [-r] <#> Restore backup | 1 is oldest - ${Restore}
|
||||
# [-d] <mod dir path> - ${DModDir}
|
||||
# [-m] <X11 subdir(s) to mod> - ${SubDirs}
|
||||
# [-t] <mod dir prefix tag> - ${DModTag}
|
||||
# [-g] Install GTK 2.0/3.0 edit config? - ${InstGTK}
|
||||
# [-x] Run the setkb script afterwards? - ${SetXMap}
|
||||
# [-s] Install without using sudo? - ${NoSudo}
|
||||
# [--] [Setxkb ShortStr <kbd loc sym>] - ${SetXStr}
|
||||
|
||||
DMod='xkb-data_xmod'
|
||||
XVERSION=''
|
||||
ModDATE=''
|
||||
DModTag="${DMod}${XVERSION:+'_v'}${XVERSION}${ModDATE:+'_'}${ModDATE}"
|
||||
|
||||
X11DIR="/usr/share/X11"
|
||||
DBakFix='dbak-' # (--) Backup dir prefix
|
||||
DModFix='d' # (--) Modded dir prefix
|
||||
InstDir="${X11DIR}" # (-i) Path to install subfolder(s) in
|
||||
#~ InstDir="${HOME}/dreymar-xmod"
|
||||
WriteSys='no' # (-o) Overwrite the original xkb dir with the modded one
|
||||
Restore='0' # (-r) Reverse: Restore from backup # instead of installing
|
||||
DoBackup='ifnone' # (-n/b) Default backup behavior is "if no backups are found"
|
||||
SubDirs='all' # (-m) Directory/-ies inside X11 to modify (e.g., 'xkb locale', 'all')
|
||||
InstGTK='no' # (-g) Whether to install the GTK 2.0/3.0 config (if not present)
|
||||
NoSudo='no' # (-s) Do not use sudo. Helpful for local dir installation.
|
||||
SetXMap='no' # (-x) Whether to run the setkb script after installing
|
||||
SetXStr='5caws us us' # (--) Shortcut string for setkb - 'kbd loc sym' (model layout eD-variant)
|
||||
|
||||
cat <<-EOF | tee ./install.sh
|
||||
#!/bin/bash
|
||||
|
||||
bash install-dreymar-xmod.sh \
|
||||
-i ${InstDir} \
|
||||
-c ${X11DIR} \
|
||||
-o ${WriteSys} \
|
||||
-b ${X11DIR} \
|
||||
-n ${DoBackup} \
|
||||
-r ${Restore} \
|
||||
-d ${DModDir} \
|
||||
-m ${SubDirs} \
|
||||
-t ${DModTag} \
|
||||
-g ${InstGTK} \
|
||||
-x ${SetXMap} \
|
||||
-s ${NoSudo} \
|
||||
-- ${SetXStr}
|
||||
EOF
|
||||
|
||||
bash ./checkinstall_it.sh
|
||||
|
||||
# To just get Extend with the currently active layout, use:
|
||||
setxkbmap -v 9 -option "" -option "misc:extend,lv5:caps_switch_lock,compose:menu".
|
||||
|
||||
# change your logon keyboard layout, use the dpkg-reconfigure command:
|
||||
# sudo dpkg-reconfigure keyboard-configuration
|
||||
|
||||
# debconf-get-selections | grep keyboard-configuration
|
||||
|
||||
# selections before
|
||||
# debconf-get-selections | grep keyboard-configuration >selections_before.conf
|
||||
|
||||
# Make changes manually
|
||||
# dpkg-reconfigure keyboard-configuration
|
||||
# debconf-get-selections | grep keyboard-configuration >selections_after.conf
|
||||
|
||||
# Use the tailored selections to avoid interaction
|
||||
# sudo debconf-set-selections <selections_after.conf
|
||||
# sudo dpkg-reconfigure -f noninteractive keyboard-configuration
|
||||
|
||||
#==============================================================================
|
||||
# extra configurations not yet added to the install,sh
|
||||
|
||||
conf_print_hyperland*() {
|
||||
cat <<-EOF
|
||||
input {
|
||||
kb_layout=us
|
||||
kb_variant=cmk_ed_us
|
||||
kb_model=pc105awide
|
||||
kb_options=misc:extend,lv5:caps_switch_lock,misc:cmk_curl_dh,compose:menu
|
||||
kb_rules=evdev
|
||||
repeat_rate=40
|
||||
repeat_delay=200
|
||||
}
|
||||
EOF
|
||||
}
|
||||
# conf_print_hyperland | tee -a ~/.config/hypr/hyprland
|
||||
|
||||
# input {
|
||||
# kb_layout = gb
|
||||
# kb_variant =
|
||||
# kb_model = pc105
|
||||
# kb_options = caps:swapescape
|
||||
# kb_rules =
|
||||
#
|
||||
# follow_mouse = 1
|
||||
#
|
||||
# touchpad {
|
||||
# natural_scroll = no
|
||||
# }
|
||||
#
|
||||
# sensitivity = 0 # -1.0 to 1.0, 0 means no modification.
|
||||
# }
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install git-buildpackage devscripts python3-debian
|
||||
|
||||
# mk-build-deps
|
||||
|
||||
# /etc/devscripts.conf
|
||||
# DEBCOMMIT_SIGN_COMMITS=yes
|
||||
# DEBSIGN_PROGRAM=gpg
|
||||
# DEBSIGN_MAINT="Bhaskar Chowdhury"
|
||||
# DEBSIGN_KEYID=9F017E9D66B07216543CEBB0B23A9DB7114B2915
|
||||
# DGET_VERIFY=yes
|
||||
|
||||
kernel_version=6.6.28
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
PACKAGE=linux-signed-${ARCH}-git
|
||||
BUILD_HOME="/var/tmp/debian-kernel_gbp"
|
||||
PATCH_DIR=${BUILD_HOME}/patches
|
||||
BUILD_DEST="${BUILD_HOME}/${PACKAGE}"
|
||||
DEBIAN_BRANCH=debian/6.7.12-1
|
||||
UPSTREAM_BRANCH=upstream/latest
|
||||
# REMOTE_REPO=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
||||
REMOTE_REPO=https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
|
||||
REPO=/space/code_repositories/decode-os/os-build-system/arm-sdk/tmp/kernels/rockpro64/rockpro64-linux_v6.6.10/
|
||||
|
||||
# fetch libreELEC patches
|
||||
mkdir -p ${PATCH_DIR}
|
||||
# wget \
|
||||
# --show-progress \
|
||||
# --directory-prefix=${PATCHES_DIR} \
|
||||
# https://github.com/LibreELEC/LibreELEC.tv/raw/master/projects/Rockchip/patches/linux/default/*.patch
|
||||
cp -a /space/code_repositories/test-kernel-patches/projects/LibreELEC.tv/projects/Rockchip/patches/linux/default/*.patch \
|
||||
${PATCH_DIR}
|
||||
|
||||
# Pull the upstream sources
|
||||
mkdir -p ${BUILD_DEST}
|
||||
gbp clone \
|
||||
--pristine-tar \
|
||||
--debian-branch=${DEBIAN_BRANCH} \
|
||||
--upstream-branch=${UPSTREAM_BRANCH} \
|
||||
--add-upstream-vcs \
|
||||
--verbose \
|
||||
https://salsa.debian.org/kernel-team/linux.git ${BUILD_DEST}
|
||||
|
||||
pushd ${BUILD_DEST}
|
||||
git checkout ${DEBIAN_BRANCH}
|
||||
|
||||
# This will produce ../orig/linux_<version>.orig.tar.xz need by the following make target
|
||||
./debian/bin/genorig.py ${REMOTE_REPO}
|
||||
|
||||
# This will apply the main quilt series to the upstream source
|
||||
cd make -f debian/rules orig
|
||||
|
||||
# Patch the sources
|
||||
gbp pq --time-machine=10 --force import
|
||||
gbp pq import ${PATCH_DIR}/*.patch
|
||||
gbp pq apply
|
||||
|
||||
# Export the Patches and Commit the Changes:
|
||||
gbp pq export --commit -v debian/patches/features/arm64
|
||||
|
||||
# Post patch / rebase commit.
|
||||
git add debian/patches
|
||||
git commit -m "Applied Rockchip patches."
|
||||
|
||||
popd
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# nvims Safely experiment with multiple Neovim configurations.
|
||||
|
||||
# Checkinstall to produce a deb package
|
||||
cd /var/tmp || exit
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
GITHUB_USER=traap
|
||||
PROJECT=nvims
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
# RELEASE=$(lastversion --format="tag" "${GITHUB_USER}/${PROJECT}") #$(lastversion --form "${PROJECT}")
|
||||
LATEST_URL="https://api.github.com/repos/${GITHUB_USER}/${PROJECT}/releases/latest"
|
||||
# RELEASE=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | grep -Po '"tag_name": "v\K[^"]*')
|
||||
# GIT_TAG=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | jq -r .tag_name)
|
||||
# DOWNLOAD_DIR=/tmp
|
||||
RELEASE=git
|
||||
|
||||
RSS_FEED="https://github.com/${GIT_USER}/${PROJECT}/releases.atom"
|
||||
# xdg-open ${RSS_FEED}
|
||||
echo ${RSS_FEED}
|
||||
|
||||
# make a containing directory
|
||||
mkdir -p /var/tmp/${PROJECT}-"${RELEASE}"
|
||||
echo "git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-${RELEASE}"
|
||||
git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-"${RELEASE}"
|
||||
cd /var/tmp/${PROJECT}-"${RELEASE}" || exit
|
||||
|
||||
cat <<-EOF | tee ./description-pak
|
||||
Safely experiment with multiple Neovim configurations.
|
||||
EOF
|
||||
|
||||
cat <<-EOF | tee ./checkinstall_it.sh
|
||||
|
||||
echo "ENTERING CHECKINSTALL"
|
||||
|
||||
BASE_URL='https://raw.githubusercontent.com/'
|
||||
BASE_USER=${GITHUB_USER}
|
||||
BASE_REPO=${PROJECT}
|
||||
LICENSE_URL="\${BASE_URL}/\${BASE_USER}/\${BASE_REPO}"/master/LICENSE
|
||||
# wget -c \${LICENSE_URL}
|
||||
|
||||
VERSION=\$(date +%Y-%m-%d_)git
|
||||
# VERSION=${RELEASE}
|
||||
RELEASE="1"
|
||||
LICENSE=bsd
|
||||
|
||||
# make a new temporary directory for this use
|
||||
BASE_TMP_DIR=~/tmptmp/checkinstall_tmp
|
||||
mkdir -p \${BASE_TMP_DIR}
|
||||
|
||||
# do your work
|
||||
sudo checkinstall -y --fstrans \
|
||||
--exclude=/home/${USER}/.sudo_as_admin_successful \
|
||||
--pkgname=neovim-\${BASE_REPO} \
|
||||
--pkgversion=\${VERSION}\
|
||||
--pkgrelease="\${RELEASE}" \
|
||||
--pkgarch=\${ARCH} \
|
||||
--pkggroup=development \
|
||||
--pkglicense=\$LICENSE \
|
||||
--pkgsource=${LATEST_URL} \
|
||||
--maintainer=cyteen@ring-zero.co.uk \
|
||||
--requires=fzf,git \
|
||||
-D \
|
||||
bash ./install_it.sh
|
||||
EOF
|
||||
|
||||
cat <<-EOF | tee ./install_it.sh
|
||||
# Copy files to their production locations.
|
||||
sudo cp -v nvims /usr/local/bin/.
|
||||
sudo chmod -v +x /usr/local/bin/nvims
|
||||
EOF
|
||||
|
||||
# Create config directory and copy files there.
|
||||
sudo -u ${USER} bash -c "mkdir -p "${DEST}"/.config/nvims"
|
||||
sudo -u ${USER} bash -c "cp -v neovim_distros "${DEST}"/.config/nvims/."
|
||||
|
||||
# Each install of an nvim has an alias appended to nvim-appname so we
|
||||
# sources it in our environment.
|
||||
cat <<-EOF | tee ${HOME}/.zshrc.d/008_nvims_appnames.zsh
|
||||
if [[ -f "${HOME}/.config/nvims/nvim_appnames" ]]; then
|
||||
source "${HOME}/.config/nvims/nvim_appnames"
|
||||
fi
|
||||
EOF
|
||||
|
||||
bash ./checkinstall_it.sh
|
||||
35
020_zsh.sh
35
020_zsh.sh
|
|
@ -22,7 +22,7 @@ set -x
|
|||
# There are insecure directories: /usr/local/share/zsh/site-functions
|
||||
# compaudit | xargs chmod g-w
|
||||
# compaudit 2>&1 | sed -n '1d; p'
|
||||
|
||||
|
||||
mkdir -p /usr/local/share/zsh/site-functions
|
||||
chmod g-w /usr/local/share/zsh/site-functions
|
||||
|
||||
|
|
@ -42,15 +42,14 @@ git clone http://github.com/ohmyzsh/ohmyzsh ${DEST}/.zgen/robbyrussell/ohmyzsh
|
|||
#ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup ${DEST}/.zgen-setup
|
||||
#ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zsh_completions ${DEST}/.zsh-completions
|
||||
mkdir -p ${DEST}/.zshrc.d
|
||||
echo "setopt PROMPT_SUBST" >> ${DEST}/.zshrc
|
||||
echo "setopt PROMPT_SUBST" >>${DEST}/.zshrc
|
||||
|
||||
|
||||
echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> ${DEST}/.zshrc.d/008_nvim.zsh
|
||||
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> ${DEST}/.zshrc.d/008_nvim.zsh
|
||||
echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >${DEST}/.zshrc.d/008_nvim.zsh
|
||||
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >>${DEST}/.zshrc.d/008_nvim.zsh
|
||||
touch /var/tmp/nvim_python.log
|
||||
|
||||
# Fix for using urls on the commandline
|
||||
cat >> ${DEST}/.zshrc.d/005_url-quote-magic.zsh <<EOF
|
||||
cat >>${DEST}/.zshrc.d/005_url-quote-magic.zsh <<EOF
|
||||
autoload -U url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
|
||||
|
|
@ -68,17 +67,17 @@ EOF
|
|||
|
||||
# debians locate db locate
|
||||
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ${DEST}/.zshrc
|
||||
echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" > ${DEST}/.zshrc.d/005-locatedb.zsh
|
||||
echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" >${DEST}/.zshrc.d/005-locatedb.zsh
|
||||
|
||||
# add plugins to the load-starter-plugin-list() function in ${DEST}/.zgen-setup ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup
|
||||
# FIXED: create a file named .zgen-local-plugins and add your zgen load commands there.
|
||||
# FIXED: create a file named .zgen-local-plugins and add your zgen load commands there.
|
||||
# Don't forget to run `zgen save` at the end of your .zgen-local-plugins file.
|
||||
# Warning: .zgen-local-plugins REPLACES the starter list setup, it doesn't add to it.
|
||||
#sed -i -e "s|zgen load srijanshetty/docker-zsh|# zgen load srijanshetty/docker-zsh|" ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup
|
||||
#sed -i '/\# zgen load srijanshetty\/docker-zsh/a\ \ zgen load oh-my-zsh plugins\/docker\n\ \ zgen load oh-my-zsh plugins\/docker-compose' ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup
|
||||
|
||||
# The contents of the starter plugin function with changes above, pulling from upstream git with now not squash local changes.
|
||||
cat > ${DEST}/.zgen-local-plugins << 'EOF'
|
||||
cat >${DEST}/.zgen-local-plugins <<'EOF'
|
||||
echo "creating a zgen save"
|
||||
ZGEN_LOADED=()
|
||||
ZGEN_COMPLETIONS=()
|
||||
|
|
@ -216,26 +215,25 @@ EOF
|
|||
# example .d file use unset to prevent update
|
||||
#echo '# Use unset 'QUICKSTART_KIT_REFRESH_IN_DAYS' to disable.' > ${DEST}/.zshrc.d/001-quickstart_refresh.zsh
|
||||
#echo 'QUICKSTART_KIT_REFRESH_IN_DAYS=30' >> ${DEST}/.zshrc.d/001-quickstart_refresh.zsh
|
||||
echo 'ZGEN_PLUGIN_UPDATE_DAYS=30' > ${DEST}/.zshrc.d/001_zgen-refresh.zsh
|
||||
echo 'ZGEN_PLUGIN_UPDATE_DAYS=30' >${DEST}/.zshrc.d/001_zgen-refresh.zsh
|
||||
|
||||
apt install -y fonts-powerline powerline
|
||||
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ${DEST}/.zshrc
|
||||
|
||||
# Use powerline-daemon to speedup the prompt.
|
||||
echo 'powerline-daemon -q' > ${DEST}/.zshrc.d/006_powerline-daemon.zsh
|
||||
|
||||
echo 'powerline-daemon -q' >${DEST}/.zshrc.d/006_powerline-daemon.zsh
|
||||
|
||||
sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup
|
||||
|
||||
# set theme for zsh
|
||||
cat > ${DEST}/.zshrc.d/002_theme.zsh << 'EOF'
|
||||
cat >${DEST}/.zshrc.d/002_theme.zsh <<'EOF'
|
||||
# https://zshthem.es/browse-zsh-themes/
|
||||
ZSH_THEME="agnoster" # powerline based theme
|
||||
#ZSH_THEME="3den"
|
||||
#ZSH_THEME="Pure"
|
||||
EOF
|
||||
|
||||
cat > ${DEST}/.zshrc.d/001_vi-mode.sh << 'EOF'
|
||||
cat >${DEST}/.zshrc.d/001_vi-mode.sh <<'EOF'
|
||||
# Set vi mode
|
||||
bindkey -v
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
|
|
@ -256,16 +254,13 @@ EOF
|
|||
# fi
|
||||
# done
|
||||
#fi
|
||||
#EOF
|
||||
#EOF
|
||||
|
||||
# alias python version
|
||||
|
||||
# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value.
|
||||
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ${DEST}/${ALIAS_DIR}/002_sudo.zsh
|
||||
echo 'alias sudo="sudo "' >> ${DEST}/${ALIAS_DIR}/002_sudo.zsh
|
||||
|
||||
|
||||
|
||||
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." >${DEST}/${ALIAS_DIR}/002_sudo.zsh
|
||||
echo 'alias sudo="sudo "' >>${DEST}/${ALIAS_DIR}/002_sudo.zsh
|
||||
|
||||
chown -R root.root /usr/local/share/zsh/site-functions
|
||||
chmod -R 755 /usr/local/share/zsh/site-functions
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# LazyShell is a GPT powered utility for Zsh that helps you write and modify
|
||||
# console commands using natural language.
|
||||
|
||||
sudo apt-et install -y jq curl
|
||||
|
||||
# Zsh plugins live in the `$ZSH_CUSTOM` directory if you use ohmyzsh and ~/.zsh/plugins otherwise
|
||||
|
||||
# Zsh plugins live in the `$ZSH_CUSTOM` directory if you use ohmyzsh and
|
||||
# ~/.zsh/plugins otherwise
|
||||
|
||||
DEST=${1:-$HOME}
|
||||
PLUGINS_DIR=${DEST}/.zsh/plugins
|
||||
|
|
@ -12,7 +17,7 @@ mkdir -p "${PLUGINS_DIR}"
|
|||
# the plugin checks for the OPENAI_API_KEY environment variable so we need to put
|
||||
# your your_api_keys in .zshrc.pre-plugins.d
|
||||
cat <<-EOF | sudo tee "$DEST/.zshrc.d/008_lazyshell.zsh"
|
||||
[ -f ${PLUGINS_DIR}/lazyshell/lazyshell.zsh ] && source ${PLUGINS_DIR}/lazyshell/lazyshell.zsh
|
||||
[ -f ${PLUGINS_DIR}/lazyshell/lazyshell.zsh ] && source ${PLUGINS_DIR}/lazyshell/lazyshell.zsh
|
||||
EOF
|
||||
|
||||
git clone --depth 1 https://github.com/not-poma/lazyshell.git "${PLUGINS_DIR}"/lazyshell
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
|
||||
USER=VikParuchuri
|
||||
PROJECT=marker
|
||||
|
||||
git_url="https://github.com/${USER}/${PROJECT}"
|
||||
|
||||
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name')
|
||||
|
||||
RSS_FEED="https://github.com/${USER}/${PROJECT}/releases.atom"
|
||||
# xdg-open ${RSS_FEED}
|
||||
|
||||
# the dependencies for the python package
|
||||
# sudo apt-get install python3-tifffile python3-sklearn
|
||||
# sudo apt-get -f install
|
||||
|
||||
# the dependencies for py2dsp
|
||||
apt install -y pristine-tar pypi2deb python3-gnupg
|
||||
|
||||
# if the build fails with 'unrecognized build system: pybuild' add
|
||||
# export PYBUILD_SYSTEM=distutils
|
||||
# to the debian/rules file.
|
||||
|
||||
BUILD_HOME="/var/tmp/build_${PROJECT}-${VERSION#v}"
|
||||
|
||||
mkdir -p "${BUILD_HOME}"
|
||||
pushd "${BUILD_HOME}" || exit
|
||||
echo "Running: py2dsp"
|
||||
py2dsp --profile dpt --distribution unstable --revision 1 --github "${git_url}"
|
||||
# strace -o /tmp/strace_output.txt py2dsp --profile dpt --distribution unstable --revision 1 --github "${git_url}"
|
||||
|
||||
pushd "${BUILD_HOME}/result/${PROJECT}-${VERSION#v}"
|
||||
|
||||
cat <<EOF | sudo tee "debian/rules" || exit
|
||||
#!/usr/bin/make -f
|
||||
|
||||
#export DH_VERBOSE=1
|
||||
export PYBUILD_NAME=${PROJECT}
|
||||
export PIPX_BIN_DIR=/usr/bin
|
||||
export PIPX_HOME=/usr/share/pipx
|
||||
|
||||
%:
|
||||
dh \$@ --with python3 --buildsystem=pybuild
|
||||
|
||||
override_dh_installdocs:
|
||||
EOF
|
||||
# dpkg-buildpackage -rfakeroot -uc -b
|
||||
# DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -rfakeroot -Tclean
|
||||
echo "Running: dpkg-buildpackage"
|
||||
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -rfakeroot -us -uc -b
|
||||
|
||||
popd || return
|
||||
|
||||
# dpkg -i result/*.deb
|
||||
dpkg -i "${BUILD_HOME}/result/python3-${PROJECT}_${VERSION#v}-1_all.deb"
|
||||
|
||||
apt-get -f install
|
||||
|
||||
echo ""
|
||||
echo "RSS feed: ${RSS_FEED}"
|
||||
|
|
@ -25,4 +25,5 @@ echo "See: automate/020_gitea_dpr.sh for sources.list creation."
|
|||
echo "deb [arch=\${ARCH} signed-by=\${KEYRING}] https://${USERNAME}:${PASSWORD}@https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian ${DISTRIBUTION} ${COMPONENT}"
|
||||
|
||||
# Show available packages
|
||||
curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}'
|
||||
curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ |
|
||||
jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
COMMAND=${1:-"cc1"}
|
||||
LEVEL=${2:-"10"}
|
||||
IO_LEVEL=${3:-"3"}
|
||||
# for pid in $(pgrep "${COMMAND}"); do
|
||||
# renice 10 -p "${pid}";
|
||||
# done
|
||||
|
||||
pgrep "${COMMAND}" | xargs -I {} renice "${LEVEL}" -p "{}"
|
||||
pgrep "${COMMAND}" | xargs -I {} ionice -c "${IO_LEVEL}" -p "{}"
|
||||
Loading…
Reference in New Issue