Initial commit

This commit is contained in:
Laura Hausmann 2023-02-16 19:04:43 +01:00
commit 74b5060e5a
Signed by untrusted user: zotan
GPG key ID: D044E84C5BE01605
24 changed files with 2540 additions and 0 deletions

View file

@ -0,0 +1,6 @@
Section "ServerFlags"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
Option "BlankTime" "0"
EndSection

View file

@ -0,0 +1,4 @@
[
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]

View file

@ -0,0 +1,9 @@
{
"auto_complete": false,
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
"theme": "Adaptive.sublime-theme"
}

View file

@ -0,0 +1,32 @@
# Colors (Gruvbox dark)
colors:
# Default colors
primary:
# hard contrast: background = '#1d2021'
background: '#282828'
# soft contrast: background = '#32302f'
foreground: '#ebdbb2'
# Normal colors
normal:
black: '#282828'
red: '#cc241d'
green: '#98971a'
yellow: '#d79921'
blue: '#458588'
magenta: '#b16286'
cyan: '#689d6a'
white: '#a89984'
# Bright colors
bright:
black: '#928374'
red: '#fb4934'
green: '#b8bb26'
yellow: '#fabd2f'
blue: '#83a598'
magenta: '#d3869b'
cyan: '#8ec07c'
white: '#ebdbb2'
font:
size: 9.0

View file

@ -0,0 +1,10 @@
timestamp_format long
snapshot_preserve_min latest
snapshot_preserve 7d
target_preserve_min no
target_preserve 21d 10w 6m
snapshot_dir .snapshots
volume /
subvolume .

73
archx-resources/dunstrc Normal file
View file

@ -0,0 +1,73 @@
[global]
monitor = 0
follow = mouse
geometry = "300x5-30+20"
indicate_hidden = yes
shrink = no
transparency = 0
notification_height = 0
separator_height = 2
padding = 8
horizontal_padding = 8
frame_width = 3
frame_color = "#aaaaaa"
separator_color = frame
sort = yes
idle_threshold = 0
font = Monospace 8
line_height = 0
markup = full
format = "<b>%s</b>\n%b"
alignment = left
vertical_alignment = center
show_age_threshold = 60
word_wrap = yes
ellipsize = middle
ignore_newline = no
stack_duplicates = true
hide_duplicate_count = false
show_indicators = yes
icon_position = left
min_icon_size = 0
max_icon_size = 32
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
sticky_history = yes
history_length = 20
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/firefox -new-tab
always_run_script = true
title = Dunst
class = Dunst
startup_notification = false
verbosity = mesg
corner_radius = 0
ignore_dbusclose = false
force_xinerama = false
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
[experimental]
per_monitor_dpi = false
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#222222"
foreground = "#888888"
timeout = 10
[urgency_normal]
background = "#285577"
foreground = "#ffffff"
timeout = 0
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 0

View file

@ -0,0 +1,8 @@
[General]
closeAfterScreenshot=false
disabledTrayIcon=true
drawColor=#ff0000
drawThickness=3
saveAfterCopyPath=/home/laura/Pictures
showDesktopNotification=false
showHelp=false

View file

@ -0,0 +1,147 @@
/**
* ROFI Color theme
* User: mbfraga
* Copyright: Martin B. Fraga
*/
/* global settings and color variables */
* {
maincolor: #ed8712;
highlight: bold #ed8712;
urgentcolor: #e53714;
fgwhite: #cfcfcf;
blackdarkest: #1d1d1d;
blackwidget: #262626;
blackentry: #292929;
blackselect: #454545;
darkgray: #848484;
scrollbarcolor: #505050;
font: "DejaVu Sans Mono Regular 14";
background-color: @blackdarkest;
}
window {
background-color: @blackdarkest;
anchor: north;
location: north;
y-offset: 20%;
}
mainbox {
background-color: @blackdarkest;
spacing:0px;
children: [inputbar, message, mode-switcher, listview];
}
message {
padding: 6px 10px;
background-color:@blackwidget;
}
textbox {
text-color:@darkgray;
background-color:@blackwidget;
}
listview {
fixed-height: false;
dynamic: true;
scrollbar: true;
spacing: 0px;
padding: 1px 0px 0px 0px;
margin: 0px 0px 1px 0px;
background: @blackdarkest;
}
element {
padding: 2px 15px;
}
element normal.normal {
padding: 0px 15px;
background-color: @blackentry;
text-color: @fgwhite;
}
element normal.urgent {
background-color: @blackentry;
text-color: @urgentcolor;
}
element normal.active {
background-color: @blackentry;
text-color: @maincolor;
}
element selected.normal {
background-color: @blackselect;
text-color: @fgwhite;
}
element selected.urgent {
background-color: @urgentcolor;
text-color: @blackdarkest;
}
element selected.active {
background-color: @maincolor;
text-color: @blackdarkest;
}
element alternate.normal {
background-color: @blackentry;
text-color: @fgwhite;
}
element alternate.urgent {
background-color: @blackentry;
text-color: @urgentcolor;
}
element alternate.active {
background-color: @blackentry;
text-color: @maincolor;
}
scrollbar {
background-color: @blackwidget;
handle-color: @darkgray;
handle-width: 15px;
}
mode-switcher {
background-color: @blackwidget;
}
button {
background-color: @blackwidget;
text-color: @darkgray;
}
button selected {
text-color: @maincolor;
}
inputbar {
background-color: @blackdarkest;
spacing: 0px;
}
prompt {
padding:6px 9px;
background-color: @maincolor;
text-color:@blackwidget;
}
entry {
padding:6px 10px;
background-color:@blackwidget;
text-color:@fgwhite;
}
case-indicator {
padding:6px 10px;
text-color:@maincolor;
background-color:@blackwidget;
}

View file

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Emoji config -->
<alias>
<family>Apple Color Emoji</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>Segoe UI Emoji</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>Segoe UI Symbol</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>Noto Emoji</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>Noto Color Emoji</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>Symbola</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>Android Emoji</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>EmojiSymbols</family>
<prefer>
<family>emoji</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>DejaVu Sans</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>DejaVu Serif</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Noto Mono</family>
<family>DejaVu Sans Mono</family>
</prefer>
</alias>
</fontconfig>

View file

@ -0,0 +1,16 @@
[Settings]
gtk-theme-name=Adwaita-dark
gtk-icon-theme-name=Papirus-Dark
gtk-font-name=Cantarell 11
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-decoration-layout=menu:

