Commit before push.

This commit is contained in:
cyteen 2024-05-03 15:18:52 +01:00
parent 1b2b029408
commit d6572ef08f
21 changed files with 4341 additions and 377 deletions

View File

@ -12,7 +12,7 @@ DEST=${1:-/etc/skel}
#rm -r $HOME/.config/pulse
#rm -rf /tmp/pulse*
apt install -y alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui alsa-firmware-loaders volumeicon-alsa libalsaplayer0 bluez-alsa-utils bluez-firmware
apt install -y alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui alsa-firmware-loaders volumeicon-alsa libalsaplayer0 bluez-alsa-utils bluez-firmware
apt install -y pnmixer blueman
/etc/init.d/alsa-utils restart
@ -21,7 +21,7 @@ apt install -y pnmixer blueman
#sed -i 's,^\(VolumeControlCommand=\).*,\1'xfce4-mixer',' $HOME/.config/pnmixer/config
#pnmixer &
cat > /etc/udev/rules.d/00_alsa-usb.rules << 'EOF'
cat >/etc/udev/rules.d/00_alsa-usb.rules <<'EOF'
# Default to using additional (USB) sound cards when they are available.
KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'"
KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'"
@ -29,7 +29,7 @@ EOF
# see also: https://panther.kapsi.fi/posts/2018-11-17_linux_bluetooth_audio
cat > /etc/init.d/bluealsa <<EOF
cat >/etc/init.d/bluealsa <<'EOF'
#!/bin/sh
### BEGIN INIT INFO
# Provides: bluez-alsa
@ -100,7 +100,7 @@ EOF
DEVICE="XX:XX:XX:XX:XX:XX"
cat > ${HOME}/.asoundrc <<EOF
cat >${HOME}/.asoundrc <<EOF
#
#pcm.SoundCoreMini {
# type bluealsa

3005
020_beets.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,52 +2,70 @@
BIN_DIR=/usr/local/bin
#BIN_DIR=~/bin
apt install -y meld
sudo apt install -y meld
GUI_DIFF_TOOL=meld # graphical diff/merge tool
GUI_MERGE_TOOL=meld
git config --global diff.guitool ${GUI_DIFF_TOOL}
git config --global merge.guitool ${GUI_MERGE_TOOL}
git config --global mergetool.meld.hasOutput true
# Available tools:
git difftool --tool-help
DIFF_TOOL=meld # graphical diff/merge tool
MERGE_TOOL=meld
TOOL_PATH=nvim
DIFF_TOOL=nvimdiff # terminal diff/merge tool
MERGE_TOOL=nvimdiff
DIFF_STYLE="LOCAL,MERGED,REMOTE"
# DIFF_TOOL=vimdiff3 # terminal diff/merge tool
# MERGE_TOOL=vimdiff3
mergetool.nvimdiff.layout 2
# $LOCAL is the file in the current branch (e.g. master).
# $REMOTE is the file in the branch being merged (e.g. branch_name).
# $MERGED is the partially merged file with the merge conflict information in it.
# $BASE is the shared commit ancestor of $LOCAL and $REMOTE, this is to say the file as it was when the branch containing $REMOTE was originally created.
# if unset the diff tool follows the mergetool settings.
# default path is vim.
#
# 2019
# git config --global diff.tool vimdiff3
# git config --global difftool.vimdiff3.path nvim
# git config --global merge.tool vimdiff3
# git config --global mergetool.vimdiff3.path
git config diff.tool ${DIFF_TOOL}
git config --global diff.tool ${DIFF_TOOL}
git config difftool.prompt false
git config --global difftool.prompt false
git config --global difftool.${DIFF_TOOL}.path "${TOOL_PATH}"
git config merge.tool ${MERGE_TOOL}
git config --global merge.tool ${MERGE_TOOL}
git config --global merge.conflictstyle diff3
git config merge.layout ${DIFF_STYLE}
git config --global mergetool.${MERGE_TOOL}.layout "${DIFF_STYLE}"
git config --global mergetool.${MERGE_TOOL}.path ${TOOL_PATH}
#git config --global mergetool.${MERGE_TOOL}.cmd ${MERGE_TOOL} '$LOCAL $BASE $MERGED'
git config --global diff.tool ${DIFF_TOOL}
git config --global difftool.prompt false
git config alias.d difftool
git config --global alias.d difftool
#git config --global difftool.${DIFF_TOOL}.cmd ${DIFF_TOOL} '$LOCAL $REMOTE'
git config merge.tool ${MERGE_TOOL}
git config merge.conflictstyle diff3
#git config mergetool.${MERGE_TOOL}.cmd ${MERGE_TOOL} '$LOCAL $BASE $MERGED'
git config diff.tool ${DIFF_TOOL}
git config difftool.prompt false
git config alias.d difftool
#git config --global difftool.${DIFF_TOOL}.cmd ${DIFF_TOOL} '$LOCAL $REMOTE'
echo "Global: Active mergetool: $(git config --global merge.tool)"
echo "Global: Merge style: $(git config --global merge.conflictstyle)"
echo "Global: Active difftool: $(git config --global diff.tool)"
echo "Global: Prompt for difftool: $(git config --global difftool.prompt)"
echo "Global: Prompt for difftool: $(git config --global difftool.prompt)"
echo "Active mergetool: $(git config merge.tool)"
echo "Merge style: $(git config merge.conflictstyle)"
echo "Active difftool: $(git config diff.tool)"
echo "Prompt for difftool: $(git config difftool.prompt)"
echo "Prompt for difftool: $(git config difftool.prompt)"
# to use an unsupported tool see below.
#git config --global diff.external ${BIN_DIR}/git-diff-vimdiff.sh
@ -62,7 +80,7 @@ echo "Prompt for difftool: $(git config difftool.prompt)"
#meld $2 $5
#EOF
#
#chmod +x ${BIN_DIR}/git-diff-meld.sh
#chmod +x ${BIN_DIR}/git-diff-meld.sh
#
#cat > ${BIN_DIR}/git-diff-vimdiff.sh <<'EOF'
##!/bin/bash

View File

@ -2,6 +2,7 @@
# Add a sources.list that points to the gitea instance.
# https://docs.gitea.com/usage/packages/debian
sudo apt-get install -y tea-cli
GITEA_URL="git2.ring-zero.co.uk"
OWNER="cyteen"

93
020_hyprland-hyprdots.sh Normal file
View File

@ -0,0 +1,93 @@
#!/usr/bin/env bash
set -x
set -eo pipefail
# the goal is to provide a tokyo-night themes hyprland
sudo apt install git liblz4-1 scdoc
# git clone https://github.com/Senshi111/debian-hyprland-hyprdots.git
# cd ~/debian-hyprland-hyprdots/build-hyprland-and-apps
# ./install_dependencies.sh
# ./install_hyprland.sh
# apt-get install hyprland
# ./install_rust.sh
# apt install rust-all cargo
#==============================================================================
# Efficient animated wallpaper daemon for wayland, controlled at runtime
# ./install_swww.sh
# requires rustc 1.74
git clone https://github.com/Horus645/swww.git
cargo build --release
# Then, put both binaries
cp target/release/swww /usr/bin
cp target/release/swww-daemon /usr/bin
# Optionally, autocompletion scripts for bash, zsh, fish and elvish are offered
# in the completions directory.
# Copy bash completions
sudo mkdir -p /usr/share/bash-completion/completions
sudo cp completions/swww.bash /usr/share/bash-completion/completions/swww
# Copy fish completions
#sudo mkdir -p /usr/share/fish/vendor_completions.d/
#sudo cp completions/swww.fish /usr/share/fish/vendor_completions.d/swww.fish
# Copy zsh completions
sudo mkdir -p /usr/share/zsh/site-functions
sudo cp completions/_swww /usr/share/zsh/site-functions/_swww
# Man pages:
# In order to generate the man pages, you must have scdoc installed. Run
./doc/gen.sh
#==============================================================================
# An XDG Desktop Portal backend for Hyprland.
# gbm - libgbm1: Installed: 23.3.5-1
# hyprland-protocols - local hyprland-protocols: Installed: 0.2
# hyprlang - local libhyprlang2: Installed: 0.5.1-0devuan1
# libdrm - libdrm2: Installed: 2.4.120-2
# libpipewire-0.3 - libpipewire-0.3-0: Installed: 1.0.3-1
# libspa-0.2 - libspa-0.2-dev: Installed: 1.0.3-1
# sdbus-cpp - libsdbus-c++-bin: Installed: (none) Candidate: 1.4.0-2
# wayland-client - libwayland-client0: Installed: 1.22.0-2.1+b1
# wayland-protocols - local wayland-protocols: Installed: 1.36-0devuan1
# ./install_xdg_portal.sh
git clone --recursive https://github.com/hyprwm/xdg-desktop-portal-hyprland
cd xdg-desktop-portal-hyprland/
cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build
cmake --build build
sudo cmake --install build
#==============================================================================
# A Wayland native snapshot editing tool, inspired by Snappy on macOS
# ./install_swappy.sh
#==============================================================================
# Command-line copy/paste utilities for Wayland
# ./install_wl_clipboard.sh
#==============================================================================
# wayland clipboard manager with support for multimedia
# ./install_cliphist.sh
#==============================================================================
# ./install_go.sh # If needed
#==============================================================================
# Swaylock, with fancy effects
# ./install_swaylock-effects.sh
#==============================================================================
# GTK3 settings editor adapted to work in the wlroots environment
# ./install_nwg-look.sh
#==============================================================================
# CLI utility to print out images of pokemon to terminal
# ./install_pokemon-colorscripts.sh
#==============================================================================
# supporting apps - personal choice.
# ./install_apps.sh
#==============================================================================
git clone --depth 1 https://github.com/Senshi111/hyprland-hyprdots-files.git
# ./install_themes.sh
./cleanup.sh

View File

