mirror of
https://github.com/kou029w/dotfiles.git
synced 2025-02-03 15:48:37 +00:00
Compare commits
3 commits
4c6df9c4c3
...
2e78e5f84e
Author | SHA1 | Date | |
---|---|---|---|
2e78e5f84e | |||
719655ca14 | |||
805f92774c |
4 changed files with 24 additions and 11 deletions
1
desktop/environment.d/firefox.conf
Normal file
1
desktop/environment.d/firefox.conf
Normal file
|
@ -0,0 +1 @@
|
|||
MOZ_ENABLE_WAYLAND=1
|
1
desktop/environment.d/vscode.conf
Normal file
1
desktop/environment.d/vscode.conf
Normal file
|
@ -0,0 +1 @@
|
|||
EDITOR="code --wait"
|
|
@ -10,8 +10,7 @@ function install_gsettings() {
|
|||
uid=${SUDO_UID:-$(id -u)}
|
||||
gsettings_file=$1
|
||||
gsettings_dir=$2
|
||||
< "$gsettings_file" \
|
||||
sudo --user="#$uid" \
|
||||
sudo <"$gsettings_file" --user="#$uid" \
|
||||
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \
|
||||
dconf load "$gsettings_dir"
|
||||
}
|
||||
|
@ -28,16 +27,28 @@ 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
|
||||
}
|
||||
|
||||
(($(id -u) == 0)) \
|
||||
&& [[ -f /etc/debian_version ]] \
|
||||
&& install_apt_packages
|
||||
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
|
||||
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
|
||||
|
|
8
mod.bash
8
mod.bash
|
@ -7,7 +7,7 @@ function install_dotfiles() {
|
|||
|
||||
dotfile=$(realpath "$dotfile")
|
||||
(
|
||||
cd -- "$home"
|
||||
cd -- "$home" || exit 1
|
||||
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"
|
||||
cd -- "$addon" || exit 1
|
||||
./install
|
||||
)
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue