Skip to content

Commit 25311ef

Browse files
Save changes at: 1773950468
1 parent e5f0785 commit 25311ef

File tree

3 files changed

+87
-42
lines changed

3 files changed

+87
-42
lines changed

macbook.sh

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,35 @@
22
# set -eu
33

44
function main() {
5-
echo "==> Install drivers."
6-
sudo pacman --sync --noconfirm broadcom-wl-dkms
7-
sudo modprobe wl
8-
#nmcli device wifi list
9-
#sudo nmcli device wifi connect YourSSID password YourPassword
5+
echo "==> Install drivers."
6+
sudo pacman --sync --noconfirm broadcom-wl-dkms
7+
sudo modprobe wl
108

11-
sudo pacman --sync --noconfirm --needed \
12-
pipewire \
13-
pipewire-alsa \
14-
pipewire-pulse \
15-
wireplumber \
16-
alsa-utils \
17-
pamixer \
18-
playerctl
19-
&> /dev/null
9+
# Connect to wifi:
10+
# ================
11+
# nmcli device wifi list
12+
# sudo nmcli device wifi connect YourSSID password YourPassword
2013

21-
echo "==> Enable services."
14+
sudo pacman --sync --noconfirm --needed \
15+
pipewire \
16+
pipewire-alsa \
17+
pipewire-pulse \
18+
wireplumber \
19+
alsa-utils \
20+
pamixer \
21+
playerctl \
22+
pavucontrol \
23+
&> /dev/null
2224

23-
systemctl --user enable --now pipewire pipewire-pulse wireplumber
24-
#pactl info
25-
#pactl list short sinks
26-
# speaker-test -c 2
25+
echo "==> Enable services."
26+
27+
systemctl --user enable --now pipewire pipewire-pulse wireplumber
28+
29+
# Test sound:
30+
# ===========
31+
# pactl info
32+
# pactl list short sinks
33+
# speaker-test -c 2
2734
}
2835

29-
main
36+
main "$@"

sway.sh

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,25 @@ function install_packages() {
5151
echo "--> Install packages."
5252
sudo pacman -S --noconfirm --needed \
5353
alacritty `# terminal` \
54+
brightnessctl `# gestor de brillo de pantalla` \
55+
grim `# screenshots` \
56+
lxqt-policykit `# authentication agent` \
57+
mako `# notificaciones` \
58+
nyxt `# web browser` \
59+
slurp `# seleccionar región screenshot` \
5460
sway `# window manager Wayland` \
5561
swaybg `# fondo de pantalla` \
56-
swaylock `# lock screen` \
5762
swayidle `# gestión de idle / suspensión` \
63+
swaylock `# lock screen` \
64+
swayimg `# image viewer` \
65+
touchegg `# gestos para el touch mouse` \
5866
waybar `# barra superior` \
59-
wmenu `# launcher o usar wofi` \
60-
mako `# notificaciones` \
61-
grim `# screenshots` \
62-
slurp `# seleccionar región screenshot` \
6367
wl-clipboard `# clipboard` \
68+
wmenu `# launcher o usar wofi` \
6469
xdg-desktop-portal-wlr `# compatibilidad con apps` \
6570
xdg-open `# ...` \
66-
lxqt-policykit `# authentication agent` \
67-
nyxt `# web browser` \
68-
touchegg `# gestos para el touch mouse` \
69-
brightnessctl `# gestor de brillo de pantalla` \
71+
xdg-user-dirs `# create user directories` \
72+
mpv `# media player` \
7073
&> /dev/null
7174
}
7275

@@ -91,6 +94,7 @@ function configure_sway() {
9194
echo "--> Configure sway."
9295

9396
mkdir -p "$HOME"/.config/sway/
97+
mkdir -p "$HOME"/.config/sway/scripts
9498
# cp /etc/sway/config "$HOME"/.config/sway/config
9599

96100
cat > "$HOME"/.config/sway/config << 'EOF'
@@ -110,17 +114,11 @@ set $term alacritty
110114
set $menu wmenu-run
111115
112116
### Idle configuration
113-
#
114-
# Example configuration:
115-
#
116-
# exec swayidle -w \
117-
# timeout 300 'swaylock -f -c 000000' \
118-
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
119-
# before-sleep 'swaylock -f -c 000000'
120-
#
121-
# This will lock your screen after 300 seconds of inactivity, then turn off
122-
# your displays after another 300 seconds, and turn your screens back on when
123-
# resumed. It will also lock your screen before your computer goes to sleep.
117+
exec swayidle -w \
118+
timeout 120 'swaylock -f -c 000000' \
119+
timeout 300 'swaymsg "output * power off"' \
120+
resume 'swaymsg "output * power on"' \
121+
before-sleep 'swaylock -f -c 000000'
124122
125123
### Key bindings
126124
#
@@ -147,6 +145,12 @@ set $menu wmenu-run
147145
148146
# Exit sway (logs you out of your Wayland session)
149147
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
148+
149+
# Screenshot
150+
bindsym $mod+Shift+p exec grim
151+
152+
# screenshot region
153+
bindsym $mod+Shift+4 exec slurp
150154
#
151155
# Moving around:
152156
#
@@ -285,7 +289,28 @@ bindsym XF86AudioPrev exec playerctl previous
285289
bindsym XF86LaunchA exec wmenu-run # F3
286290
bindsym XF86LaunchB exec wmenu-run # F4
287291
288-
exec_always waybar
292+
# windows theme
293+
# border background text indicator child_border
294+
client.focused #89b4fa #89b4fa #1e1e2e #89b4fa #89b4fa
295+
client.unfocused #313244 #313244 #cdd6f4 #313244 #313244
296+
client.focused_inactive #45475a #45475a #cdd6f4 #45475a #45475a
297+
client.urgent #f38ba8 #f38ba8 #1e1e2e #f38ba8 #f38ba8
298+
299+
# disable title on windows
300+
default_border pixel 2
301+
default_floating_border pixel 2
302+
303+
# windows gap
304+
gaps inner 4
305+
gaps outer 4
306+
smart_gaps on
307+
smart_borders on
308+
309+
# wallpaper
310+
output * bg ~/Pictures/wallpaper.jpg fill
311+
312+
# bar
313+
exec_always ~/.config/sway/scripts/waybar.sh
289314
290315
include /etc/sway/config.d/*
291316
EOF
@@ -303,10 +328,21 @@ input "type:touchpad" {
303328
tap enabled
304329
}
305330
EOF
331+
332+
cat > "$HOME"/.config/sway/scripts/waybar.sh << 'EOF'
333+
#!/bin/bash
334+
335+
pkill -x waybar
336+
waybar
337+
EOF
338+
339+
chmod +x "$HOME"/.config/sway/scripts/waybar.sh
306340
}
307341

308342
function configure_background() {
309343
echo "--> Configure background."
344+
345+
wget -O ~/Pictures/background.jpg "https://raw.githubusercontent.com/nicola-strappazzon/arch/refs/heads/main/wallpaper/apple-grass-blades.jpg"
310346
}
311347

312348
function configure_waybar() {
@@ -481,7 +517,7 @@ window#waybar {
481517
}
482518
483519
#battery {
484-
color: #9CD5FF;
520+
color: rgb(187, 225, 250);
485521
}
486522
487523
#battery.warning {
@@ -533,6 +569,8 @@ EOF
533569
}
534570

535571
function finish() {
572+
xdg-user-dirs-update
573+
536574
sudo -k
537575
}
538576

wallpaper/apple-grass-blades.jpg

1.62 MB
Loading

0 commit comments

Comments
 (0)