chores
- removes alacritty - updates gitconfig to include lfs shit - updates gitconfig to not rebase ever - updates keyboard shortcuts to use gnome-terminal - adds import/export of gnome-terminal settings with dconf - fixes export for gnome extensions to not run when not running gnome
This commit is contained in:
@ -9,4 +9,7 @@ export_gnome_extensions
|
||||
printfe "%s\n" "cyan" "Exporting VSCode extensions"
|
||||
code --list-extensions | jq -R -s -c 'split("\n")[:-1]' > ~/dotfiles/vscode/extensions.json
|
||||
|
||||
printfe "%s\n" "cyan" "Exporting gnome-terminal settings"
|
||||
dconf dump /org/gnome/terminal/ > ~/dotfiles/config/gnome-terminal.dconf
|
||||
|
||||
printfe "%s\n" "green" "Finished, don't forget to commit and push"
|
@ -190,21 +190,28 @@ fonts() {
|
||||
ensure_fonts_installed
|
||||
}
|
||||
|
||||
default_terminal() {
|
||||
printfe "%s\n" "cyan" "Setting alacritty as default terminal..."
|
||||
# Check if alacritty is installed
|
||||
if [ -x "$(command -v alacritty)" ]; then
|
||||
terminal() {
|
||||
printfe "%s\n" "cyan" "Setting gnome-terminal as default terminal..."
|
||||
if [ -x "$(command -v gnome-terminal)" ]; then
|
||||
current_terminal=$(sudo update-alternatives --query x-terminal-emulator | grep '^Value:' | awk '{print $2}')
|
||||
|
||||
if [ "$current_terminal" != $(which alacritty) ]; then
|
||||
printfe "%s\n" "yellow" " - Setting alacritty as default terminal"
|
||||
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 80
|
||||
if [ "$current_terminal" != $(which gnome-terminal) ]; then
|
||||
printfe "%s\n" "yellow" " - Setting gnome-terminal as default terminal"
|
||||
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which gnome-terminal) 80
|
||||
else
|
||||
printfe "%s\n" "green" " - alacritty is already the default terminal"
|
||||
printfe "%s\n" "green" " - gnome-terminal is already the default terminal"
|
||||
fi
|
||||
else
|
||||
printfe "%s\n" "red" " - alacritty is not installed"
|
||||
printfe "%s\n" "red" " - gnome-terminal is not installed"
|
||||
fi
|
||||
|
||||
# Reset gnome-terminal settings
|
||||
printfe "%s\n" "cyan" "Resetting gnome-terminal settings..."
|
||||
dconf reset -f /org/gnome/terminal/
|
||||
|
||||
# Set gnome-terminal settings from $HOME/dotfiles/config/gnome-terminal
|
||||
printfe "%s\n" "cyan" "Loading gnome-terminal settings..."
|
||||
dconf load /org/gnome/terminal/ < $HOME/dotfiles/config/gnome-terminal.dconf
|
||||
}
|
||||
|
||||
default_shell() {
|
||||
@ -242,7 +249,6 @@ if [ "$#" -eq 0 ]; then
|
||||
printfe "%s\n" "yellow" "No options passed, running full update..."
|
||||
|
||||
git_repos
|
||||
pull_dotfiles
|
||||
groups
|
||||
symlinks
|
||||
sys_packages
|
||||
@ -305,8 +311,8 @@ else
|
||||
--fonts)
|
||||
fonts
|
||||
;;
|
||||
--default-terminal)
|
||||
default_terminal
|
||||
--terminal)
|
||||
terminal
|
||||
;;
|
||||
--default-shell)
|
||||
default_shell
|
||||
|
@ -51,6 +51,12 @@ ensure_gnome_extensions_installed() {
|
||||
|
||||
# Export a JSON file with all installed GNOME extensions IDs
|
||||
export_gnome_extensions() {
|
||||
# Only export if we have the gnome-extensions command
|
||||
if ! command -v gnome-extensions &> /dev/null; then
|
||||
printfe "%s\n" "red" " - gnome-extensions command not found, likely not running GNOME."
|
||||
return
|
||||
fi
|
||||
|
||||
extensions=$(gnome-extensions list --enabled --user)
|
||||
echo $extensions | jq -R -s -c 'split("\n")[:-1]' > ~/dotfiles/gnome/extensions.json
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ ensure_keyboard_shortcuts() {
|
||||
# Start swhkd
|
||||
printfe "%s\n" "green" " - starting swhkd..."
|
||||
printfe "%s\n" "yellow" " Note: this will likely show a password prompt, please enter your password"
|
||||
dotf hotkey-daemon &> /dev/null
|
||||
screen -dmS swhkd zsh -c "$HOME/dotfiles/bin/actions/hotkey-daemon.sh"
|
||||
|
||||
# Check if this is gnome DESKTOP_SESSION is gnome, if not we can stop here
|
||||
# The next part is just for setting up custom shortcuts in GNOME
|
||||
|
Reference in New Issue
Block a user