274
archx-resources/i3_config Normal file
View file

@ -0,0 +1,274 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty; workspace number $ws4
# kill focused window
bindsym $mod+Shift+q kill
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
#bindsym $mod+j focus left
#bindsym $mod+k focus down
#bindsym $mod+l focus up
#bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
#bindsym $mod+Shift+j move left
#bindsym $mod+Shift+k move down
#bindsym $mod+Shift+l move up
#bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
#bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1:[1] web"
set $ws2 "2:[2] chat"
set $ws3 "3:[3] subl"
#set $ws2 "2:[2] left"
#set $ws3 "3:[3] right"
set $ws4 "4:[4] term"
set $ws5 "5:[5] audio"
set $ws6 "6:[6]"
set $ws7 "7:[7]"
set $ws8 "8:[8]"
set $ws9 "9:[9]"
set $ws10 "10:[10]"
# lock workspaces to outputs
#workspace $ws1 output DisplayPort-0
#workspace $ws2 output HDMI-A-0
#workspace $ws3 output DisplayPort-1
#workspace $ws4 output DisplayPort-0
#workspace $ws5 output DisplayPort-0
#workspace $ws6 output DisplayPort-0
#workspace $ws7 output DisplayPort-0
#workspace $ws8 output DisplayPort-0
#workspace $ws9 output DisplayPort-0
#workspace $ws10 output DisplayPort-0
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
# bar {
# status_command i3status
# }
### zotan customizations
#exec --no-startup-id "bash /home/laura/.screenlayout/layout.sh"
exec --no-startup-id "xrdb -merge ~/.Xresources"
exec --no-startup-id "gnome-keyring-daemon -s"
exec --no-startup-id "nitrogen --restore"
exec --no-startup-id "lxpolkit"
#exec --no-startup-id "nm-applet"
#exec --no-startup-id "pasystray"
exec --no-startup-id "parcellite -n"
#exec --no-startup-id "solaar -w hide"
exec --no-startup-id "google-chrome-stable"
exec --no-startup-id "subl3"
exec --no-startup-id "telegram-desktop"
#exec --no-startup-id "spotify"
#exec --no-startup-id "pavucontrol"
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
#exec --no-startup-id "xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Natural Scrolling Enabled' 1"
#exec mpv --player-operation-mode=pseudo-gui
#exec --no-startup-id "setxkbmap -option compose:caps"
#exec --no-startup-id "picom -b"
for_window [class="(?i)google-chrome"] move to workspace $ws1
for_window [class="(?i)google-chrome"] layout tabbed
#for_window [class="(?i)google-chrome"] border none
for_window [class="(?i)subl3"] move to workspace $ws3
for_window [class="(?i)subl3" window_type=normal] border none
for_window [class="(?i)telegram"] move to workspace $ws2
for_window [class="(?i)telegram"] border none
for_window [class="(?i)alacritty"] move to workspace $ws4
for_window [class="(?i)alacritty"] layout tabbed
for_window [class="(?i)spotify"] move to workspace $ws5
for_window [class="(?i)spotify"] layout tabbed
#for_window [class="(?i)mpv"] move to workspace $ws5
#for_window [class="(?i)mpv"] layout tabbed
for_window [title="(?i)no file - mpv"] floating enable
for_window [title="(?i)no file - mpv"] move scratchpad
for_window [class="(?i)pavucontrol"] move to workspace $ws5
#for_window [class="(?i)pavucontrol"] layout tabbed
for_window [class="(?i)blueman"] move to workspace $ws5
#for_window [class="(?i)blueman"] layout tabbed
bindsym $mod+d exec "rofi -show drun -modi drun,run,window,ssh"
bindsym $mod+l exec betterlockscreen -l
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym ctrl+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +1%
bindsym ctrl+XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1%
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness
bindsym ctrl+XF86MonBrightnessUp exec xbacklight -inc 1 # increase screen brightness
bindsym ctrl+XF86MonBrightnessDown exec xbacklight -dec 1 # decrease screen brightness
#bindsym Print exec escrotum -Cs
bindsym Print exec flameshot gui
hide_edge_borders smart
bindsym $mod+period workspace next
bindsym $mod+comma workspace prev
bindsym $mod+space scratchpad show
#bindsym ctrl+$mod+shift+Prior exec --no-startup-id bash -c "echo -n 'ZMON' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+Next exec --no-startup-id bash -c "echo -n 'ZMOFF' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+Up exec --no-startup-id bash -c "echo -n 'MVUP' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+Down exec --no-startup-id bash -c "echo -n 'MVDOWN' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+M exec --no-startup-id bash -c "echo -n 'RCKSK0410370' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+Left exec --no-startup-id bash -c "echo -n 'RCKSK0410787' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+Right exec --no-startup-id bash -c "echo -n 'RCKSK0410788' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+1 exec --no-startup-id bash -c "echo -n 'RCKSK0410349' | timeout 0.1 nc denon 23"
#bindsym ctrl+$mod+shift+2 exec --no-startup-id bash -c "echo -n 'RCKSK0410332' | timeout 0.1 nc denon 23"

View file

@ -0,0 +1,12 @@
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch Polybar, using default config location ~/.config/polybar/config
polybar i3wm &
echo "Polybar launched..."

View file

@ -0,0 +1,10 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Path
Target = usr/share/i18n/locales/iso14651_t1_common
[Action]
Description = Fixing locale sort...
When = PostTransaction
Exec = /usr/bin/bash -c "sed -i 's/<U002E> IGNORE/<U002E> <RES-1>/g' /usr/share/i18n/locales/iso14651_t1_common && locale-gen"

30
archx-resources/mdata Executable file
View file

@ -0,0 +1,30 @@
bar1=" "
bar2=" "
bar3=" "
bar4=" "
bar5=" "
output=$(mmcli -m ANY)
signal=$(echo "$output" | grep -oP '(?<=signal quality: ).*(?=\%)')
if [[ signal -lt 20 ]]; then
echo -n "$bar1"
elif [[ signal -lt 20 ]]; then
echo -n "$bar1"
elif [[ signal -lt 40 ]]; then
echo -n "$bar2"
elif [[ signal -lt 60 ]]; then
echo -n "$bar3"
elif [[ signal -lt 80 ]]; then
echo -n "$bar4"
else
echo -n "$bar5"
fi
echo "$output" | grep -oP '(?<=state: ).*' | cat | head -n 1 | tr -d '\n' | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g"
echo -n ' / '
echo "$output" | grep -oP '(?<=operator name: ).*' | tr -d '\n'
echo -n ' / '
echo "$output" | grep -oP '(?<=access tech: ).*' | tr [a-z] [A-Z] | tr -d '\n'
echo

