Compare commits

...

16 Commits

Author SHA1 Message Date
a61455a7cc feat: update polybar, bspwm and sxhkd configs for PC and only polybar for Laptop 2025-09-16 20:42:29 +04:00
f9f27dbe33 feat(xorg): update xorg configs
configured AutoRepeat options and disabled dpms
2025-04-11 12:44:59 +04:00
c8782a4f6a feat(xidlehook): update xidlehook autostart configuration 2025-03-13 21:32:30 +04:00
b04d42c0ae feat(xidlehook): add display variable for xidlehook, update window_gap, remove redundant arguments for feh execution and fix pgrep xmousepaste execution command 2025-03-13 21:32:03 +04:00
093289ba9c feat(installer): complete advanced installation 2025-02-16 18:43:56 +04:00
7e4714d382 fix(daemon): prevent duplicate processes 2025-02-16 18:42:40 +04:00
294c06ee84 feat(yazi): add EDITOR variable to change default editor in yazi 2025-02-16 18:41:04 +04:00
58e955527e feat(x11): move xorg.conf.d folder 2025-02-16 18:40:28 +04:00
38c96b1e4a feat(x11): remove unnecessary files 2025-02-16 18:40:02 +04:00
42a7c0e726 fix(poweroff): change shutdown command flag 2025-02-16 18:38:48 +04:00
36f7b6d24c rebrand) 2025-02-16 02:09:15 +04:00
8798d86c7f ??? 2025-02-16 02:09:05 +04:00
e0d16a1f87 todo: complete install script
1. install X11 configs
2. add config for amdgpu
2025-02-16 02:08:56 +04:00
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
4fbe56d827 feat(lock): add betterlockscreen config 2025-02-16 02:05:39 +04:00
c0df750156 feat(idle): add xidlehook 2025-02-16 02:05:04 +04:00
25 changed files with 371 additions and 61 deletions

1
.zshrc
View File

@@ -97,3 +97,4 @@ HISTFILE=~/.zsh_history
# Created by `pipx` on 2024-10-24 13:49:13 # Created by `pipx` on 2024-10-24 13:49:13
export PATH="$PATH:/home/doryan/.local/bin" export PATH="$PATH:/home/doryan/.local/bin"
export EDITOR=nvim

View File

@@ -1,7 +1,9 @@
#!/bin/sh #!/bin/bash
pgrep -x sxhkd > /dev/null || sxhkd & export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
pgrep -x polybar > /dev/null || polybar &
xhost +si:localuser:$USER &
xmodmap ~/.Xmodmap
bspc monitor -d 1 2 3 4 5 bspc monitor -d 1 2 3 4 5
@@ -25,11 +27,13 @@ bspc config active_border_color "#E0A3B6"
bspc config normal_border_color "#8393A1" bspc config normal_border_color "#8393A1"
bspc config focused_border_color "#93D4C5" bspc config focused_border_color "#93D4C5"
xhost +si:localuser:$USER & pgrep -x polybar > /dev/null || polybar &
xmodmap ~/.Xmodmap pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x xidlehook > /dev/null || xidlehook --detect-sleep --not-when-fullscreen --not-when-audio --timer 300 'betterlockscreen -l' '' --timer 1200 'sudo zzz' '' &
pgrep -x xmousepasteblock > /dev/null || xmousepasteblock &
pgrep -x syndaemon > /dev/null || syndaemon -d -i 0.5 &
xsetroot -cursor_name left_ptr
picom & picom &
feh --bg-fill ~/.bg/bg_5.png & feh --bg-fill ~/.bg/bg_5.png &
dunst & dunst &
xmousepasteblock &
xsetroot -cursor_name left_ptr &

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

@@ -25,7 +25,7 @@ secondary = #E0A3B6
alert = #E7A063 alert = #E7A063
disabled = #9DA991 disabled = #9DA991
[bar/example] [bar/doryanbar]
width = 100% width = 100%
height = 22pt height = 22pt
@@ -45,7 +45,7 @@ font-0 = "FiraCode Nerd Font Propo:size=10;2"
modules-left = xworkspaces modules-left = xworkspaces
modules-center = xwindow modules-center = xwindow
modules-right = cpu memory pulseaudio xkeyboard wlan eth date calendar battery powermenu modules-right = systray pulseaudio xkeyboard eth date calendar powermenu
cursor-click = pointer cursor-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize

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

