File tree Expand file tree Collapse file tree 6 files changed +28
-16
lines changed Expand file tree Collapse file tree 6 files changed +28
-16
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
launchctl=no
4
+ ramsize=512
5
+ ramon=no
4
6
5
7
[ $# -eq 0 ] && exit 1
6
8
[ $# -gt 1 ] && launchctl=$2
9
+ [ $# -gt 2 ] && ramsize=$3 && ramon=yes
7
10
8
11
link=$1
9
12
static=static-$1
13
16
set -efu
14
17
15
18
if [ " $launchctl " = " yes" ]; then
16
- ffox=` ps ax | grep -i firefox.app/contents/macos/firefox | grep -v grep`
17
- [ " $ffox " = " " ] && exit # Firefox is not running
19
+ if [ ! -d " /Volumes/RAM" ] && [ " $ramon " = " yes" ]; then
20
+ $HOME /.local/bin/ramdisk $ramsize
21
+ else
22
+ ffox=` ps ax | grep -i firefox.app/contents/macos/firefox | grep -v grep | cat`
23
+ [ " $ffox " = " " ] && exit # Firefox is not running
24
+ fi
18
25
fi
19
26
20
27
# RAM disk is not available
21
- [ ! -d " /Volumes/RAM" ] && exit
28
+ [ ! -d " /Volumes/RAM" ] && exit 1
22
29
23
30
# Profile is not available
24
31
if [ ! -d " $HOME /Library/Application Support/Firefox/Profiles/$link " ]; then
25
- [ ! -L " $HOME /Library/Application Support/Firefox/Profiles/$link " ] && exit
32
+ [ ! -L " $HOME /Library/Application Support/Firefox/Profiles/$link " ] && exit 1
26
33
fi
27
34
28
35
# Acquire lock
29
36
if { set -C; 2> /dev/null > " $volatile .lock" ; }; then
30
37
trap " rm -f \" $volatile .lock\" " EXIT
31
38
else
32
- # Lock exists
33
- exit
39
+ exit # Lock exists
34
40
fi
35
41
36
42
cd " $HOME /Library/Application Support/Firefox/Profiles"
Original file line number Diff line number Diff line change 9
9
10
10
function try_set_wall()
11
11
{
12
- wall=` COLUMNS=1 ls $HOME /Pictures/Wallpapers/Time \ of \ Day | grep " ^$1 \." `
13
- if [ -f " $HOME /Pictures/Wallpapers/Time of Day /$wall " ]; then
14
- " $cmd " " $HOME /Pictures/Wallpapers/Time of Day /$wall "
12
+ wall=` COLUMNS=1 ls $HOME /Pictures/Wallpapers/Dynamic | grep " ^$1 \." `
13
+ if [ -f " $HOME /Pictures/Wallpapers/Dynamic /$wall " ]; then
14
+ " $cmd " " $HOME /Pictures/Wallpapers/Dynamic /$wall "
15
15
return 1
16
16
fi
17
17
return 0
18
18
}
19
19
20
- if [ " $wall " == " --timeofday " ]; then
21
- if [ ! -d " $HOME /Pictures/Wallpapers/Time of Day " ]; then
20
+ if [ " $wall " == " --dynamic " ]; then
21
+ if [ ! -d " $HOME /Pictures/Wallpapers/Dynamic " ]; then
22
22
echo " Time-based wallpaper selection is not available"
23
23
exit 1
24
24
fi
@@ -45,4 +45,9 @@ if [ ! -f "$wall" ]; then
45
45
exit 1
46
46
fi
47
47
48
- osascript -e " tell application \" Finder\" to set desktop picture to POSIX file \" $wall \" "
48
+ which ChangeMenuBarColor > /dev/null 2>&1
49
+ if [ $? -eq 0 ] && false ; then
50
+ ChangeMenuBarColor SolidColor ' #ececec' " $wall "
51
+ else
52
+ osascript -e " tell application \" Finder\" to set desktop picture to POSIX file \" $wall \" "
53
+ fi
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ if [ -f "$outpath$out" ]; then
59
59
fi
60
60
fi
61
61
62
+ printf -v IFS " \n"
62
63
pushd " $path " > /dev/null
63
64
for i in $base ; do
64
65
echo $i
Original file line number Diff line number Diff line change 2
2
3
3
## about: config tweaks
4
4
5
- Increase the amount of RAM used for caching:
5
+ Set the amount of RAM used for caching:
6
6
7
7
| browser.cache.memory.capacity | 128
8
8
| - | -
Original file line number Diff line number Diff line change 7
7
<key >ProgramArguments </key >
8
8
<array >
9
9
<string >/Users/user/.local/bin/wallpaper </string >
10
- <string >--timeofday </string >
10
+ <string >--dynamic </string >
11
11
</array >
12
12
<key >StartInterval </key >
13
13
<integer >1800 </integer >
Original file line number Diff line number Diff line change @@ -232,10 +232,10 @@ Disable the menu bar Spotlight icon on Catalina and earlier:
232
232
233
233
``` bash
234
234
sudo mount -uw / # If on Catalina
235
- sudo chmod -x /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search
235
+ sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search
236
236
```
237
237
238
- (Reboot is required.)
238
+ A reboot is required. Note that it will also disable the search functionality in Finder too. So it’s only useful if you want to replace the built-in search functionality with a third-party app, like ** EasyFind ** .
239
239
240
240
On Big Sur and later the Spotlight icon can be easily hidden in Dock & Menu Bar preferences.
241
241
You can’t perform that action at this time.
0 commit comments