3
archx-resources/mpv.conf Normal file
View file

@ -0,0 +1,3 @@
loop-playlist=yes
prefetch-playlist=yes
autofit-larger=600x600

View file

@ -0,0 +1,41 @@
[rc]
RCVersion=1
use_copy=true
use_primary=false
synchronize=false
save_history=false
history_pos=false
history_x=1
history_y=1
history_limit=25
data_size=0
item_size=5
automatic_paste=false
auto_key=false
auto_mouse=false
key_input=false
restore_empty=true
rc_edit=false
type_search=false
case_search=false
ignore_whiteonly=false
trim_wspace_begend=false
trim_newline=false
hyperlinks_only=false
confirm_clear=true
current_on_top=true
single_line=true
reverse_history=false
item_length=50
persistent_history=false
persistent_separate=false
persistent_on_top=false
persistent_delim=\\n
nonprint_disp=false
ellipsize=2
multi_user=true
icon_name=parcellite
menu_key=<Ctrl><Alt>P
history_key=<Ctrl><Alt>H
phistory_key=<Ctrl><Alt>X
actions_key=<Ctrl><Alt>A

View file

@ -0,0 +1,480 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #fff
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/i3wm]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 26
;offset-x = 1%
;offset-y = 1%
radius = 1.0
fixed-center = false
bottom = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 0
#border-top-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = Noto Sans:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = i3
;modules-center = mpd
modules-right = pulseaudio eth date
tray-position = right
tray-padding = 2
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %name%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %name%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
strip-wsnumbers = true
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label>
label = BL %percentage%%
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/mdata]
type = custom/script
exec = mdata
interval=1
format-underline = #e65405
[module/wlan]
type = internal/network
interface = wlp4s0
interval = 1.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #d10d0d
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = enp6s0
interval = 3.0
format-connected-underline = #d10d0d
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected-prefix = " "
format-disconnected = <label-disconnected>
format-disconnected-underline = ${self.format-connected-underline}
label-disconnected =
label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 1
date = " %Y-%m-%d"
date-alt = " %Y-%m-%d"
time = %H:%M:%S
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = VOL MM%
label-muted-foreground = #999
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
label-charging = %percentage%+%
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ff942a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
;animation-charging-0 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
;animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
;animation-discharging-0 = 
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
;animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/battery1]
type = internal/battery
battery = BAT1
adapter = ADP1
full-at = 98
label-charging = %percentage%+%
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
;animation-charging-0 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
;animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
;animation-discharging-0 = 
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
;animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View file

@ -0,0 +1,479 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #fff
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/i3wm]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 26
;offset-x = 1%
;offset-y = 1%
radius = 1.0
fixed-center = false
bottom = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
#border-size = 0
border-top-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = Noto Sans:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = i3
;modules-center = mpd
modules-right = pulseaudio wlan eth mdata battery battery1 date
tray-position = right
tray-padding = 2
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %name%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %name%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
strip-wsnumbers = true
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label>
label = BL %percentage%%
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/mdata]
type = custom/script
exec = mdata
interval=1
format-underline = #e65405
[module/wlan]
type = internal/network
interface = wlp4s0
interval = 1.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #d10d0d
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = enp0s31f6
interval = 3.0
format-connected-underline = #d10d0d
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected-prefix = " "
format-disconnected = <label-disconnected>
format-disconnected-underline = ${self.format-connected-underline}
label-disconnected =
label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 1
date = " %Y-%m-%d"
date-alt = " %Y-%m-%d"
time = %H:%M:%S
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = VOL MM%
label-muted-foreground = #999
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
label-charging = %percentage%+%
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ff942a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
;animation-charging-0 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
;animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
;animation-discharging-0 = 
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
;animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/battery1]
type = internal/battery
battery = BAT1
adapter = ADP1
full-at = 98
label-charging = %percentage%+%
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
;animation-charging-0 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
;animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
;animation-discharging-0 = 
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
;animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

Binary file not shown.

View file

@ -0,0 +1 @@
rofi.theme: /usr/share/rofi/themes/flat-orange.rasi

BIN
archx-resources/vmlinuz-linux.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

651
archx.sh Normal file
View file

