Skip to content

Commit 92f18fc

Browse files
committed
Added packaged, optomised systemd boot time (Still more to go), added config files, optomised i3-bar.
1 parent 94d4762 commit 92f18fc

7 files changed

Lines changed: 332 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[font]
2+
size = 8.0
3+
4+
[font.bold]
5+
family = "monospace"
6+
style = "Bold"
7+
8+
[font.bold_italic]
9+
family = "monospace"
10+
style = "Bold Italic"
11+
12+
[font.italic]
13+
family = "monospace"
14+
style = "Italic"
15+
16+
[font.normal]
17+
family = "monospace"
18+
style = "Regular"
19+
20+
[window]
21+
opacity=0.85

armbian_config/dotfiles/i3_config

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# This file has been auto-generated by i3-config-wizard(1).
2+
# It will not be overwritten, so edit it as you like.
3+
#
4+
# Should you change your keyboard layout some time, delete
5+
# this file and re-run i3-config-wizard(1).
6+
#
7+
8+
# i3 config file (v4)
9+
#
10+
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
11+
12+
set $mod Mod4
13+
14+
# Font for window titles. Will also be used by the bar unless a different font
15+
# is used in the bar {} block below.
16+
font pango:monospace 7
17+
18+
# This font is widely installed, provides lots of unicode glyphs, right-to-left
19+
# text rendering and scalability on retina/hidpi displays (thanks to pango).
20+
#font pango:DejaVu Sans Mono 8
21+
22+
# Set the wallpaper
23+
exec_always feh --randomize --bg-fill /root/kali.png
24+
25+
# Start XDG autostart .desktop files using dex. See also
26+
# https://wiki.archlinux.org/index.php/XDG_Autostart
27+
exec --no-startup-id dex --autostart --environment i3
28+
29+
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
30+
# they are included here as an example. Modify as you see fit.
31+
32+
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
33+
# screen before suspend. Use loginctl lock-session to lock your screen.
34+
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
35+
36+
# NetworkManager is the most popular way to manage wireless networks on Linux,
37+
# and nm-applet is a desktop environment-independent system tray GUI for it.
38+
exec --no-startup-id nm-applet
39+
40+
# Use pactl to adjust volume in PulseAudio.
41+
set $refresh_i3status killall -SIGUSR1 i3status
42+
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
43+
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
44+
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
45+
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
46+
47+
# Use Mouse+$mod to drag floating windows to their wanted position
48+
floating_modifier $mod
49+
50+
# move tiling windows via drag & drop by left-clicking into the title bar,
51+
# or left-clicking anywhere into the window while holding the floating modifier.
52+
tiling_drag modifier titlebar
53+
54+
# start a terminal
55+
bindsym $mod+Return exec "alacritty"
56+
57+
# kill focused window
58+
bindsym $mod+Shift+q kill
59+
60+
# start dmenu (a program launcher)
61+
bindsym $mod+d exec --no-startup-id dmenu_run
62+
# A more modern dmenu replacement is rofi:
63+
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
64+
# There also is i3-dmenu-desktop which only displays applications shipping a
65+
# .desktop file. It is a wrapper around dmenu, so you need that installed.
66+
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
67+
68+
# change focus
69+
bindsym $mod+j focus left
70+
bindsym $mod+k focus down
71+
bindsym $mod+l focus up
72+
bindsym $mod+semicolon focus right
73+
74+
# alternatively, you can use the cursor keys:
75+
bindsym $mod+Left focus left
76+
bindsym $mod+Down focus down
77+
bindsym $mod+Up focus up
78+
bindsym $mod+Right focus right
79+
80+
# move focused window
81+
bindsym $mod+Shift+j move left
82+
bindsym $mod+Shift+k move down
83+
bindsym $mod+Shift+l move up
84+
bindsym $mod+Shift+semicolon move right
85+
86+
# alternatively, you can use the cursor keys:
87+
bindsym $mod+Shift+Left move left
88+
bindsym $mod+Shift+Down move down
89+
bindsym $mod+Shift+Up move up
90+
bindsym $mod+Shift+Right move right
91+
92+
# split in horizontal orientation
93+
bindsym $mod+h split h
94+
95+
# split in vertical orientation
96+
bindsym $mod+v split v
97+
98+
# enter fullscreen mode for the focused container
99+
bindsym $mod+f fullscreen toggle
100+
101+
# change container layout (stacked, tabbed, toggle split)
102+
bindsym $mod+s layout stacking
103+
bindsym $mod+w layout tabbed
104+
bindsym $mod+e layout toggle split
105+
106+
# toggle tiling / floating
107+
bindsym $mod+Shift+space floating toggle
108+
109+
# change focus between tiling / floating windows
110+
bindsym $mod+space focus mode_toggle
111+
112+
# focus the parent container
113+
bindsym $mod+a focus parent
114+
115+
# focus the child container
116+
#bindsym $mod+d focus child
117+
118+
# Define names for default workspaces for which we configure key bindings later on.
119+
# We use variables to avoid repeating the names in multiple places.
120+
set $ws1 "1"
121+
set $ws2 "2"
122+
set $ws3 "3"
123+
set $ws4 "4"
124+
set $ws5 "5"
125+
set $ws6 "6"
126+
set $ws7 "7"
127+
set $ws8 "8"
128+
set $ws9 "9"
129+
set $ws10 "10"
130+
131+
# switch to workspace
132+
bindsym $mod+1 workspace number $ws1
133+
bindsym $mod+2 workspace number $ws2
134+
bindsym $mod+3 workspace number $ws3
135+
bindsym $mod+4 workspace number $ws4
136+
bindsym $mod+5 workspace number $ws5
137+
bindsym $mod+6 workspace number $ws6
138+
bindsym $mod+7 workspace number $ws7
139+
bindsym $mod+8 workspace number $ws8
140+
bindsym $mod+9 workspace number $ws9
141+
bindsym $mod+0 workspace number $ws10
142+
143+
# move focused container to workspace
144+
bindsym $mod+Shift+1 move container to workspace number $ws1
145+
bindsym $mod+Shift+2 move container to workspace number $ws2
146+
bindsym $mod+Shift+3 move container to workspace number $ws3
147+
bindsym $mod+Shift+4 move container to workspace number $ws4
148+
bindsym $mod+Shift+5 move container to workspace number $ws5
149+
bindsym $mod+Shift+6 move container to workspace number $ws6
150+
bindsym $mod+Shift+7 move container to workspace number $ws7
151+
bindsym $mod+Shift+8 move container to workspace number $ws8
152+
bindsym $mod+Shift+9 move container to workspace number $ws9
153+
bindsym $mod+Shift+0 move container to workspace number $ws10
154+
155+
# reload the configuration file
156+
bindsym $mod+Shift+c reload
157+
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
158+
bindsym $mod+Shift+r restart
159+
# exit i3 (logs you out of your X session)
160+
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
161+
162+
# resize window (you can also use the mouse for that)
163+
mode "resize" {
164+
# These bindings trigger as soon as you enter the resize mode
165+
166+
# Pressing left will shrink the window’s width.
167+
# Pressing right will grow the window’s width.
168+
# Pressing up will shrink the window’s height.
169+
# Pressing down will grow the window’s height.
170+
bindsym j resize shrink width 10 px or 10 ppt
171+
bindsym k resize grow height 10 px or 10 ppt
172+
bindsym l resize shrink height 10 px or 10 ppt
173+
bindsym semicolon resize grow width 10 px or 10 ppt
174+
175+
# same bindings, but for the arrow keys
176+
bindsym Left resize shrink width 10 px or 10 ppt
177+
bindsym Down resize grow height 10 px or 10 ppt
178+
bindsym Up resize shrink height 10 px or 10 ppt
179+
bindsym Right resize grow width 10 px or 10 ppt
180+
181+
# back to normal: Enter or Escape or $mod+r
182+
bindsym Return mode "default"
183+
bindsym Escape mode "default"
184+
bindsym $mod+r mode "default"
185+
}
186+
187+
bindsym $mod+r mode "resize"
188+
189+
# Start i3bar to display a workspace bar (plus the system information i3status
190+
# finds out, if available)
191+
bar {
192+
status_command i3status
193+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# i3status configuration file.
2+
# see "man i3status" for documentation.
3+
4+
# It is important that this file is edited as UTF-8.
5+
# The following line should contain a sharp s:
6+
# ß
7+
# If the above line is not correctly displayed, fix your editor first!
8+
9+
general {
10+
colors = true
11+
interval = 5
12+
}
13+
14+
# order += "ipv6"
15+
order += "wireless _first_"
16+
# order += "ethernet _first_"
17+
# order += "disk /"
18+
order += "load"
19+
order += "memory"
20+
order += "tztime local"
21+
22+
wireless _first_ {
23+
# format_up = "W: (%quality at %essid) %ip"
24+
format_up = "%ip"
25+
format_down = "W: down"
26+
}
27+
28+
ethernet _first_ {
29+
format_up = "E: %ip (%speed)"
30+
format_down = "E: down"
31+
}
32+
33+
disk "/" {
34+
format = "%avail"
35+
}
36+
37+
load {
38+
format = "%1min"
39+
}
40+
41+
memory {
42+
format = "U: %used |F: %available"
43+
# threshold_degraded = "1G"
44+
# format_degraded = "MEMORY < %available"
45+
}
46+
47+
tztime local {
48+
format = "%Y-%m-%d %H:%M:%S"
49+
}

armbian_config/dotfiles/xinitrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
picom --backend=xrender &
4+
xrandr --output DSI-1 --rotate inverted
5+
exec i3

armbian_config/kali.png

15.3 KB
Loading

armbian_config/userpatches/customize-image.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,46 @@ EOF
5151
echo bh > /etc/hostname
5252
echo 'FONT="Lat7-Terminus12x6.psf.gz"' >> /etc/default/console-setup
5353

54+
### Boot optimisation below
55+
systemctl disable --now armbian-ramlog.service
56+
systemctl disable --now keyboard-setup.service
57+
58+
## Remove network manager requirement from systemd-user-sessions
59+
install -D -m 0644 /usr/lib/systemd/system/systemd-user-sessions.service \
60+
/etc/systemd/system/systemd-user-sessions.service
61+
62+
# Remove network.target from the After= line(s)
63+
sed -i 's/[[:space:]]network\.target//g' /etc/systemd/system/systemd-user-sessions.service
64+
sed -i 's/network\.target[[:space:]]//g' /etc/systemd/system/systemd-user-sessions.service
65+
66+
## Disable relationship between network manager and getty.
67+
# 1) Write an explicit tty1 unit that does NOT reference rc-local
68+
cat > /etc/systemd/system/getty@tty1.service <<'EOF'
69+
[Unit]
70+
Description=Getty on tty1
71+
Documentation=man:agetty(8) man:systemd-getty-generator(8)
72+
After=systemd-user-sessions.service getty-pre.target basic.target
73+
Before=getty.target
74+
IgnoreOnIsolate=yes
75+
Conflicts=rescue.service
76+
Before=rescue.service
77+
ConditionPathExists=/dev/tty0
78+
79+
[Service]
80+
ExecStart=-/usr/sbin/agetty --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d tty1 $TERM
81+
Type=idle
82+
Restart=always
83+
RestartSec=0
84+
UtmpIdentifier=tty1
85+
StandardInput=tty
86+
StandardOutput=tty
87+
TTYPath=/dev/tty1
88+
TTYReset=yes
89+
TTYVHangup=yes
90+
TTYVTDisallocate=no
91+
92+
[Install]
93+
WantedBy=getty.target
94+
EOF
5495

5596
echo "Customization complete."

build_armbian.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ cd ..
1313
rsync -av armbian_config/userpatches/ armbian/userpatches/
1414
rsync -av armbian_config/config/ armbian/config/
1515

16+
# Copy over dotfiles
17+
DOTFILES="armbian_config/dotfiles"
18+
ROOTDIR="armbian/userpatches/overlay/root"
19+
mkdir -p armbian/userpatches/overlay/root/.config/i3/
20+
cp $DOTFILES/i3_config $ROOTDIR/.config/i3/config
21+
22+
mkdir -p $ROOTDIR/.config/i3status/
23+
cp $DOTFILES/i3status_config $ROOTDIR/.config/i3status/config
24+
25+
cp $DOTFILES/xinitrc $ROOTDIR/.xinitrc
26+
27+
mkdir -p $ROOTDIR/.config/alacritty/
28+
cp $DOTFILES/alacritty.toml $ROOTDIR/.config/alacritty/
29+
30+
cp armbian_config/kali.png $ROOTDIR/
31+
1632
# Add kernel patches
1733
if [[ ${kver} == "edge" ]]; then
1834
cp patches/linux/0002-rtw88.patch armbian/userpatches/kernel/archive/sunxi-6.16/rtw88.patch
@@ -39,6 +55,13 @@ install -D rootfs_overlay/etc/init.d/S51bh_init armbian/userpatches/overlay/usr/
3955
# Add additional packages
4056
PKG_CONF="armbian/config/cli/trixie/main/packages.additional"
4157
echo usb-modeswitch >> $PKG_CONF
58+
echo xorg >> $PKG_CONF
59+
echo i3 >> $PKG_CONF
60+
echo feh >> $PKG_CONF
61+
echo vim >> $PKG_CONF
62+
echo alacritty >> $PKG_CONF
63+
echo picom >> $PKG_CONF
64+
4265

4366
cd armbian
4467

0 commit comments

Comments
 (0)