Improve subfolder management for external config
parent
92bff24fab
commit
fcb5f5aa9d
|
@ -1,7 +0,0 @@
|
|||
Xft.autohint: 0
|
||||
Xft.lcdfilter: lcddefault
|
||||
Xft.hintstyle: hintfull
|
||||
Xft.hinting: 1
|
||||
Xft.antialias: 1
|
||||
Xft.rgba: rgb
|
||||
|
|
@ -0,0 +1 @@
|
|||
/etc/NetworkManager/conf.d
|
|
@ -0,0 +1,2 @@
|
|||
[device]
|
||||
wifi.backend=iwd
|
|
@ -22,6 +22,7 @@ nemo
|
|||
neofetch
|
||||
network-manager-applet
|
||||
networkmanager
|
||||
nm-connection-editor
|
||||
noto-fonts-emoji
|
||||
numlockx
|
||||
obsidian
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
width = (0, 400)
|
||||
height = 100
|
||||
offset = 15x15
|
||||
offset = 15x70
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[variables]
|
||||
dpi = 100
|
||||
dpi = 110
|
||||
height = 70
|
||||
top_left = powermenu system-uptime-pretty battery player-mpris
|
||||
top_center = xwindow
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/etc/systemd/system/updatedb.timer.d/
|
|
@ -20,7 +20,7 @@ ARCH_PACKAGES="bootstrap"
|
|||
MERGE_DIRS="${I3_CONFIG} ${POLYBAR_CONFIG} ${ARCH_PACKAGES}"
|
||||
|
||||
# Check if a file has been modified and deleted since last commit, if so perform an action
|
||||
# $1 : path of file
|
||||
# $1 : relative path starting from the folder with "dest"
|
||||
# $2 : command to launch if file has been created of modifed
|
||||
# $3 : command to launch if file has been deleted
|
||||
function check_copy() {
|
||||
|
@ -85,16 +85,18 @@ if [ ! -z "$INIT" ]; then
|
|||
echo -e "* Installing base Arch packages..."
|
||||
yay -Syu --needed --noconfirm - < ${CONFIG}/${ARCH_PACKAGES}/${FINAL_CONFIG}
|
||||
echo -e "* Changing shell to ZSH..."
|
||||
chsh -s $(which zsh)
|
||||
sudo chsh -s $(which zsh)
|
||||
# https://man.archlinux.org/man/rofi-dmenu.5
|
||||
echo -e "* Symlink dmenu → rofi..."
|
||||
sudo ln -sf /usr/bin/rofi /usr/bin/dmenu
|
||||
echo -e "* Enabling required systemd units..."
|
||||
sudo systemctl enable --now NetworkManager
|
||||
sudo systemctl enable --now systemd-timesyncd
|
||||
# iwd will be used as a backend for NetworkManager
|
||||
sudo systemctl disable wpa_supplicant
|
||||
echo -e "* Ensure hardware clock is up to date..."
|
||||
sudo hwclock --systohc
|
||||
# So that "Open in Terminal" works in Nemo
|
||||
# So that "Open in Terminal" works inc Nemo
|
||||
echo -e "* Make 'Open Terminal' work in Nemo..."
|
||||
gsettings set org.cinnamon.desktop.default-applications.terminal exec i3-sensible-terminal
|
||||
# For screenshots
|
||||
|
@ -132,11 +134,20 @@ for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do
|
|||
DEST=`cat ${f}`
|
||||
# Get all files, either regular files or symlinks, which are not the destination file nor specific desktop/laptop files
|
||||
# This is because if desktop/laptop files exist, they already have a symlink pointing to them at this stage
|
||||
for config_file in `find ${DIR} -regextype posix-extended -mindepth 1 \( -type f -o -type l \) -not \( -regex "${ENV_EXT_REGEXP}" -o -name "${DEST_FILENAME}" \)`; do
|
||||
# We want to get the path relative to the directory we are searching in, so subfolders are kept when copying
|
||||
for config_file in `find ${DIR} -regextype posix-extended -mindepth 1 \( -type f -o -type l \) -not \( -regex "${ENV_EXT_REGEXP}" -o -name "${DEST_FILENAME}" \) -exec realpath --relative-to ${DIR} {} \;`; do
|
||||
# If we have to copy to a subfolder, extract it
|
||||
if echo ${config_file} | grep -q '/'; then
|
||||
subfolder=${config_file%/*}
|
||||
else
|
||||
subfolder=''
|
||||
fi
|
||||
filename=${config_file##*/}
|
||||
# Now copy to destination
|
||||
sudo mkdir -p ${DEST}
|
||||
# ##* strips the base path, so we manipulate absolute paths by concatening with $DEST
|
||||
check_copy "${config_file}" "sudo cp ${config_file} ${DEST}" "sudo rm ${DEST}/${config_file##*/}"
|
||||
real_dest=${DEST}/${subfolder}
|
||||
sudo mkdir -p ${real_dest}
|
||||
absolute_source=`realpath "${DIR}/${config_file}"`
|
||||
check_copy "${filename}" "sudo cp ${absolute_source} ${real_dest}" "sudo rm ${real_dest}/${filename}"
|
||||
done
|
||||
done
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
* Would be great to have a real people-agnostic base, separated from my own customization. Right now, base configuration still have personal path and stuff, making it unusable as-is for other people.
|
||||
* Have a command to cancel stuff if case something goes bad, want to restore base system, etc
|
||||
* Automatically enable systemd units
|
||||
|
||||
## What is this, Chosto ?
|
||||
|
||||
|
@ -120,7 +121,7 @@ This will install all needed software and configuration. If you want to re-use m
|
|||
|
||||
In actual setup `env` can be :
|
||||
* `desk` is currently adjusted for my home setup, i.e. two screens, a keyboard with media keys and [JACK Audio Connection Kit](https://wiki.archlinux.org/title/JACK_Audio_Connection_Kit).
|
||||
* `laptop` is adjusted for a basic, single and high-DPI screen laptop, with a simple keyboard.
|
||||
* `laptop` is adjusted for a basic, single 15' screen laptop, with a simple keyboard.
|
||||
|
||||
You can now reboot.
|
||||
|
||||
|
|
Loading…
Reference in New Issue