summary refs log tree commit diff
path: root/hyprland-welcome
blob: f0be4f4956b173f96f94b141769d3a82e547578c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/sh

one_welcome() {
	zenity --question \
	--title "Welcome to Hyprland!" \
	--text "We hope you enjoy your stay. In order to help you get accomodated to Hyprland, we prepared a little basic setup tutorial, just for you.

If you feel adventurous, or are an advanced user, you can click the "'"'"Thanks, but I don't need help"'"'" button on the bottom.

If you want to manually launch this welcome app, just execute hyprland-welcome in your terminal.

Click the "'"'"next"'"'" button to proceed to the next step of your setup :)" \
	--cancel-label "Thanks, but I don't need help" \
	--ok-label "Next"
}
register_app_state() {
	label="$1"
	shift
	installed="$(which "$@" | xargs -I{} basename "{}" | tr '\n' ' ')"
	running="$(pgrep -a "$(echo "$@" |tr ' ' '|')" |cut -d' ' -f2 |xargs -I{} basename "{}" | tr '\n' ' ')"
	printf "• %s: " "$label"
	if test -n "$running"; then
		printf "☑️<span foreground="'"'"#22cccc"'"'">%s</span>" "$running"
	elif test -n "$installed"; then
		printf "✅<span foreground="'"'"#22cc22"'"'">%s</span>" "$installed"
	else
		printf "❌<span foreground="'"'"red"'"'">Please install one of</span>"
		printf " <span foreground="'"'"red"'"'">%s</span>," "$@" |sed 's/,$//g'
	fi
}
two_getting() {
	zenity --info \
	--title "Getting started" \
	--text "The first thing we'll need to do is get some packages installed that you need in order for your system to be working properly.

Use SUPER+Q to launch a terminal.
Use SUPER+M to exit hyprland.
Supported terminals: kitty, alacritty, foot, wezterm, konsole, gnome-terminal, xterm.

<i><span foreground="'"'"#22cc22"'"'">Green</span> means the component is found to be installed, <span foreground="'"'"#22cccc"'"'">blue</span> means it's running.</i>

$(register_app_state "Authentication agent*" "hyprpolkitagent" "polkit-kde-agent")
$(register_app_state "File manager*" "dolphin" "ranger" "thunar" "pcmanfm" "nautilus" "nemo" "nnn" "yazi")
$(register_app_state "Terminal*" "kitty" "alacritty" "wezterm" "foot" "konsole" "gnome-terminal")
$(register_app_state "Pipewire*" "pipewire" "wireplumber")
$(register_app_state "Wallpaper" "hyprpaper" "swww" "awww" "swaybg" "wpaperd")
$(register_app_state "XDG Desktop Portal*" "xdg-desktop-portal-hyprland")
$(register_app_state "Notification Daemon*" "dunst", "mako" "swaync")
$(register_app_state "Status bar / shell" "quickshell" "waybar"  "eww" "ags")
$(register_app_state "Application launcher" "hyprlauncher" "fuzzel" "wofi" "rofi" "anyrun" "walker" "tofi")
$(register_app_state "Clipboard*" "wl-copy")
" \
	--ok-label "Next"
}
add_list() {
	label="$1"
	shift
	installed="$(which "$@" | xargs -I{} basename "{}" | tr '\n' '|')"
	printf -- "--add-list '%s' --list-values '%s'" "$label" "$installed"
}
three_default() {
	zenity --forms \
	--title "Default apps" \
	--text "We know that not everyone uses kitty and dolphin.
That's why we let you choose.
If you wish to change the defaults, use the selectors below." \
	$(add_list "Terminal" kitty alacritty wezterm foot konsole gnome-terminal) \
	$(add_list "File Manager" dolphin thunar pcmanfm nautilus nemo)
	#"hyprlauncher", "fuzzel", "wofi", "rofi -show run", "anyrun", "tofi-drun --drun-launch=true"
}
four_basic() {
	zenity --question \
	--title "Basic configuration" \
	--text 'Now that you'"'"'ve installed the basic apps, you might want some of them to autostart. Hyprland doesn'"'"'t automatically start anything for you, you need to tell it to.
Go to ~/.config/hypr/hyprland.conf, and add "exec-once = appname" to launch your apps, for example:
exec-once = hyprpaper
exec-once = waybar

In general, configuring apps is something for you to do. Each app you install may come with its own config file and options.

A great point to start is the Hyprland wiki at https://wiki.hypr.land. There, the master tutorial will teach you everything and link to further docs.

If you prefer pre-configured settings, or "dotfiles", you can see the "preconfigured configs" section on the wiki, or search online. <span foreground="#cc2222">Important note:</span> dotfiles can run <i>anything</i> on your computer. Make sure you trust the source.' \
	--ok-label "Next"
}
five_eco() {
	zenity --question \
	--title "Hypr Ecosystem" \
	--text "Hyprland has a wide ecosystem of apps specifically made for it.
Unlike some other popular DEs, it does not force you to use most of them by default.

You can install those elements separately, only those that you need.

Check the wiki under Hypr Ecosystem to see all of the apps, their usage and configuration." \
	--ok-label "Next"
}
six_end() {
	zenity --question \
	--title "That's it!" \
	--text 'That'"'"'s it for this small introduction! Explore the wiki, and various apps, and enjoy your journey!

Here are some important default shortcuts:
• SUPER + Q <span foreground="#666666">=</span> Terminal
• SUPER + E <span foreground="#666666">=</span> File Manager
• SUPER + R <span foreground="#666666">=</span> Launcher
• SUPER + C <span foreground="#666666">=</span> Close window
• SUPER + V <span foreground="#666666">=</span> Toggle floating
• SUPER + M <span foreground="#666666">=</span> Exit Hyprland
• SUPER + [1 - 9] <span foreground="#666666">=</span> Workspaces 1 - 9
• SUPER + SHIFT + [1 - 9] <span foreground="#666666">=</span> Move window to workspace 1 - 9
• SUPER + Arrows <span foreground="#666666">=</span> Move focus around

<i>You can easily change these in your hyprland.conf.</i>

Thank you for choosing Hyprland! ❤️)' \
	--ok-label "Next"
}
one_welcome || exit
two_getting || exit

#three_default || exit
four_basic || exit
five_eco || exit
six_end || exit