Skip to content

Commit e8ceb48

Browse files
resolve conflicts
2 parents 8ba2fdd + 696110e commit e8ceb48

File tree

14 files changed

+71
-33
lines changed

14 files changed

+71
-33
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ cd linutil
1616
```
1717

1818
## 3. Make your changes
19+
1920
- **Edit the files you want to change**: Make your changes to the relevant files.
2021
- **Test your changes**: Run `cargo run` to test your modifications in a local environment and ensure everything works as expected.
2122

@@ -60,6 +61,7 @@ cd linutil
6061
## 11. Documentation
6162

6263
- **Update the documentation**: If your change affects the functionality, please update the relevant documentation files to reflect this.
64+
- **Automatic generation**: If you decide to add functionality through a new shell script, make sure to fill out all fields in `tab_data.toml` and run `cargo xtask docgen`.
6365

6466
## 12. License
6567

.github/release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
changelog:
22
categories:
33
- title: '🚀 Features'
4-
labels:
5-
- 'feature'
6-
- 'enhancement'
4+
label: 'enhancement'
75
- title: '🐛 Bug Fixes'
8-
labels:
9-
- 'fix'
10-
- 'bugfix'
11-
- 'bug'
6+
label: 'bug'
7+
- title: '⚙️ Refactoring'
8+
label: 'refactor'
9+
- title: '🧩 UI/UX'
10+
label: 'UI/UX'
1211
- title: '📚 Documentation'
1312
label: 'documentation'
1413
- title: '🔒 Security'
1514
label: 'security'
1615
- title: '🧰 GitHub Actions'
17-
label: 'github actions'
16+
label: 'github_actions'
17+
- title: '🦀 Rust'
18+
label: 'rust'
19+
- title: '📃 Scripting'
20+
label: 'script'
1821
exclude:
1922
labels:
2023
- 'skip-changelog'

.github/workflows/github-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- name: Copy Contributing Guidelines
2424
run: |
25-
echo "<!-- THIS FILE IS GENERATED AUTOMATICALLY. EDIT .github/CONTRIBUTING.md -->\n\n$(cat .github/CONTRIBUTING.md)" > 'docs/contributing.md'
25+
echo -e "<!-- THIS FILE IS GENERATED AUTOMATICALLY. EDIT .github/CONTRIBUTING.md -->\n\n$(cat .github/CONTRIBUTING.md)" > 'docs/contributing.md'
2626
2727
- uses: stefanzweifel/git-auto-commit-action@v5
2828
with:

core/tabs/applications-setup/linutil-installer.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ installLinutil() {
3535
printf "%b\n" "${YELLOW}Installing rustup...${RC}"
3636
case "$PACKAGER" in
3737
pacman)
38-
elevated_execution "$PACKAGER" -S --needed --noconfirm rustup
38+
elevated_execution "$PACKAGER" -S --needed --noconfirm curl rustup man-db
3939
;;
4040
dnf)
41-
elevated_execution "$PACKAGER" install -y rustup
41+
elevated_execution "$PACKAGER" install -y curl rustup man-pages man-db man
4242
;;
4343
zypper)
4444
elevated_execution "$PACKAGER" install -n curl gcc make
@@ -54,12 +54,23 @@ installLinutil() {
5454
rustup default stable
5555
cargo install --force linutil_tui
5656
printf "%b\n" "${GREEN}Installed successfully.${RC}"
57+
installExtra
5758
;;
5859
*) printf "%b\n" "${RED}Linutil not installed.${RC}" ;;
5960
esac
6061
esac
6162
}
6263

64+
installExtra() {
65+
printf "%b\n" "${YELLOW}Installing the manpage...${RC}"
66+
"$ESCALATION_TOOL" mkdir -p /usr/share/man/man1
67+
curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/man/linutil.1' | "$ESCALATION_TOOL" tee '/usr/share/man/man1/linutil.1' > /dev/null
68+
printf "%b\n" "${YELLOW}Creating a Desktop Entry...${RC}"
69+
"$ESCALATION_TOOL" mkdir -p /usr/share/applications
70+
curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/linutil.desktop' | "$ESCALATION_TOOL" tee /usr/share/applications/linutil.desktop > /dev/null
71+
printf "%b\n" "${GREEN}Done.${RC}"
72+
}
73+
6374
checkEnv
6475
checkEscalationTool
6576
checkAURHelper

core/tabs/system-setup/system-cleanup.sh

100644100755
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,21 @@ cleanup_system() {
2626
elevated_execution "$PACKAGER" -Rns $(pacman -Qtdq) --noconfirm > /dev/null 2>&1
2727
;;
2828
*)
29-
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
30-
return 1
29+
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}. Skipping.${RC}"
3130
;;
3231
esac
3332
}
3433

3534
common_cleanup() {
36-
elevated_execution find /var/tmp -type f -atime +5 -delete
37-
elevated_execution find /tmp -type f -atime +5 -delete
38-
elevated_execution find /var/log -type f -name "*.log" -exec truncate -s 0 {} \;
35+
if [ -d /var/tmp ]; then
36+
elevated_execution find /var/tmp -type f -atime +5 -delete
37+
fi
38+
if [ -d /tmp ]; then
39+
elevated_execution find /tmp -type f -atime +5 -delete
40+
fi
41+
if [ -d /var/log ]; then
42+
elevated_execution find /var/log -type f -name "*.log" -exec truncate -s 0 {} \;
43+
fi
3944
elevated_execution journalctl --vacuum-time=3d
4045
}
4146

@@ -45,8 +50,12 @@ clean_data() {
4550
case $clean_response in
4651
y|Y)
4752
printf "%b\n" "${YELLOW}Cleaning up old cache files and emptying trash...${RC}"
48-
find "$HOME/.cache/" -type f -atime +5 -delete
49-
find "$HOME/.local/share/Trash" -mindepth 1 -delete
53+
if [ -d "$HOME/.cache" ]; then
54+
find "$HOME/.cache/" -type f -atime +5 -delete
55+
fi
56+
if [ -d "$HOME/.local/share/Trash" ]; then
57+
find "$HOME/.local/share/Trash" -mindepth 1 -delete
58+
fi
5059
printf "%b\n" "${GREEN}Cache and trash cleanup completed.${RC}"
5160
;;
5261
*)

core/tabs/utils/monitor-control/change_orientation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ change_orientation() {
1313
printf "%b\n" "${YELLOW}=========================================${RC}"
1414
printf "%b\n" "${YELLOW} Change Monitor Orientation${RC}"
1515
printf "%b\n" "${YELLOW}=========================================${RC}"
16-
printf "%b" "${YELLOW}Choose a monitor to configure: ${RC}"
16+
printf "%b\n" "${YELLOW}Choose a monitor to configure: ${RC}"
1717
i=1
1818
for monitor in $monitor_array; do
1919
printf "%b\n" "$i. ${GREEN}$monitor${RC}"

core/tabs/utils/monitor-control/disable_monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ disable_monitor() {
1313
printf "%b\n" "${YELLOW}=========================================${RC}"
1414
printf "%b\n" "${YELLOW} Disable Monitor${RC}"
1515
printf "%b\n" "${YELLOW}=========================================${RC}"
16-
printf "%b" "Choose a monitor to disable: "
16+
printf "%b\n" "Choose a monitor to disable: "
1717
i=1
1818
for monitor in $monitor_array; do
1919
printf "%b\n" "$i. ${GREEN}$monitor${RC}"

core/tabs/utils/monitor-control/enable_monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enable_monitor() {
1313
printf "%b\n" "${YELLOW}=========================================${RC}"
1414
printf "%b\n" "${YELLOW} Enable Monitor${RC}"
1515
printf "%b\n" "${YELLOW}=========================================${RC}"
16-
printf "%b" "${YELLOW}Choose a monitor to enable: ${RC}"
16+
printf "%b\n" "${YELLOW}Choose a monitor to enable: ${RC}"
1717

1818
i=1
1919
for monitor in $monitor_array; do

core/tabs/utils/monitor-control/extend_displays.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh -e
22

3-
. ./utility_functions.sh
3+
. ../utility_functions.sh
44

55
. ../../common-script.sh
66

core/tabs/utils/monitor-control/manage_arrangement.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ manage_arrangement() {
1313
printf "%b\n" "${YELLOW}=========================================${RC}"
1414
printf "%b\n" "${YELLOW} Manage Monitor Arrangement${RC}"
1515
printf "%b\n" "${YELLOW}=========================================${RC}"
16-
printf "%b" "${YELLOW}Choose the monitor to arrange: ${RC}"
16+
printf "%b\n" "${YELLOW}Choose the monitor to arrange: ${RC}"
1717
i=1
1818
for monitor in $monitor_array; do
19-
printf "%b\n" "$i. ${YELLOW}$monitor${RC}"
19+
printf "%b\n" "$i. ${GREEN}$monitor${RC}"
2020
i=$((i + 1))
2121
done
2222

0 commit comments

Comments
 (0)