Browse Source

add corectrl

temporary redundancy for gvm until verified alacritty fix

baseline alacritty config

reorganize bashrc and bash profile contents
Casey DeLorme 2 years ago
parent
commit
901c4ac009

+ 8 - 11
arch.sh

@@ -93,23 +93,23 @@ PACKAGES="${PACKAGES} sway alacritty wofi waybar xorg-xwayland xorg-xlsclients q
 PACKAGES="${PACKAGES} fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono ttf-font-awesome"
 PACKAGES="${PACKAGES} fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono ttf-font-awesome"
 
 
 # GUI software
 # GUI software
-PACKAGES="${PACKAGES} xarchiver gparted psensor hardinfo steam steam-native-runtime gamemode lib32-gamemode discord mpv mpv-mpris openshot gimp krita firefox obs-studio dia mednafen mame ppsspp lutris sublime-text evince viewnior virt-manager virtualbox virtualbox-host-modules-arch"
+PACKAGES="${PACKAGES} xarchiver gparted psensor hardinfo steam steam-native-runtime gamemode lib32-gamemode discord mpv mpv-mpris openshot gimp krita firefox obs-studio dia mednafen mame ppsspp lutris sublime-text evince viewnior virt-manager virtualbox virtualbox-host-modules-arch corectrl"
 
 
 # conditional GPU packages
 # conditional GPU packages
 if [ $(lspci | grep -i "vga" | grep -ci "amd") -gt 0 ]; then
 if [ $(lspci | grep -i "vga" | grep -ci "amd") -gt 0 ]; then
-	PACKAGES="$PACKAGES xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon mesa-vdpau"
+	PACKAGES="${PACKAGES} xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon mesa-vdpau"
 
 
 	# update modules to load
 	# update modules to load
 	[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 amdgpu radeon)/' /etc/mkinitcpio.conf
 	[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 amdgpu radeon)/' /etc/mkinitcpio.conf
 fi
 fi
 if [ $(lspci | grep -i "vga" | grep -ci "intel") -gt 0 ]; then
 if [ $(lspci | grep -i "vga" | grep -ci "intel") -gt 0 ]; then
-	PACKAGES="$PACKAGES xf86-video-intel vulkan-intel lib32-vulkan-intel mesa-vdpau"
+	PACKAGES="${PACKAGES} xf86-video-intel vulkan-intel lib32-vulkan-intel mesa-vdpau"
 
 
 	# update modules to load
 	# update modules to load
 	[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 i915)/' /etc/mkinitcpio.conf
 	[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 i915)/' /etc/mkinitcpio.conf
 fi
 fi
 if [ $(lspci | grep -i "vga" | grep -ci "nvidia") -gt 0 ]; then
 if [ $(lspci | grep -i "vga" | grep -ci "nvidia") -gt 0 ]; then