@ -0,0 +1,651 @@
#!/bin/bash
# Exit on error and pipeline failure
set -eo pipefail
# ---MAIN SCRIPT---
main() {
clear
# cli arguments
if [[ "$#" -ne 1 && "$#" -ne 6 || "$#" -eq 6 && "$2" != "--unattended" ]]; then
echo "Syntax: bash $0 </dev/sdX> [--unattended <hostname> <username> <pwhash> <swapsize>]"
echo "Note: for unattended installation, swapsize 0 = memsize. Also, LUKS is not available for security reasons and profile is assumed to be cli."
exit 1
fi
export disk="$1"
if [[ -d /sys/firmware/efi ]]; then
export efi=1
else
export efi=0
fi
if [[ "$2" == "--unattended" ]]; then
export unattended="true"
export keylayout="us"
export profile="cli"
export luks="false"
export hostname="$3"
export user="$4"
export password="$5"
swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')
swapsize=$(($swapsize/1000))"M"
if [[ "$6" != "0" ]]; then
swapsize="$6"
fi
export swapsize
if [[ -e /etc/netplan/50-cloud-init.yaml ]]; then
export cinetwork="/etc/netplan/50-cloud-init.yaml"
fi
if grep -q "console=ttyS0" /proc/cmdline; then
export consoleboot="console=ttyS0"
if [[ $(tty) != "/dev/ttyS0" ]]; then
exit 1
fi
fi
install
fi
# Keyboard layout selection
export keylayout="us"
loadkeys us
confirm "Do you want to change the keymap from 'us' to 'de-latin1'? [y/N]" && export keylayout="de-latin1" && loadkeys de-latin1
echo "Keymap set to $keylayout."
clear
# profile selection
echo "Profiles:"
echo "cli: barebones system, no Xorg, no DE, no WM. Primarily for servers."
echo "i3: tiling window manager"
echo "kde: KDE desktop environment + big software selection"
echo "gnome: GNOME desktop environment + software selection"
echo
read -p "Profile Selection > " profile
if [[ "$profile" != "cli" && "$profile" != "i3" && "$profile" != "kde" && "$profile" != "gnome" ]]; then
echo "Invalid profile."
exit 1
fi
# LUKS selection
clear
if [[ "$efi" -eq 0 ]]; then
echo "archx does not support LUKS on legacy BIOS systems, skipping..."
export luks="false"
else
echo "Encryption:"
export luks="false"
confirm "Do you want to encrypt your system and swap partitions? [y/N]" && export luks="true"
fi
# Swap size selection
clear
swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')
swapsize=$(($swapsize/1000))"M"
echo "Swap size: $swapsize"
confirm "Per default swap is sized equal to RAM. Customize? [y/N]" && read -p "New swap size > " swapsize
export swapsize
# Hostname selection
clear
read -p "Hostname > " hostname
export hostname
# User/Pass
clear
echo "NOTICE: Keyboard layout is $keylayout!"
if [ "$luks" == "true" ]; then
while [[ "$lukspass" != "$lukspass_verify" ]] || [[ "$lukspass" == "" ]]; do
read -s -p "LUKS password > " lukspass
echo
read -s -p "LUKS password (confirm) > " lukspass_verify
echo
done
export lukspass
fi
read -p "Username > " user
export user
while [[ "$password" != "$password_verify" ]] || [[ "$password" == "" ]]; do
read -s -p "User password > " password
echo
read -s -p "User password (confirm) > " password_verify
echo
done
export password
# VM specific stuff
if [[ -e /etc/netplan/50-cloud-init.yaml ]]; then
export cinetwork="/etc/netplan/50-cloud-init.yaml"
fi
if grep -q "console=ttyS0" /proc/cmdline; then
export consoleboot="console=ttyS0"
fi
# Summary
clear
echo "---Summary---"
echo "Target disk: $disk"
if [[ $efi -eq 1 ]]; then
echo "Mode: UEFI"
else
echo "Mode: Legacy/CSM/BIOS"
fi
if [[ -n $cinetwork ]]; then
echo "Network: cloud-init"
fi
if [[ -n $consoleboot ]]; then
echo "Console boot: enabled"
fi
echo "LUKS: $luks"
echo "Swap size: $swapsize"
echo
echo "Profile: $profile"
echo
echo "Keymap: $keylayout"
echo "Hostname: $hostname"
echo "Username: $user"
echo
confirm "Everything correct? [FINAL PROMPT] [y/N]" && install
echo "Canceling setup."
}
# ---INSTALLER FUNCTIONS---
# Main install function
install(){
clear
echo "---ArchLinux install start---"
pacman_setup
partition_disk
format_root
mkdir /mnt/{boot,home} 2>/dev/null
if [[ $efi -eq 1 ]]; then
mount $bootdev /mnt/boot
fi
pacstrap /mnt base base-devel wget btrfs-progs cryptsetup device-mapper dhcpcd e2fsprogs inetutils linux-firmware linux logrotate lvm2 man-db man-pages mdadm nano netctl perl sysfsutils texinfo usbutils vim xfsprogs openssh pacutils # start the actual install
swapsetup
basic_postinstall
setup_initramfs
install_bootloader
profile_postinstall
unmount
if [[ "$unattended" == "true" ]]; then
reboot
fi
echo "Installation complete! Please reboot now."
exit 0
}
# Set up pacman & keyring
pacman_setup(){
while [[ -e /var/lib/pacman/db.lck ]]; do
echo "Waiting for pacman database to become available..."
sleep 5
done
sed '7iServer = https://arch.zotan.services/$repo/os/$arch\n' /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrors
mv /etc/pacman.d/mirrors /etc/pacman.d/mirrorlist
pacman -Sy --needed --noconfirm archlinux-keyring
pacman -S --needed --noconfirm arch-install-scripts
echo "Waiting for pacman keyring to enter a consistent state..."
sleep 5
pacman-key --populate
if [ ! -f /usr/bin/wget ]; then
pacman -S --needed --noconfirm wget libnewt
fi
}
# Create disk partitions
partition_disk(){
parted -s $disk mklabel gpt
if [[ $efi -eq 1 ]]; then
sgdisk $disk -n=1:0:+1024M -t=1:ef00
sgdisk $disk -n=2:0:-$swapsize
sgdisk $disk -n=3:0:0 -t=2:8200
else
sgdisk $disk -n=1:0:+1M -t=1:ef02
sgdisk $disk -n=2:0:-$swapsize
sgdisk $disk -n=3:0:0 -t=2:8200
fi
# Special naming for eMMC and NVME devices
if [[ "${disk::8}" == "/dev/nvm" || "${disk::8}" == "/dev/mmc" ]]; then
bootdev=$disk"p1"
rootdev=$disk"p2"
swapdev=$disk"p3"
else
bootdev=$disk"1"
rootdev=$disk"2"
swapdev=$disk"3"
fi
export bootdev
export rootdev
export swapdev
# Format ESP to fat32
if [[ $efi -eq 1 ]]; then
mkfs.fat $bootdev
fi
}
format_root(){
if [[ "$luks" == "true" ]]; then
format_root_luks
return
fi
mkswap $swapdev # format swap
mkfs.btrfs -f $rootdev # format root to btrfs
mount $rootdev /mnt
btrfs subvolume create /mnt/@ # new root subvolume
btrfs subvolume set-default /mnt/@ # set as mount-default to prevent boot failures
btrfs subvolume create /mnt/@snapshots # new snapshot subvolume
mkdir -p /mnt/@/var/cache/pacman # create directory so next cmd works
btrfs subvolume create /mnt/@/var/cache/pacman/pkg # exclude pacman cache from snapshots
umount /mnt
mount $rootdev -o subvol=@ /mnt # remount with new root
mkdir /mnt/.snapshots
mount $rootdev -o subvol=@snapshots /mnt/.snapshots # mount snapshots as /.snapshots in new root
}
format_root_luks(){
echo "$lukspass" | cryptsetup -y -v luksFormat $rootdev # setup LUKS partition
echo "$lukspass" | cryptsetup open $rootdev cryptroot # unlock it
mkfs.btrfs -f /dev/mapper/cryptroot # format root to btrfs
mount /dev/mapper/cryptroot /mnt
btrfs subvolume create /mnt/@ # new root subvolume
btrfs subvolume set-default /mnt/@ # set as mount-default to prevent boot failures
btrfs subvolume create /mnt/@snapshots # new snapshots subvolume
mkdir -p /mnt/@/var/cache/pacman
btrfs subvolume create /mnt/@/var/cache/pacman/pkg # exclude pacman cache from snapshots
umount /mnt
mount /dev/mapper/cryptroot -o subvol=@ /mnt # remount with new root
mkdir /mnt/.snapshots
mount /dev/mapper/cryptroot -o subvol=@snapshots /mnt/.snapshots # mount snapshots as /.snapshots in new root
}
swapsetup(){
if [[ "$luks" == "true" ]]; then
# setup encrypted swap
swapuuid=$(blkid -o value -s PARTUUID $swapdev)
echo "swap PARTUUID=$swapuuid /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256" >> /mnt/etc/crypttab
else
swapon $swapdev
fi
}
# sets hostname, keymap, locale, timezone, root password
basic_postinstall(){
echo "$hostname" > /mnt/etc/hostname
echo "KEYMAP=$keylayout" > /mnt/etc/vconsole.conf
echo "EDITOR=nano" >> /mnt/etc/environment
echo "COLORTERM=truecolor" >> /mnt/etc/environment
locale=en_US
echo "LANG=$locale.UTF-8" > /mnt/etc/locale.conf
sed -i '/'$locale'.UTF-8/s/^#//g' /mnt/etc/locale.gen
sed -i 's/<U002E> IGNORE/<U002E> <RES-1>/g' /mnt/usr/share/i18n/locales/iso14651_t1_common
archchroot locale-gen
sed -i 's%#Color%Color%g' /mnt/etc/pacman.conf
sed -i 's%#ParallelDownloads %ParallelDownloads %g' /mnt/etc/pacman.conf
wget -O /mnt/usr/share/libalpm/hooks/locale-fix.hook share.zotan.services/archx-resources/locale-fix.hook
ln -sf /usr/share/zoneinfo/Europe/Berlin /mnt/etc/localtime
archchroot "hwclock --systohc --utc"
if [[ $unattended == "true" ]]; then
arch-chroot /mnt /bin/bash -c "echo 'root:$password' | chpasswd -e"
else
arch-chroot /mnt /bin/bash -c "echo -e '$password\n$password' | passwd root"
fi
if [[ -s /root/.ssh/authorized_keys ]]; then
mkdir -p /mnt/root/.ssh
cp /root/.ssh/authorized_keys /mnt/root/.ssh/authorized_keys
fi
if [[ -n $cinetwork ]]; then
cp /run/systemd/network/*.link /mnt/etc/systemd/network/10-cloud-init.link || : # ignore failures because file doesn't exist
cp /run/systemd/network/*.network /mnt/etc/systemd/network/50-cloud-init.network || : # ignore failures because file doesn't exist
cat /mnt/etc/systemd/network/50-cloud-init.network | grep -E 'DNS|Domains' | sed 's/DNS=/nameserver /g' | sed 's/Domains=/search /g' >> /mnt/etc/resolv.conf
archchroot "systemctl enable systemd-networkd"
fi
}
# sets up fstab, initramfs as well as encrypted swap if LUKS is enabled
setup_initramfs(){
partprobe $disk # make sure the kernel has the correct device uuids
genfstab -U -p /mnt > /mnt/etc/fstab
if [[ "$luks" == "true" ]]; then
echo "/dev/mapper/swap none swap defaults 0 0" >> /mnt/etc/fstab
sed -i "s/HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt filesystems fsck)/g" /mnt/etc/mkinitcpio.conf
archchroot "mkinitcpio -p linux"
fi
# add nvme module to initramfs if rootdevice is on a nvme drive
if [ "${disk::8}" == "/dev/nvm" ]; then
sed -i "s/MODULES=()/MODULES=(nvme)/g" /mnt/etc/mkinitcpio.conf
archchroot "mkinitcpio -p linux"
fi
}
# installs either refind or grub
install_bootloader(){
if [[ "$efi" -eq 1 ]]; then
install_refind
else
install_grub
fi
}
install_refind(){
pacstrap /mnt refind
archchroot "refind-install --usedefault $bootdev"
rootuuid=$(blkid -s UUID -o value $rootdev)
if [[ -n $consoleboot ]]; then
cmdline="rw add_efi_memmap $consoleboot"
else
cmdline="rw add_efi_memmap"
fi
if [[ "$luks" == "true" ]]; then
echo "\"Arch Linux \" \"cryptdevice=UUID=$rootuuid:cryptroot root=/dev/mapper/cryptroot $cmdline fbcon=nodefer quiet\"" > /mnt/boot/refind_linux.conf
echo "\"Arch Linux Verbose \" \"cryptdevice=UUID=$rootuuid:cryptroot root=/dev/mapper/cryptroot $cmdline fbcon=nodefer\"" >> /mnt/boot/refind_linux.conf
echo "\"Arch Linux Fallback\" \"cryptdevice=UUID=$rootuuid:cryptroot root=/dev/mapper/cryptroot $cmdline initrd=/initramfs-linux-fallback.img fbcon=nodefer quiet\"" >> /mnt/boot/refind_linux.conf
echo "\"Arch Linux Terminal\" \"cryptdevice=UUID=$rootuuid:cryptroot root=/dev/mapper/cryptroot $cmdline systemd.unit=multi-user.target fbcon=nodefer quiet\"" >> /mnt/boot/refind_linux.conf
else
echo "\"Arch Linux \" \"root=UUID=$rootuuid $cmdline quiet\"" > /mnt/boot/refind_linux.conf
echo "\"Arch Linux Verbose \" \"root=UUID=$rootuuid $cmdline\"" >> /mnt/boot/refind_linux.conf
echo "\"Arch Linux Fallback\" \"root=UUID=$rootuuid $cmdline initrd=/initramfs-linux-fallback.img quiet\"" >> /mnt/boot/refind_linux.conf
echo "\"Arch Linux Terminal\" \"root=UUID=$rootuuid $cmdline systemd.unit=multi-user.target quiet\"" >> /mnt/boot/refind_linux.conf
fi
sed -i 's/timeout 20/timeout 5/g' /mnt/boot/EFI/BOOT/refind.conf
sed -i 's/install, shell, bootorder, gdisk, memtest, mok_tool, apple_recovery, windows_recovery, about, //g' /mnt/boot/EFI/BOOT/refind.conf
sed -i 's/#use_graphics_for osx,linux/use_graphics_for osx,linux/g' /mnt/boot/EFI/BOOT/refind.conf
wget share.zotan.services/archx-resources/vmlinuz-linux.png -O /mnt/boot/vmlinuz-linux.png
wget share.zotan.services/archx-resources/refind-theme.tar -O /mnt/tmp/refind-theme.tar
tar xvf /mnt/tmp/refind-theme.tar -C /mnt/boot/EFI/BOOT
rm /mnt/tmp/refind-theme.tar
echo "include refind-theme-regular/theme.conf" >> /mnt/boot/EFI/BOOT/refind.conf
}
install_grub(){
pacstrap /mnt grub
mkdir /mnt/boot/grub
if [[ -n $consoleboot ]]; then
sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX=\"'$consoleboot'\"/g' /mnt/etc/default/grub
fi
archchroot "grub-mkconfig -o /boot/grub/grub.cfg"
archchroot "grub-install --target=i386-pc --recheck $disk"
}
# runs postinstall of selected profile
profile_postinstall(){
if [[ "$profile" == "cli" ]]; then
postinstall_cli
elif [[ "$profile" == "i3lite" ]]; then
postinstall_i3
elif [[ "$profile" == "kde" ]]; then
postinstall_kde
elif [[ "$profile" == "gnome" ]]; then
postinstall_gnome
fi
archchroot "btrfs subvolume snapshot / /.snapshots/postinstall"
}
# installs git, entropy harvesting daemon, ssh, neofetch and htop
# adds the destiny repo to pacman
# adds the user & sets the password
# enables network
# creates backup snapshot
postinstall_cli(){
# run this entire thing in new root
archchroot "/bin/bash" <<"EOS"
set -eo pipefail
curl https://share.zotan.services/repo.sh | bash
killall gpg-agent
pacman -Syu --needed --noconfirm git haveged neofetch htop dialog zsh kernel-modules-hook nftables yay
systemctl enable haveged sshd
sed -i 's%#PasswordAuthentication yes%PasswordAuthentication no%g' /etc/ssh/sshd_config
systemctl mask systemd-resolved
systemctl enable linux-modules-cleanup
systemctl enable systemd-timesyncd
groupadd sudo -g 666
echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
cat /etc/makepkg.conf | sed "s/xz -c -z -)/xz -c -z - --threads=0)/g" > /tmp/makepkg.conf; mv /tmp/makepkg.conf /etc/makepkg.conf
useradd "$user"
if [[ $unattended == "true" ]]; then
echo "$user:$password" | chpasswd -e
else
echo -e "$password\n$password" | passwd "$user"
fi
usermod -aG sudo "$user"
usermod -aG adm "$user"
mkdir /home/"$user"
chown "$user":"$user" /home/"$user"
if [[ -s /root/.ssh/authorized_keys ]]; then
mkdir -p /home/$user/.ssh
cp /root/.ssh/authorized_keys /home/$user/.ssh/authorized_keys
chown $user:$user /home/$user/.ssh/authorized_keys
fi
if [[ -z $cinetwork ]]; then
systemctl enable dhcpcd
fi
chsh -s /bin/zsh $user
chsh -s /bin/zsh root
wget share.zotan.services/prezto.sh -O /tmp/prezto.sh
sudo -u $user zsh /tmp/prezto.sh
zsh /tmp/prezto.sh
btrfs subvolume snapshot / /.snapshots/basesystem
EOS
}
postinstall_xorg(){
postinstall_cli
archchroot "/bin/bash" <<"EOS"
set -eo pipefail
pacman -S --needed --noconfirm xorg-server xorg-drivers ttf-opensans ttf-dejavu ttf-hack ttf-liberation networkmanager
EOS
if [[ "$keylayout" == "us" ]]; then
return
fi
cat <<EOF > /mnt/etc/X11/xorg.conf.d/00-keyboard.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "de"
Option "XkbModel" "pc105"
Option "XkbVariant" "deadacute"
EndSection
EOF
}
postinstall_i3(){
postinstall_xorg
archchroot "/bin/bash" <<"EOS"
set -eo pipefail
pacman -S --needed --noconfirm i3-wm polybar archlinux-themes-sddm gnome-icon-theme gnome-icon-theme-symbolic gnome-icon-theme-extras adwaita-icon-theme alacritty sddm betterlockscreen
systemctl enable sddm
echo -e "[Autologin]\nRelogin=false\nSession=\nUser=\n\n[General]\nHaltCommand=/usr/bin/systemctl poweroff\nRebootCommand=/usr/bin/systemctl reboot\n\n[Theme]\nCurrent=archlinux-simplyblack\nCursorTheme=Adwaita\n\n[Users]\nMaximumUid=60000\nMinimumUid=1000" > /etc/sddm.conf
systemctl enable betterlockscreen@$user
systemctl disable dhcpcd
systemctl enable NetworkManager
# customizations
pacman -S --needed --noconfirm google-chrome acpi insync rclone neofetch ccid libusb-compat pcsclite ncdu aria2 noto-fonts noto-fonts-cjk noto-fonts-extra noto-fonts-emoji-apple wireguard-tools p7zip papirus-icon-theme telegram-desktop sublime-text-4 siji-git bluez bluez-utils \
dunst etcher-bin blueman bluez-tools btrbk cli-visualizer cronie evince exfat-utils flameshot freerdp remmina geeqie gimp gnome-themes-extra idevicerestore-git iftop jq syncthing mpv lxappearance lxsession \
mediainfo mumble nautilus net-tools network-manager-applet nitrogen nfs-utils nmap ntfs-3g openssl-1.0 parcellite pasystray pavucontrol platformio postman-bin pulseaudio-alsa pulseaudio-bluetooth pulseaudio-zeroconf python-pip rclone rofi solaar spotify \
sshuttle topgrade xorg-xrdb youtube-dl yubikey-manager yubikey-manager-qt gnome-keyring xorg-xinput libldac openbsd-netcat
systemctl enable cronie
systemctl enable libvirtd
systemctl enable libvirt-guests
wget https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-u2f.rules -O /etc/udev/rules.d/70-u2f.rules
echo 'ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0116|0111", MODE="660", GROUP="scard"' > 71-gnupg-ccid.rules
mv 71-gnupg-ccid.rules /etc/udev/rules.d/71-gnupg-ccid.rules
systemctl enable pcscd.socket
sudo -u $user dbus-launch gsettings set org.gnome.desktop.interface icon-theme 'Papirus'
sudo -u $user dbus-launch gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
sudo -u $user dbus-launch gsettings set org.gnome.desktop.wm.preferences theme 'Adwaita-dark'
echo '--force-dark-mode' > /home/$user/.config/chrome-flags.conf
wget https://share.zotan.services/archx-resources/fontconfig -O /etc/fonts/local.conf
mkdir -p /etc/btrbk
wget https://share.zotan.services/archx-resources/btrbk.conf -O /etc/btrbk/btrbk.conf
sudo -u $user mkdir -p /home/$user/.config/i3
sudo -u $user wget https://share.zotan.services/archx-resources/i3_config -O /home/$user/.config/i3/config
sudo -u $user mkdir -p /home/$user/.config/polybar
sudo -u $user wget https://share.zotan.services/archx-resources/launch_polybar.sh -O /home/$user/.config/polybar/launch.sh
chmod +x /home/$user/.config/polybar/launch.sh
sudo -u $user mkdir -p /home/$user/.config/alacritty
sudo -u $user wget https://share.zotan.services/archx-resources/alacritty.yml -O /home/$user/.config/alacritty/alacritty.yml
sudo -u $user mkdir -p /home/$user/.config/flameshot
sudo -u $user wget https://share.zotan.services/archx-resources/flameshot.ini -O /home/$user/.config/flameshot/flameshot.ini
sudo -u $user mkdir -p /home/$user/.config/mpv
sudo -u $user wget https://share.zotan.services/archx-resources/mpv.conf -O /home/$user/.config/mpv/mpv.conf
sudo -u $user mkdir -p /home/$user/.config/sublime-text-3/Packages/User
sudo -u $user wget https://share.zotan.services/archx-resources/Preferences.sublime-settings -O /home/$user/.config/sublime-text-3/Packages/User/Preferences.sublime-settings
sudo -u $user wget https://share.zotan.services/archx-resources/Default_Linux.sublime-keymap -O /home/$user/.config/sublime-text-3/Packages/User/Default\ \(Linux\).sublime-keymap
sudo -u $user mkdir -p /home/$user/.config/dunst
sudo -u $user wget https://share.zotan.services/archx-resources/dunstrc -O /home/$user/.config/dunst/dunstrc
sudo -u $user mkdir -p /home/$user/.config/parcellite
sudo -u $user wget https://share.zotan.services/archx-resources/parcellitec -O /home/$user/.config/parcellite/parcelliterc
sudo -u $user mkdir -p /home/$user/.config/gtk-3.0
sudo -u $user wget https://share.zotan.services/archx-resources/gtk3-settings.ini -O /home/$user/.config/gtk-3.0/settings.ini
sudo -u $user mkdir -p /home/$user/.config/rofi
mkdir -p /usr/share/rofi/themes/
sudo -u $user wget https://share.zotan.services/archx-resources/rofi_config -O /home/$user/.config/rofi/config
wget https://share.zotan.services/archx-resources/flat-orange.rasi -O /usr/share/rofi/themes/flat-orange.rasi
mkdir -p /var/spool/cron
echo 'export COLORTERM=truecolor' >> /etc/profile
echo 'export EDITOR=nano' >> /etc/profile
echo '@hourly btrbk run -v' >> /var/spool/cron/root
echo 'Xcursor.size: 16' > /home/$user/.Xresources
chown $user:$user /home/$user/.Xresources
sudo -u $user wget https://share.zotan.services/archx-resources/polybar_config -O /home/$user/.config/polybar/config
mkdir -p /etc/X11/xorg.conf.d
wget https://share.zotan.services/archx-resources/10-monitor.conf -O /etc/X11/xorg.conf.d/10-monitor.conf
EOS
}
postinstall_kde(){
postinstall_xorg
archchroot "/bin/bash" <<"EOS"
set -eo pipefail
pacman -S --needed --noconfirm plasma plasma-meta konsole dolphin kdialog sddm
systemctl enable sddm
echo -e "[Autologin]\nRelogin=false\nSession=\nUser=\n\n[General]\nHaltCommand=/usr/bin/systemctl poweroff\nRebootCommand=/usr/bin/systemctl reboot\n\n[Theme]\nCurrent=breeze\nCursorTheme=Adwaita\n\n[Users]\nMaximumUid=60000\nMinimumUid=1000" > /etc/sddm.conf
systemctl disable dhcpcd
systemctl enable NetworkManager
EOS
}
postinstall_gnome(){
postinstall_xorg
archchroot "/bin/bash" <<"EOS"
set -eo pipefail
pacman -S --needed --noconfirm gnome gnome-extra
systemctl enable gdm
systemctl disable dhcpcd
systemctl enable NetworkManager
EOS
}
### postinstall_zotan_gnome(){
### postinstall_gnome
### archchroot "/bin/bash" <<"EOS"
### sudo pacman -S --needed --noconfirm google-chrome acpi insync rclone neofetch ccid libusb-compat pcsclite ncdu aria2 noto-fonts noto-fonts-cjk noto-fonts-extra ttf-joypixels zsh texlive-most biber wireguard-tools networkmanager-wireguard-git p7zip papirus-icon-theme adapta-gtk-theme telegram-desktop sublime-text-nightly
### sudo wget https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-u2f.rules -O /etc/udev/rules.d/70-u2f.rules
### echo 'ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0116|0111", MODE="660", GROUP="scard"' > 71-gnupg-ccid.rules
### sudo mv 71-gnupg-ccid.rules /etc/udev/rules.d/71-gnupg-ccid.rules
### sudo systemctl enable pcscd.socket
### sudo -u $user dbus-launch gsettings set org.gnome.desktop.interface icon-theme 'Papirus'
### sudo -u $user dbus-launch gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
### sudo -u $user dbus-launch gsettings set org.gnome.desktop.wm.preferences theme 'Adwaita-dark'
### echo '--force-dark-mode' > /home/$user/.config/chrome-flags.conf
### sudo wget https://gist.githubusercontent.com/lhaus/f857f10d5aac2b48a03f41e685f5109d/raw/16eba11e83648fa2a2f9ba7b5865f361e0f45247/fontconfig -O /etc/fonts/local.conf
### EOS
### }
###
### postinstall_zotan_kde(){
### postinstall_kde
### archchroot "/bin/bash" <<"EOS"
### sudo pacman -S --needed --noconfirm google-chrome acpi insync rclone neofetch ccid libusb-compat pcsclite ncdu aria2 noto-fonts noto-fonts-cjk noto-fonts-extra ttf-joypixels zsh texlive-most biber wireguard-tools networkmanager-wireguard-git p7zip papirus-icon-theme adapta-gtk-theme telegram-desktop sublime-text-nightly
### sudo pacman -S --needed --noconfirm okular kleopatra spectacle libdbusmenu-glib libdbusmenu-gtk2 libdbusmenu-gtk3 appmenu-gtk-module ntfs-3g
### sudo wget https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-u2f.rules -O /etc/udev/rules.d/70-u2f.rules
### echo 'ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0116|0111", MODE="660", GROUP="scard"' > 71-gnupg-ccid.rules
### sudo mv 71-gnupg-ccid.rules /etc/udev/rules.d/71-gnupg-ccid.rules
### sudo systemctl enable pcscd.socket
### echo '--force-dark-mode' > /home/$user/.config/chrome-flags.conf
### sudo wget https://gist.githubusercontent.com/lhaus/f857f10d5aac2b48a03f41e685f5109d/raw/16eba11e83648fa2a2f9ba7b5865f361e0f45247/fontconfig -O /etc/fonts/local.conf
### EOS
### }
# Unmount all disks
unmount(){
umount -R /mnt
if [[ "$luks" == "true" ]]; then
cryptsetup luksClose /dev/mapper/cryptroot
else
swapoff "$swapdev"
fi
}
# ---HELPER FUNCTIONS---
confirm() {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case "$response" in
[yYzZ][eE][sS]|[yYzZ])
true
;;
*)
false
;;
esac
}
archchroot(){
arch-chroot /mnt $1
}
main $@

149
macx-resources/Brewfile Normal file
View file

@ -0,0 +1,149 @@
# taps
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/services"
tap "osx-cross/arm"
tap "osx-cross/avr"
tap "qmk/qmk"
# system tools
brew "jq"
brew "mtr"
brew "mpc"
brew "wget"
brew "htop"
brew "nano"
brew "ldns" # provides drill
brew "whois"
brew "watch"
brew "iperf3"
brew "ncmpcpp"
brew "openssh"
brew "topgrade"
brew "media-info"
brew "iproute2mac"
brew "pinentry-mac"
brew "wireguard-tools"
# basic desktop apps
cask "iterm2"
cask "element"
cask "telegram"
cask "rectangle"
cask "sublime-text"
# desktop apps - utilities
cask "mp3tag"
# libraries
## TODO / FIXME
brew "gettext"
brew "sqlite"
brew "aria2"
brew "icu4c"
brew "boost"
brew "bat"
brew "glib"
brew "python@3.9"
brew "cmake"
brew "unbound"
brew "harfbuzz"
brew "tesseract"
brew "ffmpeg"
brew "gcc"
brew "git"
brew "git-lfs"
brew "libgpg-error"
brew "libgcrypt"
brew "gperf"
brew "libheif"
brew "imagemagick"
brew "libraqm"
brew "mas"
brew "taglib"
brew "neofetch"
brew "ninja"
brew "nmap"
brew "openssl@3"
brew "pandoc"
brew "tcl-tk"
brew "platformio"
brew "protobuf"
brew "pyenv"
brew "qrencode"
brew "ripgrep"
brew "rust-analyzer"
brew "rustup-init"
brew "smartmontools"
brew "sshuttle"
brew "stress"
brew "syncthing", restart_service: true
brew "uncrustify"
brew "xdelta"
brew "yt-dlp"
brew "qmk/qmk/qmk"
cask "alfred"
cask "amorphousdiskmark"
cask "anydesk"
cask "audacity"
cask "avibrazil-rdm"
cask "avidemux"
cask "balenaetcher"
cask "bartender"
cask "calibre"
cask "carbon-copy-cloner"
cask "contexts"
cask "daisydisk"
cask "dash"
cask "db-browser-for-sqlite"
cask "discord"
cask "dotnet-sdk"
cask "firefox"
cask "fl-studio"
cask "gimp"
cask "google-chrome"
cask "google-drive"
cask "gpg-suite"
cask "hex-fiend"
cask "iina"
cask "inkscape"
cask "itch"
cask "itsycal"
cask "jetbrains-toolbox"
cask "little-snitch"
cask "maciasl"
cask "mactex-no-gui"
cask "melonds"
cask "nheko"
cask "obs"
cask "obsidian"
cask "plistedit-pro"
cask "pokemon-reborn"
cask "pokemon-showdown"
cask "pokemon-trading-card-game-online"
cask "setapp"
cask "signal"
cask "spotify"
cask "steam"
cask "telegram-desktop" # for testing
cask "topnotch"
cask "transmit"
cask "viscosity"
cask "wireshark"
mas "Amphetamine", id: 937984704
mas "Boop", id: 1518425043
mas "Developer", id: 640199958
mas "ICE Buddy", id: 1595947689
mas "Key Codes", id: 414568915
mas "Keynote", id: 409183694
mas "Navigator", id: 1590354537
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "Reeder", id: 1529448980

31
macx.sh Normal file
View file

@ -0,0 +1,31 @@
#!/bin/bash
echo "--- Installing homebrew ---"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
echo "--- Downloading Brewfile ---"
curl -o Brewfile https://share.zotan.services/macx-resources/Brewfile
echo "--- Running brew bundle ---"
brew bundle
echo "--- Running postinstall steps ---"
echo "Configuring pinentry-mac"
mkdir -p ~/.gnupg
echo "pinentry-program /opt/homebrew/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
echo "Configuring dock autohide"
defaults write com.apple.dock autohide -int 1
defaults write com.apple.dock autohide-delay -int 0
defaults write com.apple.dock autohide-time-modifier -float 0.4
killall Dock
echo "Disabling font smoothing"
defaults -currentHost write -g AppleFontSmoothing -int 0
####
echo
echo "All done. Please reboot to make sure everything is applied."