-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
865 lines (819 loc) · 28.9 KB
/
main.html
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
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-12-11 Sun 19:51 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Bugs Navi OS</title>
<meta name="author" content="Suraj Kushwah" />
<meta name="generator" content="Org Mode" />
<style>
#content { max-width: 60em; margin: auto; }
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #e6e6e6;
border-radius: 3px;
background-color: #f2f2f2;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: auto;
}
pre.src:before {
display: none;
position: absolute;
top: -8px;
right: 12px;
padding: 3px;
color: #555;
background-color: #f2f2f299;
}
pre.src:hover:before { display: inline; margin-top: 14px;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { }
</style>
</head>
<body>
<div id="content" class="content">
<h1 class="title">Bugs Navi OS</h1>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#orgf2b7966">1. Stage 0</a>
<ul>
<li><a href="#org5c2dccb">1.1. Partition the disks</a></li>
<li><a href="#org63a00a3">1.2. Format the partitions</a></li>
<li><a href="#orgd8842af">1.3. Mount and Install</a></li>
<li><a href="#org026adbc">1.4. Chroot Hack</a></li>
</ul>
</li>
<li><a href="#org952fe9e">2. Stage 1</a>
<ul>
<li><a href="#org131572a">2.1. Parallel Download</a></li>
<li><a href="#org71aefc9">2.2. Time</a></li>
<li><a href="#orgbd34457">2.3. Locale</a></li>
<li><a href="#orgb298758">2.4. Hostname</a></li>
<li><a href="#orge6d3abf">2.5. Network Config</a></li>
<li><a href="#orgac4cb60">2.6. Initramfs</a></li>
<li><a href="#orgfe517a7">2.7. Root Password</a></li>
<li><a href="#org55e227b">2.8. Bootloader</a></li>
<li><a href="#org33863b6">2.9. Installing Programs</a>
<ul>
<li><a href="#org0747d80">2.9.1. Softwares</a></li>
<li><a href="#orgd1d0220">2.9.2. Utilies</a></li>
</ul>
</li>
<li><a href="#orgb2956de">2.10. Default Shell</a></li>
<li><a href="#orgcf9817b">2.11. New User</a></li>
<li><a href="#org1450104">2.12. Setting up for next stage</a></li>
<li><a href="#org2b8e777">2.13. Sudo Access</a></li>
</ul>
</li>
<li><a href="#orge15d872">3. Stage 2</a>
<ul>
<li><a href="#orgd493cde">3.1. Dotfiles</a></li>
<li><a href="#org4ffc9c7">3.2. Suckless</a>
<ul>
<li><a href="#orgcf870b0">3.2.1. Window Manager</a></li>
<li><a href="#org59a0999">3.2.2. Terminal</a></li>
<li><a href="#org8399660">3.2.3. Menu</a></li>
</ul>
</li>
<li><a href="#org48ae8fc">3.3. Status Bar</a></li>
<li><a href="#orgab8f21c">3.4. Password Prompt</a></li>
<li><a href="#org94e54a3">3.5. AUR Helper</a></li>
<li><a href="#org766d330">3.6. Some AUR Packages</a></li>
<li><a href="#org592d14f">3.7. Clean Up</a></li>
<li><a href="#org112c885">3.8. Oh My ZSH</a></li>
</ul>
</li>
</ul>
</div>
</div>
<p>
Navi (aka. bugsnavi) is a Auto Rice Bootstrapping script of <a href="https://bugswriter.com">bugswriter</a>.
Navi is a minimal script that will provide a fully-featured terminal based
OS.
</p>
<p>
I am writing this because I got bored with installing arch linux manually
All my friends keep asking me to make their systems exactly like me.
This is why I end up writing this script to make things quicker for me.
</p>
<div id="outline-container-orgf2b7966" class="outline-2">
<h2 id="orgf2b7966"><span class="section-number-2">1.</span> Stage 0</h2>
<div class="outline-text-2" id="text-1">
<p>
First we have to get prepare for Arch installation. Lets call it stage 0.
Reference: <a href="https://wiki.archlinux.org/title/installation_guide">https://wiki.archlinux.org/title/installation_guide</a>
</p>
<div class="org-src-container">
<pre class="src src-sh">echo "=== Welcome to navi OS installer script ==="
echo "> Please make sure your internet is connected"
</pre>
</div>
</div>
<div id="outline-container-org5c2dccb" class="outline-3">
<h3 id="org5c2dccb"><span class="section-number-3">1.1.</span> Partition the disks</h3>
<div class="outline-text-3" id="text-1-1">
<p>
First and very important thing is making partition.
If you are intending to wipe your hard drive and install linux.
Then usually what I do is -
</p>
<ul class="org-ul">
<li><code>/dev/sda1</code> for efi (520mb)</li>
<li><code>/dev/sda2</code> for linux. (rest)</li>
</ul>
<p>
We are going to use <code>cfdisk</code> to make partition.
No need to create a new efi partition if it exist, unless you want to.
</p>
<div class="org-src-container">
<pre class="src src-sh">echo "Checkout your drive names"
lsblk
echo "Enter the complete drive name (eg. /dev/sda)"
read drive
cfdisk $drive
</pre>
</div>
</div>
</div>
<div id="outline-container-org63a00a3" class="outline-3">
<h3 id="org63a00a3"><span class="section-number-3">1.2.</span> Format the partitions</h3>
<div class="outline-text-3" id="text-1-2">
<p>
Now I assume you managed to create your linux and efi partition correctly.
</p>
<ul class="org-ul">
<li>Now we have to give our linux partition <code>ext4</code> format.</li>
<li>and our efi parition <code>fat32</code> format. (only if efi is made).</li>
</ul>
<div class="org-src-container">
<pre class="src src-sh">echo "Enter the complete name of linux partition you made (eg. /dev/sda1): "
read partition
mkfs.ext4 $partition
read -p "Did you also create efi partition? [y/n]" answer
if [[ $answer = y ]] ; then
echo "Enter the full name of EFI partition (eg. /dev/sda2): "
read efipartition
mkfs.vfat -F 32 $efipartition
fi
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd8842af" class="outline-3">
<h3 id="orgd8842af"><span class="section-number-3">1.3.</span> Mount and Install</h3>
<div class="outline-text-3" id="text-1-3">
<p>
It's time to mount our brand new and empty linux partition we made. So we can
install our hot new arch linux kernel and packages.
</p>
<div class="org-src-container">
<pre class="src src-sh">mount $partition /mnt
pacstrap /mnt base base-devel linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
</pre>
</div>
</div>
</div>
<div id="outline-container-org026adbc" class="outline-3">
<h3 id="org026adbc"><span class="section-number-3">1.4.</span> Chroot Hack</h3>
<div class="outline-text-3" id="text-1-4">
<p>
So right now we are in our arch image system. But in order to configure our new
installation we have to change our root to new linux partition. For that we
have to use <code>arch-chroot</code>. But since we are running commands from script.
If we do chroot, we won't be able to run commands.
One solution for this is just use <code>arch-chroot /mnt <command></code>. This will
chroot - run command - exit.
We also have to type <code>arch-chroot /mnt</code> before every command.
So what I did is. I am not going to exit out this shell script, but before
exiting, we are gonna make a new shell script on <code>/mnt/</code> or for new system.
The root (<code>/</code>). Then we will <code>arch-chroot /mnt ./new_script.sh</code>.
</p>
<div class="org-src-container">
<pre class="src src-sh">sed '1,/^#stage1$/d' `basename $0` > /mnt/stage1.sh
chmod +x /mnt/stage1.sh
arch-chroot /mnt ./stage1.sh
exit
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org952fe9e" class="outline-2">
<h2 id="org952fe9e"><span class="section-number-2">2.</span> Stage 1</h2>
<div class="outline-text-2" id="text-2">
<p>
At this point your script is finished executing stage 0.
Which means our base system is installed, stage 1 will mostly be about
configurations.
</p>
</div>
<div id="outline-container-org131572a" class="outline-3">
<h3 id="org131572a"><span class="section-number-3">2.1.</span> Parallel Download</h3>
<div class="outline-text-3" id="text-2-1">
<p>
The package manager of Arch is <code>pacman</code>. Pacman now provide a feature
of downloading packages parallely, it's good and fast so lets do this.
</p>
<div class="org-src-container">
<pre class="src src-sh">pacman -S --noconfirm sed
sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf
</pre>
</div>
</div>
</div>
<div id="outline-container-org71aefc9" class="outline-3">
<h3 id="org71aefc9"><span class="section-number-3">2.2.</span> Time</h3>
<div class="outline-text-3" id="text-2-2">
<p>
Time to setup time, for my system, So I can always keep track of time.
so do my programs.
</p>
<div id="org2acd78b" class="figure">
<p><img src="https://www.magicalquote.com/wp-content/uploads/2016/07/Whiterose-season-1.jpg" alt="Whiterose-season-1.jpg" />
</p>
<p><span class="figure-number">Figure 1: </span>I love whiterose. (Mr. Robot)</p>
</div>
<div class="org-src-container">
<pre class="src src-sh">ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
hwclock --systohc
</pre>
</div>
</div>
</div>
<div id="outline-container-orgbd34457" class="outline-3">
<h3 id="orgbd34457"><span class="section-number-3">2.3.</span> Locale</h3>
<div class="outline-text-3" id="text-2-3">
<p>
A locale consists of a number of categories for which country-dependent
formatting or other specifications exist. We are going to use <code>UTF-8</code>.
We are also going to use <code>us</code>, keymap.
</p>
<div class="org-src-container">
<pre class="src src-sh">echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=us" > /etc/vconsole.conf
</pre>
</div>
</div>
</div>
<div id="outline-container-orgb298758" class="outline-3">
<h3 id="orgb298758"><span class="section-number-3">2.4.</span> Hostname</h3>
<div class="outline-text-3" id="text-2-4">
<p>
Hostname is the computer name, most people name their computer any random
crap. But I like to call my computer <i>mundus</i>. When you open your terminal
you will see <code>yourusername@yourhostname</code>.
</p>
<div class="org-src-container">
<pre class="src src-sh">echo "Hostname: "
read hostname
echo $hostname > /etc/hostname
</pre>
</div>
</div>
</div>
<div id="outline-container-orge6d3abf" class="outline-3">
<h3 id="orge6d3abf"><span class="section-number-3">2.5.</span> Network Config</h3>
<div class="outline-text-3" id="text-2-5">
<p>
Lets create hostname file. My <code>127.0.0.1</code> is aliased to localhost.
Like any other normal person.
</p>
<div class="org-src-container">
<pre class="src src-sh">echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts
</pre>
</div>
</div>
</div>
<div id="outline-container-orgac4cb60" class="outline-3">
<h3 id="orgac4cb60"><span class="section-number-3">2.6.</span> Initramfs</h3>
<div class="outline-text-3" id="text-2-6">
<p>
Creating a new initramfs is usually not required, because mkinitcpio
was run on installation of the kernel package with pacstrap.
</p>
<div class="org-src-container">
<pre class="src src-sh">mkinitcpio -P
</pre>
</div>
</div>
</div>
<div id="outline-container-orgfe517a7" class="outline-3">
<h3 id="orgfe517a7"><span class="section-number-3">2.7.</span> Root Password</h3>
<div class="outline-text-3" id="text-2-7">
<p>
Now lets set root password, root password and user password is supposed to
be different. But I like to keep it same for simpilicity. But we will worry
about this later, when we make a user.
</p>
<div class="org-src-container">
<pre class="src src-sh">passwd
</pre>
</div>
</div>
</div>
<div id="outline-container-org55e227b" class="outline-3">
<h3 id="org55e227b"><span class="section-number-3">2.8.</span> Bootloader</h3>
<div class="outline-text-3" id="text-2-8">
<p>
Bootloader is probably the most annoying thing for new linux users.
Here, lets install grub. Notice I am highly assuming you have UEFI
partition, if you don't good luck. In last 5 years almost every
computer have UEFI BOIS.
I have no reason to wait… I don't have dual boot. So I will remove
the grub wait time.
</p>
<div class="org-src-container">
<pre class="src src-sh">pacman --noconfirm -S grub efibootmgr os-prober
echo "Enter EFI partition: "
read efipartition
mkdir /boot/efi
mount $efipartition /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
sed -i 's/quiet/pci=noaer/g' /etc/default/grub
sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg
</pre>
</div>
</div>
</div>
<div id="outline-container-org33863b6" class="outline-3">
<h3 id="org33863b6"><span class="section-number-3">2.9.</span> Installing Programs</h3>
<div class="outline-text-3" id="text-2-9">
<p>
It's time to make Navi an OS which one can use daily, every single program this
script will install the best tools one could find for various purposes.
Keep in mind Navi is 90% CLI based OS. So almost every tool we will install
is also CLI based. The only true exceptions are just <code>browser</code>.
</p>
</div>
<div id="outline-container-org0747d80" class="outline-4">
<h4 id="org0747d80"><span class="section-number-4">2.9.1.</span> Softwares</h4>
<div class="outline-text-4" id="text-2-9-1">
<p>
So lets install softwares for our daily purpose.
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Package</th>
<th scope="col" class="org-left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">qutebrowser</td>
<td class="org-left">A keyboard-driven, vim-like browser based on PyQt5</td>
</tr>
<tr>
<td class="org-left">sxiv</td>
<td class="org-left">Simple X Image Viewer</td>
</tr>
<tr>
<td class="org-left">zathura</td>
<td class="org-left">Minimalistic document viewer</td>
</tr>
<tr>
<td class="org-left">mpv</td>
<td class="org-left">A free, open source, and cross-platform media player</td>
</tr>
<tr>
<td class="org-left">mpd</td>
<td class="org-left">Flexible, powerful, server-side application for playing music</td>
</tr>
<tr>
<td class="org-left">irssi</td>
<td class="org-left">Modular text mode IRC client with Perl scripting</td>
</tr>
<tr>
<td class="org-left">ncmpcpp</td>
<td class="org-left">Fully featured MPD client which runs in a terminal</td>
</tr>
<tr>
<td class="org-left">tremc</td>
<td class="org-left">A TUI Client for transmission daemon</td>
</tr>
<tr>
<td class="org-left">newsboat</td>
<td class="org-left">An RSS/Atom feed reader for text terminals</td>
</tr>
<tr>
<td class="org-left">ytfzf</td>
<td class="org-left">Find and watch youtube videos from the terminal</td>
</tr>
<tr>
<td class="org-left">lf</td>
<td class="org-left">Terminal based simple, vim-like file manager</td>
</tr>
</tbody>
</table>
<div class="org-src-container">
<pre class="src src-sh">pacman -S --noconfirm \
qutebrowser \
sxiv \
zathura \
mpv \
mpd \
lf \
ncmpcpp \
git \
ytfzf \
tremc \
irssi \
newsboat \
neomutt \
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd1d0220" class="outline-4">
<h4 id="orgd1d0220"><span class="section-number-4">2.9.2.</span> Utilies</h4>
</div>
</div>
<div id="outline-container-orgb2956de" class="outline-3">
<h3 id="orgb2956de"><span class="section-number-3">2.10.</span> Default Shell</h3>
<div class="outline-text-3" id="text-2-10">
<p>
Dash is a fast and minimal shell. Dash deserve to be my bourne shell.
</p>
<div class="org-src-container">
<pre class="src src-sh">rm /bin/sh
ln -s dash /bin/sh
</pre>
</div>
</div>
</div>
<div id="outline-container-orgcf9817b" class="outline-3">
<h3 id="orgcf9817b"><span class="section-number-3">2.11.</span> New User</h3>
<div class="outline-text-3" id="text-2-11">
<p>
Lets create a new user for our system.
Also make sure to add him in wheel group. wheel is a group in arch
linux which get sudo permission. So by putting our user in wheel group
we allow our user to use sudo no password.
</p>
<div class="org-src-container">
<pre class="src src-sh">echo "Enter Username: "
read username
useradd -m -G wheel -s /bin/zsh $username
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
</pre>
</div>
</div>
</div>
<div id="outline-container-org1450104" class="outline-3">
<h3 id="org1450104"><span class="section-number-3">2.12.</span> Setting up for next stage</h3>
<div class="outline-text-3" id="text-2-12">
<div class="org-src-container">
<pre class="src src-sh">echo "Pre-Installation Finish Reboot now"
ai3_path=/home/$username/arch_install3.sh
sed '1,/^#part3$/d' arch_install2.sh > $ai3_path
chown $username:$username $ai3_path
chmod +x $ai3_path
su -c $ai3_path -s /bin/sh $username
</pre>
</div>
</div>
</div>
<div id="outline-container-org2b8e777" class="outline-3">
<h3 id="org2b8e777"><span class="section-number-3">2.13.</span> Sudo Access</h3>
<div class="outline-text-3" id="text-2-13">
<p>
Adding our user to
</p>
</div>
</div>
</div>
<div id="outline-container-orge15d872" class="outline-2">
<h2 id="orge15d872"><span class="section-number-2">3.</span> Stage 2</h2>
<div class="outline-text-2" id="text-3">
</div>
<div id="outline-container-orgd493cde" class="outline-3">
<h3 id="orgd493cde"><span class="section-number-3">3.1.</span> Dotfiles</h3>
<div class="outline-text-3" id="text-3-1">
<p>
Dotfiles are basically the settings for all the programs we have
installed, I use git to manage my dotfiles. All we have to do is close
my dotfiles and that's it.
</p>
<div class="org-src-container">
<pre class="src src-sh">#part3
cd $HOME
git clone --separate-git-dir=$HOME/.dotfiles https://github.com/bugswriter/dotfiles.git tmpdotfiles
rsync --recursive --verbose --exclude '.git' tmpdotfiles/ $HOME/
rm -r tmpdotfiles
alias dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dots config --local status.showUntrackedFiles no
</pre>
</div>
</div>
</div>
<div id="outline-container-org4ffc9c7" class="outline-3">
<h3 id="org4ffc9c7"><span class="section-number-3">3.2.</span> Suckless</h3>
<div class="outline-text-3" id="text-3-2">
</div>
<div id="outline-container-orgcf870b0" class="outline-4">
<h4 id="orgcf870b0"><span class="section-number-4">3.2.1.</span> Window Manager</h4>
<div class="outline-text-4" id="text-3-2-1">
<p>
I'm addicted to suckless's dwm. I find dwm very solid and simple. It
just works for me. I have my custom keybindings and I am addicted to
it now. I don't use many patches. I like to keep things simple. It
fits well with unix philosophy.
</p>
<div class="org-src-container">
<pre class="src src-sh">git clone --depth=1 https://github.com/Bugswriter/dwm.git ~/.local/src/dwm
sudo make -C ~/.local/src/dwm install
</pre>
</div>
</div>
</div>
<div id="outline-container-org59a0999" class="outline-4">
<h4 id="org59a0999"><span class="section-number-4">3.2.2.</span> Terminal</h4>
<div class="outline-text-4" id="text-3-2-2">
<p>
Terminal is crucial to use our OS. Again we are going to go with
suckless. Suckless's simple terminal (aka. st) works fine I prefer
luke smith fork. It comes with some additional goodies.
</p>
<div class="org-src-container">
<pre class="src src-sh">git clone --depth=1 https://github.com/Bugswriter/st.git ~/.local/src/st
sudo make -C ~/.local/src/st install
</pre>
</div>
</div>
</div>
<div id="outline-container-org8399660" class="outline-4">
<h4 id="org8399660"><span class="section-number-4">3.2.3.</span> Menu</h4>
<div class="outline-text-4" id="text-3-2-3">
<p>
We need a menu for not just opening a program but many other purposes
(example - system menu). Dmenu is a perfect all in one thing for that.
</p>
<div class="org-src-container">
<pre class="src src-sh">git clone --depth=1 https://github.com/Bugswriter/dmenu.git ~/.local/src/dmenu
sudo make -C ~/.local/src/dmenu install
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org48ae8fc" class="outline-3">
<h3 id="org48ae8fc"><span class="section-number-3">3.3.</span> Status Bar</h3>
<div class="outline-text-3" id="text-3-3">
<p>
We are gonna use dwmblocks with our dwm for easily managing our status
bar.
</p>
<div class="org-src-container">
<pre class="src src-sh">git clone --depth=1 https://github.com/bugswriter/dwmblocks.git ~/.local/src/dwmblocks
sudo make -C ~/.local/src/dwmblocks install
</pre>
</div>
</div>
</div>
<div id="outline-container-orgab8f21c" class="outline-3">
<h3 id="orgab8f21c"><span class="section-number-3">3.4.</span> Password Prompt</h3>
<div class="outline-text-3" id="text-3-4">
<div class="org-src-container">
<pre class="src src-sh"># dmenu: Dmenu based Password Prompt
git clone --depth=1 https://github.com/ritze/pinentry-dmenu.git ~/.local/src/pinentry-dmenu
sudo make -C ~/.local/src/pinentry-dmenu clean install
</pre>
</div>
</div>
</div>
<div id="outline-container-org94e54a3" class="outline-3">
<h3 id="org94e54a3"><span class="section-number-3">3.5.</span> AUR Helper</h3>
<div class="outline-text-3" id="text-3-5">
<div class="org-src-container">
<pre class="src src-sh">git clone https://aur.archlinux.org/pikaur.git
cd pikaur
makepkg -fsri
</pre>
</div>
</div>
</div>
<div id="outline-container-org766d330" class="outline-3">
<h3 id="org766d330"><span class="section-number-3">3.6.</span> Some AUR Packages</h3>
<div class="outline-text-3" id="text-3-6">
<div class="org-src-container">
<pre class="src src-sh">cd
pikaur -S libxft-bgra-git yt-dlp-drop-in
mkdir dl dox imp music pix pub code
</pre>
</div>
</div>
</div>
<div id="outline-container-org592d14f" class="outline-3">
<h3 id="org592d14f"><span class="section-number-3">3.7.</span> Clean Up</h3>
<div class="outline-text-3" id="text-3-7">
<p>
Config file of xinit (i.e <code>.xinitrc</code>) and .zprofile needs to go on
home. But for sake of cleanup in my dotfiles I keep it insite
<code>~/.config</code>. Here we can create symbolic links for best of the both
worlds.
</p>
<div class="org-src-container">
<pre class="src src-sh">ln -s ~/.config/x11/xinitrc .xinitrc
ln -s ~/.config/shell/profile .zprofile
</pre>
</div>
</div>
</div>
<div id="outline-container-org112c885" class="outline-3">
<h3 id="org112c885"><span class="section-number-3">3.8.</span> Oh My ZSH</h3>
<div class="outline-text-3" id="text-3-8">
<p>
I know it's not cool to use it. But I use it.
</p>
<div class="org-src-container">
<pre class="src src-sh">sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mv ~/.oh-my-zsh ~/.config/zsh/oh-my-zsh
rm ~/.zshrc ~/.zsh_history
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Suraj Kushwah</p>
<p class="date">Created: 2022-12-11 Sun 19:51</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>