View File

@@ -1,14 +1,16 @@
#!/bin/sh #!/bin/sh
pipewire & pgrep -x pipewire > /dev/null || pipewire &
pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x polybar > /dev/null || polybar &
bspc monitor DVI-D-0 -d I II III IV V export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
bspc monitor HDMI-0 -d VI VII VIII IX X
xhost +si:localuser:$USER &
xmodmap ~/.Xmodmap &
bspc monitor HDMI-0 -d I II III
bspc monitor DP-0 -d IV V VI
bspc config border_width 3 bspc config border_width 3
bspc config window_gap 5 bspc config window_gap 3
bspc config pointer_modifier super bspc config pointer_modifier super
bspc config focus_follows_pointer true bspc config focus_follows_pointer true
@@ -21,17 +23,16 @@ bspc config pointer_action3 resize_corner
bspc rule -a scratch sticky=on state=floating focus=on bspc rule -a scratch sticky=on state=floating focus=on
bspc config split_ratio 0.52
bspc config active_border_color "#E0A3B6" bspc config active_border_color "#E0A3B6"
bspc config normal_border_color "#8393A1" bspc config normal_border_color "#8393A1"
bspc config focused_border_color "#93D4C5" bspc config focused_border_color "#93D4C5"
xhost +si:localuser:$USER & pgrep -x sxhkd > /dev/null || sxhkd &
xmodmap ~/.Xmodmap & pgrep -x xidlehook > /dev/null || xidlehook --detect-sleep --not-when-fullscreen --not-when-audio --timer 300 'betterlockscreen -l' '' --timer 1200 'sudo zzz' '' &
pgrep xmousepaste > /dev/null || xmousepasteblock &
pgrep -x polybar > /dev/null || exec ~/.config/polybar/launch.sh &
xsetroot -cursor_name left_ptr
picom & picom &
feh --bg-fill ~/.bg/bg_5.png ~/.bg/bg_5.png & feh --bg-fill ~/.bg/bg_5_1.png &
dunst & dunst &
xmousepasteblock &
xsetroot -cursor_name left_ptr &

View File

@@ -25,7 +25,10 @@ secondary = #E0A3B6
alert = #E7A063 alert = #E7A063
disabled = #9DA991 disabled = #9DA991
[bar/example]
[bar/prime]
monitor = HDMI-0
width = 100% width = 100%
height = 22pt height = 22pt
@@ -45,7 +48,7 @@ font-0 = "FiraCode Nerd Font Propo:size=10;2"
modules-left = xworkspaces modules-left = xworkspaces
modules-center = xwindow modules-center = xwindow
modules-right = cpu memory pulseaudio xkeyboard eth date calendar powermenu modules-right = systray pulseaudio xkeyboard eth date calendar powermenu
cursor-click = pointer cursor-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize
@@ -67,6 +70,73 @@ wm-restack = bspwm
; For more information, see the documentation page for this module: ; For more information, see the documentation page for this module:
; https://polybar.readthedocs.io/en/stable/user/modules/tray.html ; https://polybar.readthedocs.io/en/stable/user/modules/tray.html
[bar/second]
monitor=DP-0
width = 100%
height = 22pt
; dpi = 96
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2pt
padding-left = 0
padding-right = 1
module-margin = 1
font-0 = "FiraCode Nerd Font Propo:size=10;2"
modules-left = cpu memory
modules-center = xwindow
modules-right = pulseaudio xkeyboard date calendar powermenu
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; wm-restack = generic
wm-restack = bspwm
[module/cpu]
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 0.5
; Default: 80
; New in version 3.6.0
warn-percentage = 95
format = <label> <ramp-coreload>
label = " 󰻠 %percentage%% "
label-foreground = ${colors.primary}
ramp-coreload-spacing = 1
ramp-coreload-0 =
ramp-coreload-1 =
ramp-coreload-2 =
ramp-coreload-3 =
ramp-coreload-4 =
ramp-coreload-5 =
ramp-coreload-6 =
ramp-coreload-7 =
[module/memory]
type = internal/memory
interval = 3
format = <label>
label =  %gb_used%
label-foreground = ${colors.primary}
[module/systray] [module/systray]
type = internal/tray type = internal/tray
@@ -96,17 +166,6 @@ label-empty-padding = 1
type = internal/xwindow type = internal/xwindow
label = %title:0:60:...% label = %title:0:60:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#89A989}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio] [module/pulseaudio]
type = internal/pulseaudio type = internal/pulseaudio
@@ -137,20 +196,6 @@ label-indicator-margin = 1
label-indicator-foreground = ${colors.background} label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary} label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[network-base] [network-base]
type = internal/network type = internal/network
interval = 5 interval = 5

