+ MacOS support? Polishing later

This commit is contained in:
Ahmad Ansori Palembani 2022-06-17 14:13:25 +07:00
parent e5ba0534aa
commit a6ee74ce4d
4 changed files with 41 additions and 26 deletions

View file

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile"
exec tdm --xstart if [[ "$OSTYPE" == "darwin"* ]]; then
else
exec tdm --xstart
fi

View file

@ -1,26 +1,32 @@
#!/bin/sh #!/bin/sh
export _JAVA_AWT_WM_NONREPARENTING=1 if [[ "$OSTYPE" == "darwin"* ]]; then
# Disable auto-dim/autolock/screen saver export _JAVA_AWT_WM_NONREPARENTING=1
xset s off -dpms
# Set cpu-governor to performance (Sometime it still set to powersave) # Disable auto-dim/autolock/screen saver
cpupower frequency-set -g performance xset s off -dpms
# Slow app startup fix (for flatpaks) # Set cpu-governor to performance (Sometime it still set to powersave)
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY cpupower frequency-set -g performance
# Universal Autostarts # Slow app startup fix (for flatpaks)
# fcitx5 -d & dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources &
unclutter &
dunst &
numlockx &
lxpolkit &
# Custom Resolutions # Universal Autostarts
xrandr --newmode "768x432" 25.75 768 792 864 960 432 435 440 450 -hsync +vsync # fcitx5 -d &
xrandr --newmode "960x540" 40.75 960 992 1088 1216 540 543 548 562 -hsync +vsync xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources &
xrandr --addmode VGA1 768x432 unclutter &
xrandr --addmode VGA1 960x540 dunst &
numlockx &
lxpolkit &
# Custom Resolutions
xrandr --newmode "768x432" 25.75 768 792 864 960 432 435 440 450 -hsync +vsync
xrandr --newmode "960x540" 40.75 960 992 1088 1216 540 543 548 562 -hsync +vsync
xrandr --addmode VGA1 768x432
xrandr --addmode VGA1 960x540
else
fi

View file

@ -4,9 +4,11 @@
# exec startx # exec startx
#fi #fi
bash /usr/bin/tdm if [[ "$OSTYPE" == "linux-gnu"* ]]; then
bash /usr/bin/tdm
[[ -f ~/.zshrc ]] && . ~/.zshrc [[ -f ~/.zshrc ]] && . ~/.zshrc
[ ! -s ~/.config/mpd/pid ] && mpd [ ! -s ~/.config/mpd/pid ] && mpd
export PATH="$HOME/.poetry/bin:$PATH" export PATH="$HOME/.poetry/bin:$PATH"
fi

View file

@ -8,8 +8,12 @@ export ANDROID_AVD_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android/.android/avd"
# -- Path # -- Path
# PATH="$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}" # PATH="$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}"
PATH="$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}" if [[ "$OSTYPE" == "darwin"* ]]; then
export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library PATH="$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:${PATH:+:${PATH}}"
else
PATH="$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}"
fi
# export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library
# -- IBus stuff (IME) # -- IBus stuff (IME)
export GTK_IM_MODULE="ibus" export GTK_IM_MODULE="ibus"