todo: complete install script
1. install X11 configs 2. add config for amdgpu
This commit is contained in:
parent
f0c02135ff
commit
e0d16a1f87
11
install.sh
11
install.sh
|
@ -10,7 +10,7 @@ green="\e[92m"
|
|||
dgreen="\e[32m"
|
||||
end="\e[0m"
|
||||
|
||||
general_configs=("btop" "picom" "zathura" "rofi" "yazi" "dunst" "mimeapps.list" "starship.toml")
|
||||
general_configs=("betterlockscreen" "btop" "picom" "zathura" "rofi" "yazi" "dunst" "mimeapps.list" "starship.toml")
|
||||
home_dir_configs=(".bg" ".zshrc" ".zsh")
|
||||
|
||||
echo -e "${green}
|
||||
|
@ -47,12 +47,17 @@ install_config ~/ ${home_dir_configs[@]}
|
|||
|
||||
betterlockscreen -u ~/.bg/bg_5.png --fx blur --blur 1
|
||||
|
||||
echo "Do you want install custom bspwm xsession to /usr/share/xsessions/? It needs to become root (y/N):"
|
||||
echo "Do you want install bspwm_session, X11, fonts and acpid (for laptop) configs? (y/N):"
|
||||
read advanced_install
|
||||
|
||||
case "${advanced_install}" in
|
||||
"Y" | "y")
|
||||
su root -c "cp -vf ./bspwm_session/* /usr/share/xsessions/"
|
||||
sudo cp -vfr ./bspwm_session/* /usr/share/xsessions
|
||||
sudo cp -vrf ./root_configs/fonts /etc
|
||||
if [[ $type == "L" | $type == "l" ]] -; then
|
||||
sudo cp -vfr ./root_configs/acpi /etc
|
||||
else
|
||||
fi
|
||||
;;
|
||||
"N" | "n" | "*")
|
||||
echo "Skip"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
needs_root_rights = yes
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
userresources=$HOME/.Xresources
|
||||
usermodmap=$HOME/.Xmodmap
|
||||
sysresources=/etc/X11/xinit/.Xresources
|
||||
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||
|
||||
# merge in defaults and keymaps
|
||||
|
||||
if [ -f $sysresources ]; then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
xrdb -merge $sysresources
|
||||
|
||||
fi
|
||||
|
||||
if [ -f $sysmodmap ]; then
|
||||
xmodmap $sysmodmap
|
||||
fi
|
||||
|
||||
if [ -f "$userresources" ]; then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
xrdb -merge "$userresources"
|
||||
|
||||
fi
|
||||
|
||||
if [ -f "$usermodmap" ]; then
|
||||
xmodmap "$usermodmap"
|
||||
fi
|
||||
|
||||
# start some nice programs
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
twm &
|
||||
xclock -geometry 50x50-1+1 &
|
||||
xterm -geometry 80x50+494+51 &
|
||||
xterm -geometry 80x20+494-0 &
|
||||
exec xterm -geometry 80x66+0+0 -name login
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
if [ -z "$XDG_VTNR" ]; then
|
||||
exec /usr/bin/X -nolisten tcp "$@"
|
||||
else
|
||||
exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR
|
||||
fi
|
|
@ -0,0 +1,6 @@
|
|||
Section "Files"
|
||||
EndSection
|
||||
Section "InputDevice"
|
||||
Identifier "Keyboard0"
|
||||
Driver "kbd"
|
||||
EndSection
|
|
@ -0,0 +1,6 @@
|
|||
Section "InputClass"
|
||||
Identifier "keyboard-all"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbLayout" "us,ru"
|
||||
Option "XkbOptions" "grp:win_space_toggle"
|
||||
EndSection
|
|
@ -0,0 +1,21 @@
|
|||
Section "InputClass"
|
||||
Identifier "touchpad"
|
||||
Driver "synaptics"
|
||||
MatchIsTouchpad "on"
|
||||
Option "TapButton1" "1"
|
||||
Option "TapButton2" "3"
|
||||
Option "TapButton3" "2"
|
||||
Option "VertEdgeScroll" "on"
|
||||
Option "VertTwoFingerScroll" "on"
|
||||
Option "HorizEdgeScroll" "on"
|
||||
Option "HorizTwoFingerScroll" "on"
|
||||
Option "CircularScrolling" "on"
|
||||
Option "CircScrollTrigger" "2"
|
||||
Option "EmulateTwoFingerMinZ" "40"
|
||||
Option "EmulateTwoFingerMinW" "8"
|
||||
Option "CoastingSpeed" "0"
|
||||
Option "FingerLow" "30"
|
||||
Option "FingerHigh" "50"
|
||||
Option "MaxTapTime" "125"
|
||||
EndSection
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Pass all events to our one handler script
|
||||
event=.*
|
||||
action=/etc/acpi/handler.sh %e
|
|
@ -0,0 +1,101 @@
|
|||
#!/bin/sh
|
||||
# Default acpi script that takes an entry for all actions
|
||||
|
||||
# NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
|
||||
# modify it to not use /sys
|
||||
|
||||
# $1 should be + or - to step up or down the brightness.
|
||||
step_backlight() {
|
||||
for backlight in /sys/class/backlight/*/; do
|
||||
[ -d "$backlight" ] || continue
|
||||
step=$(( $(cat "$backlight/max_brightness") / 20 ))
|
||||
[ "$step" -gt "1" ] || step=1 #fallback if gradation is too low
|
||||
printf '%s' "$(( $(cat "$backlight/brightness") $1 step ))" >"$backlight/brightness"
|
||||
done
|
||||
}
|
||||
|
||||
minspeed="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
|
||||
maxspeed="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"
|
||||
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
case "$1" in
|
||||
button/power)
|
||||
case "$2" in
|
||||
PBTN|PWRF)
|
||||
logger "PowerButton pressed: $2, shutting down..."
|
||||
shutdown -P now
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
button/sleep)
|
||||
case "$2" in
|
||||
SBTN|SLPB)
|
||||
# suspend-to-ram
|
||||
logger "Sleep Button pressed: $2, suspending..."
|
||||
su doryan -c -m "betterlockscreen -l &"
|
||||
sleep 0.5
|
||||
zzz
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
ac_adapter)
|
||||
case "$2" in
|
||||
AC|ACAD|ADP0)
|
||||
case "$4" in
|
||||
00000000)
|
||||
cat "$minspeed" >"$setspeed"
|
||||
#/etc/laptop-mode/laptop-mode start
|
||||
;;
|
||||
00000001)
|
||||
cat "$maxspeed" >"$setspeed"
|
||||
#/etc/laptop-mode/laptop-mode stop
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
battery)
|
||||
case "$2" in
|
||||
BAT0)
|
||||
case "$4" in
|
||||
00000000) #echo "offline" >/dev/tty5
|
||||
;;
|
||||
00000001) #echo "online" >/dev/tty5
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
CPU0)
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
button/lid)
|
||||
case "$3" in
|
||||
close)
|
||||
# suspend-to-ram
|
||||
logger "LID closed, suspending..."
|
||||
su doryan -c -m "betterlockscreen -l &"
|
||||
sleep 0.5
|
||||
zzz
|
||||
;;
|
||||
open)
|
||||
logger "LID opened"
|
||||
;;
|
||||
*) logger "ACPI action undefined (LID): $2";;
|
||||
esac
|
||||
;;
|
||||
video/brightnessdown)
|
||||
step_backlight -
|
||||
;;
|
||||
video/brightnessup)
|
||||
step_backlight +
|
||||
;;
|
||||
*)
|
||||
logger "ACPI group/action undefined: $1 / $2"
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- /etc/fonts/fonts.conf file to configure system font access -->
|
||||
<fontconfig>
|
||||
<description>Default configuration file</description>
|
||||
|
||||
<!--
|
||||
DO NOT EDIT THIS FILE.
|
||||
IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
|
||||
LOCAL CHANGES BELONG IN 'local.conf'.
|
||||
|
||||
The intent of this standard configuration file is to be adequate for
|
||||
most environments. If you have a reasonably normal environment and
|
||||
have found problems with this configuration, they are probably
|
||||
things that others will also want fixed. Please submit any problems
|
||||
to the fontconfig issue tracking system located at fontconfig.org
|
||||
|
||||
Note that the normal 'make install' procedure for fontconfig is to
|
||||
replace any existing fonts.conf file with the new version. Place
|
||||
any local customizations in local.conf which this file references.
|
||||
|
||||
Keith Packard
|
||||
-->
|
||||
|
||||
<!-- Font directory list -->
|
||||
|
||||
<dir>/home/doryan/.fonts</dir>
|
||||
|
||||
<dir prefix="xdg">fonts</dir>
|
||||
<!-- the following element will be removed in the future -->
|
||||
<dir>~/.fonts</dir>
|
||||
|
||||
<!--
|
||||
Accept deprecated 'mono' alias, replacing it with 'monospace'
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family">
|
||||
<string>mono</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>JetBrainsMono Nerd Font Propo</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!--
|
||||
Accept alternate 'system ui' spelling, replacing it with 'system-ui'
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family">
|
||||
<string>system ui</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Onest Medium</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!--
|
||||
Load local system customization file
|
||||
-->
|
||||
<include ignore_missing="yes">conf.d</include>
|
||||
|
||||
<!-- Font cache directory list -->
|
||||
|
||||
<cachedir>/var/cache/fontconfig</cachedir>
|
||||
<cachedir prefix="xdg">fontconfig</cachedir>
|
||||
<!-- the following element will be removed in the future -->
|
||||
<cachedir>~/.fontconfig</cachedir>
|
||||
|
||||
<config>
|
||||
<!--
|
||||
Rescan configuration every 30 seconds when FcFontSetList is called
|
||||
-->
|
||||
<rescan>
|
||||
<int>30</int>
|
||||
</rescan>
|
||||
</config>
|
||||
|
||||
</fontconfig>
|
Loading…
Reference in New Issue