some changes in .bashrc for new wayland setup

probably not important changes in .xinitrc and .xprofile - last before migrating to wayland
This commit is contained in:
2025-11-09 13:43:46 +01:00
parent 20d1b9e7f5
commit b714d64b4f
3 changed files with 50 additions and 3 deletions

22
.bashrc
View File

@@ -138,6 +138,23 @@ gpg_decrypt () {
gpg --decrypt --output ${output} "${1}" && echo "${1} -> ${output}"
}
# for spawning new terminal instances in the current working directory in foot terminal
osc7_cwd() {
local strlen=${#PWD}
local encoded=""
local pos c o
for (( pos=0; pos<strlen; pos++ )); do
c=${PWD:$pos:1}
case "$c" in
[-/:_.!\'\(\)~[:alnum:]] ) o="${c}" ;;
* ) printf -v o '%%%02X' "'${c}" ;;
esac
encoded+="${o}"
done
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
}
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }osc7_cwd
# Aliases and Exports
## utility
@@ -164,7 +181,8 @@ alias lgfw="cd ~/git/fofrweb/"
alias lbc="cd ~/git/fr/pedf/bc"
## programs
alias r="ranger"
#alias r="ranger"
alias r="yazi"
alias feh="feh --scale-down"
#alias dragon="dragon-drop"
alias xclip="xclip -selection c"
@@ -174,7 +192,7 @@ alias speedtest="speedtest-cli"
alias "cd.."="cd .."
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias tldr='tldr -t base16' # colors
#alias tldr='tldr -t base16' # colors
## gpg encryption
# verify signature for isos

View File

@@ -5,11 +5,16 @@
[ -f ~/.xprofile ] && . ~/.xprofile
[ -f ~/.Xresources ] && xrdb -merge -I$HOME ~/.Xresources
# OPTIMUS SHITS
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
export _JAVA_AWT_WM_NONREPARENTING=1
eval "$(dbus-launch --sh-syntax --exit-with-session)"
feh --bg-center "$HOME/Pictures/bg.png" &
#feh --bg-center "$HOME/Pictures/bg.png" &
feh --bg-scale "$HOME/Pictures/bg.png" &
xautolock -locker lock-us -secure -time 1 &
@@ -20,5 +25,12 @@ wireplumber &
dwmblocks &
clipmenud &
mpd --no-daemon &
pw-metadata -n settings 0 clock.force-rate 44100
pw-metadata -n settings 0 clock.force-quantum 1024
dbus-launch --sh-syntax --exit-with-session dwm

View File

@@ -5,3 +5,20 @@ xinput disable $TPADID
xinput set-prop "TPPS/2 IBM TrackPoint" "libinput Accel Speed" 0.9
xdg-settings set default-web-browser firefox.desktop
xdg-mime default mupdf.desktop application/pdf
xdg-mime default thunar.desktop inode/directory
#xrandr --output HDMI-0 --mode 2560x1440 --rate 143.91
#xrandr --output DP-3 --mode 1920x1080 --pos 0x180 --rotate normal --output HDMI-0 --mode 2560x1440 --rate 143.91 --pos 1920x0 --rotate normal
#xrandr --output DP-3 --mode 1920x1080 --pos 0x180 --rotate normal --output HDMI-0 --mode 2560x1440 --rate 143.91 --pos 1920x0 --rotate normal --primary
##nvidia-settings --assign 'CurrentMetaMode=DPY-4: 2560x1440_144 @2560x1440 +1920+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0, ForceCompositionPipeline=On}, DPY-3: nvidia-auto-select @1920x1080 +0+180 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On}'
#nvidia-settings --assign 'CurrentMetaMode=DPY-5: 2560x1440_170 @2560x1440 +1920+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0, ForceCompositionPipeline=On}, DPY-1: nvidia-auto-select @1920x1080 +0+138 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On}'
xrandr --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-A-0 --mode 1920x1080 --pos 0x180 --rotate normal
xrandr --output DisplayPort-2 --set "scaling mode" Full
if [ -d ~/.sv ]; then
runsvdir -P ~/.sv &
fi