forked from JeremiahCheatham/archlinux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dtos-helper.sh
761 lines (694 loc) · 36.6 KB
/
dtos-helper.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
#!/bin/fish
clear
echo " --------- DTOS Helper 1.4 ---------"
echo "1 Download latest DTOS Helper file."
echo "2 Run all CONFIG & Autofix from 10 to 20."
echo "3 1080x1920 14in Fonts + Autofix Preset."
echo "4 768x1366 14in Fonts + Autofix Preset."
echo "5 Reset DTOS from /etc/dtos folder."
echo " -------- CONFIG & Autofix ---------"
echo "10 Enable pacman ParallelDownloads."
echo "11 Check needed packages are installed."
echo "12 Create a touchpad.conf file."
echo "13 Enable Backlight keys with flashText."
echo "14 Alsa pulseaudio muting with flashText."
echo "15 Enable notification-daemon."
echo "16 Generate KDE GTK2/3/4 theme configs."
echo "17 Let QT & GTK use the KDE themes."
echo "18 Make firefox the default browser."
echo "19 Make DTOS scripts are executable."
echo "20 Switch Adwaita to breeze_cursors."
echo "21 Update alacritty opacity."
echo " ---------- OTHER CONFIG -----------"
echo "22 Disable NaturalScrolling touchpad.conf."
echo "23 Use pulseaudio for extended volume."
echo " -------------- FONTS --------------"
echo "30 Increase Xmobar font size."
echo "31 Decrease Xmobar font size."
echo "32 Increase Conky font size."
echo "33 Decrease Conky font size."
echo "34 Set the Systems font size."
echo "35 Set Systems fonts to Noto Sans & Hack"
echo "36 Set the Console font size."
echo " -------------- QUIT ---------------"
echo "40 Quit"
read CHOICE
echo ""
if [ $CHOICE -eq 1 ]
# Download this file.
if curl -fLO https://raw.githubusercontent.com/JeremiahCheatham/archlinux/main/dtos-helper.sh > /dev/null 2>&1
echo "Downloaded dtos-helper.sh successfully."
else
echo "Failed to download dtos-helper.sh."
end
end
if [ $CHOICE -eq 3 ]
# Preset for 1080x1920 14inch
set NEWFONTSIZE 14
set NEWXFONTSIZE 14
set CFONTSIZE1 11
set VCFONTSIZE 24
end
if [ $CHOICE -eq 4 ]
# Preset for 768x1366 14inch
set NEWFONTSIZE 10
set NEWXFONTSIZE 10
set CFONTSIZE1 7
set VCFONTSIZE 18
end
if [ $CHOICE -eq 3 ] || [ $CHOICE -eq 4 ]
# Xmobar font size for presets.
set LINENUMBERS (grep -n pixelsize= $HOME/.config/xmobar/doom-one-xmobarrc | cut -f 1 -d ":")
set LGXFONTSIZE ( echo $NEWXFONTSIZE + 1 | bc )
sed -i "$LINENUMBERS[1] s/pixelsize=[0-9]*/pixelsize=$NEWXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[2] s/pixelsize=[0-9]*/pixelsize=$NEWXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[3] s/pixelsize=[0-9]*/pixelsize=$LGXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[4] s/pixelsize=[0-9]*/pixelsize=$LGXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
echo "Setting font size $NEWXFONTSIZE for Xmobar."
end
if [ $CHOICE -eq 3 ] || [ $CHOICE -eq 4 ]
# Conky font size for presets.
set LINENUMBERS ( grep -n size= $HOME/.config/conky/xmonad/doom-one-01.conkyrc | cut -f 1 -d ":" )
set CFONTSIZE2 (printf %.0f (echo "$CFONTSIZE1 * 3.5" | bc))
set CFONTSIZE3 (printf %.0f (echo "$CFONTSIZE1 * 1.5" | bc))
set CFONTSIZE4 (printf %.0f (echo "$CFONTSIZE1 * 1.1" | bc))
sed -i "$LINENUMBERS[1] s/size=[0-9]*/size=$CFONTSIZE1/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[2] s/size=[0-9]*/size=$CFONTSIZE2/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[3] s/size=[0-9]*/size=$CFONTSIZE3/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[4] s/size=[0-9]*/size=$CFONTSIZE4/" $HOME/.config/conky/xmonad/*.conkyrc
echo "Setting font size $CFONTSIZE1 for Conky."
end
if [ $CHOICE -eq 5 ]
# Reset DTOS from /etc/dtos.
echo "Resetting DTOS from /etc/dtos folder."
/bin/cp -r /etc/dtos/.* $HOME/
end
if [ $CHOICE -eq 10 ] || [ $CHOICE -eq 2 ]
# Check ParallelDownloads is enabled.
if grep -R "^ParallelDownloads" /etc/pacman.conf > /dev/null
echo "Cool ParallelDownloads is already enabled."
else
echo "Enabling ParallelDownloads."
sudo sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
end
end
if [ $CHOICE -eq 11 ] || [ $CHOICE -eq 2 ]
# Check these packages are installed.
set PACKAGES alsa-utils audacity bash-language-server breeze breeze-gtk firefox geany geary gimp gnome-keyring haskell-language-server kdenlive libreoffice-fresh light notification-daemon noto-fonts obs-studio pass pcmanfm terminus-font ttf-hack
if pacman -Q $PACKAGES > /dev/null 2>&1
echo "Cool needed packages are already installed."
else
sudo pacman -S $PACKAGES --needed
end
end
if [ $CHOICE -eq 12 ] || [ $CHOICE -eq 2 ]
# Add touch pad support with tapping and NaturalScrolling.
echo "Generate /etc/X11/xorg.conf.d/30-touchpad.conf"
echo 'Section "InputClass"' >> 30-touchpad.conf
echo ' Identifier "touchpad"' >> 30-touchpad.conf
echo ' Driver "libinput"' >> 30-touchpad.conf
echo ' MatchIsTouchpad "on"' >> 30-touchpad.conf
echo ' Option "Tapping" "on"' >> 30-touchpad.conf
echo ' Option "TappingButtonMap" "lrm"' >> 30-touchpad.conf
echo ' Option "NaturalScrolling" "true"' >> 30-touchpad.conf
echo 'EndSection' >> 30-touchpad.conf
sudo chown root 30-touchpad.conf
sudo mv 30-touchpad.conf /etc/X11/xorg.conf.d/
end
if [ $CHOICE -eq 13 ] || [ $CHOICE -eq 14 ] || [ $CHOICE -eq 2 ]
if not grep -R "XMonad.Actions.ShowText" $HOME/.xmonad/xmonad.hs > /dev/null
echo "Enabling XMonad.Actions.ShowText."
sed -i '/XMonad.Actions.Search/a import XMonad.Actions.ShowText' $HOME/.xmonad/xmonad.hs
else
echo "Cool XMonad.Actions.ShowText already enabled."
end
if not grep -R "Data.Maybe" $HOME/.xmonad/xmonad.hs | grep "fromMaybe" > /dev/null
sed -i 's/import Data.Maybe (/import Data.Maybe (fromMaybe, /' $HOME/.xmonad/xmonad.hs
end
if not grep -R "XMonad.Util.Loggers" $HOME/.xmonad/xmonad.hs > /dev/null
sed -i '/XMonad.Util.SpawnOnce/a import XMonad.Util.Loggers (logCmd)' $HOME/.xmonad/xmonad.hs
end
if not grep -R "Theme for showText which prints messages." $HOME/.xmonad/xmonad.hs > /dev/null
sed -i '/-- The layout hook/i -- Theme for showText which prints messages.' $HOME/.xmonad/xmonad.hs
sed -i '/-- The layout hook/i myTextConfig :: ShowTextConfig' $HOME/.xmonad/xmonad.hs
sed -i '/-- The layout hook/i myTextConfig = STC' $HOME/.xmonad/xmonad.hs
sed -i '/-- The layout hook/i \ { st_font = "xft:Ubuntu:bold:size=60"' $HOME/.xmonad/xmonad.hs
sed -i '/-- The layout hook/i \ , st_bg = "#1c1f24"' $HOME/.xmonad/xmonad.hs
sed -i '/-- The layout hook/i \ , st_fg = "#ffffff"' $HOME/.xmonad/xmonad.hs
sed -i '/-- The layout hook/i \ }' $HOME/.xmonad/xmonad.hs
sed -i '/-- The layout hook/i \ ' $HOME/.xmonad/xmonad.hs
end
if not grep -R "handleTimerEvent" $HOME/.xmonad/xmonad.hs > /dev/null
sed -i 's/= docksEventHook/= docksEventHook <+> handleTimerEvent/' $HOME/.xmonad/xmonad.hs > /dev/null
end
end
if [ $CHOICE -eq 13 ] || [ $CHOICE -eq 2 ]
# Make sure light is installed.
if pacman -Q light > /dev/null 2>&1
echo "Cool light is already installed."
else
echo "Installing light."
sudo pacman -S light
end
# You need to be in Video group for light to change screen brightness.
if groups | grep video > /dev/null
echo "Cool you're already in the video group."
else
echo "Adding you to video group. A restart will be needed."
sudo usermod -a -G video $USER
end
# Add keybindings for screen brightness.
if grep -R '"<XF86MonBrightnessUp>", logCmd' $HOME/.xmonad/xmonad.hs > /dev/null
echo "Cool XF86MonBrightnessUp is already in xmonad.hs."
else
echo "Adding XF86MonBrightnessUp to xmonad.hs"
sed -i '/"<XF86MonBrightnessUp>"/d' $HOME/.xmonad/xmonad.hs
sed -i '/-- KB_GROUP Multimedia Keys/a\ , ("<XF86MonBrightnessUp>", logCmd "light -A 5 && printf \' %.0f%% \' $(light -G)" >>= flashText myTextConfig 1 . fromMaybe "")' $HOME/.xmonad/xmonad.hs
end
if grep -R '"<XF86MonBrightnessDown>", logCmd' $HOME/.xmonad/xmonad.hs > /dev/null
echo "Cool XF86MonBrightnessDown is already in xmonad.hs."
else
echo "Adding XF86MonBrightnessDown to xmonad.hs"
sed -i '/"<XF86MonBrightnessDown>"/d' $HOME/.xmonad/xmonad.hs
sed -i '/-- KB_GROUP Multimedia Keys/a\ , ("<XF86MonBrightnessDown>", logCmd "light -U 5 && printf \' %.0f%% \' $(light -G)" >>= flashText myTextConfig 1 . fromMaybe "")' $HOME/.xmonad/xmonad.hs
end
end
if [ $CHOICE -eq 14 ] || [ $CHOICE -eq 2 ]
# Make sure pulseaudio-alsa is installed and add flashText support.
if pacman -Q pulseaudio-alsa > /dev/null 2>&1
echo "Cool pulseaudio-alsa is already installed."
else
echo "Installing pulseaudio-alsa."
sudo pacman -S pulseaudio-alsa
end
if grep -R '"<XF86AudioRaiseVolume>", spawn' $HOME/.xmonad/xmonad.hs > /dev/null
echo "Patching amixer volume raise with flashText."
sed -i '/"<XF86AudioRaiseVolume>", spawn/d' $HOME/.xmonad/xmonad.hs
sed -i '/"<XF86AudioNext>"/a\ , ("<XF86AudioRaiseVolume>", logCmd "printf \' %s \' $(amixer -D pulse set Master 5%+ unmute | grep \'Right:\' | awk -F\'[][]\' \'{ print $2 }\')" >>= flashText myTextConfig 1 . fromMaybe "")' $HOME/.xmonad/xmonad.hs
else
echo "Cool amixer volume raise with flashText already patched."
end
if grep -R '"<XF86AudioLowerVolume>", spawn' $HOME/.xmonad/xmonad.hs > /dev/null
echo "Patching amixer volume lower with flashText."
sed -i '/"<XF86AudioLowerVolume>", spawn/d' $HOME/.xmonad/xmonad.hs
sed -i '/"<XF86AudioNext>"/a\ , ("<XF86AudioLowerVolume>", logCmd "printf \' %s \' $(amixer -D pulse set Master 5%- unmute | grep \'Right:\' | awk -F\'[][]\' \'{ print $2 }\')" >>= flashText myTextConfig 1 . fromMaybe "")' $HOME/.xmonad/xmonad.hs
else
echo "Cool amixer volume lower with flashText already patched."
end
if grep -R '"<XF86AudioMute>", spawn' $HOME/.xmonad/xmonad.hs > /dev/null
echo "Patching amixer with pulse and flashText."
sed -i '/"<XF86AudioMute>", spawn/d' $HOME/.xmonad/xmonad.hs
sed -i '/"<XF86AudioNext>"/a\ , ("<XF86AudioMute>", logCmd "amixer -D pulse set Master toggle | grep \'off\' > /dev/null && echo \' Mute \' || echo \' Unmute \'" >>= flashText myTextConfig 1 . fromMaybe "")' $HOME/.xmonad/xmonad.hs
else
echo "Cool amixer with pulse and flashText already patched."
end
end
if [ $CHOICE -eq 15 ] || [ $CHOICE -eq 2 ]
# Make sure notification-daemon is installed.
if pacman -Q notification-daemon > /dev/null 2>&1
echo "Cool notification-daemon is already installed."
else
echo "Installing notification-daemon."
sudo pacman -S notification-daemon
end
# Launch notification-daemon
if grep -R "/usr/lib/notification-daemon-1.0/notification-daemon" $HOME/.xmonad/xmonad.hs > /dev/null
echo "Cool notification-daemon is already in xmonad.hs."
else
echo "Adding notification-daemon to xmonad.hs"
sed -i '/spawnOnce "picom"/i\ spawnOnce "/usr/lib/notification-daemon-1.0/notification-daemon"' $HOME/.xmonad/xmonad.hs
end
end
if [ $CHOICE -eq 16 ] || [ $CHOICE -eq 2 ]
# Generate theme configs.
# Generate KDE theme config.
echo "Generating KDE theme config."
/bin/cp /usr/share/plasma/desktoptheme/breeze-dark/colors $HOME/.config/kdeglobals
sed -i "/\KDE\]/a LookAndFeelPackage=org.kde.breezedark.desktop" $HOME/.config/kdeglobals
# GTK 4.0 Theme ~/.config/gtk-4.0/settings.ini
echo "Generating GTK 4 theme config."
echo "[Settings]" > $HOME/.config/gtk-4.0/settings.ini
echo "gtk-application-prefer-dark-theme=true" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-button-images=true" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-cursor-theme-name=breeze_cursors" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-cursor-theme-size=24" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-decoration-layout=icon:minimize,maximize,close" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-enable-animations=true" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-font-name=Noto Sans, 10" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-icon-theme-name=breeze-dark" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-menu-images=true" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-primary-button-warps-slider=false" >> $HOME/.config/gtk-4.0/settings.ini
echo "gtk-toolbar-style=3" >> $HOME/.config/gtk-4.0/settings.ini
# GTK 3.0 Theme ~/.config/gtk-3.0/settings.ini
echo "Generating GTK 3 theme config."
echo "[Settings]" > $HOME/.config/gtk-3.0/settings.ini
echo "gtk-application-prefer-dark-theme=true" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-button-images=true" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-cursor-theme-name=breeze_cursors" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-cursor-theme-size=24" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-decoration-layout=icon:minimize,maximize,close" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-enable-animations=true" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-font-name=Noto Sans, 10" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-icon-theme-name=breeze-dark" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-menu-images=true" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-primary-button-warps-slider=false" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-toolbar-style=3" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-modules=colorreload-gtk-module" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-theme-name=Breeze-Dark" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-enable-event-sounds=1" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-enable-input-feedback-sounds=1" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-xft-antialias=1" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-xft-hinting=1" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-xft-hintstyle=hintfull" >> $HOME/.config/gtk-3.0/settings.ini
echo "gtk-xft-rgba=rgb" >> $HOME/.config/gtk-3.0/settings.ini
# GTK 2.0 Theme ~/.gtkrc-2.0.
echo "Generating GTK 2 theme config."
echo 'gtk-button-images=1' > $HOME/.gtkrc-2.0
echo 'gtk-cursor-theme-name="breeze_cursors"' >> $HOME/.gtkrc-2.0
echo 'gtk-cursor-theme-size=24' >> $HOME/.gtkrc-2.0
echo 'gtk-enable-animations=1' >> $HOME/.gtkrc-2.0
echo 'gtk-font-name="Noto Sans, 10"' >> $HOME/.gtkrc-2.0
echo 'gtk-icon-theme-name="breeze-dark"' >> $HOME/.gtkrc-2.0
echo 'gtk-menu-images=1' >> $HOME/.gtkrc-2.0
echo 'gtk-primary-button-warps-slider=0' >> $HOME/.gtkrc-2.0
echo 'gtk-toolbar-style=3' >> $HOME/.gtkrc-2.0
echo 'gtk-theme-name="Breeze-Dark"' >> $HOME/.gtkrc-2.0
echo 'gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR' >> $HOME/.gtkrc-2.0
echo 'gtk-enable-event-sounds=1' >> $HOME/.gtkrc-2.0
echo 'gtk-enable-input-feedback-sounds=1' >> $HOME/.gtkrc-2.0
echo 'gtk-xft-antialias=1' >> $HOME/.gtkrc-2.0
echo 'gtk-xft-hinting=1' >> $HOME/.gtkrc-2.0
echo 'gtk-xft-hintstyle="hintfull"' >> $HOME/.gtkrc-2.0
echo 'gtk-xft-rgba="rgb"' >> $HOME/.gtkrc-2.0
# Xwindows theme ~/.config/xsettingsd/xsettingsd.conf.
echo "Generating Xwindows theme config."
echo 'Gtk/EnableAnimations 1' > $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/DecorationLayout "icon:minimize,maximize,close"' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/PrimaryButtonWarpsSlider 0' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/ToolbarStyle 3' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/MenuImages 1' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/ButtonImages 1' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/CursorThemeSize 24' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/CursorThemeName "breeze_cursors"' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Net/IconThemeName "breeze-dark"' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Gtk/FontName "Noto Sans, 10"' >> $HOME/.config/xsettingsd/xsettingsd.conf
echo 'Net/ThemeName "Breeze"' >> $HOME/.config/xsettingsd/xsettingsd.conf
end
if [ $CHOICE -eq 17 ] || [ $CHOICE -eq 2 ]
# Let KDE/QT5 and GTK apps use the KDE theme and font.
if grep -R "XDG_CURRENT_DESKTOP=KDE" /etc/environment > /dev/null
echo "Cool XDG_CURRENT_DESKTOP=KDE is already in /etc/environment."
else
echo "Adding XDG_CURRENT_DESKTOP=KDE to /etc/environment."
sudo fish -c "echo 'XDG_CURRENT_DESKTOP=KDE' >> /etc/environment"
end
end
if [ $CHOICE -eq 18 ] || [ $CHOICE -eq 2 ]
# Make sure firefox is installed.
if pacman -Q firefox > /dev/null 2>&1
echo "Cool firefox is already installed."
else
echo "Installing firefox."
sudo pacman -S firefox
end
# Make sure firefox is the default browser.
if grep -R "qutebrowser" $HOME/.xmonad/xmonad.hs > /dev/null
echo "Replacing qutebrowser with firefox in xmonad.hs"
sed -i 's/qutebrowser/firefox/' $HOME/.xmonad/xmonad.hs
else
echo "Cool firefox already replaced qutebrowser in xmonad.hs"
end
end
if [ $CHOICE -eq 19 ] || [ $CHOICE -eq 2 ] || [ $CHOICE -eq 5 ]
# Check bin files are executable.
echo "Checking if DTOS scripts are executable."
set BINS clock dtos-colorscheme dtos-help kernel memory pacupdate upt volume
for i in $BINS
if [ ! -x $HOME/.local/bin/$i ]
echo "Making ~/.local/bin/$i executable."
chmod +x $HOME/.local/bin/$i
end
end
chmod +x $HOME/.config/xmobar/trayer-padding-icon.sh
chmod +x $HOME/.xmonad/xmonad_keys.sh
chmod +x $HOME/.config/sxiv/exec/key-handler
chmod +x $HOME/.config/qutebrowser/solarized-everything-css/release.sh
chmod +x $HOME/.config/dmscripts/config
end
if [ $CHOICE -eq 20 ] || [ $CHOICE -eq 2 ]
if [ -f /usr/share/icons/default/index.theme ]
if grep -R "Adwaita" /usr/share/icons/default/index.theme > /dev/null
echo "Setting breeze_cursors cursor theme."
sed -i 's/Adwaita/breeze_cursors/' /usr/share/icons/default/index.theme
else
echo "Cool breeze_cursors theme already set."
end
else
echo "/usr/share/icons/default/index.theme not found, skipping."
end
end
if [ $CHOICE -eq 21 ] || [ $CHOICE -eq 2 ]
if [ -f $HOME/.config/alacritty/alacritty.yml ]
if grep -R "background_opacity" $HOME/.config/alacritty/alacritty.yml > /dev/null
echo "Updating Alacritty opacity."
sed -i 's/background_opacity/window.opacity/' $HOME/.config/alacritty/alacritty.yml
else
echo "Cool Alacritty already updated."
end
end
end
if [ $CHOICE -eq 22 ]
# Disable NaturalScrolling direction.
if [ -f /etc/X11/xorg.conf.d/30-touchpad.conf ]
echo "Setting NaturalScrolling to false."
sudo sed -i 's/"NaturalScrolling" "true"/"NaturalScrolling" "false"/' /etc/X11/xorg.conf.d/30-touchpad.conf
else
echo "TouchPad config file not found. Generate it first."
end
end
if [ $CHOICE -eq 23 ]
# Switch alsa for pulseaudio keybindings.
set SINK ( pactl list | grep -oP 'Sink #\K([0-9]+)' )
if grep -R '"<XF86AudioRaiseVolume>", logCmd "printf \' %s \' $(pactl' $HOME/.xmonad/xmonad.hs > /dev/null
echo "Cool pactl -- set-sink-volume 0 +5% is already in xmonad.hs."
else
echo "Adding pactl -- set-sink-volume 0 +5% to xmonad.hs"
sed -i '/"<XF86AudioRaiseVolume>"/d' $HOME/.xmonad/xmonad.hs
sed -i '/<XF86AudioMute>/a\ , ("<XF86AudioRaiseVolume>", logCmd "printf \' %s \' $(pactl -- set-sink-volume PASINK +5% && pactl -- get-sink-volume 0 | grep -o \'[0-9]*%\' | head -1)" >>= flashText myTextConfig 1 . fromMaybe "")' $HOME/.xmonad/xmonad.hs
sed -i "s/PASINK/$SINK/" $HOME/.xmonad/xmonad.hs
end
if grep -R '"<XF86AudioLowerVolume>", logCmd "printf \' %s \' $(pactl' $HOME/.xmonad/xmonad.hs > /dev/null
echo "Cool pactl -- set-sink-volume 0 -5% is already in xmonad.hs."
else
echo "Adding pactl -- set-sink-volume 0 -5% to xmonad.hs"
sed -i '/"<XF86AudioLowerVolume>"/d' $HOME/.xmonad/xmonad.hs
sed -i '/<XF86AudioRaiseVolume>/a\ , ("<XF86AudioLowerVolume>", logCmd "printf \' %s \' $(pactl -- set-sink-volume PASINK -5% && pactl -- get-sink-volume 0 | grep -o \'[0-9]*%\' | head -1)" >>= flashText myTextConfig 1 . fromMaybe "")' $HOME/.xmonad/xmonad.hs
sed -i "s/PASINK/$SINK/" $HOME/.xmonad/xmonad.hs
end
end
if [ $CHOICE -eq 30 ]
# Increase Xmobar font size.
if [ -f $HOME/.config/xmobar/doom-one-xmobarrc ]
set OLDXFONTSIZE ( grep weight $HOME/.config/xmobar/doom-one-xmobarrc | cut -d "=" -f 4 | cut -d ":" -f 1 )
set NEWXFONTSIZE ( echo $OLDXFONTSIZE + 1 | bc )
set LGXFONTSIZE ( echo $OLDXFONTSIZE + 2 | bc )
if [ $NEWXFONTSIZE -le 20 ]
set LINENUMBERS (grep -n pixelsize= $HOME/.config/xmobar/doom-one-xmobarrc | cut -f 1 -d ":")
sed -i "$LINENUMBERS[1] s/pixelsize=[0-9]*/pixelsize=$NEWXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[2] s/pixelsize=[0-9]*/pixelsize=$NEWXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[3] s/pixelsize=[0-9]*/pixelsize=$LGXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[4] s/pixelsize=[0-9]*/pixelsize=$LGXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
echo "Xmobar font increased to $NEWXFONTSIZE."
else
echo "Xmobar font limited to $OLDXFONTSIZE."
echo "Font size unchanged."
end
else
echo "Xmobar theme file not found."
end
end
if [ $CHOICE -eq 31 ]
# Decrease Xmobar font size.
if [ -f $HOME/.config/xmobar/doom-one-xmobarrc ]
set OLDXFONTSIZE ( grep weight $HOME/.config/xmobar/doom-one-xmobarrc | cut -d "=" -f 4 | cut -d ":" -f 1 )
set NEWXFONTSIZE ( echo $OLDXFONTSIZE - 1 | bc )
if [ $NEWXFONTSIZE -ge 8 ]
set LINENUMBERS (grep -n pixelsize= $HOME/.config/xmobar/doom-one-xmobarrc | cut -f 1 -d ":")
sed -i "$LINENUMBERS[1] s/pixelsize=[0-9]*/pixelsize=$NEWXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[2] s/pixelsize=[0-9]*/pixelsize=$NEWXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[3] s/pixelsize=[0-9]*/pixelsize=$OLDXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
sed -i "$LINENUMBERS[4] s/pixelsize=[0-9]*/pixelsize=$OLDXFONTSIZE/" $HOME/.config/xmobar/*-xmobarrc
echo "Xmobar font increased to $NEWXFONTSIZE."
else
echo "Xmobar font limited to $OLDXFONTSIZE."
echo "Font size unchanged."
end
else
echo "Xmobar theme file not found."
end
end
if [ $CHOICE -eq 32 ]
# Increase Conky font size.
if [ -f $HOME/.config/conky/xmonad/doom-one-01.conkyrc ]
set OLDCFONTSIZE (grep size= $HOME/.config/conky/xmonad/doom-one-01.conkyrc | cut -f 3 -d "=" | cut -f 1 -d "'" | head -1)
set CFONTSIZE1 ( echo $OLDCFONTSIZE + 1 | bc )
if [ $CFONTSIZE1 -le 20 ]
set LINENUMBERS ( grep -n size= $HOME/.config/conky/xmonad/doom-one-01.conkyrc | cut -f 1 -d ":" )
set CFONTSIZE2 (printf %.0f (echo "$CFONTSIZE1 * 3.5" | bc))
set CFONTSIZE3 (printf %.0f (echo "$CFONTSIZE1 * 1.5" | bc))
set CFONTSIZE4 (printf %.0f (echo "$CFONTSIZE1 * 1.1" | bc))
sed -i "$LINENUMBERS[1] s/size=[0-9]*/size=$CFONTSIZE1/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[2] s/size=[0-9]*/size=$CFONTSIZE2/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[3] s/size=[0-9]*/size=$CFONTSIZE3/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[4] s/size=[0-9]*/size=$CFONTSIZE4/" $HOME/.config/conky/xmonad/*.conkyrc
echo "Conky font increased to $CFONTSIZE1."
else
echo "Xmobar font limited to $OLDCFONTSIZE."
echo "Font size unchanged."
end
else
echo "Conky theme files not found."
end
end
if [ $CHOICE -eq 33 ]
# Decrease Conky font size.
if [ -f $HOME/.config/conky/xmonad/doom-one-01.conkyrc ]
set OLDCFONTSIZE (grep size= $HOME/.config/conky/xmonad/doom-one-01.conkyrc | cut -f 3 -d "=" | cut -f 1 -d "'" | head -1)
set CFONTSIZE1 ( echo $OLDCFONTSIZE - 1 | bc )
if [ $CFONTSIZE1 -ge 4 ]
set LINENUMBERS ( grep -n size= $HOME/.config/conky/xmonad/doom-one-01.conkyrc | cut -f 1 -d ":" )
set CFONTSIZE2 (printf %.0f (echo "$CFONTSIZE1 * 3.5" | bc))
set CFONTSIZE3 (printf %.0f (echo "$CFONTSIZE1 * 1.5" | bc))
set CFONTSIZE4 (printf %.0f (echo "$CFONTSIZE1 * 1.1" | bc))
sed -i "$LINENUMBERS[1] s/size=[0-9]*/size=$CFONTSIZE1/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[2] s/size=[0-9]*/size=$CFONTSIZE2/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[3] s/size=[0-9]*/size=$CFONTSIZE3/" $HOME/.config/conky/xmonad/*.conkyrc
sed -i "$LINENUMBERS[4] s/size=[0-9]*/size=$CFONTSIZE4/" $HOME/.config/conky/xmonad/*.conkyrc
echo "Conky font decreased to $CFONTSIZE1."
else
echo "Xmobar font limited to $OLDCFONTSIZE."
echo "Font size unchanged."
end
else
echo "Conky theme files not found."
end
end
if [ $CHOICE -eq 34 ]
set NEWFONTSIZE 0
while [ $NEWFONTSIZE -lt 6 ] || [ $NEWFONTSIZE -gt 20 ]
echo "Choose a font size between 6 and 20."
read NEWFONTSIZE
echo ""
end
end
if [ $CHOICE -eq 34 ] || [ $CHOICE -eq 3 ] || [ $CHOICE -eq 4 ]
# Set Systems font size.
# Xterm font size in ~/.Xresources
sed -i "s/size=[0-9]*/size=$NEWFONTSIZE/" $HOME/.Xresources
sed -i "s/faceSize: [0-9]*/faceSize: $NEWFONTSIZE/" $HOME/.Xresources
# Dmenu Font Size
echo "Setting font size $NEWFONTSIZE in ~/.config/dmscripts/config"
if grep -R "xft:size=14" $HOME/.config/dmscripts/config > /dev/null
sed -i "s/xft:size=[0-9]*/xft:size=$NEWFONTSIZE/" $HOME/.config/dmscripts/config
else
sed -i "s/dmenu -i -l 20 -p/dmenu -fn xft:size=$NEWFONTSIZE -i -l 20 -p/" $HOME/.config/dmscripts/config
end
if grep -R "dmenu_run -fn xft:size=" $HOME/.xmonad/xmonad.hs > /dev/null
sed -i "s/dmenu_run -fn xft:size=[0-9]*/dmenu_run -fn xft:size=$NEWFONTSIZE/" $HOME/.xmonad/xmonad.hs
else
sed -i "s/dmenu_run -i -p/dmenu_run -fn xft:size=$NEWFONTSIZE -i -p/" $HOME/.xmonad/xmonad.hs
end
if grep -R "passmenu -fn xft:size=" $HOME/.xmonad/xmonad.hs > /dev/null
sed -i "s/passmenu -fn xft:size=[0-9]*/passmenu -fn xft:size=$NEWFONTSIZE/" $HOME/.xmonad/xmonad.hs
else
sed -i "s/passmenu/passmenu -fn xft:size=$NEWFONTSIZE -i -p/" $HOME/.xmonad/xmonad.hs
end
# Xmonad font size.
echo "Setting font size $NEWFONTSIZE in ~/.xmonad/xmonad.hs"
set LINENUMBER (grep -n "myFont" $HOME/.xmonad/xmonad.hs | grep "size=" | cut -f 1 -d ":")
sed -i "$LINENUMBER s/size=[0-9]*/size=$NEWFONTSIZE/" $HOME/.xmonad/xmonad.hs
# Alacritty font size.
if [ -f $HOME/.config/alacritty/alacritty.yml ]
echo "Setting font size $NEWFONTSIZE in ~/.config/alacritty/alacritty.yml"
sed -i "s/size: [0-9]*.0/size: $NEWFONTSIZE.0/" $HOME/.config/alacritty/alacritty.yml
else
echo "~/.config/alacritty/alacritty.yml file not founds, skipping."
end
# Set GTK 2.0 font size.
if [ -f $HOME/.gtkrc-2.0 ]
echo "Setting font size $NEWFONTSIZE in ~/.gtkrc-2.0."
set LINENUMBER (grep -n "gtk-font-name=" $HOME/.gtkrc-2.0 | cut -d ":" -f 1)
set OLDFONTSIZE (grep "gtk-font-name=" $HOME/.gtkrc-2.0 | cut -d "," -f 2 | cut -d "\"" -f 1)
sed -i "$LINENUMBER s/$OLDFONTSIZE/ $NEWFONTSIZE/" $HOME/.gtkrc-2.0
else
echo "~/.gtkrc-2.0 file not founds, skipping."
end
# Set GTK 3.0 font size.
if [ -f $HOME/.config/gtk-3.0/settings.ini ]
echo "Setting font size $NEWFONTSIZE in ~/.config/gtk-3.0/settings.ini."
set LINENUMBER (grep -n "gtk-font-name=" $HOME/.config/gtk-3.0/settings.ini | cut -d ":" -f 1)
set OLDFONTSIZE (grep "gtk-font-name=" $HOME/.config/gtk-3.0/settings.ini | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/ $NEWFONTSIZE/" $HOME/.config/gtk-3.0/settings.ini
else
echo "~/.config/gtk-3.0/settings.ini file not founds, skipping."
end
# Set GTK 4.0 font size.
if [ -f $HOME/.config/gtk-4.0/settings.ini ]
echo "Setting font size $NEWFONTSIZE in ~/.config/gtk-4.0/settings.ini."
set LINENUMBER (grep -n "gtk-font-name=" $HOME/.config/gtk-4.0/settings.ini | cut -d ":" -f 1)
set OLDFONTSIZE (grep "gtk-font-name=" $HOME/.config/gtk-4.0/settings.ini | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/ $NEWFONTSIZE/" $HOME/.config/gtk-4.0/settings.ini
else
echo "~/.config/gtk-4.0/settings.ini file not founds, skipping."
end
# Set Xwindows font size.
if [ -f $HOME/.config/xsettingsd/xsettingsd.conf ]
echo "Setting font size $NEWFONTSIZE in ~/.config/xsettingsd/xsettingsd.conf"
set LINENUMBER (grep -n "FontName" $HOME/.config/xsettingsd/xsettingsd.conf | cut -d ":" -f 1)
set OLDFONTSIZE (grep "FontName" $HOME/.config/xsettingsd/xsettingsd.conf | cut -d "," -f 2 | cut -d '"' -f 1)
sed -i "$LINENUMBER s/$OLDFONTSIZE/ $NEWFONTSIZE/" $HOME/.config/xsettingsd/xsettingsd.conf
else
echo "~/.config/xsettingsd/xsettingsd.conf"
end
# Set QT/KDE font size.
if [ -f $HOME/.config/kdeglobals ]
echo "Setting font size $NEWFONTSIZE in ~/.config/kdeglobals."
set SMALLFONTSIZE (printf %.0f (echo "$NEWFONTSIZE * 0.8" | bc))
if not grep -R "\[General\]" $HOME/.config/kdeglobals > /dev/null
echo "" >> $HOME/.config/kdeglobals
echo "[General]" >> $HOME/.config/kdeglobals
end
if grep -R "toolBarFont=" $HOME/.config/kdeglobals > /dev/null
set LINENUMBER (grep -n "toolBarFont=" $HOME/.config/kdeglobals | cut -d ":" -f 1)
set OLDFONTSIZE (grep "toolBarFont=" $HOME/.config/kdeglobals | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/$NEWFONTSIZE/1" $HOME/.config/kdeglobals
else
sed -i "/\[General\]/a toolBarFont=Noto Sans,$NEWFONTSIZE,-1,5,50,0,0,0,0,0" $HOME/.config/kdeglobals
end
if grep -R "smallestReadableFont=" $HOME/.config/kdeglobals > /dev/null
set LINENUMBER (grep -n "smallestReadableFont=" $HOME/.config/kdeglobals | cut -d ":" -f 1)
set OLDFONTSIZE (grep "smallestReadableFont=" $HOME/.config/kdeglobals | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/$SMALLFONTSIZE/1" $HOME/.config/kdeglobals
else
sed -i "/\[General\]/a smallestReadableFont=Noto Sans,$NEWFONTSIZE,-1,5,50,0,0,0,0,0" $HOME/.config/kdeglobals
end
if grep -R "menuFont=" $HOME/.config/kdeglobals > /dev/null
set LINENUMBER (grep -n "menuFont=" $HOME/.config/kdeglobals | cut -d ":" -f 1)
set OLDFONTSIZE (grep "menuFont=" $HOME/.config/kdeglobals | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/$NEWFONTSIZE/1" $HOME/.config/kdeglobals
else
sed -i "/\[General\]/a menuFont=Noto Sans,$NEWFONTSIZE,-1,5,50,0,0,0,0,0" $HOME/.config/kdeglobals
end
if grep -R "font=" $HOME/.config/kdeglobals > /dev/null
set LINENUMBER (grep -n "font=" $HOME/.config/kdeglobals | cut -d ":" -f 1)
set OLDFONTSIZE (grep "font=" $HOME/.config/kdeglobals | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/$NEWFONTSIZE/1" $HOME/.config/kdeglobals
else
sed -i "/\[General\]/a font=Noto Sans,$NEWFONTSIZE,-1,5,50,0,0,0,0,0" $HOME/.config/kdeglobals
end
if grep -R "fixed=" $HOME/.config/kdeglobals > /dev/null
set LINENUMBER (grep -n "fixed=" $HOME/.config/kdeglobals | cut -d ":" -f 1)
set OLDFONTSIZE (grep "fixed=" $HOME/.config/kdeglobals | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/$NEWFONTSIZE/1" $HOME/.config/kdeglobals
else
sed -i "/\[General\]/a fixed=Hack,$NEWFONTSIZE,-1,5,50,0,0,0,0,0" $HOME/.config/kdeglobals
end
if grep -R "activeFont=" $HOME/.config/kdeglobals > /dev/null
set LINENUMBER (grep -n "activeFont=" $HOME/.config/kdeglobals | cut -d ":" -f 1)
set OLDFONTSIZE (grep "activeFont=" $HOME/.config/kdeglobals | cut -d "," -f 2)
sed -i "$LINENUMBER s/$OLDFONTSIZE/$NEWFONTSIZE/1" $HOME/.config/kdeglobals
else
sed -i "/\[WM\]/a activeFont=Noto Sans,$NEWFONTSIZE,-1,5,50,0,0,0,0,0" $HOME/.config/kdeglobals
end
else
echo "~/.config/kdeglobals file not found, skipping."
end
end
if [ $CHOICE -eq 35 ] || [ $CHOICE -eq 3 ] || [ $CHOICE -eq 4 ]
# Setting fonts to Noto Sans and Hack.
# Setting Alacritty fonts to Hack.
if [ -f $HOME/.config/alacritty/alacritty.yml ]
echo "Setting font Noto Sans in ~/.config/alacritty/alacritty.yml"
sed -i 's/ family: Source Code Pro/ # family: Source Code Pro/' $HOME/.config/alacritty/alacritty.yml
sed -i 's/ # family: Hack/ family: Hack/' $HOME/.config/alacritty/alacritty.yml
else
echo "~/.config/alacritty/alacritty.yml file not founds, skipping."
end
# Setting Xmobar fonts to Noto Sans.
if [ -f $HOME/.config/xmobar/doom-one-xmobarrc ]
echo "Setting Xmobar fonts to Noto Sans."
sed -i 's/Ubuntu/Noto Sans/' $HOME/.config/xmobar/*-xmobarrc
else
echo "Xmobar theme files not found."
end
# Setting Conky fonts to Noto Sans.
if [ -f $HOME/.config/conky/xmonad/doom-one-01.conkyrc ]
echo "Setting Conky fonts to Noto Sans."
sed -i 's/Source Code Pro/Noto Sans/' $HOME/.config/conky/xmonad/*.conkyrc
sed -i 's/Raleway/Noto Sans/' $HOME/.config/conky/xmonad/*.conkyrc
sed -i 's/Ubuntu/Noto Sans/' $HOME/.config/conky/xmonad/*.conkyrc
else
echo "Conky theme files not found."
end
# Setting font Noto Sans in ~/.gtkrc-2.0.
if [ -f $HOME/.gtkrc-2.0 ]
echo "Setting font Noto Sans in ~/.gtkrc-2.0."
set OLDFONT (grep -R "gtk-font-name=" $HOME/.gtkrc-2.0 | cut -d '"' -f 2 | cut -d "," -f 1)
sed -i "s/$OLDFONT/Noto Sans/" $HOME/.gtkrc-2.0
else
echo "~/.gtkrc-2.0 file not founds, skipping."
end
# Setting font Noto Sans in ~/.config/gtk-3.0/settings.ini.
if [ -f $HOME/.config/gtk-3.0/settings.ini ]
echo "Setting font Noto Sans in ~/.config/gtk-3.0/settings.ini."
set OLDFONT (grep -R "gtk-font-name=" $HOME/.config/gtk-3.0/settings.ini | cut -d "=" -f 2 | cut -d "," -f 1)
sed -i "s/$OLDFONT/Noto Sans/" $HOME/.config/gtk-3.0/settings.ini
else
echo "~/.config/gtk-3.0/settings.ini file not founds, skipping."
end
# Setting font Noto Sans in ~/.config/gtk-4.0/settings.ini.
if [ -f $HOME/.config/gtk-4.0/settings.ini ]
echo "Setting font Noto Sans in ~/.config/gtk-4.0/settings.ini."
set OLDFONT (grep -R "gtk-font-name=" $HOME/.config/gtk-4.0/settings.ini | cut -d "=" -f 2 | cut -d "," -f 1)
sed -i "s/$OLDFONT/Noto Sans/" $HOME/.config/gtk-4.0/settings.ini
else
echo "~/.config/gtk-4.0/settings.ini file not founds, skipping."
end
end
if [ $CHOICE -eq 36 ]
# Choose a Console font size.
set VCFONTLIST ter-112 ter-114 ter-116 ter-118 ter-120 ter-122 ter-124 ter-128 ter-132
set VCFONTSIZE 0
while not echo $VCFONTLIST | grep "ter-1$VCFONTSIZE" > /dev/null
echo "Enter a Console font size."
echo "12 14 16 18 20 22 24 28 32"
read VCFONTSIZE
echo ""
end
end
if [ $CHOICE -eq 36 ] || [ $CHOICE -eq 3 ] || [ $CHOICE -eq 4 ]
# Set Console font size to VCFONTSIZE.
echo "Setting font size $VCFONTSIZE for the console."
if [ -f /etc/vconsole.conf ]
if grep -R "FONT=" /etc/vconsole.conf > /dev/null
sudo sed -i '/FONT=/d' /etc/vconsole.conf
end
if grep -R "FONT_MAP=" /etc/vconsole.conf > /dev/null
sudo sed -i '/FONT_MAP=/d' /etc/vconsole.conf
end
end
sudo fish -c "echo "FONT=ter-1"$VCFONTSIZE"n" >> /etc/vconsole.conf"
sudo fish -c "echo "FONT_MAP=8859-2" >> /etc/vconsole.conf"
end
if [ $CHOICE -eq 2 ] || [ $CHOICE -eq 3 ] || [ $CHOICE -eq 4 ] || [ $CHOICE -eq 5 ] || [ $CHOICE -eq 13 ] || [ $CHOICE -eq 14 ] || [ $CHOICE -eq 18 ] || [ $CHOICE -eq 22 ] || [ $CHOICE -eq 30 ] || [ $CHOICE -eq 31 ] || [ $CHOICE -eq 34 ] || [ $CHOICE -eq 35 ]
xmonad --restart
end
if [ $CHOICE -eq 40 ]
# Exit script.
exit
end
echo ""
echo "Press any key to continue."
read
fish (status filename) && exit