update README.md and check_dependencies.sh, use Hyprland without path

This commit is contained in:
Łukasz Pankowski 2024-06-29 18:12:34 +02:00
parent 30793b5a46
commit 728b00c2ca
3 changed files with 78 additions and 35 deletions

View File

@ -4,11 +4,40 @@ Lupan's config files
Installation
------------
Install Hyprland
----------------
To reproduce my environment clone this repo into `~/dotfiles` and check
that you have required programs in your `PATH` with
```
$ sh check_dependencies.sh
$ sh check_dependencies.sh hypr
```
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).
Install proper configurations with
```
$ stow shell hyprland alacritty xsession nvim yazi
```
Where `xsession` is just to install `lupan-set-theme` script, `nvim` and `yazi` may be skipped if you do not use them.
Change to `zsh` as your login shell with
```
$ chsh -s /usr/bin/zsh
```
Install DWM (old)
-----------------
To reproduce my environment clone this repo into `~/dotfiles` and check
that you have required programs in your `PATH` with
```
$ sh check_dependencies.sh dwm
```
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).

View File

@ -1,37 +1,51 @@
#!/bin/sh
echo '# required:'
for CMD in \
zsh \
git \
cc \
make \
setxkbmap \
slock \
systemctl \
xmodmap \
xrandr \
xrdb \
xset \
xsetroot \
hsetroot \
xsettingsd \
sed \
pkill \
dmenu \
dmenu_run \
xss-lock \
exa \
fzf \
; do
REQUIRED="$1"
check_dependency() {
local CMD="$1"
shift
for REQ in "$@"; do
if [ "$REQ" = "$REQUIRED" ]; then
which "$CMD"
break
fi
done
}
echo '# required:'
check_dependency zsh dwm hypr
check_dependency git dwm hypr
check_dependency cc dwm
check_dependency make dwm
check_dependency setxkbmap dwm
check_dependency slock dwm
check_dependency systemctl dwm hypr
check_dependency xmodmap dwm
check_dependency xrandr dwm
check_dependency xrdb dwm
check_dependency xset dwm
check_dependency xsetroot dwm
check_dependency hsetroot dwm
check_dependency xsettingsd dwm
check_dependency sed dwm hypr
check_dependency pkill dwm
check_dependency dmenu dwm
check_dependency dmenu_run dwm
check_dependency xss-lock dwm
check_dependency exa dwm hypr
check_dependency fzf dwm hypr
check_dependency Hyprland hypr
check_dependency hyprctl hypr
check_dependency alacritty hypr
check_dependency swaylock hypr
check_dependency waybar hypr
check_dependency wofi hypr
echo -e '\n# optional:'
for CMD in \
sx \
picom \
compton \
xbacklight; do
which "$CMD"
done
check_dependency sx dwm
check_dependency picom dwm
check_dependency compton dwm
check_dependency xbacklight dwm

View File

@ -29,8 +29,8 @@ export PATH
# start X or Hyprland at login
if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then
if which /usr/bin/Hyprland > /dev/null; then
exec /usr/bin/Hyprland
if which Hyprland > /dev/null; then
exec Hyprland
elif which /usr/bin/sx > /dev/null; then
exec /usr/bin/sx ~/.xsession
fi