@ -64,126 +64,132 @@ set -x
## └── watch
conf_print_debian_control() {
cat <<-'EOF'
Source: hyprland
Section: x11
Homepage: https://hyprland.org/
Priority: optional
Standards-Version: 4.6.2
Vcs-Git: https://salsa.debian.org/debian/hyperland.git
Vcs-Browser: https://salsa.debian.org/debian/hyperland
Maintainer: Mo Zhou <lumin@debian.org>
Build-Depends: debhelper-compat (= 13),
cmake,
meson,
ninja-build,
cmake-extras,
cmake,
gettext,
gettext-base,
git,
fontconfig,
libfontconfig-dev,
libffi-dev,
libxml2-dev,
libdrm-dev,
libxkbcommon-x11-dev,
libxkbregistry-dev,
libxkbcommon-dev,
libpixman-1-dev,
libudev-dev,
libseat-dev,
seatd,
libxcb-dri3-dev,
libvulkan-dev,
libvulkan-volk-dev,
libvkfft-dev,
libgulkan-dev,
libegl-dev,
libgles2,
libegl1-mesa-dev,
glslang-tools,
libinput-bin,
libinput-dev,
libxcb-composite0-dev,
libavutil-dev,
libavcodec-dev,
libavformat-dev,
libxcb-ewmh2,
libxcb-ewmh-dev,
libxcb-present-dev,
libxcb-icccm4-dev,
libxcb-render-util0-dev,
libxcb-res0-dev,
libxcb-xinput-dev,
xdg-desktop-portal-wlr,
hwdata,
hyprwayland-scanner,
xwayland,
libwayland-dev,
libpango1.0-dev,
wayland-protocols,
libtomlplusplus-dev,
libhyprlang-dev,
systemd-dev | libelogind-dev,
libgbm-dev,
libliftoff-dev,
libdisplay-info-dev,
cpio,
cat <<'EOF'
Source: hyprland
Section: x11
Homepage: https://hyprland.org/
Priority: optional
Standards-Version: 4.6.2
Vcs-Git: https://salsa.debian.org/debian/hyperland.git
Vcs-Browser: https://salsa.debian.org/debian/hyperland
Maintainer: Mo Zhou <lumin@debian.org>
Build-Depends:
debhelper-compat (= 13),
cmake,
cmake-extras,
meson,
ninja-build,
gettext,
gettext-base,
git,
fontconfig,
libfontconfig-dev,
libffi-dev,
libxml2-dev,
libdrm2,
libdrm-dev,
libxkbcommon-x11-dev,
libxkbregistry-dev,
libxkbcommon-dev,
libpixman-1-dev,
libudev-dev,
libseat-dev,
seatd,
libxcb-dri3-dev,
libvulkan-dev,
libvulkan-volk-dev,
libvkfft-dev,
libgulkan-dev,
libegl-dev,
libgles2,
libegl1-mesa-dev,
glslang-tools,
libinput-bin,
libinput-dev,
libavutil-dev,
libavcodec-dev,
libavformat-dev,
libxcb1,
libxcb-composite0-dev,
libxcb-ewmh2,
libxcb-ewmh-dev,
libxcb-present-dev,
libxcb-icccm4-dev,
libxcb-render-util0,
libxcb-render-util0-dev,
libxcb-res0-dev,
libxcb-xinput-dev,
xdg-desktop-portal-wlr,
hwdata,
hyprwayland-scanner >=0.3.1,
hyprcursor >=0.1.7,
xwayland,
libwayland-server0,
libwayland-dev,
libpango1.0-dev,
wayland-protocols,
libtomlplusplus-dev,
libhyprlang2 >=0.3.2,
libhyprlang-dev,
systemd-dev | libelogind-dev,
libgbm-dev,
libliftoff-dev,
libdisplay-info-dev,
cpio,
Package: hyprland
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland-common
Suggests: kitty | foot, dolphin, waybar
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains the executables.
Package: hyprland
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland-common
Suggests: kitty | foot, dolphin, waybar
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains the executables.
Package: hyprland-dev
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland (= ${binary:Version})
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains the development files.
Package: hyprland-dev
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland (= ${binary:Version})
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains the development files.
Package: hyprland-common
Architecture: all
Depends: ${misc:Depends}
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains architecture independent files such as wallpapers.
Package: hyprland-common
Architecture: all
Depends: ${misc:Depends}
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains architecture independent files such as wallpapers.
Package: hyprland-completions
Architecture: all
Depends: ${misc:Depends}
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains the completions for bash, zsh and fish
EOF
Package: hyprland-completions
Architecture: all
Depends: ${misc:Depends}
Description: Tiling compositor with the looks
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't
sacrifice on its looks.
.
It provides the latest Wayland features, is highly customizable, has all the
eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other
wlr-based compositors and more.
.
This package contains the completions for bash, zsh and fish
EOF
}
# conf_print_debian_control | sudo tee debian/control
@ -570,7 +576,7 @@ conf_print_hyprland_dev_substvars() {
## conf_print_hyprland_install | sudo tee debian/hyprland.install
conf_print_hyprland_install() {
cat <<-EOF
cat <<-'EOF'
usr/bin/
usr/lib/
usr/share/man
@ -582,7 +588,7 @@ conf_print_hyprland_install() {
conf_print_hyprland_substvars() {
cat <<-EOF
shlibs:Depends=hyprland (>= ${VERSION}), libc6 (>= 2.34), libcairo2 (>= 1.2.4), libdisplay-info1 (>= 0.1.1), libdrm2 (>= 2.4.119), libegl1, libeudev1 (>= 3.2.14), libgbm1 (>= 23.3.5), libgcc-s1 (>=13.2.0), libgles2, libglib2.0-0 (>=2.78.4), libhyprlang2 (>= 0.5.1), libinput10 (>=1.25.0), libliftoff0 (>= 0.4.1), libopengl0, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.52.0), libpixman-1-0 (>= 0.42.0), libseat1 (>= 0.8.0), libstdc++6 (>= 13.2), libtomlplusplus3 (>= 3.4.0), libwayland-client0 (>= 1.20.0), libwayland-server0 (>= 1.22.0), libxcb-composite0, libxcb-dri3-0 (>= 1.13), libxcb-ewmh2 (>= 0.4.1), libxcb-icccm4 (>= 0.4.1), libxcb-present0, libxcb-render-util0, libxcb-render0, libxcb-res0 (>= 1.10), libxcb-shm0 (>= 1.10), libxcb-xfixes0 (>= 1.15), libxcb-xinput0 (>= 1.15), libxcb1, libxkbcommon0 (>= 1.6.0)
shlibs:Depends=hyprland (>= ${VERSION}), libc6 (>= 2.34), libcairo2 (>= 1.2.4), libdisplay-info1 (>= 0.1.1), libdrm2 (>= 2.4.119), libegl1, libeudev1 (>= 3.2.14), libgbm1 (>= 23.3.5), libgcc-s1 (>=13.2.0), libgles2, libglib2.0-0 (>=2.78.4), libhyprlang2 (>= 0.3.2), libinput10 (>=1.25.0), libliftoff0 (>= 0.4.1), libopengl0, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.52.0), libpixman-1-0 (>= 0.42.0), libseat1 (>= 0.8.0), libstdc++6 (>= 13.2), libtomlplusplus3 (>= 3.4.0), libwayland-client0 (>= 1.20.0), libwayland-server0 (>= 1.22.0), libxcb-composite0, libxcb-dri3-0 (>= 1.13), libxcb-ewmh2 (>= 0.4.1), libxcb-icccm4 (>= 0.4.1), libxcb-present0, libxcb-render-util0, libxcb-render0, libxcb-res0 (>= 1.10), libxcb-shm0 (>= 1.10), libxcb-xfixes0 (>= 1.15), libxcb-xinput0 (>= 1.15), libxcb1, libxkbcommon0 (>= 1.6.0)
misc:Depends=
misc:Pre-Depends=
EOF
@ -609,6 +615,7 @@ conf_print_hyprland_completions_substvars() {
}
# conf_print_hyprland_completions_substvars | tee debian/hyprland-completions.substvars
# Don't call this use deb_create_watch.py below.
conf_print_github_watch() {
cat <<-EOF
version=4
@ -808,76 +815,105 @@ conf_print_hyprland_headers() {
# chmod +x debian/install-headers.sh
conf_print_hyprland_rules_1() {
cat <<-'EOF'
#!/usr/bin/make -f
cat <<'EOF'
#!/usr/bin/make -f
# Uncomment and adjust the following lines as needed
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# Uncomment and adjust the following lines as needed
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@ --buildsystem=cmake+ninja
%:
dh $@ --buildsystem=cmake+ninja
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DNO_SYSTEMD=TRUE
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DNO_SYSTEMD=TRUE
override_dh_auto_build:
dh_auto_build -- \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:STRING=$(CURDIR)/debian/hyperland \
-DLEGACY_RENDERER:BOOL=true \
-S . -B ./build -G Ninja
EOF
override_dh_auto_build:
dh_auto_build -- \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:STRING=$(CURDIR)/debian/hyperland \
-DLEGACY_RENDERER:BOOL=true \
-S . -B ./build -G Ninja
EOF
}
# conf_print_hyprland_rules_1 | sudo tee debian/rules
conf_print_hyprland_rules_2() {
cat <<-'EOF'
#!/usr/bin/make -f
cat <<'EOF'
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#%:
dh $@ --buildsystem=cmake
#%:
dh $@ --buildsystem=cmake
override_dh_auto_test:
if [ -f obj-x86_64-linux-gnu/build.ninja ] && grep -q 'test' obj-x86_64-linux-gnu/build.ninja; then \
dh_auto_test; \
else \
echo "No tests found, skipping test phase."; \
fi
override_dh_auto_test:
if [ -f obj-x86_64-linux-gnu/build.ninja ] && grep -q 'test' obj-x86_64-linux-gnu/build.ninja; then \
dh_auto_test; \
else \
echo "No tests found, skipping test phase."; \
fi
override_dh_auto_build:
meson setup build \
--prefix=/usr \
--libexecdir=lib \
--sbindir=bin \
--buildtype=release \
--wrap-mode=nodownload \
-Db_lto=true \
-Db_pie=true \
-Ddefault_library=shared \
-Dxwayland=enabled \
-Dsystemd=disabled && \
meson compile -C build
override_dh_auto_build:
meson setup build \
--prefix=/usr \
--libexecdir=lib \
--sbindir=bin \
--buildtype=release \
--wrap-mode=nodownload \
-Db_lto=true \
-Db_pie=true \
-Ddefault_library=shared \
-Dxwayland=enabled \
-Dsystemd=disabled && \
meson compile -C build
override_dh_auto_install:
meson install -C build \
--destdir=$(CURDIR)/debian/hyprland \
--skip-subprojects hyprland-protocols && \
install -Dm0644 -t $(CURDIR)/debian/hyprland/usr/share/licenses/hyprland LICENSE && \
./debian/install.sh $(CURDIR)
EOF
override_dh_auto_install:
meson install -C build \
--destdir=$(CURDIR)/debian/hyprland \
--skip-subprojects hyprland-protocols && \
install -Dm0644 -t $(CURDIR)/debian/hyprland/usr/share/licenses/hyprland LICENSE && \
./debian/install.sh $(CURDIR)
EOF
}
# conf_print_hyprland_rules_2 | sudo tee debian/rules
conf_print_hyprland_rules_3() {
cat <<'EOF'
#!/usr/bin/make -f
%:
dh $@ --builddirectory=build/ \
--buildsystem=meson+ninja
override_dh_auto_configure:
# meson subprojects update --reset
# use either -Dbuildtype=release|debug or -Doptimisation= and -Ddebug=
override_dh_auto_build:
meson setup build \
-Dwarning_level=2 \
-Ddefault_library=static \
-Dsystemd=disabled \
-Dxwayland=enabled \
-Dlegacy_renderer=enabled \
-Doptimization=3 \
-Ddebug=true
ninja -C build
override_dh_auto_install:
ninja -C build install
dh_install
EOF
}
# conf_print_hyprland_rules_3 | sudo tee debian/rules
# debian/rules are Makefiles and requires tabs so '-EOF' breaks
# the output of the heredoc. So hardleft for this one.
conf_print_hyprland_rules() {
@ -886,7 +922,7 @@ conf_print_hyprland_rules() {
PREFIX=$(CURDIR)/tmp/usr
%:
dh $@ --buildsystem cmake+ninja --builddirectory=build
dh $@ --buildsystem=meson+ninja --builddirectory=build
override_dh_auto_configure:
dh_auto_configure -- --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_SYSTEMD:STRING=true -DCMAKE_INSTALL_PREFIX:STRING=$(PREFIX) -S .
@ -983,17 +1019,16 @@ DEBIAN_BUILD_DEPS=(
"ninja-build"
"seatd"
"wget"
"wayland-protocols"
"util-linux"
"vulkan-utility-libraries-dev"
"xdg-desktop-portal-wlr"
"xwayland"
"wayland-protocols"
"libavcodec-dev"
"libavformat-dev"
"libavutil-dev"
"libblkid-dev"
"libdrm2"
"libdrm-dev"
"libdisplay-info-bin"
"libdisplay-info-dev"
"libdisplay-info1"
@ -1030,8 +1065,6 @@ DEBIAN_BUILD_DEPS=(
"libxkbcommon0"
"libxcb-composite0-dev"
"libxcb-dri3-dev"
# "libxcb-errors0"
# "libxcb-errors0-dev"
"libxcb-ewmh2"
"libxcb-ewmh-dev"
"libxcb-icccm4-dev"
@ -1048,6 +1081,8 @@ DEBIAN_BUILD_DEPS=(
"libxkbregistry-dev"
"libxml2-dev"
)
# "libxcb-errors0"
# "libxcb-errors0-dev"
sudo apt install -y "${DEBIAN_BUILD_DEPS[@]}"
@ -1196,9 +1231,10 @@ chmod +x debian/install-headers.sh
# conf_print_hyprland_make_patch | sudo tee debian/patches/00-makefile.patch
# conf_print_hyprland_make_series | sudo tee debian/patches/series
conf_print_hyprland_rules | sudo tee debian/rules
# conf_print_hyprland_rules | sudo tee debian/rules
# conf_print_hyprland_rules_1 | sudo tee debian/rules
# conf_print_hyprland_rules_2 | sudo tee debian/rules
conf_print_hyprland_rules_3 | sudo tee debian/rules
#==============================================================================
# Call the append function to add the build deps to the controlfile.
@ -1229,7 +1265,7 @@ sed -i \
# rm -rf $(CURDIR)/debian/hyprland/usr/share/xdg-desktop-portal && \
# https://salsa.debian.org/debian/debian-package-init/-/blob/master/deb_create_watch.py
# outputs to debian/watch/ With deb_create_watch.py in you path
# outputs to debian/watch/ With deb_create_watch.py in your path
EXEC_PREFIX=${HOME}/.local/bin
wget -c -O ${EXEC_PREFIX}/deb_create_watch.py https://salsa.debian.org/debian/debian-package-init/-/raw/master/deb_create_watch.py?inline=false
@ -1286,8 +1322,8 @@ git commit -m "Post gbp dch commit upstream changelog"
#==============================================================================
# Post patch / rebase commit.
git add debian/patches
git commit -m "Alter Makefile for Debian directory installation"
# git add debian/patches
# git commit -m "Alter Makefile for Debian directory installation"
# AUR patch https://pastebin.com/7WPZ7ewq
@ -1346,7 +1382,8 @@ GITEA_URL="git2.ring-zero.co.uk"
# GITEA_KEY="$(curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q)"
# sudo curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q -o ${GITEA_KEY}
# sbuild called for an asc key file which is what gitea provides
# sbuild called for an asc key file which is what gitea provides, and puts it in:
# /etc/apt/trusted.gpg.d/sbuild-extra-repository-IDqCM94OpA.gpg
# GITEA_KEY="/etc/apt/keyrings/gitea-cyteen.asc"
GITEA_KEY="${BUILD_HOME}/gitea-cyteen.asc"
@ -1367,8 +1404,6 @@ GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@${GITEA_URL}/api/packages/$
# echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list
# GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@git2.ring-zero.co.uk/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}"
# passes all options not starting with --git- to the builder.
# mimic the resolver behaviour used by the official buildds:
# add experimental to unstable = see: https://wiki.debian.org/sbuild#CA-4db577cbb51eedbbe4205d14af637002f7fbb9c0_1
@ -1377,7 +1412,37 @@ ASPCUD_CRITERIA='-count(solution,APT-Release:=/a=experimental/),-removed,-change
# --build-dep-resolver=aspcud \
# --aspcud-criteria ${ASPCUD_CRITEREA}
DEPENDS="hyprcursor,hyprwayland-scanner,libxcb-util1,edid-decode,libblkid-dev,libdisplay-info1,libdisplay-info-bin,libdrm2,libelogind-dev,libgbm1,libgles2-mesa-dev,libinput10,libliftoff0,libpixman-1-0,libtomlplusplus3,libudev1,libvulkan1,libx11-xcb-dev,libxcb1,libxcb1-dev,libxcb-image0-dev,libxcb-render-util0,libxcb-util1,libxcb-util-dev,libxkbcommon0,util-linux,vulkan-utility-libraries-dev,wget"
DEPENDS="hyprland-protocols, \
debhelper-compat, \
edid-decode, \
hyprwayland-scanner >=0.3.1, \
jq, \
pkg-config, \
util-linux, \
vulkan-utility-libraries-dev, \
wget, \
libblkid-dev, \
libgbm1, \
libhyprlang2, \
libhyprlang-dev \
libinput10, \
libudev1, \
libvulkan1, \
libcap-dev, \
libcairo2-dev, \
libdisplay-info1, \
libdisplay-info-bin, \
libpng-dev, \
libxcb-util1, \
libxcb-util-dev, \
libxcb-render0-dev, \
libxcb-shm0-dev, \
libxcb-xfixes0-dev, \
"
# libwlroots-dev, \
# all options to gbp not starting with --git- to the builder, or add to GIT_BUIDLER
GIT_BUILDER='sbuild --arch-all --source --source-only-changes --verbose --dist=unstable'
# --extra-package="${EXTRA_PACKAGES}" \
sudo gbp buildpackage \
@ -1389,6 +1454,7 @@ sudo gbp buildpackage \
--git-ignore-branch \
--git-pristine-tar \
--git-submodules \
--git-builder="${GIT_BUILDER}" \
--git-debian-branch="${DEBIAN_BRANCH}" \
--git-debian-tag="${DEBIAN_TAG}" \
--git-upstream-tag="${UPSTREAM_TAG}" \
@ -1403,5 +1469,7 @@ sudo gbp buildpackage \
# Re-enter the session
# sudo schroot -c session:unstable-amd64-sbuild-c57f64a1-ea97-4627-bbc4-2f9b03f45015
# schroots are mounted under: /var/run/schroot/mount/
# Stop the session
sudo schroot --end-session $(schroot -l --all | grep 'session:unstable-amd64-sbuild-' | awk '{print $1}')
# sudo schroot --end-session $(schroot -l --all | grep 'session:unstable-amd64-sbuild-' | awk '{print $1}')

View File

@ -38,12 +38,7 @@ git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION}
cd ${PACKAGE}-${VERSION} || exit
# debianize the BUILD_HOME directory
dh_make \
--createorig \
--single \
--native \
--copyright ${LICENSE} \
--yes
dh_make --createorig --single --native --copyright ${LICENSE} --yes
# Customize the debian directory values
sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control

View File

@ -1,30 +1,19 @@
# https://forum.kicad.info/t/nightly-builds-for-debian-buster-and-bullseye/27487
RELEASE=bookworm
RELEASE=trixie
#RELEASE=sid
rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-bullseye.list
rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-buster.list
rm /etc/apt/sources.list.d/kicad_nightly-bullseye.list /etc/apt/sources.list.d/kicad_nightly-buster.list
# rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-bullseye.list
# rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-buster.list
# rm /etc/apt/sources.list.d/kicad_nightly-bullseye.list /etc/apt/sources.list.d/kicad_nightly-buster.list
#echo "deb [arch=amd64] https://debian.sur5r.net/kicad-nightly buster main" | tee /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list
ARCH="$(dpkg --print-architecture)"
KEY_DIR="/etc/apt/trusted.gpg.d/"
KEY=${KEY_DIR}/sur5r-keyring
KEY_DIR="/etc/apt/trusted.gpg.d"
KEY=${KEY_DIR}/sur5r-keyring.gpg
RECV_KEYS="E3CA1A89941C42E6 C3DE1DD4F661CDCB"
gpg --keyserver keyserver.ubuntu.com --recv-keys "${RECV_KEYS}"
gpg --export --armor "${RECV_KEYS}" > "${KEY}"
cat <<-EOF | tee /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list
deb [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main
deb-src [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main
EOF
#ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list
ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list
# RECV_KEYS="E3CA1A89941C42E6 C3DE1DD4F661CDCB"
# gpg --keyserver keyserver.ubuntu.com --recv-keys "${RECV_KEYS}"
# gpg --export --armor "${RECV_KEYS}" >"${KEY}"
#The repository is signed by my debian.sur5r.net key, Fingerprint
#
@ -37,23 +26,43 @@ ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/so
# The easiest way to install the keyring from https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/ beforehand is:
# KEYDATE="2021.02.02"
# KEYDATE="2021.02.17"
KEYDATE="2023.02.18"
# KEYDATE="2023.02.18"
KEYDATE="2024.03.04"
#/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_2021.02.02_all.deb sur5r-keyring.deb SHA256:cccfb1dd7d6b1b6a137bb96ea5b5eef18a0a4a6df1d6c0c37832025d2edaa710
/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_${KEYDATE}_all.deb sur5r-keyring.deb
# /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/i3/pool/main/s/sur5r-keyring/sur5r-keyring_2024.03.04_all.deb keyring.deb SHA256:f9bb4340b5ce0ded29b7e014ee9ce788006e9bbfe31e96c09b2118ab91fca734
# /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_2021.02.02_all.deb sur5r-keyring.deb SHA256:cccfb1dd7d6b1b6a137bb96ea5b5eef18a0a4a6df1d6c0c37832025d2edaa710
/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_${KEYDATE}_all.deb sur5r-keyring.deb
# /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/sur5r-keyring/pool/main/s/sur5r-keyring/sur5r-keyring_${KEYDATE}_all.deb sur5r-keyring.deb
dpkg -i ./sur5r-keyring.deb
# dpkg -S sur5r-keyring
# sur5r-keyring: /usr/share/doc/sur5r-keyring/copyright
# sur5r-keyring: /usr/share/doc/sur5r-keyring/changelog.gz
# sur5r-keyring: /etc/apt/trusted.gpg.d/sur5r-keyring.gpg
# sur5r-keyring: /usr/share/lintian/overrides/sur5r-keyring
# sur5r-keyring: /usr/share/keyrings/sur5r-keyring.gpg
# sur5r-keyring: /usr/share/doc/sur5r-keyring
cat <<-EOF | tee /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list
deb [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main
deb-src [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main
EOF
#ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list
ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list
apt-get update
apt-get install \
kicad-nightly \
kicad-nightly-demos \
kicad-nightly-footprints \
kicad-nightly-libraries \
kicad-nightly-packages3d \
kicad-nightly-symbols \
kicad-nightly-templates \
kicad-nightly \
kicad-nightly-demos \
kicad-nightly-footprints \
kicad-nightly-libraries \
kicad-nightly-packages3d \
kicad-nightly-symbols \
kicad-nightly-templates
#
# Deps for spice and sycira (maxima) and spice
# Deps for spice and sycira (maxima) and spice
# sudo apt-get install -y ngspice maxima wxmaxima libtinyxml2-6 libzip5
#mv /usr/share/kicad-nightly/templates/fp-lib-table ~/.config/kicad/7.0/
@ -77,6 +86,6 @@ mkdir -p "${KICAD_SCRIPTS}"
#git clone https://github.com/mitxela/kicad-round-tracks ${KICAD_SCRIPTS}/kicad-round-tracks
# teardrop
#git clone -b kicad6 https://github.com/sekigon-gonnoc/kicad_scripts /tmp/kicad_scripts
#git clone -b kicad6 https://github.com/sekigon-gonnoc/kicad_scripts /tmp/kicad_scripts
#cp -a /tmp/kicad_scripts/teardrops ${KICAD_SCRIPTS}/
#rm -rf /tmp/kicad_scripts

View File

@ -2,18 +2,17 @@
# Synapse is the reference Python/Twisted Matrix homeserver implementation.
#
# Synapse is intended to showcase the concept of Matrix, and to let users run their own
# Synapse is intended to showcase the concept of Matrix, and to let users run their own
# homeserver and generally help bootstrap the ecosystem.
#
# Matrix is an open standard for interoperable, decentralised, real-time communication
# over IP. It can be used to power Instant Messaging, VoIP/WebRTC signalling, Internet of
# Things communication or anywhere where's a need for a standard HTTP API for publishing
# Matrix is an open standard for interoperable, decentralised, real-time communication
# over IP. It can be used to power Instant Messaging, VoIP/WebRTC signalling, Internet of
# Things communication or anywhere where's a need for a standard HTTP API for publishing
# and subscribing to data whilst tracking the conversation history.
#
# In Matrix, every user runs one or more Matrix clients, which connect through to a Matrix
# homeserver. The homeserver stores all their personal chat history and user account
# information, much as a mail client connects through to an IMAP/SMTP server.
# In Matrix, every user runs one or more Matrix clients, which connect through to a Matrix
# homeserver. The homeserver stores all their personal chat history and user account
# information, much as a mail client connects through to an IMAP/SMTP server.
#echo "build depends include dh-systemd, libsystemd-dev. Fix the package for devuan and submit to devuan."
#exit 0
@ -28,6 +27,5 @@
#sudo sh -c "echo 'deb [signed-by=${KEY_DIR}/matrix-org-archive-keyring.asc] https://packages.matrix.org/debian/ buster main' > /etc/apt/sources.list-available/matrix-synapse.list"
#sudo sh -c "echo 'deb-src [signed-by=${KEY_DIR}/matrix-org-archive-keyring.asc] https://packages.matrix.org/debian/ buster main' >> /etc/apt/sources.list-available/matrix-synapse.list"
#sudo apt update && apt install -y matrix-synapse-py3
sudo apt-get install matrix-synapse
# sudo apt-get install matrix-synapse
# sudo apt-get install matrix-synapse-ldap3 # allows synapse to use LDAP for authentication as opposed to usual authentication via registering using a matrix client.

View File

@ -31,6 +31,7 @@ sudo apt-get install qpwgraph vlc-plugin-pipewire
# Copy conffiles to /etc
sudo cp -vRa /usr/share/pipewire /etc/
sudo cp -vRa /usr/share/wireplumber /etc/
sudo mkdir -p /etc/pipewire/pipewire.conf.d
sudo mkdir -p /etc/wireplumber/wireplumber.conf.d
# WirePlumber has profile auto-switching enabled by default. It can
@ -103,28 +104,108 @@ conf_print_wireplumber_desktop() {
}
conf_print_wireplumber_desktop | sudo tee /etc/xdg/autostart/wireplumber.desktop
conf_print_pipewire_conf() {
# don't use this we make incremental changes to conf.d/<file>.conf
#
# conf_print_pipewire_conf() {
# cat <<-EOF
# # PipeWire ALSA configuration
# context.properties = {
# # ALSA settings
# alsa.jack.device = "hw:0"
# alsa.jack.autoconnect = true
# alsa.jack.autoconnect-ports = true
# alsa.jack.latency = 100000
# }
# EOF
#}
# conf_print_pipewire_conf | sudo tee /etc/pipewire/pipewire.conf
# https://davejansen.com/disable-wireplumber-pipewire-suspend-on-idle-pops-delays-noise/
conf_print_alsa_conf_suspend-timeout() {
cat <<-EOF
# PipeWire ALSA configuration
context.properties = {
# ALSA settings
alsa.jack.device = "hw:0"
alsa.jack.autoconnect = true
alsa.jack.autoconnect-ports = true
alsa.jack.latency = 100000
alsa_monitor.enabled = true
alsa_monitor.properties = {
-- Your existing properties configuration
}
alsa_monitor.rules = {
{
matches = {
{
-- This matches all cards.
{ "device.name", "matches", "alsa_card.*" },
},
},
apply_properties = {
-- Your existing apply_properties configuration
["session.suspend-timeout-seconds"] = 0, -- Add this line
},
},
{
matches = {
{
-- Matches all sources.
{ "node.name", "matches", "alsa_input.*" },
},
{
-- Matches all sinks.
{ "node.name", "matches", "alsa_output.*" },
},
},
apply_properties = {
-- Your existing apply_properties configuration
["session.suspend-timeout-seconds"] = 0, -- Add this line
},
},
}
EOF
}
# conf_print_pipewire_conf | sudo tee /etc/pipewire/pipewire.conf
conf_print_alsa_conf_suspend-timeout | sudo tee /etc/wireplumber/main.lua.d/60-alsa_suspend-timeout.conf
# improved crackling in fullscreen
conf_print_pipewire_quantum() {
cat <<-EOF
conf_print_pipewire_quantum() {
default.clock.quantum = "32"
default.clock.min-quantum = "64"
default.clock.max-quantum = "768"
EOF
}
conf_print_pipewire_quantum | sudo tee /etc/pipewire/pipewire.conf.d/clock_quantum.conf
# default.clock.allowed-rates = [ 44100 48000 96000 192000 ]
conf_print_pipewire_quantum() {
cat <<-EOF
default.clock.rate = 44100
default.clock.allowed-rates = 44100
default.clock.quantum = 512
default.clock.min-quantum = 16
default.clock.max-quantum = 2048
default.clock.quantum-limit = 512
settings.check-quantum = false
settings.check-rate = false
EOF
}
conf_print_pipewire_quantum | sudo tee /etc/pipewire/pipewire.conf.d/clock_quantum.conf
conf_print_pipewire_alsa-api() {
cat <<-EOF
# See: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-ALSA#alsa-buffer-properties
api.alsa.headroom = 1024
api.alsa.period-size = 256
EOF
}
conf_print_pipewire_alsa-api | sudo tee /etc/pipewire/pipewire.conf.d/alsa-api.conf
conf_print_pipewire_clock-rate() {
cat <<-EOF
context.properties = {
default.clock.rate = 44100
default.clock.rate = [ 44100 48000 ]
}
EOF
}
# conf_print_pipewire_clock-rate | sudo tee /etc/pipewire/pipewire.conf.d/alsa-dmix.conf
conf_print_pipewire_clock-rate | sudo tee /etc/pipewire/pipewire.conf.d/alsa-dmix.conf
conf_print_pipewire_alsa-dmix() {
cat <<EOF

View File

@ -5,20 +5,17 @@ sudo apt install -y albatross-gtk-theme
sudo apt install -y blackbird-gtk-theme
sudo apt install -y greybird-gtk-theme
sudo apt install -y adwaita-icon-theme
sudo apt install -y adwaita-qt
sudo apt-get install -y gtk2-engines-murrine
apt install -y gtk2-engines-murrine gtk2-engines-pixbuf
sudo apt install -y adwaita-qt adwaita-qt6
sudo apt install -y gtk2-engines-murrine gtk2-engines-pixbuf
cd /var/tmp || exit
git clone --depth 1 http://github.com/vinceliuice/stylish-gtk-theme /var/tmp/stylish-gtk-theme
pushd /var/tmp/stylish-gtk-theme || exit
./Install
./Install
popd || exit
rm -rf /var/tmp/stylish-gtk-theme
dbus-launch --exit-with-session gsettings set org.gnome.desktop.interface gtk-theme "Stylish-Dark-Laptop"
dbus-launch --exit-with-session gsettings set org.gnome.desktop.wm.preferences theme "Stylish-Dark-Laptop"
@ -26,14 +23,23 @@ dbus-launch --exit-with-session gsettings set org.gnome.desktop.wm.preferences t
# qt4
sed -i '/[Qt]/a style=GTK+' "${DEST}"/.config/Trolltech.conf
# qt5
sudo apt install -y qt5-style-plugins
# install both qt5 and qt6 theme setting programs
sudo apt install -y qt6ct qt5ct
if grep -q "QT_QPA_PLATFORMTHEME=gtk2" /etc/environment; then
cat <<-EOF | sudo tee -a /etc/environment
# ~/.config/qt5ct/qt5ct.conf
# ~/.config/qt6ct/qt6ct.conf
QT_QPA_PLATFORMTHEME=gtk2
QT_STYLE_OVERRIDE=gtk2
# [Appearance]
# custom_palette=false
# style=Adwaita-Dark
QT_STYLE="Adwaita-Dark"
if grep -q "QT_STYLE_OVERRIDE=${QT_STYLE}" /etc/environment/99-qt-style.conf; then
mkdir -p /etc/environment.d
cat <<-EOF | sudo tee /etc/environment.d/99-qt-style.conf
QT_STYLE_OVERRIDE=${QT_STYLE}
EOF
else
echo "QT theme already set."
@ -72,7 +78,6 @@ fi
#MOZILLA_PROFILE='2efrqxjh.default-default'
#checkinstall bash -c "./scripts/install.sh -f ${MOZILLA_HOME} -p ${MOZILLA_PROFILE}"
#cd /var/tmp
#git clone https://github.com/horst3180/Vertex-theme --depth 1
#cd Vertex-theme
@ -85,12 +90,10 @@ fi
#git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
#
#./autogen.sh --prefix=/usr
#sudo make install
#sudo make install
#echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0/ /' | sudo tee /etc/apt/sources.list-available/vertex-theme_Horst3180.list
#sudo ln -s /etc/apt/sources.list-available/vertex-theme_Horst3180.list /etc/apt/sources.list.d/vertex-theme_Horst3180.list
#curl -fsSL https://download.opensuse.org/repositories/home:Horst3180/Debian_8.0/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_Horst3180.gpg > /dev/null
#sudo apt update
#sudo apt install vertex-theme

View File

@ -27,7 +27,7 @@ sudo apt install -y zsh nodejs zsh-theme-powerlevel9k git fonts-powerline powerl
# 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
@ -41,7 +41,6 @@ cd "${DEST}" || exit
cp /var/tmp/automate/.p10k.zsh "${DEST}"
chsh -s "$(which zsh)" "${USER}"
# Install zgenom plugin manager and zsh quickstart to get a default setup for zsh
# .zgen-setup pulls zgenom automatically and puts it in .zqs-zgenom, plugins in .zgenom
git clone https://github.com/unixorn/zsh-quickstart-kit "${DEST}"/zsh-quickstart-kit
@ -53,13 +52,11 @@ ln -rsf "${DEST}"/zsh-quickstart-kit/zsh/.zgen-setup "${DEST}"/.zgen-setup
#ln -rsf ~/zsh-quickstart-kit/zsh/.zsh_completions ~/.zsh_completions
mkdir -p "${DEST}"/"${ALIAS_DIR}"
touch "${DEST}"/.zshrc
echo "setopt PROMPT_SUBST" >> "${DEST}"/.zshrc
echo "setopt PROMPT_SUBST" >>"${DEST}"/.zshrc
echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> "${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> "${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh
echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >>"${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >>"${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh
sudo touch /var/tmp/nvim_python.log
# fix path error in .zshrc
@ -67,10 +64,10 @@ sudo touch /var/tmp/nvim_python.log
# 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}"/"${ALIAS_DIR}"/005_locatedb.zsh
echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" >"${DEST}"/"${ALIAS_DIR}"/005_locatedb.zsh
# add plugins to the load-starter-plugin-list() function in ~/.zgen-setup ~/zsh-quickstart-kit/zsh/.zgen-setup
# FIXED: create a file named .zgen-local-plugins and add your zgenom load commands there.
# FIXED: create a file named .zgen-local-plugins and add your zgenom load commands there.
# Don't forget to run `zgenom 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.
@ -78,9 +75,8 @@ echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" > "${DEST}"/"${ALIAS_DIR}"
sed -i -e "s|zgenom load srijanshetty/docker-zsh|# zgenom load srijanshetty/docker-zsh|" "${DEST}"/zsh-quickstart-kit/zsh/.zgen-setup
#sed -i '/\# zgenom load srijanshetty\/docker-zsh/a\ \ zgenom load ohmyzsh plugins\/docker\n\ \ zgenom load ohmyzsh plugins\/docker-compose' "${DEST}"/zsh-quickstart-kit/zsh/.zgen-setup
# zsh quickstart created this file if missing expecting fzf to be installed in ${HOME}
# we have it installed via apt so the executables are in the path and the key-bindings
# we have it installed via apt so the executables are in the path and the key-bindings
# and completitions are in examples fom the package.
cat <<-EOF | sudo tee "${DEST}/.fzf.zsh"
# Setup fzf
@ -181,8 +177,8 @@ cat <<-EOF | tee "${DEST}"/.zgen-local-plugins
zgenom ohmyzsh plugins/osx
fi
# pipx completitons
zgenom load thuandt/zsh-pipx
# pipx completitons
zgenom load thuandt/zsh-pipx
# A set of shell functions to make it easy to install small apps and
# utilities distributed with pip.
@ -214,9 +210,9 @@ cat <<-EOF | tee "${DEST}"/.zgen-local-plugins
# Add Fish-like autosuggestions to your ZSH
zgenom load zsh-users/zsh-autosuggestions
# Add support for python venv
zgenom load MichaelAquilina/zsh-autoswitch-virtualenv
zgenom load bckim92/zsh-autoswitch-conda
# Add support for autoswitching conda/python venv
# zgenom load MichaelAquilina/zsh-autoswitch-virtualenv
# zgenom load bckim92/zsh-autoswitch-conda
# Add functional testing for zsh
zgenom load olets/zsh-test-runner
@ -252,7 +248,7 @@ cat <<-EOF | tee "${DEST}"/.zgen-local-plugins
## plugins
# zgenom load/path/to/super-secret-private-plugin
# Load me last
GENCOMPL_FPATH=\$HOME/.zsh/complete
GENCOMPL_PY=python3
@ -269,33 +265,31 @@ cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/001_quickstart-refresh.zsh
unset "QUICKSTART_KIT_REFRESH_IN_DAYS"
EOF
#
echo '# zgenom autoupdate' > "${DEST}"/"${ALIAS_DIR}"/001_zgenom-refresh.zsh
#
echo '# zgenom autoupdate' >"${DEST}"/"${ALIAS_DIR}"/001_zgenom-refresh.zsh
# oh-my-zsh disable update check
echo 'DISABLE_AUTO_UPDATE="true"' > "${DEST}"/"${ALIAS_DIR}"/001_auto-update-off.zsh
echo 'DISABLE_AUTO_UPDATE="true"' >"${DEST}"/"${ALIAS_DIR}"/001_auto-update-off.zsh
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ~/.zshrc
# Use powerline-daemon to speedup the prompt.
echo 'powerline-daemon -q' > "${DEST}"/"${ALIAS_DIR}"/006_powerline-daemon.zsh
echo 'powerline-daemon -q' >"${DEST}"/"${ALIAS_DIR}"/006_powerline-daemon.zsh
sudo sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup
# set theme for zsh
cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/002_theme.zsh
# https://zshthem.es/browse-zsh-themes/
ZSH_THEME="agnoster" # powerline based theme
ZSH_THEME="agnoster" # powerline based theme
#ZSH_THEME="3den"
#ZSH_THEME="Pure"
EOF
# set colorize tool
cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/003_colorize.zsh
ZSH_COLORIZE_TOOL="chroma"
ZSH_COLORIZE_CHROMA_FORMATTER=terminal256
ZSH_COLORIZE_TOOL="chroma"
ZSH_COLORIZE_CHROMA_FORMATTER=terminal256
EOF
# see also ZVM jeffreytse/zsh-vi-mode plugin
@ -310,7 +304,7 @@ cat <<-'EOF' | tee "${DEST}"/"${ALIAS_DIR}"/001_vi-mode.sh
# # Change to Zsh's default readkey engine (default for zvm is NEX)
# ZVM_READKEY_ENGINE=$ZVM_READKEY_ENGINE_ZLE
# The plugin will auto execute this zvm_after_select_vi_mode function
# function zvm_after_select_vi_mode() {
# case $ZVM_MODE in
@ -338,7 +332,6 @@ cat <<-'EOF' | tee "${DEST}"/"${ALIAS_DIR}"/001_vi-mode.sh
ZVM_OPPEND_MODE_CURSOR=$ZVM_CURSOR_UNDERLINE
EOF
#git clone http://github.com/bhilburn/powerlevel9k.git "${DEST}"/.zgen/robbyrussell/ohmyzsh-master/themes/powerlevel9k
## add a separate zsh aliases directory
@ -360,10 +353,9 @@ cat <<-EOF | sudo tee -a "${DEST}"/.zshrc >/dev/null
fi
EOF
# 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
cat <<-EOF | sudo tee "\${DEST}"/"\${ALIAS_DIR}"/003_py_aliases.zsh
_py_version() {
@ -440,7 +432,7 @@ cat <<-EOF | sudo tee "${DEST}"/"${ALIAS_DIR}"/003_transfer.zsh
echo "File \$file doesn't exists."
return 1
fi
if [ -d \$file ];
then
# zip directory and transfer
@ -472,6 +464,5 @@ cat <<-EOF | sudo tee "${DEST}"/"${ALIAS_DIR}"/003_transfer.zsh
}
EOF
sudo chown -R root:root /usr/local/share/zsh/site-functions
sudo chmod -R 755 /usr/local/share/zsh/site-functions

View File

@ -185,3 +185,534 @@ conf_print_nvim-lint-markdownlint() {
}
# conf_print_nvim-lint-markdownlint >"${LAZY_DEST}"/nvim-lint-markdownlint.lua
# Turn off .vscode import in neoconf
# neoconf settings are found in ~/.config/nvim/neoconf.json
# defaults are in lua/neoconf/config.lua
conf_print_neoconf_json() {
cat <<EOF
{
"neoconf": {
"import": {
"vscode": false,
"coc": true,
"nlsp": true
}
}
}
EOF
}
#conf_print_neoconf_json | tee -a "${DEST}/.config/nvim/neoconf.json"
#
# Check if the file exists
if [ -f ~/.config/nvim/neoconf.json ]; then
# If the file exists, merge the new JSON snippet with the existing content
conf_print_neoconf_json | jq -s 'reduce .[] as $item ({}; . *= $item)' ~/.config/nvim/neoconf.json - > ~/.config/nvim/neoconf.json.tmp
mv ~/.config/nvim/neoconf.json.tmp ~/.config/nvim/neoconf.json
else
# If the file does not exist, create it with the new JSON snippet
conf_print_neoconf_json > ~/.config/nvim/neoconf.json
fi
#==============================================================================
# vim-tmux-navigator.lua within the plugins folder of Lazyvim:
conf_print_tmux_navigator() {
cat <<EOF
return {
"christoomey/vim-tmux-navigator",
keys = {
{ "<C-\\>", "<cmd>TmuxNavigatePrevious<cr>", desc = "Go to the previous pane" },
{ "<C-h>", "<cmd>TmuxNavigateLeft<cr>", desc = "Got to the left pane" },
{ "<C-j>", "<cmd>TmuxNavigateDown<cr>", desc = "Got to the down pane" },
{ "<C-k>", "<cmd>TmuxNavigateUp<cr>", desc = "Got to the up pane" },
{ "<C-l>", "<cmd>TmuxNavigateRight<cr>", desc = "Got to the right pane" },
},
}
EOF
}
conf_print_tmux_navigator | tee "${LAZY_DEST}/ns/vim-tmux-navigator.lua"
#==============================================================================
# Example with keymap override.
# LazyVim overrides the <C-hjkl> keymaps, so only adding the keymaps in the
# plugin folder did not work and I had to explicitly add the keymaps outside the
# plugins in keymaps.lua.
# (e.g vim.keymap.set("n", "<C-j>", ":TmuxNavigateDown<CR>", { silent = true }))
conf_print_nvim-tmux() {
cat <<EOF
return {
"alexghergh/nvim-tmux-navigation",
event = "VeryLazy",
config = function()
local nvim_tmux_nav = require("nvim-tmux-navigation")
nvim_tmux_nav.setup({
disable_when_zoomed = true,
-- defaults to false
keybindings = {
left = "<C-h>",
down = "<C-j>",
up = "<C-k>",
right = "<C-l>",
last_active = "<C-\\>",
next = "<C-Space>",
},
})
end,
}
EOF
}
conf_print_nvim-tmux | tee "${LAZY_DEST}"/nvim-tmux.lua
lua/plugins/tmux.lua
LAZY_DEST=${DEST}/.config/nvim/lua/plugins
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here: ~/.config/nvim/lua/config/keymaps.lua
conf_print_nvim-tmux-keymap() {
cat <<EOF
vim.keymap.set("n", "<C-h>", "<Cmd>NvimTmuxNavigateLeft<CR>", { silent = true })
vim.keymap.set("n", "<C-j>", "<Cmd>NvimTmuxNavigateDown<CR>", { silent = true })
vim.keymap.set("n", "<C-k>", "<Cmd>NvimTmuxNavigateUp<CR>", { silent = true })
vim.keymap.set("n", "<C-l>", "<Cmd>NvimTmuxNavigateRight<CR>", { silent = true })
vim.keymap.set("n", "<C-\\>", "<Cmd>NvimTmuxNavigateLastActive<CR>", { silent = true })
vim.keymap.set("n", "<C-Space>", "<Cmd>NvimTmuxNavigateNavigateNext<CR>", { silent = true })
EOF
}
conf_print_nvim-tmux-keymap | tee -a "${LAZY_DEST}"/.config/nvim/lua/config/keymaps.lua
~/.tmux.conf
conf_print_tmux_conf() {
cat <<EOF
set -g default-terminal "screen-256color"
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
unbind r
bind r source-file ~/.tmux.conf
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
bind -r m resize-pane -Z
set -g mouse on
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse
# remove delay for exiting insert mode with ESC in Neovim
set -sg escape-time 10
# tpm plugin
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
# set -g @plugin 'christoomey/vim-tmux-navigator'
# THIS IS WHERE THE NEW CODE FOR NAVIGATION IS
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -n 'C-Space' if-shell "$is_vim" 'send-keys C-Space' 'select-pane -t:.+'
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+
# END FANCY STUFF <---------
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
set -g @themepack 'powerline/default/cyan'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
EOF
}
# conf_print_tmux_conf | tee ${DEST}/.config/tmux/tmux.conf
#==============================================================================
# write a lazyvim spec for diffview
# do not lazy load, it's a library
# https://github.com/sindrets/diffview.
# https://github.com/nvim-lua/plenary.nvim
# https://github.com/nvim-tree/nvim-web-devicons
# return {
-- add symbols-outline
{
"sindrets/diffview.nvim",
cmd = "diffview",
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
opts = {
-- add your options that should be passed to the setup() function here
position = "right",
},
},
}
require("lazy").setup({
{
"sindrets/diffview.nvim",
cmd = {
'DiffviewOpen',
'DiffviewFileHistory',
'DiffviewClose',
'DiffviewToggleFiles',
'DiffviewFocusFiles',
'DiffviewRefresh'
},
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
},
keys = {
{ "<leader>dv", "<cmd>DiffviewOpen<cr>", desc = "Open Diffview" },
{ "<leader>df", "<cmd>DiffviewFileHistory<cr>", desc = "Show file history" },
{ "<leader>dc", "<cmd>DiffviewClose<cr>", desc = "Close Diffview" },
{ "<leader>dt", "<cmd>DiffviewToggleFiles<cr>", desc = "Toggle file list" },
{ "<leader>df", "<cmd>DiffviewFocusFiles<cr>", desc = "Focus on file list" },
{ "<leader>dr", "<cmd>DiffviewRefresh<cr>", desc = "Refresh Diffview" }
-- Add other keybindings as needed
}
config = function()
require("config.diffview")
end,
},
})
use {
"sindrets/diffview.nvim",
requires = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
},
after = "plenary.nvim",
}
# packer
ui['sindrets/diffview.nvim'] = {
config = conf.diffview,
requires = {
{'nvim-lua/plenary.nvim'},
{'nvim-tree/nvim-web-devicons'},
}.
after='plenary.nvim',
cmd = {
'DiffviewOpen',
'DiffviewFileHistory',
'DiffviewClose',
'DiffviewToggleFiles',
'DiffviewFocusFiles',
'DiffviewRefresh'
}
}
config = function()
-- Lua
local cb = require'diffview.config'.diffview_callback
require'diffview'.setup {
diff_binaries = false, -- Show diffs for binaries
enhanced_diff_hl = false, -- See ':h diffview-config-enhanced_diff_hl'
use_icons = true, -- Requires nvim-web-devicons
icons = { -- Only applies when use_icons is true.
folder_closed = "",
folder_open = "",
},
signs = {
fold_closed = "",
fold_open = "",
},
file_panel = {
position = "left", -- One of 'left', 'right', 'top', 'bottom'
width = 35, -- Only applies when position is 'left' or 'right'
height = 10, -- Only applies when position is 'top' or 'bottom'
listing_style = "tree", -- One of 'list' or 'tree'
tree_options = { -- Only applies when listing_style is 'tree'
flatten_dirs = true, -- Flatten dirs that only contain one single dir
folder_statuses = "only_folded", -- One of 'never', 'only_folded' or 'always'.
},
},
file_history_panel = {
position = "bottom",
width = 35,
height = 16,
log_options = {
max_count = 256, -- Limit the number of commits
follow = false, -- Follow renames (only for single file)
all = false, -- Include all refs under 'refs/' including HEAD
merges = false, -- List only merge commits
no_merges = false, -- List no merge commits
reverse = false, -- List commits in reverse order
},
},
default_args = { -- Default args prepended to the arg-list for the listed commands
DiffviewOpen = {},
DiffviewFileHistory = {},
},
hooks = {}, -- See ':h diffview-config-hooks'
key_bindings = {
disable_defaults = false, -- Disable the default key bindings
-- The `view` bindings are active in the diff buffers, only when the current
-- tabpage is a Diffview.
view = {
["<tab>"] = cb("select_next_entry"), -- Open the diff for the next file
["<s-tab>"] = cb("select_prev_entry"), -- Open the diff for the previous file
["gf"] = cb("goto_file"), -- Open the file in a new split in previous tabpage
["<C-w><C-f>"] = cb("goto_file_split"), -- Open the file in a new split
["<C-w>gf"] = cb("goto_file_tab"), -- Open the file in a new tabpage
["<leader>e"] = cb("focus_files"), -- Bring focus to the files panel
["<leader>b"] = cb("toggle_files"), -- Toggle the files panel.
},
file_panel = {
["j"] = cb("next_entry"), -- Bring the cursor to the next file entry
["<down>"] = cb("next_entry"),
["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry.
["<up>"] = cb("prev_entry"),
["<cr>"] = cb("select_entry"), -- Open the diff for the selected entry.
["o"] = cb("select_entry"),
["<2-LeftMouse>"] = cb("select_entry"),
["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry.
["S"] = cb("stage_all"), -- Stage all entries.
["U"] = cb("unstage_all"), -- Unstage all entries.
["X"] = cb("restore_entry"), -- Restore entry to the state on the left side.
["R"] = cb("refresh_files"), -- Update stats and entries in the file list.
["<tab>"] = cb("select_next_entry"),
["<s-tab>"] = cb("select_prev_entry"),
["gf"] = cb("goto_file"),
["<C-w><C-f>"] = cb("goto_file_split"),
["<C-w>gf"] = cb("goto_file_tab"),
["i"] = cb("listing_style"), -- Toggle between 'list' and 'tree' views
["f"] = cb("toggle_flatten_dirs"), -- Flatten empty subdirectories in tree listing style.
["<leader>e"] = cb("focus_files"),
["<leader>b"] = cb("toggle_files"),
},
file_history_panel = {
["g!"] = cb("options"), -- Open the option panel
["<C-A-d>"] = cb("open_in_diffview"), -- Open the entry under the cursor in a diffview
["y"] = cb("copy_hash"), -- Copy the commit hash of the entry under the cursor
["zR"] = cb("open_all_folds"),
["zM"] = cb("close_all_folds"),
["j"] = cb("next_entry"),
["<down>"] = cb("next_entry"),
["k"] = cb("prev_entry"),
["<up>"] = cb("prev_entry"),
["<cr>"] = cb("select_entry"),
["o"] = cb("select_entry"),
["<2-LeftMouse>"] = cb("select_entry"),
["<tab>"] = cb("select_next_entry"),
["<s-tab>"] = cb("select_prev_entry"),
["gf"] = cb("goto_file"),
["<C-w><C-f>"] = cb("goto_file_split"),
["<C-w>gf"] = cb("goto_file_tab"),
["<leader>e"] = cb("focus_files"),
["<leader>b"] = cb("toggle_files"),
},
option_panel = {
["<tab>"] = cb("select"),
["q"] = cb("close"),
},
},
}
end
}
#==============================================================================
# To combine the Packer configuration for sindrets/diffview.nvim with the
# provided Lua configuration for diffview,
#==============================================================================
use {
'sindrets/diffview.nvim',
config = function()
-- Lua
local cb = require'diffview.config'.diffview_callback
require'diffview'.setup {
diff_binaries = false, -- Show diffs for binaries
enhanced_diff_hl = false, -- See ':h diffview-config-enhanced_diff_hl'
use_icons = true, -- Requires nvim-web-devicons
icons = { -- Only applies when use_icons is true.
folder_closed = "",
folder_open = "",
},
signs = {
fold_closed = "",
fold_open = "",
},
file_panel = {
position = "left", -- One of 'left', 'right', 'top', 'bottom'
width = 35, -- Only applies when position is 'left' or 'right'
height = 10, -- Only applies when position is 'top' or 'bottom'
listing_style = "tree", -- One of 'list' or 'tree'
tree_options = { -- Only applies when listing_style is 'tree'
flatten_dirs = true, -- Flatten dirs that only contain one single dir
folder_statuses = "only_folded", -- One of 'never', 'only_folded' or 'always'.
},
},
file_history_panel = {
position = "bottom",
width = 35,
height = 16,
log_options = {
max_count = 256, -- Limit the number of commits
follow = false, -- Follow renames (only for single file)
all = false, -- Include all refs under 'refs/' including HEAD
merges = false, -- List only merge commits
no_merges = false, -- List no merge commits
reverse = false, -- List commits in reverse order
},
},
default_args = { -- Default args prepended to the arg-list for the listed commands
DiffviewOpen = {},
DiffviewFileHistory = {},
},
hooks = {}, -- See ':h diffview-config-hooks'
key_bindings = {
disable_defaults = false, -- Disable the default key bindings
-- The `view` bindings are active in the diff buffers, only when the current
-- tabpage is a Diffview.
view = {
["<tab>"] = cb("select_next_entry"), -- Open the diff for the next file
["<s-tab>"] = cb("select_prev_entry"), -- Open the diff for the previous file
["gf"] = cb("goto_file"), -- Open the file in a new split in previous tabpage
["<C-w><C-f>"] = cb("goto_file_split"), -- Open the file in a new split
["<C-w>gf"] = cb("goto_file_tab"), -- Open the file in a new tabpage
["<leader>e"] = cb("focus_files"), -- Bring focus to the files panel
["<leader>b"] = cb("toggle_files"), -- Toggle the files panel.
},
file_panel = {
["j"] = cb("next_entry"), -- Bring the cursor to the next file entry
["<down>"] = cb("next_entry"),
["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry.
["<up>"] = cb("prev_entry"),
["<cr>"] = cb("select_entry"), -- Open the diff for the selected entry.
["o"] = cb("select_entry"),
["<2-LeftMouse>"] = cb("select_entry"),
["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry.
["S"] = cb("stage_all"), -- Stage all entries.
["U"] = cb("unstage_all"), -- Unstage all entries.
["X"] = cb("restore_entry"), -- Restore entry to the state on the left side.
["R"] = cb("refresh_files"), -- Update stats and entries in the file list.
["<tab>"] = cb("select_next_entry"),
["<s-tab>"] = cb("select_prev_entry"),
["gf"] = cb("goto_file"),
["<C-w><C-f>"] = cb("goto_file_split"),
["<C-w>gf"] = cb("goto_file_tab"),
["i"] = cb("listing_style"), -- Toggle between 'list' and 'tree' views
["f"] = cb("toggle_flatten_dirs"), -- Flatten empty subdirectories in tree listing style.
["<leader>e"] = cb("focus_files"),
["<leader>b"] = cb("toggle_files"),
},
file_history_panel = {
["g!"] = cb("options"), -- Open the option panel
["<C-A-d>"] = cb("open_in_diffview"), -- Open the entry under the cursor in a diffview
["y"] = cb("copy_hash"), -- Copy the commit hash of the entry under the cursor
["zR"] = cb("open_all_folds"),
["zM"] = cb("close_all_folds"),
["j"] = cb("next_entry"),
["<down>"] = cb("next_entry"),
["k"] = cb("prev_entry"),
["<up>"] = cb("prev_entry"),
["<cr>"] = cb("select_entry"),
["o"] = cb("select_entry"),
["<2-LeftMouse>"] = cb("select_entry"),
["<tab>"] = cb("select_next_entry"),
["<s-tab>"] = cb("select_prev_entry"),
["gf"] = cb("goto_file"),
["<C-w><C-f>"] = cb("goto_file_split"),
["<C-w>gf"] = cb("goto_file_tab"),
["<leader>e"] = cb("focus_files"),
["<leader>b"] = cb("toggle_files"),
},
option_panel = {
["<tab>"] = cb("select"),
["q"] = cb("close"),
},
},
}
end,
requires = {
{'nvim-lua/plenary.nvim'},
{'nvim-tree/nvim-web-devicons'},
},
after='plenary.nvim',
cmd = {
'DiffviewOpen',
'DiffviewFileHistory',
'DiffviewClose',
'DiffviewToggleFiles',
'DiffviewFocusFiles',
'DiffviewRefresh'
}
}
#==============================================================================
local diffview = require('diffview')
local custom_diff_view = diffview.CDiffView({
git_toplevel = '/path/to/git/repo',
left = 'HEAD',
right = 'HEAD~1',
files = {
working = {
{path = 'file1.txt', status = 'M'},
{path = 'file2.txt', status = 'A'},
},
},
})
-- Example command to open the options panel
vim.api.nvim_set_keymap('n', '<leader>o', '<cmd>DiffviewOpenOptions<CR>', {noremap = true, silent = true})
-- Example command to navigate to the next conflict
vim.api.nvim_set_keymap('n', '<leader>c', '<cmd>DiffviewNextConflict<CR>', {noremap = true, silent = true})
-- Example help command
vim.api.nvim_set_keymap('n', '<leader>h', '<cmd>DiffviewHelp<CR>', {noremap = true, silent = true})

View File

@ -1,58 +0,0 @@
#!/bin/bash
set -x
# Function to check if a directory exists and create it if not
ensure_directory_exists() {
local dir_path="$1"
local output_file="$2"
echo "*** adding mkdir -p $dir_path to the conf_print file"
echo -e "\nmkdir -p debian/$(basename $dir_path)\n" >>"$output_file"
echo "calling generate_functions() on $dir_path"
generate_functions "$dir_path" "$output_file"
}
# Function to generate functions for text files in a directory
generate_functions() {
local directory=$1
local output_file=$2
for item in "$directory"/*; do
if [ -d "$item" ]; then
# If the item is a directory, recursively call generate_functions on it
ensure_directory_exists "$item" "$output_file"
elif [ -f "$item" ]; then
# If the item is a file, proceed with generating functions as before
local filename=$(basename "$item" .txt)
local function_name="conf_print_$(echo "$filename" | tr -c '[:alnum:]' '_')"
local heredoc=$(
cat <<-FOE
$function_name() {
cat <<-'EOF'
$(cat "$item")
EOF
}
FOE
)
echo "$heredoc" >>"$output_file"
echo "# $function_name | tee $directory/$filename >/dev/null" >>"$output_file"
fi
done
}
# Main script execution
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <directory> <output_file>"
exit 1
fi
directory=$1
output_file=$2
# Generate functions for the directory
generate_functions "$directory" "$output_file"
echo "Functions generated and appended to $output_file"

View File

@ -5,7 +5,8 @@
# Function to display usage information
usage() {
echo "Usage: $(basename $0) -p <project> -b <builddir>"
echo " -p <project> Project name (e.g., kislyuk/yq)"
echo " -p <project> Project name (e.g., kislyuk/yq)" or
echo " -d <dsc> file"
echo " -b <builddir> Build directory"
exit 1
}
@ -19,6 +20,9 @@ while getopts ":p:b:" opt; do
b)
BUILDDIR=$OPTARG
;;
d)
DSC_FILE=$OPTARG
;;
\?)
usage
;;
@ -30,10 +34,10 @@ while getopts ":p:b:" opt; do
done
shift $((OPTIND - 1))
# Check if project name and build directory are provided
if [ -z "$PROJECT_NAME" ] || [ -z "$BUILDDIR" ]; then
usage
fi
# Check if project name or dsc file and build directory are provided
# if [[ -z "$PROJECT_NAME" ] || [ -z "$BUILDDIR" ]] | [[ -z "$DSC_FILE" ] || [ -z "$BUILDDIR" ]] ; then
# usage
# fi
# Install necessary tools
# sudo apt install -y git-buildpackage equivs

View File

@ -0,0 +1,49 @@
#!/usr/bin/env bash
USERNAME="cyteen"
PASSWORD="mlpfinsonik"
DISTRIBUTION="ceres"
COMPONENT="main"
ARCH=$(dpkg --print-architecture)
# Function to delete a package
delete_package() {
local PACKAGE_NAME=$1
local PACKAGE_VERSION=$2
local ARCHITECTURE=${3}
# Construct the GITEA URL for deletion
GITEA_DELETE_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${ARCHITECTURE}"
# Perform the DELETE request
curl --user ${USERNAME}:${PASSWORD} -X DELETE ${GITEA_DELETE_URL}
echo "Deleted ${PACKAGE_NAME}-${PACKAGE_VERSION}-${ARCHITECTURE} from the repository."
}
# local ARCHITECTURE="${DEB_FILE%.*}" # Assuming DEB_FILE is defined and contains the package name and version
# Check if both package name and version were provided as arguments
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo "Usage: $0 <package_name> <version> <arch>"
exit 1
fi
PACKAGE="$1"
VERSION="$2"
ARCH="$3"
echo "PACKAGE: ${PACKAGE}"
echo "VERSION: ${VERSION}"
echo "ARCH: ${ARCH}"
echo ${GITEA_URL}
# Use the constructed URL in the curl command to delete the specified package version
curl --user ${USERNAME}:${PASSWORD} \
-X DELETE \
-H 'accept: application/json' \
"${GITEA_URL}"
# 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}'

View File

@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -x
USERNAME="cyteen"
PASSWORD="mlpfinsonik"
DISTRIBUTION="ceres"
COMPONENT="main"
# ARCH=$(dpkg --print-architecture)
# Function to delete a package
delete_package() {
local PACKAGE_NAME=$1
local PACKAGE_VERSION=$2
local ARCHITECTURE=${3}
# Construct the GITEA URL for deletion
GITEA_DELETE_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${ARCHITECTURE}"
# Perform the DELETE request
curl --user ${USERNAME}:${PASSWORD} \
-X DELETE \
${GITEA_DELETE_URL}
echo "Deleted ${PACKAGE_NAME}-${PACKAGE_VERSION}-${ARCHITECTURE} from the repository."
}
# local ARCHITECTURE="${DEB_FILE%.*}" # Assuming DEB_FILE is defined and contains the package name and version
# Check if both package name and version were provided as arguments
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo "Usage: $0 <package_name> <version> <arch>"
exit 1
fi
PACKAGE="$1"
VERSION="$2"
ARCH="$3"
echo "PACKAGE: ${PACKAGE}"
echo "VERSION: ${VERSION}"
echo "ARCH: ${ARCH}"
echo ${GITEA_URL}
# Call the delete fuanction
delete_package ${PACKAGE} ${VERSION} ${ARCH}
# 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}'

View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
USERNAME="cyteen"
PASSWORD="mlpfinsonik"
# RELEASE="unstable"
# RELEASE="excalibur"
RELEASE="ceres"
COMPONENT="main"
ARCH=$(dpkg --print-architecture)
declare -A DEBS
# DEBS["libhyprlang2"]="0.5.1"
# DEBS["libhyprlang2-dbgsym"]="0.5.1"
# DEBS["libhyprlang2-dev"]="0.5.1"
DEBS["hyprwayland-scanner"]="0.1.0"
for key in "${!DEBS[@]}"; do
PACKAGE="${key}"
VERSION="${DEBS[$key]}"
echo "PACKAGE: ${PACKAGE}"
echo "VERSION: ${VERSION}"
# Construct the URL for each package within the loop
# GITEA_URL="https://git2.ring-zero.co.uk/api/v1/packages/${USERNAME}/debian/pools/${RELEASE}/${COMPONENT}/${PACKAGE}/${VERSION}/${ARCH}"
GITEA_URL="https://git2.ring-zero.co.uk/api/v1/packages/${USERNAME}/debian/${PACKAGE}/${VERSION}"
echo ${GITEA_URL}
# Use the constructed URL in the curl command
curl --user ${USERNAME}:${PASSWORD} \
-X DELETE \
-H 'accept: application/json' \
"${GITEA_URL}"
done
# 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}'

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
USERNAME="cyteen"
PASSWORD="mlpfinsonik"
DISTRIBUTION="ceres"
COMPONENT="main"
GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload"
# Check if a .deb file was provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <deb_file>"
exit 1
fi
DEB_FILE="$1"
# Upload the specified .deb file
curl \
--user ${USERNAME}:${PASSWORD} \
--upload-file ./${DEB_FILE} \
${GITEA_URL}
echo "See: automate/020_gitea_dpr.sh for sources.list creation."
echo "deb [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}'

View File

@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -x
USERNAME="cyteen"
PASSWORD="mlpfinsonik"
DISTRIBUTION="ceres"
COMPONENT="main"
# Extract the architecture from the filename
DEB_FILE="$1"
ARCHITECTURE="${DEB_FILE%.*}" # Remove the.deb extension to get the architecture
# Validate the architecture
if [[ $ARCHITECTURE =~ ^(amd64|arm64)$ ]]; then
echo "Invalid architecture. Must be either amd64 or arm64."
exit 1
fi
# Construct the GITEA URL based on the architecture
GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload/${ARCHITECTURE}"
# Upload the specified.deb file
curl \
--user ${USERNAME}:${PASSWORD} \
--upload-file "${DEB_FILE}" \
${GITEA_URL}
# echo "See: automate/020_gitea_dpr.sh for sources.list creation."
# echo "deb [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}'

View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
USERNAME="cyteen"
PASSWORD="mlpfinsonik"
# DISTRIBUTION="unstable"
# DISTRIBUTION="excalibur"
DISTRIBUTION="ceres"
COMPONENT="main"
GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload"
DEBS=(
"wayland-protocols_1.36-0devuan1_all.deb"
"hyprland-protocols_0.2_amd64.deb"
"hyprcursor_0.1.7_amd64.deb"
"hyprwayland-scanner_0.1.0_amd64.deb"
"libhyprlang2_0.5.1-0devuan1_amd64.deb"
"libhyprlang2-dbgsym_0.5.1-0devuan1_amd64.deb"
"libhyprlang-dev_0.5.1-0devuan1_amd64.deb"
)
for DEB_FILE in "${DEBS}"; do
curl --user ${USERNAME}:${PASSWORD} \
--upload-file ./${DEB_FILE} \
${GITEA_URL}
done
echo "See: automate/020_gitea_dpr.sh for sources.list creation."
echo "deb [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}'