File tree 3 files changed +42
-0
lines changed
3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Export display environment variables
4
+ export XDG_RUNTIME_DIR=/run/user/$( id -u)
5
+ export WAYLAND_DISPLAY=$( ls $XDG_RUNTIME_DIR | grep -m1 wayland)
6
+
7
+ # Check if Waybar is running
8
+ if ! pgrep -x " waybar" > /dev/null
9
+ then
10
+ # If Waybar is not running, start it
11
+ waybar &
12
+ echo " Waybar restarted at $( date) " >> ~ /waybar_restart.log
13
+ fi
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ aur_packages=(
128
128
google-earth-pro
129
129
luajit-tiktoken-bin
130
130
btop
131
+ obsidian
131
132
)
132
133
133
134
# Update the system
@@ -180,6 +181,7 @@ scripts=(
180
181
" rofi_theme.sh"
181
182
" aliases.sh"
182
183
" update_dns.sh"
184
+ " obsidian_setup.sh"
183
185
# "laptop_setup.sh"
184
186
)
185
187
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Define the path to the Obsidian desktop file
4
+ DESKTOP_FILE=" /usr/share/applications/obsidian.desktop"
5
+
6
+ # Check if the file exists
7
+ if [ ! -f " $DESKTOP_FILE " ]; then
8
+ echo " Error: Obsidian desktop file not found at $DESKTOP_FILE "
9
+ exit 1
10
+ fi
11
+
12
+ # Create a backup of the original file
13
+ cp " $DESKTOP_FILE " " ${DESKTOP_FILE} .bak"
14
+ echo " Backup created: ${DESKTOP_FILE} .bak"
15
+
16
+ # Modify the Exec line to include --disable-gpu
17
+ sed -i ' s/^Exec=obsidian/Exec=obsidian --disable-gpu/' " $DESKTOP_FILE "
18
+
19
+ # Check if the modification was successful
20
+ if grep -q " Exec=obsidian --disable-gpu" " $DESKTOP_FILE " ; then
21
+ echo " Successfully modified $DESKTOP_FILE to include --disable-gpu"
22
+ else
23
+ echo " Error: Failed to modify $DESKTOP_FILE "
24
+ exit 1
25
+ fi
26
+
27
+ echo " Obsidian desktop file has been updated. You may need to restart your desktop environment for changes to take effect."
You can’t perform that action at this time.
0 commit comments