From 7e587eb40f991a1346ed51abbdc6936dc83c4f90 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 22 Mar 2021 10:47:23 -0500 Subject: [PATCH] Weechat crap and a bunch of work on arch system bootstrapping --- common/bin/dotfiles-setup | 1 + common/bin/paths | 33 ---------- common/data/user-dirs | 10 +-- common/fish/key-bindings.fish | 7 +- common/fish/paths.fish | 15 +++-- common/neovim/init.vim | 3 + common/tmux/conf | 7 +- common/weechat/.gitignore | 1 + common/weechat/buflist.conf | 1 + common/weechat/fset.conf | 1 + common/weechat/guile.conf | 14 ++++ common/weechat/irc.conf | 4 ++ common/weechat/logs/core.weechat.weechatlog | 1 + common/weechat/plugins.conf | 14 ++++ common/weechat/ruby.conf | 14 ++++ common/weechat/script.conf | 1 + common/weechat/sec.conf | 18 ++++++ common/weechat/weechat.conf | 2 + os/linux/arch/bootstrap-test.fish | 13 ++++ .../arch/provision.d/00-AS_ROOT-add-user.bash | 19 ++++++ os/linux/arch/provision.d/00-add-user.bash | 15 ++++- os/linux/arch/provision.d/10-install-yay.bash | 7 +- .../arch/provision.d/20-install-packages.bash | 62 ++---------------- .../provision.d/50-install-tmux-plugins.bash | 3 - .../provision.d/60-AS_ROOT-vt-colors.bash | 26 ++++++++ .../provision.d/optional/ui-packages.bash | 64 +++++++++++++++++++ os/linux/arch/provision.sh | 22 ++++++- os/linux/config.d.fish | 2 - os/linux/kanshi/config | 7 +- os/linux/sway/config | 10 +-- os/linux/sway/init | 5 ++ 31 files changed, 277 insertions(+), 125 deletions(-) delete mode 100755 common/bin/paths create mode 100644 common/weechat/.gitignore create mode 100644 common/weechat/guile.conf create mode 100644 common/weechat/logs/core.weechat.weechatlog create mode 100644 common/weechat/plugins.conf create mode 100644 common/weechat/ruby.conf create mode 100644 common/weechat/sec.conf create mode 100755 os/linux/arch/bootstrap-test.fish create mode 100755 os/linux/arch/provision.d/00-AS_ROOT-add-user.bash create mode 100755 os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash create mode 100644 os/linux/arch/provision.d/optional/ui-packages.bash delete mode 100644 os/linux/config.d.fish diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 244a5f0..405bbd9 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -49,6 +49,7 @@ l common/kitty $c/kitty l common/mutt/rc $c/.muttrc l common/git/config $h/.gitconfig l common/elixir/iex.exs $h/.iex.exs +l common/data/user-dirs $c/user-dirs.dirs popd for s in $c/lytedev-env/*/dotfiles-setup.d.fish diff --git a/common/bin/paths b/common/bin/paths deleted file mode 100755 index c0c0a71..0000000 --- a/common/bin/paths +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env sh - -export GOPATH="$HOME/.go" - -# PATH=$PATH:$APPENDED_PATH -PATH="$DOTFILES_PATH/bin":$PATH -PATH="$ENV_PATH/bin":$PATH -[ -d "$HOME/.bin" ] && PATH=$PATH:"$HOME/.bin" -PATH=$PATH:"$HOME/.cargo/bin" -PATH=$PATH:"$HOME/.nimble/bin" -PATH=$PATH:"$HOME/.yarn/bin" -PATH=$PATH:"$GOPATH/bin" -[ -d "$HOME/.local/bin" ] && PATH=$PATH:"$HOME/.local/bin" -has_command python && PATH="$(python -m site --user-base)/bin:$PATH" -has_command ruby && PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH" - -export PATH - -export XDG_DESKTOP_DIR="$HOME/desktop" -export XDG_PUBLICSHARE_DIR="$HOME/public" -export XDG_TEMPLATES_DIR="$HOME/templates" - -export XDG_DOCUMENTS_DIR="$NICE_HOME/doc" -export XDG_DOWNLOAD_DIR="$NICE_HOME/dl" -export XDG_MUSIC_DIR="$NICE_HOME/music" -export XDG_PICTURES_DIR="$NICE_HOME/img" -export XDG_VIDEOS_DIR="$NICE_HOME/video" -export XDG_GAMES_DIR="$NICE_HOME/games" - -export TMUX_PLUGIN_MANAGER_PATH="${TMUX_PLUGIN_MANAGER_PATH:-$XDG_CONFIG_HOME/tmux/plugins/}" -export NOTES_PATH="${NOTES_PATH:-$XDG_DOCUMENTS_DIR/notes}" -export USER_LOGS_PATH="${USER_LOGS_PATH:-$XDG_DOCUMENTS_DIR/logs}" -export SCROTS_PATH="${SCROTS_PATH:-$XDG_PICTURES_DIR/scrots}" diff --git a/common/data/user-dirs b/common/data/user-dirs index f6043fd..3a32c71 100644 --- a/common/data/user-dirs +++ b/common/data/user-dirs @@ -1,8 +1,8 @@ XDG_DESKTOP_DIR="$HOME/desktop" -XDG_DOCUMENTS_DIR="$HOME/../doc" -XDG_DOWNLOAD_DIR="$HOME/../dl" -XDG_MUSIC_DIR="$HOME/../music" -XDG_PICTURES_DIR="$HOME/../img" +XDG_DOCUMENTS_DIR="$NICE_HOME/doc" +XDG_DOWNLOAD_DIR="$NICE_HOME/dl" +XDG_MUSIC_DIR="$NICE_HOME/music" +XDG_PICTURES_DIR="$NICE_HOME/img" XDG_PUBLICSHARE_DIR="$HOME/public" XDG_TEMPLATES_DIR="$HOME/templates" -XDG_VIDEOS_DIR="$HOME/../video" +XDG_VIDEOS_DIR="$NICE_HOME/video" diff --git a/common/fish/key-bindings.fish b/common/fish/key-bindings.fish index 6f1a54e..c8c90d1 100755 --- a/common/fish/key-bindings.fish +++ b/common/fish/key-bindings.fish @@ -20,7 +20,6 @@ function fish_user_key_bindings bind -M insert \ce end-of-line bind -M insert \ca beginning-of-line bind -M insert \cw forward-word - bind -M insert \ct tmuxswitcher bind -M insert \cv edit_command_buffer bind -M default \cv edit_command_buffer @@ -29,4 +28,10 @@ function fish_user_key_bindings bind -M insert \ev false bind -M default \ee false bind -M default \ev false + + bind --erase \ct + bind --erase \c\t + bind --erase btab + + bind \ct 'tmux new-session' end diff --git a/common/fish/paths.fish b/common/fish/paths.fish index d6b06eb..868668d 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -6,19 +6,21 @@ set -U fish_user_paths \ $HOME/.go \ $GOPATH/bin \ $DOTFILES_PATH/common/bin \ - $ENV_PATH/bin \ - $ENV_PATH/.hidden/bin \ $HOME/.bin \ $HOME/.cargo/bin \ $HOME/.nimble/bin \ $HOME/.yarn/bin \ $HOME/.netlify/helper/bin -test -d $HOME/.local/bin && set -U fish_user_paths $HOME/.local/bin $fish_user_paths -test -d $HOME/.bin && set -U fish_user_paths $HOME/.local/bin $fish_user_paths +for d in $ENV_PATH/*/bin + test -d $d && set -Ua fish_user_paths $d +end -has_command python && set -U fish_user_paths (python -m site --user-base)"/bin" $fish_user_paths -has_command ruby && set -U fish_user_paths (ruby -e 'print Gem.user_dir')"/bin" $fish_user_paths +test -d $HOME/.local/bin && set -Ua fish_user_paths $HOME/.local/bin +test -d $HOME/.bin && set -Ua fish_user_paths $HOME/.local/bin + +has_command python && set -Ua fish_user_paths (python -m site --user-base)/bin +has_command ruby && set -Ua fish_user_paths (ruby -e 'print Gem.user_dir')/bin if set -q NICE_HOME else @@ -27,7 +29,6 @@ else test -f $HOME/.nice_home && set -Ux NICE_HOME (cat $HOME/.nice_home) test -f $ENV_PATH/.nice_home && set -Ux NICE_HOME (cat $ENV_PATH/.nice_home) end - for p in $NICE_HOME $HOME $ENV_PATH test -f $p/.nice_home && set -Ux NICE_HOME (cat $p/.nice_home) end diff --git a/common/neovim/init.vim b/common/neovim/init.vim index ad8579b..7071a82 100644 --- a/common/neovim/init.vim +++ b/common/neovim/init.vim @@ -134,10 +134,13 @@ cnoremap xnoremap < >gv +nnoremap gd :call CocAction('jumpDefinition') + " TODO: learn about the wildmenu `q:` let mapleader = "\" nnoremap r :source $vimdir/init.vim:echo 'Reloaded init.vim' +nnoremap gv :e $vimdir/init.vim nnoremap w :bd nnoremap h :b# nnoremap k :bnext diff --git a/common/tmux/conf b/common/tmux/conf index 8cd1447..a9d9095 100644 --- a/common/tmux/conf +++ b/common/tmux/conf @@ -29,7 +29,12 @@ set -g status-bg colour0 set -g status-fg colour8 set -g status-interval 5 set -g status-left-length 50 -set -g status-left "#h:#S.#W" +set -g window-status-style "fg=colour8 bg=colour0" +set -g window-status-current-style "fg=colour8 bg=colour0" +set -g window-status-format " #I" +set -g window-status-separator "" +set -g window-status-current-format " #I" +set -g status-left "#h:#S #I" set -g status-right-length 280 set -g status-right "#(kubeline && printf ' ')#{pane_current_path} #(cd '#{pane_current_path}' && git rev-parse --abbrev-ref --sq HEAD | tr -d \"'\")#{pane_current_command}" set -g message-style "fg=colour7 bg=colour18" diff --git a/common/weechat/.gitignore b/common/weechat/.gitignore new file mode 100644 index 0000000..98d8a5a --- /dev/null +++ b/common/weechat/.gitignore @@ -0,0 +1 @@ +logs diff --git a/common/weechat/buflist.conf b/common/weechat/buflist.conf index d285f89..225b5e8 100644 --- a/common/weechat/buflist.conf +++ b/common/weechat/buflist.conf @@ -21,6 +21,7 @@ nick_prefix = off nick_prefix_empty = on signals_refresh = "" sort = "number,-active" +use_items = 1 [format] buffer = "${format_number}${indent}${format_nick_prefix}${color_hotlist}${format_name}" diff --git a/common/weechat/fset.conf b/common/weechat/fset.conf index 668266c..53b0da7 100644 --- a/common/weechat/fset.conf +++ b/common/weechat/fset.conf @@ -10,6 +10,7 @@ # [look] +auto_refresh = "*" auto_unmark = off condition_catch_set = "${count} >= 1" export_help_default = on diff --git a/common/weechat/guile.conf b/common/weechat/guile.conf new file mode 100644 index 0000000..07a4910 --- /dev/null +++ b/common/weechat/guile.conf @@ -0,0 +1,14 @@ +# +# weechat -- guile.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +check_license = off +eval_keep_context = on diff --git a/common/weechat/irc.conf b/common/weechat/irc.conf index ccfa721..8ada824 100644 --- a/common/weechat/irc.conf +++ b/common/weechat/irc.conf @@ -129,6 +129,7 @@ charset_message = message command = "" command_delay = 0 connection_timeout = 60 +default_chantypes = "#&" ipv6 = on local_hostname = "" msg_kick = "" @@ -201,6 +202,7 @@ soupwhale.msg_quit soupwhale.notify soupwhale.split_msg_max_length soupwhale.charset_message +soupwhale.default_chantypes soup.addresses = "irc.soupwhale.com" soup.proxy soup.ipv6 @@ -244,6 +246,7 @@ soup.msg_quit soup.notify soup.split_msg_max_length soup.charset_message +soup.default_chantypes freenode.addresses = "irc.freenode.net" freenode.proxy freenode.ipv6 @@ -287,3 +290,4 @@ freenode.msg_quit freenode.notify freenode.split_msg_max_length freenode.charset_message +freenode.default_chantypes diff --git a/common/weechat/logs/core.weechat.weechatlog b/common/weechat/logs/core.weechat.weechatlog new file mode 100644 index 0000000..6942fe4 --- /dev/null +++ b/common/weechat/logs/core.weechat.weechatlog @@ -0,0 +1 @@ +2021-03-19 21:11:45 Plugins loaded: alias, buflist, charset, exec, fifo, fset, guile, irc, logger, lua, perl, python, relay, ruby, script, spell, tcl, trigger, xfer diff --git a/common/weechat/plugins.conf b/common/weechat/plugins.conf new file mode 100644 index 0000000..9f3aa9f --- /dev/null +++ b/common/weechat/plugins.conf @@ -0,0 +1,14 @@ +# +# weechat -- plugins.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[var] + +[desc] diff --git a/common/weechat/ruby.conf b/common/weechat/ruby.conf new file mode 100644 index 0000000..f6de7fb --- /dev/null +++ b/common/weechat/ruby.conf @@ -0,0 +1,14 @@ +# +# weechat -- ruby.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[look] +check_license = off +eval_keep_context = on diff --git a/common/weechat/script.conf b/common/weechat/script.conf index 121f189..655eb36 100644 --- a/common/weechat/script.conf +++ b/common/weechat/script.conf @@ -50,6 +50,7 @@ text_version_selected = lightmagenta [scripts] autoload = on cache_expire = 1440 +download_enabled = off download_timeout = 30 hold = "" path = "%h/script" diff --git a/common/weechat/sec.conf b/common/weechat/sec.conf new file mode 100644 index 0000000..00c14f9 --- /dev/null +++ b/common/weechat/sec.conf @@ -0,0 +1,18 @@ +# +# weechat -- sec.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart +# + +[crypt] +cipher = aes256 +hash_algo = sha256 +passphrase_command = "" +salt = on + +[data] diff --git a/common/weechat/weechat.conf b/common/weechat/weechat.conf index 9e62d13..d4e334e 100644 --- a/common/weechat/weechat.conf +++ b/common/weechat/weechat.conf @@ -72,6 +72,7 @@ hotlist_short_names = on hotlist_sort = group_time_asc hotlist_suffix = "" hotlist_unique_numbers = on +hotlist_update_on_buffer_switch = on input_cursor_scroll = 20 input_share = none input_share_overwrite = off @@ -121,6 +122,7 @@ quote_time_format = "%H:%M:%S" read_marker = line read_marker_always_show = off read_marker_string = "- " +read_marker_update_on_buffer_switch = on save_config_on_exit = on save_config_with_fsync = off save_layout_on_exit = none diff --git a/os/linux/arch/bootstrap-test.fish b/os/linux/arch/bootstrap-test.fish new file mode 100755 index 0000000..cf6a56d --- /dev/null +++ b/os/linux/arch/bootstrap-test.fish @@ -0,0 +1,13 @@ +#!/usr/bin/env fish + +docker ps -q || begin + echo "docker not running" + exit 1 +end + +docker pull archlinux -q || begin + echo "failed to pull archlinux docker image" + exit 1 +end + +docker run -it --rm -v $DOTFILES_PATH:/dotfiles:ro archlinux sh -c "/dotfiles/os/linux/arch/provision.sh" diff --git a/os/linux/arch/provision.d/00-AS_ROOT-add-user.bash b/os/linux/arch/provision.d/00-AS_ROOT-add-user.bash new file mode 100755 index 0000000..bb2524e --- /dev/null +++ b/os/linux/arch/provision.d/00-AS_ROOT-add-user.bash @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +u=daniel +ud="/home/$u" + +# user exists - we will assume setup has already run +if getent passwd "$u"; then exit 0; fi + +pacman -S --needed --noconfirm sudo +echo '%admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin-group-sudoers +groupadd admin 2>/dev/null +mkdir --parents "$ud/.home" "$ud/dl" +useradd --home-dir "$ud/.home" \ + --groups "admin,users,uucp,lock" \ + --shell "/bin/bash" \ + "$u" +chown --recursive "$u:$u" "$ud" +echo "Setting password for user '$u'" +passwd "$u" diff --git a/os/linux/arch/provision.d/00-add-user.bash b/os/linux/arch/provision.d/00-add-user.bash index ed3399b..9ee7a4a 100755 --- a/os/linux/arch/provision.d/00-add-user.bash +++ b/os/linux/arch/provision.d/00-add-user.bash @@ -6,6 +6,7 @@ ud="/home/$u" # user exists - we will assume setup has already run if getent passwd "$u"; then exit 0; fi +pacman -S --needed --noconfirm sudo echo '%admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin-group-sudoers groupadd admin 2>/dev/null mkdir --parents "$ud/.home" "$ud/dl" @@ -15,4 +16,16 @@ useradd --home-dir "$ud/.home" \ "$u" chown --recursive "$u:$u" "$ud" echo "Setting password for user '$u'" -passwd "$u" + +# enforce that a password is set +# we need one for sudo commands in later scripts +while true; do + passwd "$u" + ee=$! + echo $ee + if [ "$ee" -eq 0 ]; then + break + fi + sleep 2 +done +echo $! diff --git a/os/linux/arch/provision.d/10-install-yay.bash b/os/linux/arch/provision.d/10-install-yay.bash index 238caa6..e6faacb 100755 --- a/os/linux/arch/provision.d/10-install-yay.bash +++ b/os/linux/arch/provision.d/10-install-yay.bash @@ -1,11 +1,12 @@ #!/usr/bin/env bash +echo $USER REPOSITORY_PATH="/tmp/provisioning" -sudo pacman -S --needed git base-devel +sudo pacman -S --needed --noconfirm git base-devel mkdir -p "$REPOSITORY_PATH" rm -rf "$REPOSITORY_PATH/yay" git clone https://aur.archlinux.org/yay.git "$REPOSITORY_PATH/yay" cd "$REPOSITORY_PATH/yay" -makepkg -si -yay -S yay +makepkg --noconfirm -si +yay -S --noconfirm yay rm -rf "$REPOSITORY_PATH/yay" diff --git a/os/linux/arch/provision.d/20-install-packages.bash b/os/linux/arch/provision.d/20-install-packages.bash index e1b8bae..e1be3f0 100755 --- a/os/linux/arch/provision.d/20-install-packages.bash +++ b/os/linux/arch/provision.d/20-install-packages.bash @@ -7,44 +7,11 @@ else sudo sh -c 'echo -e "\n\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf' fi -yay -Sy \ - xf86-input-libinput \ +yay -Sy --needed --noconfirm \ fwupd \ - bluez bluez-libs bluez-utils bluez-tools `# Bluetooth` \ - pigz `# Multi-core gzipping` \ - iw `# WiFi Power Saving` \ - arc-gtk-theme `# GTK Theme` \ - elementary-icon-theme `# GUI File Explorer Icons` \ - thunar thunar-volman gvfs `# GUI File Explorer + Volume Management/Auto-Mount Disks)` \ - samba `# Sharing Files with other (Windows) PCs` \ - gvfs-smb `# Auto-Detect Samba Shares` \ - ttf-opensans ttf-dejavu ttf-liberation `# Fonts` \ - avr-libc avr-gcc dfu-programmer dfu-util `# Keyboard Programming Utilities` \ - xorg-xbacklight `# Xorg Backlight Control` \ - gimp inkscape krita `# Image/Vector Editing Applications` \ - audacity `# Audio Editing Application` \ - cmake `# Cross-Platform Make` \ - accountsservice `# Mainly for User Avatars with Display Manager` \ - gdm `# Display Manager of choice` \ - deluge deluge-gtk cairo python-cairo `# GUI Torrent Client` \ - elixir nodejs erlang rustup \ - php `# PHP Language` \ - nginx `# Web Server` \ - postgresql pgcli `# RDBMS` \ - neofetch `# swag` \ - cloc `# For counting lines of code` \ - noto-fonts noto-fonts-emoji `# Emoji` \ docker `# Containers` \ - discord `# Chat` \ - steam steamcmd lutris `# Games` \ - gnome-shell `# Guh-nome Guh-shell` \ - vlc `# Video Viewer` \ ncdu `# Disk Usage Analyzer` \ - zathura zathura-pdf-mupdf `# Document Viewer` \ - libinput libinput-gestures `# Trackpad Control` \ efibootmgr efivar `# UEFI Boot CLI Stuff` \ - glu mesa wxgtk2 libpng `# Various` \ - gammastep `# Redshift for Wayland` \ weechat `# IRC Client` \ aria2 `# Downloads Manager` \ dmenu `# Application Launcher` \ @@ -58,43 +25,22 @@ yay -Sy \ openssh mosh `# Remote Access` \ openssl `# Crypto` \ asdf-vm `# Runtime Version Manager` \ - python python-pip `# Python 3 Language` \ - hexyl `# CLI Hex Viewer` \ pass passff-host `# Password Management` \ - firefox-developer-edition `# Default Web Browser` \ rsync `# File Transfer` \ - alsa-utils `# Audio Utilities` \ - alsa-plugins `# Plugins for ALSA` \ - pulseaudio pavucontrol pulsemixer `# Audio Backend and Controls` \ - playerctl `# Media Keys Controls` \ - neovim-git `# Text Editors` \ + neovim-nightly-bin `# Text Editors` \ sc-im `# Spreadsheets` \ unzip `# Simple Unzipping` \ tmux `# Terminal Multiplexer` \ kitty `# Almost Better Terminal Emulator` \ - feh `# Image Viewer & Wallpaper Manager` \ - wlroots-git sway-git `# Wayland Compositor` \ - swaylock-git swayidle-git `# Auto-Locking for Sway` \ - kanshi-git `# Monitor Management for Sway` \ - waybar-git mako-git `# Sway Bar & Notifications` \ - slurp grim wl-clipboard `# Sway Screen Selection & Clipping` \ - pipewire pipewire-pulse libpipewire02 `# Pipewire` \ - xdg-desktop-portal xdg-desktop-portal-wlr `# Screensharing` \ - obs-studio-wayland obs-xdg-portal `# OBS` \ - ttf-iosevka `# Primary Fonts` \ - ttf-font-awesome `# Icon Font` \ curl `# HTTP Utility` \ - w3m `# Viewing Images in Terminals` \ + w3m `# Terminal Browser` \ jq `# CLI for Interacting with JSON` \ - ranger `# CLI File Manager` \ httpie `# httpie and neovim dependencies` \ docker docker-compose `# Yummy containers` \ inotify-tools `# Watching` \ fish `# Shell` \ time `# GNU time` \ fortune-mod fortune-mod-archlinux `# Fortune` \ - diff-so-fancy `# Fancy Diffs` \ oath-toolkit `# One-Time Passwords` \ sysstat `# System Statistics` \ - man-db man-pages `# Come On, Man!` \ - ripcord `# Discord and Slack Client` + man-db man-pages `# Come On, Man!` diff --git a/os/linux/arch/provision.d/50-install-tmux-plugins.bash b/os/linux/arch/provision.d/50-install-tmux-plugins.bash index 51c07af..4d24d6b 100755 --- a/os/linux/arch/provision.d/50-install-tmux-plugins.bash +++ b/os/linux/arch/provision.d/50-install-tmux-plugins.bash @@ -12,6 +12,3 @@ bash "$XDG_CONFIG_HOME/tmux/plugins/tpm/bindings/install_plugins" bash "$XDG_CONFIG_HOME/tmux/plugins/tpm/bindings/update_plugins" tmux source-file "$HOME/.tmux.conf" - -systemctl --user enable tmux.service -systemctl --user restart tmux.service diff --git a/os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash b/os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash new file mode 100755 index 0000000..33c5108 --- /dev/null +++ b/os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +inject_red="vt.default_red=0x11,0xf9,0xa6,0xf4,0x66,0xae,0xa1,0xf8,0x75,0xf9,0xa6,0xf4,0x66,0xae,0xa1,0xf9" +inject_green="vt.default_grn=0x11,0x26,0xe2,0xbf,0xd9,0x81,0xef,0xf8,0x71,0x26,0xe2,0xbf,0xd9,0x81,0xef,0xf8" +inject_blue="vt.default_blu=0x11,0x72,0x2e,0x75,0xef,0xff,0xe4,0xf2,0x5e,0x72,0x2e,0x75,0xef,0xff,0xe4,0xf5" + +optional_space='[[:space:]]\{0,1\}' +not_space="[^[:space:]]" + +function delete_matching_param() { + opt="$1"; shift + sed -i '/^options / s/'"$opt"'//' "$@" +} + +function delete_prefixed_unquoted_param() { + pre="$1"; shift + delete_matching_param "$optional_space$pre$not_space*" "$@" +} + +for f in /boot/loader/entries/*; do + delete_prefixed_unquoted_param 'vt.default_red=' "$f" + delete_prefixed_unquoted_param 'vt.default_grn=' "$f" + delete_prefixed_unquoted_param 'vt.default_blu=' "$f" + # append kernel params + sed -i "/^options / s/$/ $inject_red $inject_green $inject_blue/" "$f" +done diff --git a/os/linux/arch/provision.d/optional/ui-packages.bash b/os/linux/arch/provision.d/optional/ui-packages.bash new file mode 100644 index 0000000..5445c4d --- /dev/null +++ b/os/linux/arch/provision.d/optional/ui-packages.bash @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +if grep -E -q '^\[multilib\]$' /etc/pacman.conf; then + echo "Multilib Repository Already Enabled!" +else + echo "Enabling Multilib Repository (with sudo)..." + sudo sh -c 'echo -e "\n\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf' +fi + +yay -Sy \ + xf86-input-libinput \ + bluez bluez-libs bluez-utils bluez-tools `# Bluetooth` \ + arc-gtk-theme `# GTK Theme` \ + elementary-icon-theme `# GUI File Explorer Icons` \ + thunar thunar-volman gvfs `# GUI File Explorer + Volume Management/Auto-Mount Disks)` \ + ttf-opensans ttf-dejavu ttf-liberation `# Fonts` \ + avr-libc avr-gcc dfu-programmer dfu-util `# Keyboard Programming Utilities` \ + xorg-xbacklight `# Xorg Backlight Control` \ + gimp inkscape krita `# Image/Vector Editing Applications` \ + audacity `# Audio Editing Application` \ + accountsservice `# Mainly for User Avatars with Display Manager` \ + deluge deluge-gtk cairo python-cairo `# GUI Torrent Client` \ + gdm `# Display Manager of choice` \ + pigz `# Multi-core gzipping` \ + samba `# Sharing Files with other (Windows) PCs` \ + gvfs-smb `# Auto-Detect Samba Shares` \ + cmake `# Cross-Platform Make` \ + elixir nodejs erlang rustup \ + php `# PHP Language` \ + nginx `# Web Server` \ + postgresql pgcli `# RDBMS` \ + neofetch `# swag` \ + cloc `# For counting lines of code` \ + noto-fonts noto-fonts-emoji `# Emoji` \ + discord `# Chat` \ + steam steamcmd lutris `# Games` \ + gnome-shell `# Guh-nome Guh-shell` \ + vlc `# Video Viewer` \ + zathura zathura-pdf-mupdf `# Document Viewer` \ + libinput libinput-gestures `# Trackpad Control` \ + glu mesa wxgtk2 libpng `# Various` \ + gammastep `# Redshift for Wayland` \ + dmenu `# Application Launcher` \ + python python-pip `# Python 3 Language` \ + hexyl `# CLI Hex Viewer` \ + firefox-developer-edition `# Default Web Browser` \ + alsa-utils `# Audio Utilities` \ + alsa-plugins `# Plugins for ALSA` \ + pulseaudio pavucontrol pulsemixer `# Audio Backend and Controls` \ + playerctl `# Media Keys Controls` \ + feh `# Image Viewer & Wallpaper Manager` \ + wlroots-git sway-git `# Wayland Compositor` \ + swaylock-git swayidle-git `# Auto-Locking for Sway` \ + kanshi-git `# Monitor Management for Sway` \ + wofi-git `# Sway app launcher` \ + waybar-git mako-git `# Sway Bar & Notifications` \ + slurp grim wl-clipboard `# Sway Screen Selection & Clipping` \ + pipewire pipewire-pulse libpipewire02 `# Pipewire` \ + xdg-desktop-portal xdg-desktop-portal-wlr `# Screensharing` \ + obs-studio-wayland obs-xdg-portal `# OBS` \ + ttf-iosevka `# Primary Fonts` \ + ttf-font-awesome `# Icon Font` \ + diff-so-fancy `# Fancy Diffs` \ + ripcord `# Discord and Slack Client` diff --git a/os/linux/arch/provision.sh b/os/linux/arch/provision.sh index ac6fb46..294a3ec 100755 --- a/os/linux/arch/provision.sh +++ b/os/linux/arch/provision.sh @@ -1,2 +1,22 @@ #!/usr/bin/env sh -for file in "$(dirname "$0")/provision.d"/*; do "$file"; done + +pacman -Syy + +is_root="$(test "$(whoami)" == 'root' && echo "1" || echo "0")" +for file in "$(dirname "$0")/provision.d"/*; do + test -d "$file" && continue + echo "Runnning $f..." + if <<< "$file" grep -q "AS_ROOT"; then + if [ "$is_root" == "1" ]; then + "$file" + else + sudo "$file" + fi + else + if [ "$is_root" == "1" ]; then + sudo -u daniel "$file" + else + "$file" + fi + fi +done diff --git a/os/linux/config.d.fish b/os/linux/config.d.fish deleted file mode 100644 index 956d991..0000000 --- a/os/linux/config.d.fish +++ /dev/null @@ -1,2 +0,0 @@ -set e $argv[1] -set -Ua fish_user_paths $e/bin diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index cde0173..79e6f8d 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -4,10 +4,15 @@ profile desktop-1x4kside { exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-H-workspaces.sh" } +profile desktop-1x4kside2 { + output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal + output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 + exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-H-workspaces.sh" +} + profile desktop-H-4k { output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 4880,0 scale 1.5 transform 90 - output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-H-workspaces.sh" } diff --git a/os/linux/sway/config b/os/linux/sway/config index 6fb2b0e..471bf91 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -7,14 +7,6 @@ set $mod Mod4 set $default_gap 0 -exec initctl set-env --global SWAYSOCK="$SWAYSOCK" -exec initctl set-env --global I3SOCK="$I3SOCK" -exec initctl set-env --global WAYLAND_DISPLAY="$WAYLAND_DISPLAY" -exec initctl set-env --global CLUTTER_BACKEND=wayland -exec initctl set-env --global SDL_VIDEODRIVER=wayland -exec initctl set-env --global MOZ_ENABLE_WAYLAND=1 -exec initctl emit sway-session - focus_wrapping no gaps inner $default_gap smart_borders on|no_gaps @@ -53,7 +45,7 @@ bindsym $mod+shift+return exec floating-term bindsym $mod+shift+alt+return exec kitty bindsym $mod+c kill bindsym $mod+shift+c kill # TODO: kill -9? -bindsym $mod+space exec app-launcher +bindsym $mod+space exec wofi --show drun bindsym $mod+shift+s exec clipshot bindsym $mod+e exec thunar bindsym $mod+shift+r reload diff --git a/os/linux/sway/init b/os/linux/sway/init index c809e36..6227572 100755 --- a/os/linux/sway/init +++ b/os/linux/sway/init @@ -13,5 +13,10 @@ end set -Ux CLUTTER_BACKEND wayland set -Ux SDL_VIDEODRIVER wayland set -Ux MOZ_ENABLE_WAYLAND 1 +set -Ux XDG_CURRENT_DESKTOP sway + +for s in $ENV_PATH/*/sway-init.d.fish + source $s (dirname $s) +end exec sway