update README.md and check_dependencies.sh, use Hyprland without path
This commit is contained in:
parent
30793b5a46
commit
728b00c2ca
31
README.md
31
README.md
@ -4,11 +4,40 @@ Lupan's config files
|
|||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
Install Hyprland
|
||||||
|
----------------
|
||||||
|
|
||||||
To reproduce my environment clone this repo into `~/dotfiles` and check
|
To reproduce my environment clone this repo into `~/dotfiles` and check
|
||||||
that you have required programs in your `PATH` with
|
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).
|
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).
|
||||||
|
@ -1,37 +1,51 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
REQUIRED="$1"
|
||||||
|
|
||||||
|
check_dependency() {
|
||||||
|
local CMD="$1"
|
||||||
|
shift
|
||||||
|
for REQ in "$@"; do
|
||||||
|
if [ "$REQ" = "$REQUIRED" ]; then
|
||||||
|
which "$CMD"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
echo '# required:'
|
echo '# required:'
|
||||||
for CMD in \
|
|
||||||
zsh \
|
check_dependency zsh dwm hypr
|
||||||
git \
|
check_dependency git dwm hypr
|
||||||
cc \
|
check_dependency cc dwm
|
||||||
make \
|
check_dependency make dwm
|
||||||
setxkbmap \
|
check_dependency setxkbmap dwm
|
||||||
slock \
|
check_dependency slock dwm
|
||||||
systemctl \
|
check_dependency systemctl dwm hypr
|
||||||
xmodmap \
|
check_dependency xmodmap dwm
|
||||||
xrandr \
|
check_dependency xrandr dwm
|
||||||
xrdb \
|
check_dependency xrdb dwm
|
||||||
xset \
|
check_dependency xset dwm
|
||||||
xsetroot \
|
check_dependency xsetroot dwm
|
||||||
hsetroot \
|
check_dependency hsetroot dwm
|
||||||
xsettingsd \
|
check_dependency xsettingsd dwm
|
||||||
sed \
|
check_dependency sed dwm hypr
|
||||||
pkill \
|
check_dependency pkill dwm
|
||||||
dmenu \
|
check_dependency dmenu dwm
|
||||||
dmenu_run \
|
check_dependency dmenu_run dwm
|
||||||
xss-lock \
|
check_dependency xss-lock dwm
|
||||||
exa \
|
check_dependency exa dwm hypr
|
||||||
fzf \
|
check_dependency fzf dwm hypr
|
||||||
; do
|
check_dependency Hyprland hypr
|
||||||
which "$CMD"
|
check_dependency hyprctl hypr
|
||||||
done
|
check_dependency alacritty hypr
|
||||||
|
check_dependency swaylock hypr
|
||||||
|
check_dependency waybar hypr
|
||||||
|
check_dependency wofi hypr
|
||||||
|
|
||||||
echo -e '\n# optional:'
|
echo -e '\n# optional:'
|
||||||
for CMD in \
|
|
||||||
sx \
|
check_dependency sx dwm
|
||||||
picom \
|
check_dependency picom dwm
|
||||||
compton \
|
check_dependency compton dwm
|
||||||
xbacklight; do
|
check_dependency xbacklight dwm
|
||||||
which "$CMD"
|
|
||||||
done
|
|
||||||
|
@ -29,8 +29,8 @@ export PATH
|
|||||||
|
|
||||||
# start X or Hyprland at login
|
# start X or Hyprland at login
|
||||||
if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then
|
if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then
|
||||||
if which /usr/bin/Hyprland > /dev/null; then
|
if which Hyprland > /dev/null; then
|
||||||
exec /usr/bin/Hyprland
|
exec Hyprland
|
||||||
elif which /usr/bin/sx > /dev/null; then
|
elif which /usr/bin/sx > /dev/null; then
|
||||||
exec /usr/bin/sx ~/.xsession
|
exec /usr/bin/sx ~/.xsession
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user