Compare commits

...

6 Commits

Author SHA1 Message Date
doryan 36f7b6d24c rebrand) 2025-02-16 02:09:15 +04:00
doryan 8798d86c7f ??? 2025-02-16 02:09:05 +04:00
doryan e0d16a1f87 todo: complete install script
1. install X11 configs
2. add config for amdgpu
2025-02-16 02:08:56 +04:00
doryan f0c02135ff feat(loginctl): use stock power management command instead elogind (need in sudoers let to execute zzz, reboot and etc.) 2025-02-16 02:07:52 +04:00
doryan 4fbe56d827 feat(lock): add betterlockscreen config 2025-02-16 02:05:39 +04:00
doryan c0df750156 feat(idle): add xidlehook 2025-02-16 02:05:04 +04:00
22 changed files with 315 additions and 14 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/bin/bash
pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x polybar > /dev/null || polybar &
xhost +si:localuser:$USER &
xmodmap ~/.Xmodmap
bspc monitor -d 1 2 3 4 5
@ -25,11 +25,12 @@ bspc config active_border_color "#E0A3B6"
bspc config normal_border_color "#8393A1"
bspc config focused_border_color "#93D4C5"
xhost +si:localuser:$USER &
xmodmap ~/.Xmodmap
pgrep -x polybar > /dev/null || polybar &
pgrep -x sxhkd > /dev/null || sxhkd &
xmousepasteblock &
xsetroot -cursor_name left_ptr
picom &
feh --bg-fill ~/.bg/bg_5.png &
dunst &
xmousepasteblock &
xsetroot -cursor_name left_ptr &
pgrep -x xidlehook > /dev/null/ || xidlehook --not-when-fullscreen --not-when-audio --timer 30 'betterlockscreen -l' '' --timer 360 'sudo zzz' ''

2
Laptop/polybar/config.ini Normal file → Executable file
View File

@ -25,7 +25,7 @@ secondary = #E0A3B6
alert = #E7A063
disabled = #9DA991
[bar/example]
[bar/doryanbar]
width = 100%
height = 22pt

0
Laptop/sxhkd/sxhkdrc Normal file → Executable file
View File

View File

@ -35,3 +35,4 @@ feh --bg-fill ~/.bg/bg_5.png ~/.bg/bg_5.png &
dunst &
xmousepasteblock &
xsetroot -cursor_name left_ptr &
pgrep -x xidlehook > /dev/null/ || xidlehook --not-when-fullscreen --not-when-audio --timer 30 'betterlockscreen -l' '' --timer 360 'sudo zzz' ''

View File

@ -0,0 +1,17 @@
# ~/.config/betterlockscreenrc
# default options
display_on=0
span_image=false
fx_list=(blur)
dim_level=40
blur_level=1
wallpaper_cmd="feh --bg-fill"
quiet=false
# i3lockcolor_bin="i3lock-color" # Manually set command for i3lock-color
suspend_command="sudo zzz"
# i3lock-color - custom arguments
# lockargs=() # overwriting default "(-n)"
# lockargs+=(--ignore-empty-password) # appending new argument

View File

@ -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
rofi/colors.rasi Normal file → Executable file
View File

0
rofi/config.rasi Normal file → Executable file
View File

0
rofi/launcher/app_menu.rasi Normal file → Executable file
View File

BIN
rofi/power/bg.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 0 B

View File

@ -59,11 +59,11 @@ run_cmd() {
selected="$(confirm_exit)"
if [[ "$selected" == "$yes" ]]; then
if [[ $1 == '--shutdown' ]]; then
loginctl poweroff
sudo shutdown -f now
elif [[ $1 == '--reboot' ]]; then
loginctl reboot
sudo reboot
elif [[ $1 == '--suspend' ]]; then
betterlockscreen --suspend
betterlockscreen --suspend
elif [[ $1 == '--logout' ]]; then
bspc quit & pkill pipewire & pkill pipewire-pulse & pkill polybar
fi

0
rofi/power/power_menu.rasi Normal file → Executable file
View File

0
rofi/volume/volume_menu.rasi Normal file → Executable file
View File

View File

@ -0,0 +1 @@
needs_root_rights = yes

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,6 @@
Section "Files"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbOptions" "grp:win_space_toggle"
EndSection

View File

@ -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

View File

@ -0,0 +1,3 @@
# Pass all events to our one handler script
event=.*
action=/etc/acpi/handler.sh %e

101
root_configs/acpi/handler.sh Executable file
View File

@ -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

View File

@ -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>