File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1919
2020# Settings -> Dock & Menu Bar -> Sound -> Show in Menu Bar (always)
2121- name : Enabling always show sound in the menu bar
22+ when : islaptop == 'true'
2223 community.general.osx_defaults :
2324 domain : com.apple.controlcenter
2425 host : currentHost
2829
2930# Settings -> Dock & Menu Bar -> Battery -> *
3031- name : Configuring battery settings for menu bar
32+ when : islaptop == 'true'
3133 community.general.osx_defaults :
3234 domain : com.apple.controlcenter
3335 host : currentHost
3941
4042# Settings -> Dock & Menu Bar -> Battery -> Show percentage
4143- name : Enabling battery percentage in the menu bar
44+ when : islaptop == 'true'
4245 community.general.osx_defaults :
4346 domain : com.apple.controlcenter
4447 host : currentHost
Original file line number Diff line number Diff line change @@ -95,6 +95,13 @@ needsudo=""
9595# needsudo=-K # --ask-become-password
9696# fi
9797
98+ macoslaptop=" false"
99+ if [[ $( uname) == Darwin ]]; then
100+ if pmset -g batt | grep -q InternalBattery; then
101+ macoslaptop=" true"
102+ fi
103+ fi
104+
98105if [[ $mtype != server ]]; then
99106 vaultoption=" --vault-id ${VAULT_ID} "
100107
@@ -143,6 +150,7 @@ ansible-playbook $needsudo $vaultoption $tags \
143150 --extra-vars mtype=$mtype \
144151 --extra-vars wedition=$wedition \
145152 --extra-vars isgaming=$isgaming \
153+ --extra-vars islaptop=$macoslaptop \
146154 dotfiles.yml
147155
148156# we set ANSIBLE_HOME now, but this might be left over after the initial run:
You can’t perform that action at this time.
0 commit comments