July 3, 2023

Настройка Openbox на Void Linux (на будущие)

после установки заходим под рут и вводим:

chsh -s /bin/bash root
useradd -m -s /bin/bash -U -G wheel,users,audio,video,cdrom,network,bluetooth,disk юзернейм, затем passwd юзернейм

настройка сети: https://docs.voidlinux.org/config/network/index.html

ставим nano: xbps-install nano

теперь редачим sudoers:
nano /etc/sudoers
и раскоментируем:
%wheel ALL=(ALL:ALL) ALL

теперь выходим и заходим под нашим аккаунтом

ставим репы:
sudo xbps-install void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree

и всё необходимое:
sudo xbps-install xorg xinit xterm openbox obconf nitrogen qt5ct lxappearance lxterminal fcitx5 octoxbps chromium arandr kvantum mousepad polybar plank ark rofi wget Thunar gvfs dunst copyq ntfs-3g git bluez blueman fontawesome6 flatpak flameshot papirus-icon-theme mpv gnome-disk-utility fish-shell

после этого, редачим .xinitrc и вводим:

openbox-session

создаем файл .profile и добавляем:

export QT_QPA_PLATFORMTHEME=qt5ct export QT_AUTO_SCREEN_SCALE_FACTOR=0 export QT_SCALE_FACTOR=1 export QT_FONT_DPI=96

export $(dbus-launch)

ставим дрова на видюху:
sudo xbps-install nvidia перезагружаемся
после логина вводим startx

пишем arandr и меняем разрешение

открываем терминал и копируем конфиги опенбокса:
mkdir -p ~/.config/openbox

cp -a /etc/xdg/openbox/ ~/.config/

теперь ставим picom и другие приколы:
wget https://hsdchannel.ml/bruh/picom_etc.zip

ark picom_etc.zip

cd picom_etc

sudo cp * /usr/local/bin

ставим тему:
https://github.com/catppuccin/openbox

https://github.com/catppuccin/Kvantum

https://github.com/catppuccin/gtk/releases

распаковываем, переносим в /usr/share/themes и принимаем их

Ставим lightdm

вводим в терминале:
sudo xbps-install lightdm lightdm-gtk3-greeter

редачим конфиг:
sudo nano /etc/lightdm/lightdm.conf

[Seat:*] *** greeter-session=lightdm-gtk-greeter *** user-session=hsd *** display-setup-script=/etc/lightdm/1080_mon.sh greeter-setup-script=/etc/lightdm/1080_mon.sh session-setup-script=/etc/lightdm/1080_mon.sh session-cleanup-script=/etc/lightdm/1080_mon.sh autologin-user=hsd autologin-user-timeout=0 ***

Xsession:

exec dbus-launch --sh-syntax --exit-with-session $@

и скрипт:

sudo nano /etc/lightdm/1080_mon.sh

#!/bin/sh xrandr --output ***1 --primary --mode 1920x1080

добавляем в автостарт:

sudo ln -sf /etc/sv/lightdm /var/service sudo ln -sf /etc/sv/dbus /var/service

sudo reboot

ALSA

sudo xbps-install alsalib alsa-firmware AlsaMixer.app alsa-pluginsbluez-alsaalsa-utils alsa-plugins-pulseaudiopavucontrol

Bluetooth

sudo ln -sf /etc/sv/bluetoothd /var/service

sudo usermod -a -G bluetooth

fcitx5

/etc/environment

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx

Прочие

Меню

wget https://github.com/onuronsekiz/obamenu/raw/main/obamenu.py

