Add initial xlibre/X11 configs and installs, add misc install programs
This commit is contained in:
@@ -8,8 +8,12 @@ copy_file() {
|
|||||||
from=$1
|
from=$1
|
||||||
to=$2
|
to=$2
|
||||||
filename=$(basename "$from")
|
filename=$(basename "$from")
|
||||||
|
[ "$3" = "--sudo" ] &&
|
||||||
|
echo_and_execute sudo cp -RPp "$from" "$to/$filename" ||
|
||||||
|
{
|
||||||
[ -e "$to/$filename" ] && rm "$to/$filename"
|
[ -e "$to/$filename" ] && rm "$to/$filename"
|
||||||
echo_and_execute cp -RPp "$from" "$to/$filename"
|
echo_and_execute cp -RPp "$from" "$to/$filename"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_dir() {
|
copy_dir() {
|
||||||
@@ -42,6 +46,8 @@ copy_file src_files/shell/.profile $HOME
|
|||||||
copy_file src_files/shell/profile $XDG_CONFIG_HOME
|
copy_file src_files/shell/profile $XDG_CONFIG_HOME
|
||||||
copy_file src_files/shell/rc $XDG_CONFIG_HOME
|
copy_file src_files/shell/rc $XDG_CONFIG_HOME
|
||||||
copy_file src_files/.config/zsh/.zshenv $HOME
|
copy_file src_files/.config/zsh/.zshenv $HOME
|
||||||
|
# TODO: move this into xdg type dir if possible
|
||||||
|
copy_file src_files/.config/X11/xinit/.xinitrc $HOME
|
||||||
|
|
||||||
# copy over configs, executables, and scripts
|
# copy over configs, executables, and scripts
|
||||||
copy_dir src_files/.config $XDG_CONFIG_HOME
|
copy_dir src_files/.config $XDG_CONFIG_HOME
|
||||||
@@ -58,8 +64,19 @@ IFS=","; for obs_dir in $OBSIDIAN_WORKSPACES_TO_CONFIGURE; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# TODO: get reaper config set up
|
# TODO: get reaper config set up
|
||||||
# [[ "$OSTYPE" = *"darwin"* ]] &&
|
# case "$OSTYPE" in
|
||||||
|
# (*darwin*)
|
||||||
# sym_link "$XDG_CONFIG_HOME/REAPER" "$HOME/Library/Application Support/REAPER"
|
# sym_link "$XDG_CONFIG_HOME/REAPER" "$HOME/Library/Application Support/REAPER"
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
|
||||||
|
# copy settings/configs to /etc locations
|
||||||
|
case "$OSTYPE" in
|
||||||
|
(*darwin*)
|
||||||
|
;;
|
||||||
|
(*) copy_file src_files/etc/47-elogind.conf /etc/elogind/logind.conf.d --sudo
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# set up themes and theme-switcher
|
# set up themes and theme-switcher
|
||||||
! [ "$1" = "--skip-theme-config" ] && ./theme_config.sh
|
! [ "$1" = "--skip-theme-config" ] && ./theme_config.sh
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# xlibre/x11 - adding xrandr modes
|
||||||
|
|
||||||
|
## 2026-01-16, artix linux, framework 13in laptop
|
||||||
|
|
||||||
|
### to add 1920x1280 resolution option:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dispmanage_modeline=$(cvt 1920 1280 60 | sed -n '2p' | sed -E "s/^Modeline //g")
|
||||||
|
dispmanage_mode_id=$(printf "%s" "$dispmanage_modeline" | sed -E "s/^([^ ]+)\s.*$/\1/g")
|
||||||
|
printf "%s" "$modeline" | xargs xrandr --newmode
|
||||||
|
printf "%s" "$mode_id" | xargs xrandr --addmode eDP
|
||||||
|
# NOTE: the lines above have been added to .xinitrc, just leaving here for reference
|
||||||
|
|
||||||
|
# then, add the $mode_id value to my display-manage script as the target mode:
|
||||||
|
DISPMANAGE_LAPTOP_MODE='"1920x1280_60.00"'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
@@ -6,15 +6,19 @@
|
|||||||
- add dmenu
|
- add dmenu
|
||||||
- add st
|
- add st
|
||||||
- xresources working? use from/within theme-changing logic?
|
- xresources working? use from/within theme-changing logic?
|
||||||
|
- finish xlibre setup, including installing any needed packages and doing config
|
||||||
- finished artix/dinit setup
|
- finished artix/dinit setup
|
||||||
- include figuring out wiregaurd/vpn stuff
|
- include figuring out wiregaurd/vpn stuff
|
||||||
- web browsers config and install (primary: qutebrowser, alt1: brave, alt2: tor?)
|
- also include remapping ctrl, alt, and super keys as needed
|
||||||
|
- web browsers config and install (primary: qutebrowser, alt1: brave, alt2: tor)
|
||||||
- config for mpd, and client(s), (mpd clients to consider: mpc, ncmpcpp, ncmpc, inori)
|
- config for mpd, and client(s), (mpd clients to consider: mpc, ncmpcpp, ncmpc, inori)
|
||||||
- get find, xargs, and awk (use nawk) as unified as i can across system types
|
- get find, xargs, and awk (use nawk) as unified as i can across system types
|
||||||
|
|
||||||
## optional
|
## optional
|
||||||
|
|
||||||
- configured neomutt
|
- configured neomutt
|
||||||
|
- seems mpv install (maybe others?) bring in wayland, see if i can remove it
|
||||||
|
- figured out nvim debug options for linux and macos, then update nvim's dap.lua
|
||||||
- picked and configured rss reader
|
- picked and configured rss reader
|
||||||
- newsboat? others? option with inbox and separate queues?
|
- newsboat? others? option with inbox and separate queues?
|
||||||
- make all these scripts POSIX-compliant (or at least usable in ksh/oksh)
|
- make all these scripts POSIX-compliant (or at least usable in ksh/oksh)
|
||||||
|
|||||||
4
installs_and_builds/custom_openssh_linux_debian
Executable file
4
installs_and_builds/custom_openssh_linux_debian
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# for debian, use package name `openssh-server` instead of `openssh`
|
||||||
|
${=BOX_SETUP_INSTALL_COMMAND} openssh-server
|
||||||
17
installs_and_builds/custom_xlibre_default
Executable file
17
installs_and_builds/custom_xlibre_default
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# change package name; on artix it is 'pandoc-bin'
|
||||||
|
${=BOX_SETUP_INSTALL_COMMAND} \
|
||||||
|
xlibre-xserver \
|
||||||
|
xlibre-video-amdgpu \
|
||||||
|
xlibre-input-libinput \
|
||||||
|
libx11 \
|
||||||
|
libxft \
|
||||||
|
libxinerama
|
||||||
|
|
||||||
|
# `xlibre-video-amdgpu` depends on system gpu; ref lspci; maybe use `xlibre-drivers` instead
|
||||||
|
# if `xlibre-input-libinput` doesn't work, try `xlibre-input-evdev` (generic module) if libinput does not work
|
||||||
|
|
||||||
|
${=BOX_SETUP_INSTALL_COMMAND} \
|
||||||
|
xorg-xinit \
|
||||||
|
xorg-xrandr
|
||||||
3
installs_and_builds/custom_xlibre_macos_default
Executable file
3
installs_and_builds/custom_xlibre_macos_default
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "intentionally skipping build/installation for macos"
|
||||||
@@ -2,9 +2,12 @@ gcc
|
|||||||
musl
|
musl
|
||||||
coreutils
|
coreutils
|
||||||
findutils
|
findutils
|
||||||
|
xlibre
|
||||||
make
|
make
|
||||||
mpv
|
mpv
|
||||||
kitty
|
kitty
|
||||||
|
st
|
||||||
|
dmenu
|
||||||
zsh
|
zsh
|
||||||
ksh
|
ksh
|
||||||
tmux
|
tmux
|
||||||
@@ -14,6 +17,8 @@ curl
|
|||||||
grep
|
grep
|
||||||
ripgrep
|
ripgrep
|
||||||
sed
|
sed
|
||||||
|
less
|
||||||
|
openssh
|
||||||
fzf
|
fzf
|
||||||
jq
|
jq
|
||||||
parallel
|
parallel
|
||||||
@@ -26,5 +31,7 @@ git
|
|||||||
calcurse
|
calcurse
|
||||||
zathura
|
zathura
|
||||||
gimp
|
gimp
|
||||||
|
dwm
|
||||||
|
qutebrowser
|
||||||
aerospace
|
aerospace
|
||||||
skhd
|
skhd
|
||||||
|
|||||||
@@ -18,8 +18,9 @@ echo "---- making system dirs ----------------"
|
|||||||
|
|
||||||
# additional directories for how i'm organizing my system
|
# additional directories for how i'm organizing my system
|
||||||
! [ -d "$DIR_HOME_BOX" ] && mkdir -p "$DIR_HOME_BOX"
|
! [ -d "$DIR_HOME_BOX" ] && mkdir -p "$DIR_HOME_BOX"
|
||||||
! [ -d "$DIR_MUSIC" ] && mkdir -p "$DIR_MUSIC"
|
! [ -d "$DIR_INBOX" ] && mkdir -p "$DIR_INBOX"
|
||||||
! [ -d "$DIR_NOTES" ] && mkdir -p "$DIR_NOTES"
|
! [ -d "$DIR_NOTES" ] && mkdir -p "$DIR_NOTES"
|
||||||
|
! [ -d "$DIR_MUSIC" ] && mkdir -p "$DIR_MUSIC"
|
||||||
! [ -d "$DIR_DEV" ] && mkdir -p "$DIR_DEV"
|
! [ -d "$DIR_DEV" ] && mkdir -p "$DIR_DEV"
|
||||||
! [ -d "$DIR_GIT_PROJECTS" ] && mkdir -p "$DIR_GIT_PROJECTS"
|
! [ -d "$DIR_GIT_PROJECTS" ] && mkdir -p "$DIR_GIT_PROJECTS"
|
||||||
! [ -d "$DIR_GIT_PROJECTS/me" ] && mkdir -p "$DIR_GIT_PROJECTS/me"
|
! [ -d "$DIR_GIT_PROJECTS/me" ] && mkdir -p "$DIR_GIT_PROJECTS/me"
|
||||||
|
|||||||
38
src_files/.config/X11/xinit/.xinitrc
Normal file
38
src_files/.config/X11/xinit/.xinitrc
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
prefix="/usr"
|
||||||
|
exec_prefix="${prefix}"
|
||||||
|
xrdb="xrdb"
|
||||||
|
xinitdir="/etc/X11/xinit"
|
||||||
|
xmodmap="xmodmap"
|
||||||
|
|
||||||
|
userresources="$HOME/.Xresources"
|
||||||
|
usermodmap="$HOME/.Xmodmap"
|
||||||
|
sysresources="$xinitdir/.Xresources"
|
||||||
|
sysmodmap="$xinitdir/.Xmodmap"
|
||||||
|
|
||||||
|
# merge in defaults and keymaps
|
||||||
|
|
||||||
|
[ -x /usr/bin/cpp ] && xinit_nocpp_opt="" || xinit_nocpp_opt="-nocpp"
|
||||||
|
[ -f "$sysresources" ] && "$xrdb" "$xinit_nocpp_opt" -merge "$sysresources"
|
||||||
|
[ -f "$sysmodmap" ] && "$xmodmap" "$sysmodmap"
|
||||||
|
[ -f "$userresources" ] && "$xrdb" -nocpp -merge "$userresources"
|
||||||
|
[ -f "$usermodmap" ] && "$xmodmap" "$usermodmap"
|
||||||
|
|
||||||
|
# source xinitdrc.d script files
|
||||||
|
[ -d "$xinitdir"/xinitrc.d ] && {
|
||||||
|
for f in "$xinitdir/xinitrc.d"/?*.sh ; do
|
||||||
|
[ -x "$f" ] && . "$f"
|
||||||
|
done
|
||||||
|
unset f
|
||||||
|
}
|
||||||
|
|
||||||
|
# xrandr mode for laptop display (framework 13in), target 1920x1280 resolution
|
||||||
|
dispmanage_modeline=$(cvt 1920 1280 60 | sed -n '2p' | sed -E "s/^Modeline //g")
|
||||||
|
dispmanage_mode_id=$(printf "%s" "$dispmanage_modeline" | sed -E "s/^([^ ]+)\s.*$/\1/g")
|
||||||
|
printf "%s" "$dispmanage_modeline" | xargs xrandr --newmode
|
||||||
|
printf "%s" "$dispmanage_mode_id" | xargs xrandr --addmode eDP
|
||||||
|
xrandr --output eDP --mode "1920x1280_60.00"
|
||||||
|
|
||||||
|
# start window manager
|
||||||
|
exec dwm
|
||||||
@@ -5,10 +5,10 @@ return {
|
|||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
dap.set_log_level("DEBUG")
|
dap.set_log_level("DEBUG")
|
||||||
|
|
||||||
dap.adapters.codelldb = {
|
-- dap.adapters.codelldb = {
|
||||||
type = "executable",
|
-- type = "executable",
|
||||||
command = "codelldb",
|
-- command = "codelldb",
|
||||||
}
|
-- }
|
||||||
|
|
||||||
local dapConfigArgsInput = function()
|
local dapConfigArgsInput = function()
|
||||||
return vim.split(vim.fn.input("args: "), " ")
|
return vim.split(vim.fn.input("args: "), " ")
|
||||||
@@ -104,7 +104,7 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("mason-nvim-dap").setup({
|
require("mason-nvim-dap").setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"codelldb",
|
-- "codelldb",
|
||||||
-- "delve",
|
-- "delve",
|
||||||
},
|
},
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[ -r "$HOME/.config/profile" ] && . "$HOME/.config/profile"
|
[ -r "$HOME/.config/profile" ] && . "$HOME/.config/profile"
|
||||||
[ -r "$XDG_CONFIG_HOME/rc" ] && . "$XDG_CONFIG_HOME/rc"
|
[ -r "$XDG_CONFIG_HOME/rc" ] && . "$XDG_CONFIG_HOME/rc"
|
||||||
|
|
||||||
# overwrite PS1 here, since zsh to use different special chars
|
# overwrite PS1 here, since zsh decided to use different special chars
|
||||||
export PS1="%n@%m %1~ %# "
|
export PS1="%n@%m %1~ %# "
|
||||||
|
|||||||
63
src_files/.local/scripts/display-manage
Executable file
63
src_files/.local/scripts/display-manage
Executable file
@@ -0,0 +1,63 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# NOTE: just use this for recurring cases; if i'm doing a one-off case such presenting at
|
||||||
|
# an event or temporarily using more than one external monitor, then i probably
|
||||||
|
# would be better off just writing a one-time script in prep for that case;
|
||||||
|
# example where one external is DisplayPort-1, another is HDMI-1, and laptop is eDP:
|
||||||
|
# xrandr --query # to get devices and status
|
||||||
|
# xrandr --output DisplayPort-1 --primary --auto --output HDMI-1 --auto --output eDP --auto
|
||||||
|
|
||||||
|
DISPMANAGE_EXT_PORT_ID_PREFIX="DisplayPort"
|
||||||
|
DISPMANAGE_LAPTOP_ID="eDP"
|
||||||
|
DISPMANAGE_LAPTOP_MODE='"1920x1280_60.00"'
|
||||||
|
|
||||||
|
non_primary_monitors_off() {
|
||||||
|
xrandr |
|
||||||
|
grep -v "^Screen" |
|
||||||
|
grep -v "^\s" |
|
||||||
|
grep -v "primary" |
|
||||||
|
while IFS="\n " read -r target_mon_id remaining_text; do
|
||||||
|
xrandr --output "$target_mon_id" --off
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
solo_monitor_mode() {
|
||||||
|
mode_id="--auto"
|
||||||
|
[ "$1" = "$DISPMANAGE_LAPTOP_ID" ] &&
|
||||||
|
[ -n "$DISPMANAGE_LAPTOP_MODE" ] &&
|
||||||
|
mode_id="--mode $DISPMANAGE_LAPTOP_MODE"
|
||||||
|
echo "$mode_id" | xargs xrandr --output "$1" --primary
|
||||||
|
non_primary_monitors_off
|
||||||
|
! [ "$2" = "--quiet" ] && echo "display-manage: solo monitor mode, $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
primary_mon_id=""
|
||||||
|
case "$1" in
|
||||||
|
(laptop | laptop-only)
|
||||||
|
primary_mon_id="$DISPMANAGE_LAPTOP_ID"
|
||||||
|
;;
|
||||||
|
(ext | external)
|
||||||
|
primary_mon_id=$(
|
||||||
|
xrandr |
|
||||||
|
grep "^$DISPMANAGE_EXT_PORT_ID_PREFIX.*\sconnected" |
|
||||||
|
sed -n "1p" |
|
||||||
|
sed -E "s/^([^ ]+).*$/\1/g"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ -z "$primary_mon_id" ] &&
|
||||||
|
echo "display-manage: target monitor not detected or not configured; using laptop" &&
|
||||||
|
solo_monitor_mode "$DISPMANAGE_LAPTOP_ID" &&
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
case "$2" in
|
||||||
|
(m | mirror)
|
||||||
|
solo_monitor_mode "$primary_mon_id" --quiet
|
||||||
|
xrandr --output "$DISPMANAGE_LAPTOP_ID" --auto --same-as "$primary_mon_id"
|
||||||
|
echo "display-manage: $primary_mon_id monitor, primary; laptop monitor, mirror"
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
solo_monitor_mode "$primary_mon_id"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
2
src_files/etc/47-elogind.conf
Normal file
2
src_files/etc/47-elogind.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[Login]
|
||||||
|
HandleLidSwitchDocked=ignore
|
||||||
@@ -23,6 +23,8 @@ alias nv='nvim'
|
|||||||
alias ths='theme-set'
|
alias ths='theme-set'
|
||||||
alias thw='theme-update-wallpaper'
|
alias thw='theme-update-wallpaper'
|
||||||
alias tmi='tmux-session-init'
|
alias tmi='tmux-session-init'
|
||||||
|
alias dme='display-manage external'
|
||||||
|
alias dml='display-manage laptop'
|
||||||
|
|
||||||
# executable overrides
|
# executable overrides
|
||||||
alias ls='ls -F'
|
alias ls='ls -F'
|
||||||
|
|||||||
Reference in New Issue
Block a user