mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-13 22:02:34 +00:00
feat: removes old link-config script, rename a few things in dev-env script, more cleanup.
This commit is contained in:
19
ARCHNOTES.md
19
ARCHNOTES.md
@@ -1,19 +0,0 @@
|
||||
# Arch Linux Notes
|
||||
|
||||
## Web App (PWA)
|
||||
|
||||
For the `webapp-install` script to work there needs to be a directory
|
||||
for the icons to be installed to. It can be done with the following command:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.local/share/applications/icons
|
||||
```
|
||||
|
||||
## Monitor Lid Events
|
||||
|
||||
In order to monitor lid events, the user needs to be
|
||||
added to the `input` group.
|
||||
|
||||
```bash
|
||||
sudo usermod -aG input $USER
|
||||
```
|
||||
33
dev-env
33
dev-env
@@ -32,7 +32,7 @@ log() {
|
||||
log "env: $DEV_ENV"
|
||||
|
||||
# Removes a destination directory and copies all files to the destination.
|
||||
update_files() {
|
||||
update_dirs() {
|
||||
log "copying over files from: $1"
|
||||
pushd $1 &>/dev/null
|
||||
(
|
||||
@@ -60,7 +60,7 @@ update_files() {
|
||||
copy() {
|
||||
log "removing: $2"
|
||||
if [[ $dry_run == "0" ]]; then
|
||||
rm $2
|
||||
rm $2 &>/dev/null
|
||||
fi
|
||||
log "copying: $1 to $2"
|
||||
if [[ $dry_run == "0" ]]; then
|
||||
@@ -70,15 +70,30 @@ copy() {
|
||||
|
||||
# Copy all files from a directory into another directory.
|
||||
copy_files() {
|
||||
for f in $(find $1 -mindepth 1 -maxdepth 1 -type f); do
|
||||
copy $f "$2/$(basename $f)"
|
||||
done
|
||||
log "copying over files from: $1"
|
||||
pushd $1 &>/dev/null
|
||||
(
|
||||
for f in $(find . -mindepth 1 -maxdepth 1 -type f); do
|
||||
|
||||
local dest="$2/$(basename $f)"
|
||||
|
||||
if [[ $dry_run == "0" ]]; then
|
||||
rm -rf $dest >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
log " copying env: cp $f $dest"
|
||||
if [[ $dry_run == "0" ]]; then
|
||||
cp $f $dest
|
||||
fi
|
||||
done
|
||||
)
|
||||
popd &>/dev/null
|
||||
}
|
||||
|
||||
############################## MAIN ##############################
|
||||
|
||||
update_files $DEV_ENV/env/.config $XDG_CONFIG_HOME
|
||||
update_files $DEV_ENV/env/.local $HOME/.local
|
||||
update_dirs $DEV_ENV/env/.config $XDG_CONFIG_HOME
|
||||
update_dirs $DEV_ENV/env/.local $HOME/.local
|
||||
|
||||
# SYSTEMD
|
||||
mkdir -p $XDG_CONFIG_HOME/systemd/user
|
||||
@@ -89,7 +104,7 @@ copy_files $DEV_ENV/env/.config/systemd/user $XDG_CONFIG_HOME/systemd/user
|
||||
# copying configuration.
|
||||
copy $DEV_ENV/env/.zshenv $HOME/.zshenv
|
||||
mkdir -p $XDG_CONFIG_HOME/zsh
|
||||
update_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
|
||||
update_dirs $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
|
||||
copy_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
|
||||
|
||||
# TMUX
|
||||
@@ -99,5 +114,7 @@ copy $DEV_ENV/env/.tmux.conf $HOME/.tmux.conf
|
||||
mkdir $HOME/.gnupg
|
||||
copy_files $DEV_ENV/env/.gnupg $HOME/.gnupg
|
||||
|
||||
copy $DEV_ENV/dev-env $HOME/.local/scripts/dev-env
|
||||
|
||||
systemctl --user daemon-reload
|
||||
hyprctl reload
|
||||
|
||||
14
env/.config/nvim/lua/plugins/oil.lua
vendored
14
env/.config/nvim/lua/plugins/oil.lua
vendored
@@ -15,13 +15,15 @@ return {
|
||||
desc = "Open the entry in a vertical split",
|
||||
},
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
is_hidden_file = function(name, _) -- second arg is bufnr, but not currently used.
|
||||
-- Don't show .DS_Store in output.
|
||||
local is_ds_store = name ~= ".DS_Store"
|
||||
return not is_ds_store
|
||||
-- local is_ds_store = name ~= ".DS_Store"
|
||||
-- return not is_ds_store
|
||||
return false
|
||||
end,
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
-- Show the parent directory in current window.
|
||||
@@ -29,8 +31,10 @@ return {
|
||||
-- Open parent directory in floating window.
|
||||
{
|
||||
"<space>-",
|
||||
function() require("oil").toggle_float() end,
|
||||
desc = "Open parent directory in floating window."
|
||||
function()
|
||||
require("oil").toggle_float()
|
||||
end,
|
||||
desc = "Open parent directory in floating window.",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
5
env/.local/scripts/install-webapp
vendored
5
env/.local/scripts/install-webapp
vendored
@@ -100,6 +100,9 @@ MIME_TYPES=$mime_types[-1]
|
||||
|
||||
# Refer to local icon or fetch remotely from URL
|
||||
ICON_DIR="$HOME/.local/share/applications/icons"
|
||||
# Ensure the icon directory exists (useful if it's the first run.)
|
||||
[ ! -d $ICON_DIR ] && mkdir -p $ICON_DIR
|
||||
|
||||
if [[ $ICON_REF == https://* ]]; then
|
||||
ICON_PATH="$ICON_DIR/$APP_NAME.png"
|
||||
if curl -sL -o "$ICON_PATH" "$ICON_REF"; then
|
||||
@@ -121,7 +124,7 @@ fi
|
||||
if [[ -n $CUSTOM_EXEC ]]; then
|
||||
EXEC_COMMAND="$CUSTOM_EXEC"
|
||||
else
|
||||
EXEC_COMMAND="$HOME/.local/scripts/launch-webapp $APP_URL"
|
||||
EXEC_COMMAND="${SCRIPTS:-$HOME/.local/scripts}/launch-webapp $APP_URL"
|
||||
fi
|
||||
|
||||
# Create application .desktop file
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function copy() {
|
||||
local item=$1
|
||||
local dest=${2:-~/.config}
|
||||
|
||||
if [ -d "$item" ]; then
|
||||
cp -Rfv "$item" "$dest"
|
||||
else
|
||||
cp -fv "$item" "$dest"
|
||||
fi
|
||||
}
|
||||
|
||||
gpgs=(
|
||||
"gpg/gpg.conf"
|
||||
"gpg/gpg-agent.conf"
|
||||
"gpg/scdaemon.conf"
|
||||
)
|
||||
|
||||
ln -sfv ~/.dotfiles/clipse ~/.config
|
||||
ln -sfv ~/.dotfiles/eza ~/.config
|
||||
ln -sfv ~/.dotfiles/ghostty ~/.config
|
||||
ln -sfv ~/.dotfiles/git ~/.config
|
||||
# TODO: Remove kitty.
|
||||
ln -sfv ~/.dotfiles/kitty ~/.config
|
||||
ln -sfv ~/.dotfiles/npm ~/.config
|
||||
ln -sfv ~/.dotfiles/nvim/lazynvim ~/.config
|
||||
ln -sfv ~/.dotfiles/starship ~/.config
|
||||
ln -sfv ~/.dotfiles/systemd ~/.config
|
||||
ln -sfv ~/.dotfiles/tree-sitter ~/.config
|
||||
ln -sfv ~/.dotfiles/walker ~/.config
|
||||
ln -sfv ~/.dotfiles/waybar ~/.config
|
||||
ln -sfv ~/.dotfiles/yubico ~/.config
|
||||
|
||||
# Espanso
|
||||
espanso service stop
|
||||
rm -rf ~/.config/espanso >/dev/null 2>&1
|
||||
ln -sfV ~/.dotfiles/espanso ~/.config
|
||||
espanso service start
|
||||
|
||||
# Hyprland
|
||||
rm -rf ~/.config/hypr >/dev/null 2>&1
|
||||
ln -sfv ~/.dotfiles/hypr ~/.config
|
||||
|
||||
# GPG
|
||||
mkdir ~/.gnupg
|
||||
chmod 700 ~/.gnupg
|
||||
ln -sfv ~/.dotfiles/gpg/gpg-agent.conf ~/.gnupg/gpg-agent.conf
|
||||
ln -sfv ~/.dotfiles/gpg/gpg.conf ~/.gnupg/gpg.conf
|
||||
ln -sfv ~/.dotfiles/gpg/scdaemon.conf ~/.gnupg/scdaemon.conf
|
||||
|
||||
# yazi
|
||||
mkdir ~/.config/yazi
|
||||
ln -sfv ~/.dotfiles/yazi/theme.toml ~/.config/yazi/theme.toml
|
||||
ln -sfv ~/.dotfiles/yazi/yazi.toml ~/.config/yazi/yazi.toml
|
||||
|
||||
# tmux
|
||||
mkdir -p ~/.config/tmux/plugins
|
||||
ln -sfv ~/.dotfiles/tmux/tmux.conf ~/.config/tmux/tmux.conf
|
||||
|
||||
# scripts
|
||||
mkdir -p ~/.local/share
|
||||
ln -sfv ~/.dotfiles/scripts/arch ~/.local/bin
|
||||
ln -sfv ~/.dotfiles/scripts/scripts ~/.local/share/scripts
|
||||
|
||||
# zsh
|
||||
mkdir -p ~/.config/zsh/plugins
|
||||
ln -sfv ~/.dotfiles/zsh/.zshenv ~/.zshenv
|
||||
ln -sfv ~/.dotfiles/zsh/config/.zshenv ~/.config/zsh/.zshenv
|
||||
ln -sfv ~/.dotfiles/zsh/config/.zshrc ~/.config/zsh/.zshrc
|
||||
ln -sfv ~/.dotfiles/zsh/config/functions ~/.config/zsh/functions
|
||||
ln -sfv ~/.dotfiles/zsh/config/zsh-functions ~/.config/zsh/zsh-functions
|
||||
touch ~/.config/zsh/history
|
||||
chmod 600 ~/.config/zsh/history
|
||||
chsh -s $(which zsh)
|
||||
Reference in New Issue
Block a user