-	PACKAGES="$PACKAGES nvidia-dkms libglvnd lib32-libglvnd opencl-nvidia lib32-opencl-nvidia xf86-video-nouveau nvidia-utils lib32-nvidia-utils mesa-vdpau nvidia-settings"
+	PACKAGES="${PACKAGES} nvidia-dkms libglvnd lib32-libglvnd opencl-nvidia lib32-opencl-nvidia xf86-video-nouveau nvidia-utils lib32-nvidia-utils mesa-vdpau nvidia-settings"
 
 
 	# update modules to load
 	# update modules to load
 	[ $(grep -c "nvidia" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
 	[ $(grep -c "nvidia" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
@@ -125,7 +125,7 @@ pacman -Syu --noconfirm $PACKAGES
 [ -d /srv/arch-desktop/install ] || git clone https://git.caseydelorme.com/cdelorme/arch-desktop /srv/arch-desktop
 [ -d /srv/arch-desktop/install ] || git clone https://git.caseydelorme.com/cdelorme/arch-desktop /srv/arch-desktop
 rsync -Pav /srv/arch-desktop/install/ /
 rsync -Pav /srv/arch-desktop/install/ /
 mkdir -p /etc/skel/.config/pulse
 mkdir -p /etc/skel/.config/pulse
-mkdir -p /etc/skel/{desktop,downloads,public,public/templates,documents,music,pictures,videos,git}
+mkdir -p /etc/skel/{desktop,downloads,public,public/templates,documents,music,pictures,videos,code}
 sed "/module-suspend-on-idle/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
 sed "/module-suspend-on-idle/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
 # @note: we may want to avoid disabling this on laptops
 # @note: we may want to avoid disabling this on laptops
 sed -i "/module-switch-on-port-available/d" /etc/skel/.config/pulse/default.pa
 sed -i "/module-switch-on-port-available/d" /etc/skel/.config/pulse/default.pa
@@ -152,12 +152,8 @@ sudo -u $aur_username git clone https://aur.archlinux.org/xcursor-chameleon-skyb
 sudo -u $aur_username git clone https://aur.archlinux.org/numix-icon-theme-git.git /home/${aur_username}/numix-icon-theme-git
 sudo -u $aur_username git clone https://aur.archlinux.org/numix-icon-theme-git.git /home/${aur_username}/numix-icon-theme-git
 (cd /home/${aur_username}/numix-icon-theme-git && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
 (cd /home/${aur_username}/numix-icon-theme-git && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
 
 
-# xpadneo
-
 # cmst (for connman UI)
 # cmst (for connman UI)
 
 
-# corectrl
-
 # wev
 # wev
 
 
 # cleanup aur user
 # cleanup aur user
@@ -231,9 +227,10 @@ if [[ -n "$username" && -n "$password" ]]; then
 	# generate default (passwordless) ed25519 ssh key if none exists
 	# generate default (passwordless) ed25519 ssh key if none exists
 	su $username -c "cd; if [ ! -f ~/.ssh/id_ed25519 ]; then ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519 && cd && chmod 600 ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519.pub; fi"
 	su $username -c "cd; if [ ! -f ~/.ssh/id_ed25519 ]; then ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519 && cd && chmod 600 ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519.pub; fi"
 
 
-	# install gvm loading from ~/.bash_profile, and the latest go version
+	# install gvm loading from ~/.bashrc & ~/.bash_profile, and the latest go version
 	su $username -c "if [ ! -d ~/.gvm ]; then GVM_NO_UPDATE_PROFILE=1 bash < <(curl -Ls https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer 2> /dev/null); fi"
 	su $username -c "if [ ! -d ~/.gvm ]; then GVM_NO_UPDATE_PROFILE=1 bash < <(curl -Ls https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer 2> /dev/null); fi"
-	su $username -c 'grep "gvm" ~/.bash_profile &> /dev/null || echo -e "\n# load gvm\n! which gvm &> /dev/null && . ~/.gvm/scripts/gvm" >> ~/.bash_profile'
+	su $username -c 'grep "gvm" ~/.bashrc &> /dev/null || echo -e "\n# load gvm\n[ -s $HOME/.gvm/scripts/gvm ] && . $HOME/.gvm/scripts/gvm" >> ~/.bashrc'
+	su $username -c 'grep "gvm" ~/.bash_profile &> /dev/null || echo -e "\n# load gvm\n[ -s $HOME/.gvm/scripts/gvm ] && . $HOME/.gvm/scripts/gvm" >> ~/.bash_profile'
 	su $username -c ". ~/.gvm/scripts/gvm && gvm install go1.17.6 -B && gvm use go1.17.6 --default"
 	su $username -c ". ~/.gvm/scripts/gvm && gvm install go1.17.6 -B && gvm use go1.17.6 --default"
 
 
 	# configure user-space transmission
 	# configure user-space transmission

+ 24 - 5
install/etc/skel/.bash_profile

@@ -3,21 +3,40 @@
 # add local bin to path
 # add local bin to path
 export PATH=/usr/local/bin:$PATH
 export PATH=/usr/local/bin:$PATH
 
 
-# alias for discord wayland, since it ignores configs
-alias discord='discord --enable-features=UseOzonePlatform --ozone-platform=wayland'
+# explicitly set and append to XDG_DATA_DIRS
+[ -z "$XDG_DATA_DIRS" ] && export XDG_DATA_DIRS="/usr/share:/usr/local/share"
+export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share"
+
+# set language, editor, augment history behavior, enable dynamic resize
+export LANG=en_US.UTF-8
+export LANGUAGE=en_US.UTF-8
+export EDITOR=vim
+export HISTFILE="$HOME/.bash_history"
+export HISTCONTROL=ignoreboth:erasedups
+shopt -s histappend
+shopt -s checkwinsize
+shopt -s direxpand
 
 
 # fcitx IME support
 # fcitx IME support
 export GTK_IM_MODULE=fcitx
 export GTK_IM_MODULE=fcitx
 export QT_IM_MODULE=fcitx
 export QT_IM_MODULE=fcitx
 export XMODIFIERS=@im=fcitx
 export XMODIFIERS=@im=fcitx
 
 
-# specify wayland for applications like steam
+# specify wayland for applications (primarily games)
 export MOZ_ENABLE_WAYLAND=1
 export MOZ_ENABLE_WAYLAND=1
 export SDL_VIDEODRIVER="wayland"
 export SDL_VIDEODRIVER="wayland"
 export XDG_CURRENT_DESKTOP=Unity
 export XDG_CURRENT_DESKTOP=Unity
+export WINE_FULLSCREEN_FSR=1
 
 
-# golang override for package behavior
-export GO111MODULE=auto
+# add aliases with optimized settings
+alias ls='ls -vhFA --color=auto'
+alias grep='grep --color=auto'
+alias ..='cd ..'
+alias ...='cd ../..'
+alias sshfs='sshfs -o cache=yes,compression=yes,kernel_cache'
+
+# alias for discord wayland, since it ignores configs
+alias discord='discord --enable-features=UseOzonePlatform --ozone-platform=wayland'
 
 
 # if bashrc exists and the terminal has stdin load it
 # if bashrc exists and the terminal has stdin load it
 test -t 0 && . "$HOME/.bashrc"
 test -t 0 && . "$HOME/.bashrc"

+ 0 - 21
install/etc/skel/.bashrc

@@ -1,22 +1,5 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# set language, editor, augment history behavior, enable dynamic resize
-export LANG=en_US.UTF-8
-export LANGUAGE=en_US.UTF-8
-export EDITOR=vim
-export HISTFILE="$HOME/.bash_history"
-export HISTCONTROL=ignoreboth:erasedups
-shopt -s histappend
-shopt -s checkwinsize
-shopt -s direxpand
-
-# add aliases with optimized settings
-alias ls='ls -vhFA --color=auto'
-alias grep='grep --color=auto'
-alias ..='cd ..'
-alias ...='cd ../..'
-alias sshfs='sshfs -o cache=yes,compression=yes,kernel_cache'
-
 # define pretty man pages colors
 # define pretty man pages colors
 man() {
 man() {
 	env \
 	env \
@@ -95,10 +78,6 @@ fi
 . /usr/share/bash-completion/bash_completion
 . /usr/share/bash-completion/bash_completion
 . /usr/share/doc/pkgfile/command-not-found.bash
 . /usr/share/doc/pkgfile/command-not-found.bash
 
 
-# explicitly set and append to XDG_DATA_DIRS
-[ -z "$XDG_DATA_DIRS" ] && export XDG_DATA_DIRS="/usr/share:/usr/local/share"
-export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share"
-
 # use shared agent to load ssh-keys; expects systemd to manage agent
 # use shared agent to load ssh-keys; expects systemd to manage agent
 export SSH_AUTH_SOCK="$HOME/.ssh/socket"
 export SSH_AUTH_SOCK="$HOME/.ssh/socket"
 ssh-add -l &> /dev/null || ssh-add
 ssh-add -l &> /dev/null || ssh-add

+ 5 - 0
install/etc/skel/.config/alacritty/alacritty.yml

@@ -0,0 +1,5 @@
+env:
+  TERM: xterm-256color
+window:
+  opacity: 0.95
+

+ 3 - 2
install/etc/skel/.config/sway/config

@@ -20,7 +20,7 @@ seat seat0 xcursor_theme Chameleon-SkyBlue-Large
 # window manager commands
 # window manager commands
 bindsym $mod+Shift+c reload
 bindsym $mod+Shift+c reload
 bindsym $mod+Shift+q kill
 bindsym $mod+Shift+q kill
-bindsym $mod+x exec swaymsg exit
+bindsym $mod+x exec "systemctl --user import-environment; systemctl --user stop sway-session.target; swaymsg exit"
 bindsym $mod+p focus parent
 bindsym $mod+p focus parent
 
 
 # split workspace horizontal and vertical
 # split workspace horizontal and vertical
@@ -135,7 +135,8 @@ for_window [class="xdg-desktop-portal-kde"] floating enable
 for_window [class="Wine"] floating enable
 for_window [class="Wine"] floating enable
 for_window [app_id="lutris"] floating enable
 for_window [app_id="lutris"] floating enable
 
 
-# waybar is great
+# @reference: man 5 sway-bar
+# @todo: figure out how to configure and optimize waybar
 bar {
 bar {
     swaybar_command waybar
     swaybar_command waybar
 }
 }

+ 12 - 0
install/etc/skel/.config/systemd/user/corectrl.service

@@ -0,0 +1,12 @@
+[Unit]
+Description=CoreControl Advanced CPU and GPU Tuning
+PartOf=graphical-session.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/corectrl
+Restart=on-failure
+RestartSec=3
+
+[Install]
+WantedBy=sway-session.target

+ 46 - 65
todo.md

@@ -8,56 +8,24 @@ _Expect iterative changes over the following months while fine-tuning happens on
 
 
 ## sway
 ## sway
 
 
-Going directly to hardware trials because virtualbox support requires too much undesirable configuration:
+Fresh install after swapping motherboards since Gigabyte hasn't fixed the reboot problems in 1.5 years.
 
 
+- Verify gvm reloads properly as I have copied it to bashrc
+- Verify swapping export locations into bash_profile does not break (_eg. due to alacritty only loading bashrc not bash_profile_)
+- Test the new sway exit command works by properly terminating session services
+	- _Figure out what is still broken so I can exit and restart sway without rebooting?_
 
 
----
+- modify alacritty.yml to match former xdefaults
+	- [reference](https://sunnnychan.github.io/cheatsheet/linux/config/alacritty.yml.html)
+	- We can set the program and args to force it to load bash_profile and eliminate redundant gvm logic while fixing the other major issue I had with it?
 
 
-Consider modifying this line to stop the sway-session.target:
-
-	bindsym $mod+x exec swaymsg exit
-
-Like:
-
-	bindsym $mod+x exec "systemctl --user import-environment; systemctl --user stop sway-session.target; swaymsg exit"
-
-
----
-
-When I eventually break down and buy elden ring, try these?
-
-	PROTON_NO_FSYNC=1 WINE_FULLSCREEN_FSR=1 mangohud gamemoderun %command%
-
-May need other steps for ultrawide support?
-
-https://github.com/gurrgur/er-patcher
-
-	./er-patcher -r 144 -uavc -- env <above command>
-
-
----
-
-- move aur packages to install under the actual user and download to their src directory (for easier updates)
-- add these packages to the installation list:
-	- xpadneo-dkms
+- consider moving aur package installation to the user rather than the temporary aur user
+- verify whether we should add these packages:
 	- cmst (sway/wayland friendly connman management)
 	- cmst (sway/wayland friendly connman management)
-	- corectrl
-		- add `.service` to userspace systemd
 	- wev (_need to verify necessity?_)
 	- wev (_need to verify necessity?_)
-	- https://aur.archlinux.org/packages/mpv-mpris/
-- Change aur packages to install under the user being created instead of a temporary user
-	- _this will allow that user to find and update them more readily/easily_
-
 
 
 - investigate `poweralertd` and `batsignal` to setup low battery alerts with `mako`
 - investigate `poweralertd` and `batsignal` to setup low battery alerts with `mako`
-
-
-- create alacritty config copying from former xdefaults
-	- https://sunnnychan.github.io/cheatsheet/linux/config/alacritty.yml.html
-	- _transparency is a great start, but we're not done!_
-
-
----
+	- _This is important for laptops_
 
 
 - continue to refine `notes/sway.md` to account for the lack of obvious world-knowledge
 - continue to refine `notes/sway.md` to account for the lack of obvious world-knowledge
 
 
@@ -71,10 +39,11 @@ https://github.com/gurrgur/er-patcher
 	- try No Man's Sky
 	- try No Man's Sky
 
 
 
 
----
+## better temperature scripts
 
 
-- write a script to grab temperatures to replace the temperature module in waybar with custom commands...
-	- _this is because configuring temperatures is hardware dependent and the waybar has unintelligent defaults and anti-agnostic configuration!_
+Write a script to grab temperatures to replace the temperature module in waybar with custom commands...
+
+_This is because configuring temperatures is hardware dependent and the waybar has unintelligent defaults and anti-agnostic configuration!_
 
 
 Example that matters?
 Example that matters?
 
 
@@ -109,13 +78,13 @@ Samples:
 	}
 	}
 
 
 
 
----
+## scratchpad experiment
+
+I would like to be able to selectively deal with applications send to scratchpad.
+
+Getting an ordered list is a starting point.
 
 
-- test writing a script to iterate scratchpad items
-	- need to be able to get a list
-	- need that list to be reliably ordered
-		- _or need to impose an order_
-	- can potentially replace `scratchpad show` with `exec`
+Probably replacing `scratchpad show` with an `exec`.
 
 
 New `/usr/local/bin/alacrittyq` with `$mod+tilde` toggle:
 New `/usr/local/bin/alacrittyq` with `$mod+tilde` toggle:
 
 
@@ -131,15 +100,20 @@ New `/usr/local/bin/alacrittyq` with `$mod+tilde` toggle:
 - investigate dedicated identity for an alacritty window to selectively target for scratchpad persistent terminal via mod+tilde
 - investigate dedicated identity for an alacritty window to selectively target for scratchpad persistent terminal via mod+tilde
 
 
 
 
----
+## workspace restoration
 
 
-- It may be possible to write an IPC connected utility to save and restore workspaces
-	- _this tool would need to know when to save, and to intelligently restore only once when applications are first launched._
-	- It would need to have a way to pull wayland equivalents for the content mentioned in this issue:
-		- https://github.com/swaywm/sway/issues/1005
+It may be possible to write an IPC connected utility to save and restore workspaces
 
 
+_This tool would need to know when to save, and to intelligently restore only once when applications are first launched._
 
 
----
+It would need to have a way to pull wayland equivalents for the content mentioned in this issue:
+
+- https://github.com/swaywm/sway/issues/1005
+
+
+## hidpi check
+
+Previously I stopped caring because hidpi is erratic and glitchy, but I'm curious if sway might be smarter than openbox...
 
 
 - test hidpi configuration
 - test hidpi configuration
 	- `output * scale 2`
 	- `output * scale 2`
@@ -153,7 +127,7 @@ New `/usr/local/bin/alacrittyq` with `$mod+tilde` toggle:
 - _Remember to take some screenshots before and after to indicate visible changes?_
 - _Remember to take some screenshots before and after to indicate visible changes?_
 
 
 
 
----
+## firefox automated configuration
 
 
 - investigate firefox configuration
 - investigate firefox configuration
 	- [auto-configuration?](https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig)
 	- [auto-configuration?](https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig)
@@ -161,10 +135,17 @@ New `/usr/local/bin/alacrittyq` with `$mod+tilde` toggle:
 	- how to make it remember workspaces when restoring tabs (_probably not possible, so using tab manager addon_)
 	- how to make it remember workspaces when restoring tabs (_probably not possible, so using tab manager addon_)
 
 
 
 
----
+## data cleanup
+
+Utilize my old rig to cleanup and organize my data across my old HDD's
+
+- Uninstall everything that is taking up disk space
+	- games
+	- videos
+	- music
+	- data
+- disable transmission (_we should not be downloading more content on this box_)
+
+Since this machine is separate/independent I can happily deal with long running processes and filling the disks to the brim while going through my files...
 
 
-- utilize my old rig to cleanup and organize my data across my old HDD's
-	- _transfer `views/` ASAP..._
-	- uninstall all games and other content taking up space
-	- disable transmission so I can avoid accidentally increasing the files on this disk
-	- this includes sorting what is on `data/`, the other 2TB disk
+At the end I want to be able to eliminate a huge amount of data that I don't need anymore, and any redundant copies of data as well...