A few new install scripts.
This commit is contained in:
parent
63ecba605f
commit
e3743c3f77
|
|
@ -0,0 +1,80 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
GHOSTTY_HOME=${DEST}/.config/ghostty
|
||||
|
||||
sudo apt update
|
||||
sudo apt install ghostty
|
||||
|
||||
# https://ghostty.org/docs/config/reference
|
||||
|
||||
mkdir -p "${GHOSTTY_HOME}"
|
||||
|
||||
# https://gist.githubusercontent.com/adibhanna/c552c452fb244b3b721e3c2432e85cde/raw/a7540b1bfe1d653df303ed2aecf943bc15515752/config
|
||||
# https://www.youtube.com/watch?v=jWuQxU4bDeU&t=7s
|
||||
conf_print_ghostty_config() {
|
||||
cat <<EOF
|
||||
font-family = BerkeleyMono Nerd Font
|
||||
#font-family = Iosevka Nerd Font
|
||||
# font-family = SFMono Nerd Font
|
||||
font-size = 20
|
||||
theme = GruvboxDarkHard
|
||||
shell-integration-features = no-cursor,sudo,no-title
|
||||
cursor-style = block
|
||||
adjust-cell-height = 35%
|
||||
# background-opacity = 0.96
|
||||
|
||||
mouse-hide-while-typing = true
|
||||
mouse-scroll-multiplier = 2
|
||||
|
||||
window-padding-balance = true
|
||||
window-save-state = always
|
||||
macos-titlebar-style=transparent
|
||||
window-colorspace = "display-p3"
|
||||
background = 1C2021
|
||||
# foreground = d4be98
|
||||
|
||||
# keybindings
|
||||
keybind = cmd+s>r=reload_config
|
||||
keybind = cmd+s>x=close_surface
|
||||
|
||||
keybind = cmd+s>n=new_window
|
||||
|
||||
# tabs
|
||||
keybind = cmd+s>c=new_tab
|
||||
keybind = cmd+s>shift+l=next_tab
|
||||
keybind = cmd+s>shift+h=previous_tab
|
||||
keybind = cmd+s>comma=move_tab:-1
|
||||
keybind = cmd+s>period=move_tab:1
|
||||
|
||||
# quick tab switch
|
||||
keybind = cmd+s>1=goto_tab:1
|
||||
keybind = cmd+s>2=goto_tab:2
|
||||
keybind = cmd+s>3=goto_tab:3
|
||||
keybind = cmd+s>4=goto_tab:4
|
||||
keybind = cmd+s>5=goto_tab:5
|
||||
keybind = cmd+s>6=goto_tab:6
|
||||
keybind = cmd+s>7=goto_tab:7
|
||||
keybind = cmd+s>8=goto_tab:8
|
||||
keybind = cmd+s>9=goto_tab:9
|
||||
|
||||
# split
|
||||
keybind = cmd+s>\=new_split:right
|
||||
keybind = cmd+s>-=new_split:down
|
||||
|
||||
keybind = cmd+s>j=goto_split:bottom
|
||||
keybind = cmd+s>k=goto_split:top
|
||||
keybind = cmd+s>h=goto_split:left
|
||||
keybind = cmd+s>l=goto_split:right
|
||||
|
||||
keybind = cmd+s>z=toggle_split_zoom
|
||||
|
||||
keybind = cmd+s>e=equalize_splits
|
||||
|
||||
# other
|
||||
copy-on-select = clipboard
|
||||
EOF
|
||||
}
|
||||
conf_print_ghostty_config | tee "${GHOSTTY_HOME}/config.yaml"
|
||||
|
||||
ghostty +validate-config
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
# xapp gathers the components which are common to multiple GTK desktop
|
||||
# environments (Cinnamon, MATE and Xfce) and required to implement cross-DE solutions.
|
||||
|
||||
# Xreader is a document viewer capable of displaying multiple and single page
|
||||
# document formats like PDF and Postscript.
|
||||
# https://github.com/linuxmint/xreader
|
||||
|
||||
# Xviewer is a simple image viewer which uses the gdk-pixbuf library.
|
||||
# https://github.com/linuxmint/xviewer
|
||||
|
||||
AUTOMATE_HOME="/var/tmp/automate"
|
||||
SCRIPT="build_deb_from_dsc_with_update.sh"
|
||||
BUILD_DIR="/var/tmp/build_xapp"
|
||||
|
||||
# https://github.com/linuxmint/xapp
|
||||
# DSC_FILE="http://packages.linuxmint.com/pool/main/x/xapp/xapp_1.0.0-1.dsc"
|
||||
|
||||
# Source: xapp
|
||||
# Binary: xapps-common, libxapp1, libxapp-dev, gir1.2-xapp-1.0, libxapp-dbg, xapps-doc
|
||||
|
||||
# https://github.com/linuxmint/xapps-common
|
||||
# DSC_FILE="http://packages.linuxmint.com/pool/main/x/xapps-common/xapps-common_1.0.0.dsc"
|
||||
|
||||
# Source: xapps-common
|
||||
# Binary: xapps-common
|
||||
# https://github.com/linuxmint/xplayer
|
||||
# DSC_FILE="http://packages.linuxmint.com/pool/main/x/xplayer/xplayer_1.4.3+betsy.dsc"
|
||||
|
||||
# Source: xplayer
|
||||
# Binary: libxplayer0, xplayer, xplayer-mozilla, xplayer-common, xplayer-dbg, xplayer-plugins, xplayer-plugins-extra, gir1.2-xplayer-1.0, libxplayer-dev
|
||||
|
||||
# https://github.com/linuxmint/xreader
|
||||
# DSC_FILE="http://packages.linuxmint.com/pool/main/x/xreader/xreader_1.4.4+betsy.dsc"
|
||||
|
||||
# Source: xreader
|
||||
# Binary: xreader, xreader-dbg, xreader-common, libxreaderview3, libxreaderview-dev, libxreaderview3-dbg, libxreaderdocument3, libxreaderdocument-dev, libxreaderdocument3-dbg, gir1.2-xreader
|
||||
|
||||
# https://github.com/linuxmint/xviewer
|
||||
# DSC_FILE="http://packages.linuxmint.com/pool/main/x/xviewer/xviewer_1.4.3+betsy.dsc"
|
||||
|
||||
# Source: xviewer
|
||||
# Binary: xviewer, xviewer-dbg, xviewer-dev
|
||||
|
||||
print_conf_watch() {
|
||||
local XAPP="$1"
|
||||
cat <<EOF
|
||||
version: 5
|
||||
Source: https://github.com/linuxmint/${XAPP}/tags
|
||||
Matching-Pattern: .*/archive/refs/tags/v?@ANY_VERSION@@ARCHIVE_EXT@
|
||||
EOF
|
||||
}
|
||||
# conf_print_watch | debian/watch
|
||||
|
||||
DSC_URLS=(
|
||||
"http://packages.linuxmint.com/pool/main/x/xapp/xapp_1.0.3+betsy.dsc"
|
||||
"http://packages.linuxmint.com/pool/main/x/xplayer/xplayer_1.4.3+betsy.dsc"
|
||||
"http://packages.linuxmint.com/pool/main/x/xreader/xreader_1.4.4+betsy.dsc"
|
||||
"http://packages.linuxmint.com/pool/main/x/xviewer/xviewer_1.4.3+betsy.dsc"
|
||||
)
|
||||
|
||||
for DSC_URL in "${DSC_URLS[@]}"; do
|
||||
echo "Building from $DSC_URL"
|
||||
bash "${AUTOMATE_HOME}/${SCRIPT}" "${BUILD_DIR}" "$DSC_URL"
|
||||
FILENAME=$(basename "$DSC_URL")
|
||||
XAPP="${FILENAME%%_*}"
|
||||
|
||||
if [[ -d "${BUILD_DIR}/debian" ]]; then
|
||||
conf_print_watch "${XAPP}" | tee "${BUILD_DIR}/debian/watch"
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Build failed for $DSC_URL"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
DEST=${1-/etc/skel}
|
||||
NEOVIDE_HOME=${DEST}/.config/neovide
|
||||
NEOVIDE_CONFIG=${NEOVIDE_HOME}/config.toml
|
||||
NVIM_HOME="${DEST}/.config/nvim"
|
||||
NVIM_PLUGINS_HOME=${NVIM_HOME}/lua/plugins
|
||||
|
||||
mkdir -p "${NEOVIDE_HOME}"
|
||||
sudo apt update --qq
|
||||
sudo apt install -y curl \
|
||||
gnupg ca-certificates git \
|
||||
gcc-multilib g++-multilib cmake libssl-dev pkg-config \
|
||||
libfreetype6-dev libasound2-dev libexpat1-dev libxcb-composite0-dev \
|
||||
libbz2-dev libsndio-dev freeglut3-dev libxmu-dev libxi-dev libfontconfig1-dev \
|
||||
libxcursor-dev
|
||||
|
||||
printf "Using cargo to fetch, build and install, it's a rust thing."
|
||||
cargo install --git https://github.com/neovide/neovide
|
||||
|
||||
conf_print_neovide_conf() {
|
||||
cat <<'EOF'
|
||||
backtraces-path = "${HOME}/.local/share/neovide/neovide_backtraces.log" # see below for the default platform specific location
|
||||
chdir = "/path/to/dir"
|
||||
fork = false
|
||||
frame = "full"
|
||||
# grid = "420x240" # mutually exclusive with `size` and `maximized`
|
||||
# size = "1200x800" # mutually exclusive with `grid` and `maximized`
|
||||
idle = true
|
||||
icon = "${HOME}/.local/share/nvim/lazy/neovide/assets/neovide.ico"
|
||||
maximized = false
|
||||
mouse-cursor-icon = "arrow" # "i-beam"
|
||||
neovim-bin = "/usr/bin/nvim" # in reality found dynamically on $PATH if unset
|
||||
no-multigrid = false
|
||||
opengl = false # macOS/Windows only
|
||||
# server = "/tmp/nvim.sock" # or "127.0.0.1:7777"
|
||||
srgb = false # platform-specific: false (Linux/macOS) or true (Windows)
|
||||
tabs = true
|
||||
title-hidden = false
|
||||
vsync = true
|
||||
# wayland-app-id = "neovide"
|
||||
wsl = false
|
||||
# x11-wm-class = "neovide"
|
||||
# x11-wm-class-instance = "neovide"
|
||||
|
||||
[font]
|
||||
normal = [] # Will use the bundled Fira Code Nerd Font by default
|
||||
size = 14.0
|
||||
|
||||
[box-drawing]
|
||||
# "font-glyph", "native" or "selected-native"
|
||||
mode = "font-glyph"
|
||||
|
||||
[box-drawing.sizes]
|
||||
default = [2, 4] # Thin and thick values respectively, for all sizes
|
||||
|
||||
EOF
|
||||
}
|
||||
conf_print_neovide_conf | tee "${NEOVIDE_CONFIG}/neovide_config.toml"
|
||||
|
||||
## Font scaling t o match normal font size in neovide
|
||||
# vim.g.neovide_scale_factor controls the font scaling dynamically.
|
||||
# vim.g.neovide_increment_scale_factor sets the step size for scaling (e.g., 0.1 = 10% change per keypress).
|
||||
# vim.g.neovide_min_scale_factor and vim.g.neovide_max_scale_factor prevent extreme scaling.
|
||||
# Keymaps allow real-time adjustment using Ctrl+=, Ctrl+-, and Ctrl+0.
|
||||
|
||||
conf_print_neovide_lua() {
|
||||
cat <<EOF
|
||||
-- lua/plugins/neovide_scaling.lua
|
||||
return {
|
||||
"neovide/neovide", -- Required: any valid plugin name (even if not used)
|
||||
config = function()
|
||||
vim.g.neovide_scale_factor = 0.5
|
||||
vim.g.neovide_min_scale_factor = 0.7
|
||||
vim.g.neovide_max_scale_factor = 2.0
|
||||
vim.g.neovide_increment_scale_factor = 0.1
|
||||
|
||||
local function change_scale_factor(increment)
|
||||
local new_scale = vim.g.neovide_scale_factor + increment
|
||||
vim.g.neovide_scale_factor = math.max(
|
||||
vim.g.neovide_min_scale_factor,
|
||||
math.min(vim.g.neovide_max_scale_factor, new_scale)
|
||||
)
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<C-=>", function() change_scale_factor(0.1) end, { desc = "Increase scale" })
|
||||
vim.keymap.set("n", "<C-->", function() change_scale_factor(-0.1) end, { desc = "Decrease scale" })
|
||||
vim.keymap.set("n", "<C-0>", function() vim.g.neovide_scale_factor = 1.0 end, { desc = "Reset scale" })
|
||||
|
||||
-- Ctrl+Scrollwheel font size up/down like Nvy or VSCode.
|
||||
vim.keymap.set({ "n", "v" }, "<C-ScrollWheelUp>", ":lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1<CR>")
|
||||
vim.keymap.set({ "n", "v" }, "<C-ScrollWheelDown>", ":lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor - 0.1<CR>")
|
||||
end,
|
||||
}
|
||||
EOF
|
||||
}
|
||||
conf_print_neovide_lua | tee "${NVIM_PLUGINS_HOME}/neovide_scaling.lua"
|
||||
|
||||
conf_print_zsh_shell_wrapper() {
|
||||
cat <<EOF
|
||||
function n() {
|
||||
command neovide --mouse-cursor-icon i-beam
|
||||
}
|
||||
EOF
|
||||
}
|
||||
conf_print_zsh_shell_wrapper | tee "${DEST}/.zsh_aliases.d/010_neovide.zsh"
|
||||
|
||||
# Install desktop file
|
||||
# install -m644 "${DEST}/.local/share/nvim/lazy/neovide/assets/neovide.desktop" ~/.local/share/applications/neovide.desktop
|
||||
|
||||
conf_print_neovide_desktop() {
|
||||
cat <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=sh -c 'exec ${HOME}/.cargo/bin/neovide %F'
|
||||
Icon=${HOME}/.local/share/icons/hicolor/scalable/apps/neovide.png
|
||||
Name=Neovide
|
||||
Keywords=Text;Editor;
|
||||
Categories=Utility;TextEditor;
|
||||
Comment=No Nonsense Neovim Client in Rust
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
StartupNotify=true
|
||||
StartupWMClass=neovide
|
||||
EOF
|
||||
}
|
||||
conf_print_neovide_desktop | tee "${DEST}/.local/share/applications/neovide.desktop"
|
||||
|
||||
xfce4-panel --add=launcher "${DEST}/.local/share/applications/neovide.desktop"
|
||||
|
||||
# Add an icon
|
||||
mkdir -p ~/.local/share/icons/hicolor/scalable/apps/
|
||||
cp "${DEST}/.local/share/nvim/lazy/neovide/assets/neovide-256x256.png" \
|
||||
"${DEST}/.local/share/icons/hicolor/scalable/apps/neovide.png"
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Needs to be wrapped in a checkinstall."
|
||||
|
||||
exit 0
|
||||
|
||||
DIST=${1:-/etc/skel}
|
||||
TICKER_HOME=${DIST}/.config/ticker
|
||||
|
||||
conf_print_ticker_install() {
|
||||
cat <<EOF
|
||||
curl -Ls https://api.github.com/repos/achannarasappa/ticker/releases/latest \
|
||||
| grep -wo "https.*linux-amd64*.tar.gz" \
|
||||
| wget -qi - \
|
||||
&& tar -xvf ticker*.tar.gz ticker \
|
||||
&& chmod +x ./ticker \
|
||||
&& sudo mv ticker /usr/local/bin/
|
||||
EOF
|
||||
}
|
||||
conf_print_ticker_install
|
||||
|
||||
conf_print_ticker_config() {
|
||||
cat <<EOF
|
||||
# ~/.ticker.yaml
|
||||
show-summary: true
|
||||
show-tags: true
|
||||
show-fundamentals: true
|
||||
show-separator: true
|
||||
show-holdings: true
|
||||
interval: 5
|
||||
currency: USD
|
||||
currency-summary-only: false
|
||||
watchlist:
|
||||
- NET
|
||||
- TEAM
|
||||
- ESTC
|
||||
- BTC-USD # Bitcoin price via Yahoo
|
||||
- SOL.X # Solana price via CoinGecko
|
||||
- SAMOYEDCOIN.CG # Samoyed price via CoinGecko
|
||||
- CARDANO.CC # Samoyed price via CoinCap
|
||||
lots:
|
||||
- symbol: "ABNB"
|
||||
quantity: 35.0
|
||||
unit_cost: 146.00
|
||||
- symbol: "ARKW"
|
||||
quantity: 20.0
|
||||
unit_cost: 152.25
|
||||
- symbol: "ARKW"
|
||||
quantity: 20.0
|
||||
unit_cost: 145.35
|
||||
fixed_cost: 7.00 # e.g. brokerage commission fee
|
||||
groups:
|
||||
- name: crypto
|
||||
watchlist:
|
||||
- SHIB-USD
|
||||
- VGX-USD
|
||||
holdings:
|
||||
- symbol: SOL1-USD
|
||||
quantity: 17
|
||||
unit_cost: 159.10
|
||||
EOF
|
||||
}
|
||||
conf_print_ticker_config | tee "${TICKER_HOME}/ticker.conf"
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
DIST=${1:-/etc/skel}
|
||||
TICKRS_HOME=${DIST}/.config/tickrs
|
||||
|
||||
cargo install tickrs
|
||||
|
||||
conf_print_tickrs_config() {
|
||||
cat <<EOF
|
||||
# List of ticker symbols to start app with
|
||||
#symbols:
|
||||
# - SPY
|
||||
# - AMD
|
||||
|
||||
# Chart type to start app with
|
||||
# Default is line
|
||||
# Possible values: line, candle, kagi
|
||||
#chart_type: candle
|
||||
|
||||
# Use specified time frame when starting program and when new stocks are added
|
||||
# Default is 1D
|
||||
# Possible values: 1D, 1W, 1M, 3M, 6M, 1Y, 5Y
|
||||
#time_frame: 1D
|
||||
|
||||
# Interval to update data from API (seconds)
|
||||
# Default is 1
|
||||
#update_interval: 1
|
||||
|
||||
# Enable pre / post market hours for graphs
|
||||
#enable_pre_post: true
|
||||
|
||||
# Hide help icon in top right
|
||||
#hide_help: true
|
||||
|
||||
# Hide previous close line on 1D chart
|
||||
#hide_prev_close: true
|
||||
|
||||
# Hide toggle block
|
||||
#hide_toggle: true
|
||||
|
||||
# Show volumes graph
|
||||
#show_volumes: true
|
||||
|
||||
# Show x-axis labels
|
||||
#show_x_labels: true
|
||||
|
||||
# Start in summary mode
|
||||
#summary: true
|
||||
|
||||
# Truncate pre market graphing to only 30 minutes prior to markets opening
|
||||
#trunc_pre: true
|
||||
|
||||
# Ticker options for Kagi charts
|
||||
#
|
||||
# A map of each ticker with reversal and/or price fields (both optional). If no
|
||||
# entry is defined for a symbol, a default of 'close' price and 1% for 1D and 4%
|
||||
# for non-1D timeframes is used. This can be updated in the GUI by pressing 'e'
|
||||
#
|
||||
# reversal can be supplied as a single value, or a map on time frame to give each
|
||||
# time frame a different reversal amount
|
||||
#
|
||||
# reversal.type can be 'amount' or 'pct'
|
||||
#
|
||||
# price can be 'close' or 'high_low'
|
||||
#
|
||||
#kagi_options:
|
||||
# SPY:
|
||||
# reversal:
|
||||
# type: amount
|
||||
# value: 5.00
|
||||
# price: close
|
||||
# AMD:
|
||||
# price: high_low
|
||||
# TSLA:
|
||||
# reversal:
|
||||
# type: pct
|
||||
# value: 0.08
|
||||
# NVDA:
|
||||
# reversal:
|
||||
# 1D:
|
||||
# type: pct
|
||||
# value: 0.02
|
||||
# 5Y:
|
||||
# type: pct
|
||||
# value: 0.10
|
||||
|
||||
# Apply a custom theme
|
||||
#
|
||||
# All colors are optional. If commented out / omitted, the color will get sourced
|
||||
# from your terminal color scheme
|
||||
#theme:
|
||||
# background: '#403E41'
|
||||
# gray: '#727072'
|
||||
# profit: '#ADD977'
|
||||
# loss: '#FA648A'
|
||||
# text_normal: '#FCFCFA'
|
||||
# text_primary: '#FFDA65'
|
||||
# text_secondary: '#79DBEA'
|
||||
# border_primary: '#FC9766'
|
||||
# border_secondary: '#FCFCFA'
|
||||
# border_axis: '#FC9766'
|
||||
# highlight_focused: '#FC9766'
|
||||
# highlight_unfocused: '#727072'
|
||||
EOF
|
||||
}
|
||||
conf_print_tickrs_config | tee ${TICKRS_HOME}/config.yml
|
||||
Loading…
Reference in New Issue