diff options
-rw-r--r-- | alacritty/alacritty.yml | 6 | ||||
-rw-r--r-- | bash/.bash/01-aliases.bash | 2 | ||||
-rw-r--r-- | bash/.bash/02-prompt.bash | 17 | ||||
-rw-r--r-- | bash/.bash/03-boot.bash | 43 | ||||
-rw-r--r-- | bash/.bash_profile | 1 | ||||
-rw-r--r-- | htop/htoprc | 16 | ||||
-rw-r--r-- | tmux/tmux.conf | 2 | ||||
-rwxr-xr-x | update.sh | 4 | ||||
m--------- | vim/colors/gruvbox | 0 | ||||
-rw-r--r-- | vscode/settings.json | 16 | ||||
-rw-r--r-- | x/.xinitrc | 45 | ||||
-rw-r--r-- | x/.xinitrc-docked (renamed from x/.xinitrc-not-docked) | 43 | ||||
-rwxr-xr-x | x/battery (renamed from x/battery.pl) | 6 | ||||
-rwxr-xr-x | x/startdwm (renamed from x/startdwm.sh) | 0 |
14 files changed, 99 insertions, 102 deletions
diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index df55e76..552b034 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -28,7 +28,7 @@ font: # family: Scientifica style: Bold Italic - size: 11 + size: 13.5 offset: x: 0 @@ -36,7 +36,7 @@ font: window: padding: - x: 7 + x: 10 y: 7 opacity: 0.70 @@ -100,7 +100,7 @@ mouse: # Gruvbox dark colors: primary: - background: '#282828' + background: '#202020' # background: '#3c3836' # background: '#32302f' # background: '#000000' diff --git a/bash/.bash/01-aliases.bash b/bash/.bash/01-aliases.bash index 511503c..3786b8f 100644 --- a/bash/.bash/01-aliases.bash +++ b/bash/.bash/01-aliases.bash @@ -61,7 +61,7 @@ alias keys='xset r rate 300 50' alias gits='git status' alias mac="rm -rf __MACOSX/; rm \$(find . -name '.DS_Store')" alias super='xmodmap -e "remove mod1 = Alt_L"; xmodmap -e "remove mod4 = Super_L"; xmodmap -e "add mod1 = Super_L"; xmodmap -e "add mod4 = Alt_L"' -alias make-kernel='sudo genkernel --kernel-config=/proc/config.gz all && sudo grub-mkconfig -o /boot/grub/grub.cfg' +alias make-kernel='sudo genkernel --luks --lvm --install --kernel-config=/proc/config.gz --microcode=intel all && sudo grub-mkconfig -o /boot/grub/grub.cfg' # bash navigation alias aa='vim ~/.bash/01-aliases.bash; . ~/.bash_profile' diff --git a/bash/.bash/02-prompt.bash b/bash/.bash/02-prompt.bash index 8181d33..035f216 100644 --- a/bash/.bash/02-prompt.bash +++ b/bash/.bash/02-prompt.bash @@ -48,8 +48,10 @@ color4='\e[38;5;226m' function exit_code() { local ERROR="$?" if [[ ERROR -ne 0 ]]; then - echo -n '\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]!' + echo -n ''"$dgray"'\]/\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]\\' # echo -n '\['"$RED"'\]'"$ERROR"' ' + else + echo -n ''"$dgray"'\]/\['"$LCYAN"'\]'"$ERROR"'\['"$dgray"'\]\\' fi } @@ -77,7 +79,7 @@ function _git_prompt() { fi if ! [[ "$branch" =~ local ]]; then # echo -n '\['"$color"'\] ('"$ansi"''"$branch"') ' - echo -n '\['"$dgray"'\]#\['"$color"'\]'"$branch"''"$ansi"'' + echo -n '\['"$dgray"'\](\['"$color"'\]'"$branch"''"$ansi"'\['"$dgray"'\])' fi fi } @@ -116,15 +118,18 @@ export -f _git_prompt # export _PS1="\[$lgray\][ \[$LMAGENTA\]\h\[$lgray\] ] \[$LYELLOW\]\d, \[$LRED\]\T" # export _PS2="\[$lgray\]{ \[$CYAN\]\w\[$lgray\] }" -# bryson@dingo:/current/path:master +# bryson@hostname:/current/path:master # $ -# -export _PS1="\[$LBLUE\]\u\[$dgray\]@\[$LGREEN\]\h\[$dgray\]:\[$LYELLOW\]\w" +# export _PS1="\[$LBLUE\]\u\[$dgray\]@\[$LGREEN\]\h\[$dgray\]:\[$LYELLOW\]\w" + +# hostname[/current/path]<bryson>{12:00:00}[255](master) +# $ +export _PS1="\[$LGREEN\]\h\[$dgray\][\[$LYELLOW\]\w\[$dgray\]]<\[$LBLUE\]\u\[$dgray\]>{\[$LMAGENTA\]\@\[$dgray\]}" # define x titlebar TITLEBAR='\[\033]0;\u@\h:\w ($(history 1 | cut -c 8-))\]' # apply prompt and functions # export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a' -export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}$(_git_prompt)\n\[$NC\]\$ ";history -a' +export PROMPT_COMMAND='export PS1="$TITLEBAR${_PS1}$(exit_code)$(_git_prompt)\n\[$NC\]\$ ";history -a' diff --git a/bash/.bash/03-boot.bash b/bash/.bash/03-boot.bash index 333aaed..952dd83 100644 --- a/bash/.bash/03-boot.bash +++ b/bash/.bash/03-boot.bash @@ -3,49 +3,30 @@ # 03-boot.bash # startup scripts for systems -bat_check() { - TEST=$(acpi | grep "Discharging" | grep -v "rate information") - - if [[ $? -eq 0 ]]; then - echo "***********************************************************" - echo " WARNING" - echo "***********************************************************" - echo "Power supply is not plugged in." - echo "Make sure it is plugged in to avoid a random shutdown." - read -rs -N 1 -p "Press [Enter] to continue, any other key to return..." input; - if grep -q "$input" <<< ""; then - echo "" - else - return 1 - fi - fi -} - # run startup script if tty # for dingo -if [[ $TERM == 'linux' && $(hostname) == 'dingo' ]]; then +if [[ $TERM == 'linux' && $(hostname) == 'landseer' ]]; then cat ~/bin/house.txt printf "\n${CYAN}Welcome back Bryson :)\n\n" - printf "${LGREEN}What should dingo do?\n${magenta}" - echo -e '\td: start docked\n\tn: start not docked\n\tq: shutdown\n\tr: reboot\n\tl: logout\n\tb: bash\n\n' + printf "${LGREEN}What should landseer do?\n${magenta}" + echo -e "\tn: start x\n\tq: shutdown\n\tr: reboot\n\tl: logout\n\tb: bash\n\n" while read -rs -N 1 key; do printf "${NC}" case $key in - d) bat_check && startx ;; - n) nstartx.sh ;; - q) echo "Are you sure you want to shutdown? (y/n)"; - read -rs -N 1 key2; case $key2 in y) doas shutdown -Ph now ;; esac; ;; - r) echo "Are you sure you want to reboot? (y/n)"; - read -rs -N 1 key3; case $key3 in y) doas reboot ;; esac; ;; - l) logout ;; - b) break ;; + n) startx ;; + q) echo "Are you sure you want to shutdown? (y/n)"; + read -rs -N 1 key2; case $key2 in y) doas shutdown -Ph now ;; esac; ;; + r) echo "Are you sure you want to reboot? (y/n)"; + read -rs -N 1 key3; case $key3 in y) doas reboot ;; esac; ;; + l) logout ;; + b) break ;; [h?]) echo "$USAGE";; esac clear cat ~/bin/house.txt - printf "\n${LGREEN}What should dingo do now?\n${magenta}" - echo -e '\td: start docked\n\tn: start not docked\n\tq: shutdown\n\tr: reboot\n\tl: logout\n\tb: bash\n\n' + printf "\n${LGREEN}What should landseer do?\n${magenta}" + echo -e "\tn: start x\n\tq: shutdown\n\tr: reboot\n\tl: logout\n\tb: bash\n\n" done fi diff --git a/bash/.bash_profile b/bash/.bash_profile index c93170e..dba61c3 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -12,6 +12,7 @@ fi export EDITOR=/usr/bin/vim export TERMINAL=/usr/bin/alacritty export BROWSER=/usr/bin/librewolf-bin +export XZ_OPT='-9 -T0 -M 32000000000' export PATH complete -cf doas diff --git a/htop/htoprc b/htop/htoprc index 1f03b22..eb3f12b 100644 --- a/htop/htoprc +++ b/htop/htoprc @@ -1,15 +1,17 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -htop_version=3.2.1 +htop_version=3.2.2 config_reader_min_version=3 fields=0 48 17 18 38 39 40 2 46 47 49 1 hide_kernel_threads=1 hide_userland_threads=0 +hide_running_in_container=0 shadow_other_users=0 show_thread_names=0 show_program_path=1 highlight_base_name=1 highlight_deleted_exe=1 +shadow_distribution_path_prefix=0 highlight_megabytes=1 highlight_threads=1 highlight_changes=0 @@ -19,7 +21,7 @@ strip_exe_from_cmdline=1 show_merged_command=0 header_margin=1 screen_tabs=1 -detailed_cpu_time=1 +detailed_cpu_time=0 cpu_count_from_one=0 show_cpu_usage=1 show_cpu_frequency=1 @@ -32,10 +34,10 @@ enable_mouse=1 delay=7 hide_function_bar=0 header_layout=two_50_50 -column_meters_0=LeftCPUs Memory Swap -column_meter_modes_0=1 1 1 -column_meters_1=RightCPUs Tasks LoadAverage Uptime -column_meter_modes_1=1 2 2 2 +column_meters_0=AllCPUs2 +column_meter_modes_0=1 +column_meters_1=CPU Memory Swap Hostname System DateTime Tasks LoadAverage Uptime +column_meter_modes_1=1 1 1 2 2 2 2 2 2 tree_view=0 sort_key=46 tree_sort_key=0 @@ -51,7 +53,7 @@ screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU P .sort_direction=-1 .tree_sort_direction=1 .all_branches_collapsed=0 -screen:I/O=PID USER COMM IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command .sort_key=IO_RATE .tree_sort_key=PID .tree_view=0 diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 1b0d4fe..3ad9c80 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,4 +1,4 @@ -set -g prefix M-Space +set -g prefix C-a set -g visual-activity on set -g status-style fg=white,bg=black set-window-option -g window-status-bell-style fg=white,bg=red,bold @@ -13,8 +13,8 @@ cp -r ~/.vim/after ./vim cp ~/.xinitrc* ./x cp ~/.Xresources ./x cp ~/.Xmodmap ./x -cp ~/bin/battery.pl ./x -cp ~/bin/startdwm.sh ./x +cp ~/bin/battery ./x +cp ~/bin/startdwm ./x cp ~/.config/VSCodium/User/settings.json ./vscode # other config files diff --git a/vim/colors/gruvbox b/vim/colors/gruvbox -Subproject bf2885a95efdad7bd5e4794dd0213917770d79b +Subproject f1ecde848f0cdba877acb0c740320568252cc48 diff --git a/vscode/settings.json b/vscode/settings.json index 78fc3e4..d56cfdb 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -11,9 +11,13 @@ }, "editor.fontFamily": "'JetBrains Mono'", "java.configuration.runtimes": [ + // { + // "name": "JavaSE-1.8", + // "path": "/usr/local/java/jdk-8", + // }, { - "name": "JavaSE-1.8", - "path": "/usr/local/java/jdk-8", + "name": "JavaSE-17", + "path": "/usr/lib/jvm/openjdk-bin-17", "default": true } ], @@ -25,7 +29,7 @@ "extensions.autoCheckUpdates": false, "extensions.autoUpdate": "onlyEnabledExtensions", "typescript.disableAutomaticTypeAcquisition": true, - "workbench.colorTheme": "Gruvbox Dark Medium", + "workbench.colorTheme": "Gruvbox Dark Hard", "editor.cursorBlinking": "solid", "editor.tabSize": 2, "keyboard.dispatch": "keyCode", @@ -40,6 +44,7 @@ "vim.hlsearch": true, "workbench.startupEditor": "none", "workbench.sideBar.location": "right", + "window.restoreWindows": "none", "vim.normalModeKeyBindingsNonRecursive": [ { "before": ["<leader>", "h"], @@ -65,5 +70,8 @@ "workbench.action.navigateRight" ] } - ] + ], + "debug.onTaskErrors": "showErrors", + "explorer.confirmDelete": false, + "window.zoomLevel": 1 }
\ No newline at end of file @@ -1,7 +1,7 @@ #!/bin/sh -# executed by startx -# for use when dingo is DOCKED -export DOCKED=true +# executed by startx-not-docked +# for use when dingo is NOT docked +export DOCKED=false # load xinitrc.d stuff @@ -40,21 +40,23 @@ fi # start notifications (dunst) /usr/bin/dunst & -# open picom compositor +# start picom compositor picom --config ~/.config/picom.conf & #spotifyd & -# set up monitors -sh ~/.config/screenlayout.sh & +# add network, battery, date and time to xsetroot +slstatus & -# set default audio device to be dock audio jack -pulseaudio -k & -pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo & +# reset backlight +light -S 30 & -# add weather, date and time to xsetroot -#sh ~/bin/xsetloop-docked.sh & -slstatus & +# set default audio device to be laptop speakers +# pacmd set-default-sink alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink & +# pacmd set-sink-volume alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink 0 & + +# set up wallpaper +feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/mountains-2.jpg # apply Xresources xrdb -merge ~/.Xresources @@ -62,18 +64,17 @@ xrdb -merge ~/.Xresources # make cursor disappear after typing xbanish & -# enable numlock -numlockx & +# turn tearfree on +xrandr --output eDP --auto --set TearFree on --output HDMI-A-0 --set TearFree on & + +# run battery checker +~/bin/battery & # start keepassxc for passwords keepassxc ~/.passwords/Passwords.kdbx & -# set up wallpapers -#wallpapers.sh & -feh --bg-fill git/wallpapers-exorcist/gruvbox/mountains-2.jpg git/wallpapers-exorcist/gruvbox/mountains-2.jpg & - -# if unicomp keyboard detected, turn alt into super -if $(lsusb | grep -qi "Unicomp"); then +# if logitech keyboard detected, turn alt into super +if $(lsusb | grep -qi "Logitech Mechanical Keyboard"); then xmodmap -e "remove mod1 = Alt_L" xmodmap -e "remove mod4 = Super_L" xmodmap -e "add mod1 = Super_L" @@ -82,5 +83,5 @@ fi # start dwm redshift & -xset r rate 300 50 -exec /home/bryson/bin/startdwm.sh +xset r rate 300 80 +exec /home/bryson/bin/startdwm diff --git a/x/.xinitrc-not-docked b/x/.xinitrc-docked index b102bb6..dd30be4 100644 --- a/x/.xinitrc-not-docked +++ b/x/.xinitrc-docked @@ -1,7 +1,7 @@ #!/bin/sh -# executed by startx-not-docked -# for use when dingo is NOT docked -export DOCKED=false +# executed by startx +# for use when dingo is DOCKED +export DOCKED=true # load xinitrc.d stuff @@ -40,23 +40,21 @@ fi # start notifications (dunst) /usr/bin/dunst & -# start picom compositor +# open picom compositor picom --config ~/.config/picom.conf & #spotifyd & -# add network, battery, date and time to xsetroot -slstatus-not-docked & +# set up monitors +sh ~/.config/screenlayout.sh & -# reset backlight -light -S 50 & +# set default audio device to be dock audio jack +pulseaudio -k & +pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo & -# set default audio device to be laptop speakers -pacmd set-default-sink alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink & -pacmd set-sink-volume alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink 0 & - -# set up wallpaper -feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/mountains-2.jpg +# add weather, date and time to xsetroot +#sh ~/bin/xsetloop-docked.sh & +slstatus & # apply Xresources xrdb -merge ~/.Xresources @@ -64,17 +62,18 @@ xrdb -merge ~/.Xresources # make cursor disappear after typing xbanish & -# turn tearfree on -xrandr --output eDP --auto --set TearFree on --output HDMI-A-0 --set TearFree on & - -# run battery checker -~/bin/battery.pl & +# enable numlock +numlockx & # start keepassxc for passwords keepassxc ~/.passwords/Passwords.kdbx & -# if logitech keyboard detected, turn alt into super -if $(lsusb | grep -qi "Logitech Mechanical Keyboard"); then +# set up wallpapers +#wallpapers.sh & +feh --bg-fill git/wallpapers-exorcist/gruvbox/mountains-2.jpg git/wallpapers-exorcist/gruvbox/mountains-2.jpg & + +# if unicomp keyboard detected, turn alt into super +if $(lsusb | grep -qi "Unicomp"); then xmodmap -e "remove mod1 = Alt_L" xmodmap -e "remove mod4 = Super_L" xmodmap -e "add mod1 = Super_L" @@ -83,5 +82,5 @@ fi # start dwm redshift & -xset r rate 300 80 +xset r rate 300 50 exec /home/bryson/bin/startdwm.sh @@ -22,13 +22,13 @@ while (1) { if (int($battery_level) <= int($CRITICAL_LEVEL)) { $CRITICAL = 'def'; $sent = 'def'; - system "notify-send -i \"battery-empty\" -t 0 -u critical \"BATTERY CRITICAL\" \"Battery level is ${battery_level}%\n\nCharge the system NOW.\"" + system "notify-send -i \"battery-empty-symbolic\" -t 0 -u critical \"BATTERY CRITICAL\" \"Battery level is ${battery_level}%\n\nCharge the system NOW.\"" } } if (!$LOW && !$sent) { if (int($battery_level) <= int($LOW_LEVEL)) { $LOW = 'def'; $sent = 'def'; - system "notify-send -i \"battery-caution\" -t 0 -u normal \"BATTERY LOW\" \"Battery level is ${battery_level}%\n\nCharge the system soon.\"" + system "notify-send -i \"battery-caution-symbolic\" -t 0 -u normal \"BATTERY LOW\" \"Battery level is ${battery_level}%\n\nCharge the system soon.\"" } } if (int($battery_level) <= int($DEAD_LEVEL)) { system "notify-send -t 0 -u critical \"SHUTTING DOWN\" \"Battery level is too low. The system will shutdown in 2 minutes to prevent corruption.\n\nCharge the system NOW to cancel the shutdown.\""; @@ -40,7 +40,7 @@ while (1) { $CRITICAL = undef; $LOW = undef; system "doas shutdown -c"; - system "notify-send -t 3000 -i \"battery-good-charging\" \"System is now charging\""; + system "notify-send -t 3000 -i \"battery-good-charging-symbolic\" \"System is now charging\""; } } diff --git a/x/startdwm.sh b/x/startdwm index 496d79b..496d79b 100755 --- a/x/startdwm.sh +++ b/x/startdwm |