15
PC/polybar/launch.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Terminate already running bar instances
# If all your bars have ipc enabled, you can use
polybar-msg cmd quit
# Otherwise you can use the nuclear option:
# killall -q polybar
# Launch bar1 and bar2
echo "---" | tee -a /tmp/polybar1.log
# echo "---" | tee -a /tmp/polybar2.log
polybar prime 2>&1 | tee -a /tmp/polybar1.log & disown
polybar second 2>&1 | tee -a /tmp/polybar2.log & disown
echo "Bars launched..."

0
PC/sxhkd/nohup.out Normal file
View File

View File

@@ -28,7 +28,7 @@ super + alt + {q,r}
bspc {quit & pkill pipewire & pkill pipewire-pulse,wm -r} bspc {quit & pkill pipewire & pkill pipewire-pulse,wm -r}
alt + shift + l alt + shift + l
betterlockscreen -l dim betterlockscreen -l dim --show-layout
# close and kill # close and kill
super + {q, shift + q} super + {q, shift + q}

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

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
function install_config() { function install_config() {
for config in ${@:2}; do for config in "${@:2}"; do
cp -vr "./${config}" "$1" cp -vr "./${config}" "$1"
done done
} }
@@ -10,7 +10,7 @@ green="\e[92m"
dgreen="\e[32m" dgreen="\e[32m"
end="\e[0m" 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") home_dir_configs=(".bg" ".zshrc" ".zsh")
echo -e "${green} echo -e "${green}
@@ -27,7 +27,7 @@ echo -e "${green}
" "
echo "Select your device type (Laptop: L/l, PC: P/p)" echo "Select your device type (Laptop: L/l, PC: P/p)"
read type read -r type
case "${type}" in case "${type}" in
"L" | "l") "L" | "l")
@@ -42,19 +42,30 @@ case "${type}" in
;; ;;
esac esac
install_config ~/.config/ ${general_configs[@]} install_config ~/.config/ "${general_configs[@]}"
install_config ~/ ${home_dir_configs[@]} install_config ~/ "${home_dir_configs[@]}"
betterlockscreen -u ~/.bg/bg_5.png --fx blur --blur 1 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 read -r advanced_install
case "${advanced_install}" in case "${advanced_install}" in
"Y" | "y") "Y" | "y")
su root -c "cp -vf ./bspwm_session/* /usr/share/xsessions/" su --shell /bin/bash -c "
cp -vrf ./bspwm_session/* /usr/share/xsessions
cp -vrf ./root_configs/fonts /etc
mkdir -p /etc/X11/xorg.conf.d
cp -vf ./root_configs/xorg.conf.d/{00-keyboard.conf,10-extensions.conf,10-serverflags.conf} /etc/X11/xorg.conf.d/
if [[ \"$type\" = \"L\" || \"$type\" = \"l\" ]] ; then
cp -vfr ./root_configs/acpi /etc
cp -vf ./root_configs/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d/
fi
"
;; ;;
"N" | "n" | "*") "N" | "n" | "*")
echo "Skip" echo "Skip"
;; ;;
esac esac
echo "Installation is complete, have a fun!"

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

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

View File

@@ -0,0 +1,7 @@
Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbOptions" "grp:ctrl_space_toggle"
Option "AutoRepeat" "250 20"
EndSection

View File

@@ -0,0 +1,3 @@
Section "Extensions"
Option "DPMS" "false"
EndSection

View File

@@ -0,0 +1,3 @@
Section "ServerFlags"
Option "BlankTime" "0"
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