файл menu.xml:
<menu id="root-menu" label="Openbox 3"> <separator label="Void Linux | hsd-pc" /> <item label="Терминал"> <action name="Execute"> <command>lxterminal</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <item label="Браузер"> <action name="Execute"> <command>chromium</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <item label="Файлы"> <action name="Execute"> <command>thunar</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <separator /> <menu execute="~/.config/openbox/obamenu.py" id="pymenu" label="Приложения"></menu> <separator label="Polybar" /> <item label="Показать"> <action name="Execute"> <command>polybar-msg cmd show</command> </action> </item> <item label="Скрыть"> <action name="Execute"> <command>polybar-msg cmd hide</command> </action> </item> <separator /> <separator label="Система" /> <item label="Настройки Openbox"> <action name="Execute"> <command>obconf</command> <startupnotify><enabled>yes</enabled></startupnotify> </action> </item> <!— <item label="Настройки fcitx5"> <action name="Execute"> <command>fcitx5-configtool</command> <startupnotify><enabled>yes</enabled></startupnotify> </action> </item> --> <!— <item label="Перезапуск Picom"> <action name="Execute"> <command>/usr/local/bin/picom --experimental-backends</command> <startupnotify><enabled>yes</enabled></startupnotify> </action> </item> --> <separator /> <item label="Реконфигурация Openbox"> <action name="Reconfigure" /> </item> <separator /> <!— <item label="Выход"> <action name="Exit"> <prompt>yes</prompt> </action> </item> --> <item label="Выключение"> <action name="Execute"> <command>bash ~/.config/rofi/power.sh </command> </action> </item> </menu>

power.sh

#!/bin/bash rofi \ -show p \ -modi p:'rofi-power-menu --symbols-font "Font Awesome 6 Free" --choices=shutdown/reboot/logout' \ -font "Monospace Regular 16" \ -theme-str 'window {width: 10em;} listview {lines: 4;}'

sudo chmod +s /sbin/reboot

sudo chmod +s /sbin/poweroff

rc.xml

<!— Keybindings for window switching --> <keybind key="W-x"> <action name="ShowMenu"> <menu>root-menu</menu> <position> <x>center</x> <y>center</y> </position> </action> </keybind>


<!— Keybindings for running applications --> <keybind key="W-space"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>rofi</name> </startupnotify> <command>rofi -show drun -show-icons</command> </action> </keybind> <keybind key="C-S-t"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>lxterminal</name> </startupnotify> <command>lxterminal</command> </action> </keybind> <keybind key="Print"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>PrtSc</name> </startupnotify> <command>flameshot screen</command> </action> </keybind> <keybind key="C-Print"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>PrtSc1</name> </startupnotify> <command>flameshot gui</command> </action> </keybind> </keyboard>

autostart

/usr/bin/dunst & exec dbus-launch --exit-with-session fcitx5 & nitrogen --restore & polybar -c ~/.config/polybar/config.ini & plank & copyq & /usr/local/bin/picom --experimental-backends &

Steam

flatpak install steam

или

sudo xbps-install steam libgcc-32bit libstdc++-32bit libdrm-32bit libglvnd-32bit mesa-dri-32bit

Flatpak

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Picom

~/.config/picom/picom.conf

backend ="glx"; glx-no-stencil = true;

inactive-opacity = 0.6; active-opacity = 1; frame-opacity = 1; inactive-opacity-override = false;

blur-background = true; blur-background-frame = true; blur-background-fixed = false; blur-background-exclude = [ "window_type = 'dock'", "class_g = 'Polybar'", "class_g = 'Plank'", "window_type = 'desktop'", "_GTK_FRAME_EXTENTS@:c", "window_type = 'popup_menu'" ]; blur-kern = "3x3box"; blur-method = "kawase"; blur-strength = 7;

opacity-rule = [ "90:class_g = 'urxvt'", "100:class_g = 'plank'" ];

corner-radius = 12;

shadow = true; shadow-radius = 20; shadow-opacity = 0.5; shadow-offset-x = -5; shadow-offset-y = -5; no-dock-shadow = false; no-dnd-shadow = false;

shadow-exclude = [ "class_g = 'bar'", "class_g = 'lemonbar'", "class_g = 'plank'", ]; shadow-ignore-shaped = false;

fading = true fade-in-step = 0.15; fade-out-step = 0.14; fade-delta = 20; no-fading-destroyed-argb = false;

vsync = true; detect-rounded-corners = true; detect-client-opacity = true; detect-transient = true; detect-client-leader = true; mark-ovredir-focused = true;

lxqt-sudo

sudo xbps-install lxqt-sudo

Шрифты

/usr/share/fonts/***

fc-cache -fv