mirror of
https://github.com/kou029w/dotfiles.git
synced 2025-02-03 23:58:38 +00:00
Compare commits
No commits in common. "2e78e5f84e0b8bb9ae83a0f482a767b8d24cb609" and "4c6df9c4c30840b37db95b4ead5db02032f4a1e2" have entirely different histories.
2e78e5f84e
...
4c6df9c4c3
4 changed files with 11 additions and 24 deletions
|
@ -1 +0,0 @@
|
||||||
MOZ_ENABLE_WAYLAND=1
|
|
|
@ -1 +0,0 @@
|
||||||
EDITOR="code --wait"
|
|
|
@ -10,7 +10,8 @@ function install_gsettings() {
|
||||||
uid=${SUDO_UID:-$(id -u)}
|
uid=${SUDO_UID:-$(id -u)}
|
||||||
gsettings_file=$1
|
gsettings_file=$1
|
||||||
gsettings_dir=$2
|
gsettings_dir=$2
|
||||||
sudo <"$gsettings_file" --user="#$uid" \
|
< "$gsettings_file" \
|
||||||
|
sudo --user="#$uid" \
|
||||||
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \
|
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \
|
||||||
dconf load "$gsettings_dir"
|
dconf load "$gsettings_dir"
|
||||||
}
|
}
|
||||||
|
@ -34,21 +35,9 @@ function install_source_han_mono_fonts() {
|
||||||
fc-cache
|
fc-cache
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_environment_d() {
|
(($(id -u) == 0)) \
|
||||||
local home
|
&& [[ -f /etc/debian_version ]] \
|
||||||
local environment_d
|
&& install_apt_packages
|
||||||
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
|
|
||||||
install_gsettings settings.ini /
|
install_gsettings settings.ini /
|
||||||
install_gsettings terminal-settings.ini "/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')/"
|
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_source_han_mono_fonts
|
||||||
install_environment_d
|
|
||||||
|
|
8
mod.bash
8
mod.bash
|
@ -7,7 +7,7 @@ function install_dotfiles() {
|
||||||
|
|
||||||
dotfile=$(realpath "$dotfile")
|
dotfile=$(realpath "$dotfile")
|
||||||
(
|
(
|
||||||
cd -- "$home" || exit 1
|
cd -- "$home"
|
||||||
ln -svf "$dotfile" .
|
ln -svf "$dotfile" .
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
@ -20,8 +20,8 @@ function install_apt_packages() {
|
||||||
eval "$(apt-config shell apt_sources_dir 'Dir::Etc::sourceparts/d')"
|
eval "$(apt-config shell apt_sources_dir 'Dir::Etc::sourceparts/d')"
|
||||||
rsync -rv etc/apt/keyrings/ /usr/share/keyrings/
|
rsync -rv etc/apt/keyrings/ /usr/share/keyrings/
|
||||||
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
|
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
|
||||||
[[ -d etc/default ]] &&
|
[[ -d etc/default ]] \
|
||||||
rsync -rv etc/default/ /etc/default/
|
&& rsync -rv etc/default/ /etc/default/
|
||||||
apt update
|
apt update
|
||||||
apt install -y "${packages[@]}"
|
apt install -y "${packages[@]}"
|
||||||
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
|
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
|
||||||
|
@ -31,7 +31,7 @@ function install_addons() {
|
||||||
local addon
|
local addon
|
||||||
for addon in "$@"; do
|
for addon in "$@"; do
|
||||||
(
|
(
|
||||||
cd -- "$addon" || exit 1
|
cd -- "$addon"
|
||||||
./install
|
./install
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue