1
0
Fork 0
mirror of https://github.com/kou029w/dotfiles.git synced 2025-02-03 15:48:37 +00:00

Compare commits

..

No commits in common. "2e78e5f84e0b8bb9ae83a0f482a767b8d24cb609" and "4c6df9c4c30840b37db95b4ead5db02032f4a1e2" have entirely different histories.

4 changed files with 11 additions and 24 deletions

View file

@ -1 +0,0 @@
MOZ_ENABLE_WAYLAND=1

View file

@ -1 +0,0 @@
EDITOR="code --wait"

View file

@ -10,7 +10,8 @@ function install_gsettings() {
uid=${SUDO_UID:-$(id -u)}
gsettings_file=$1
gsettings_dir=$2
sudo <"$gsettings_file" --user="#$uid" \
< "$gsettings_file" \
sudo --user="#$uid" \
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \
dconf load "$gsettings_dir"
}
@ -27,28 +28,16 @@ function install_source_han_mono_fonts() {
sudo --user="#$uid" mkdir -p "$fonts_dir" "$fontconfig_dir"
sudo --user="#$uid" \
curl \
-fsSL https://github.com/adobe-fonts/source-han-mono/releases/download/1.002/SourceHanMono.ttc \
-o "$fonts_dir/SourceHanMono.ttc"
-fsSL https://github.com/adobe-fonts/source-han-mono/releases/download/1.002/SourceHanMono.ttc \
-o "$fonts_dir/SourceHanMono.ttc"
sudo --user="#$uid" \
rsync -rv fontconfig/ "$fontconfig_dir/"
fc-cache
}
function install_environment_d() {
local home
local environment_d
home=$(eval "echo ~${SUDO_USER:-}")
environment_d=$(realpath environment.d)
(
cd -- "${home}/.config" || exit 1
ln -svf "$environment_d" .
)
}
(($(id -u) == 0)) &&
[[ -f /etc/debian_version ]] &&
install_apt_packages
(($(id -u) == 0)) \
&& [[ -f /etc/debian_version ]] \
&& install_apt_packages
install_gsettings settings.ini /
install_gsettings terminal-settings.ini "/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')/"
install_source_han_mono_fonts
install_environment_d

View file

@ -7,7 +7,7 @@ function install_dotfiles() {
dotfile=$(realpath "$dotfile")
(
cd -- "$home" || exit 1
cd -- "$home"
ln -svf "$dotfile" .
)
done
@ -20,8 +20,8 @@ function install_apt_packages() {
eval "$(apt-config shell apt_sources_dir 'Dir::Etc::sourceparts/d')"
rsync -rv etc/apt/keyrings/ /usr/share/keyrings/
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
[[ -d etc/default ]] &&
rsync -rv etc/default/ /etc/default/
[[ -d etc/default ]] \
&& rsync -rv etc/default/ /etc/default/
apt update
apt install -y "${packages[@]}"
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
@ -31,7 +31,7 @@ function install_addons() {
local addon
for addon in "$@"; do
(
cd -- "$addon" || exit 1
cd -- "$addon"
./install
)
done