| @@ -0,0 +1,26 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4:ft=zsh:syn=zsh:fenc=utf8: | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## Install packages | ||
| packages=( | ||
| 'intel-ucode' 'linux' 'linux-headers' 'linux-firmware' | ||
| 'linux-api-headers' 'util-linux' 'systemd' 'efibootmgr' | ||
| 'syslinux' 'gptfdisk' | ||
| ) | ||
|
|
||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| for _i in "${packages[@]}" ; do pacman -S "${pacargs[@]}" $_i ; done | ||
|
|
||
| ## Install the bootloader | ||
| syslinux-install_update -iam | ||
|
|
||
| ## Copy the bootloader files to necessary location | ||
| botimg="/root/install/files/boot/syslinux/boot.png" | ||
| config="/root/install/files/boot/syslinux/syslinux.cfg" | ||
|
|
||
| [[ -d /boot/syslinux ]] && cp -iv $botimg /boot/syslinux/boot.png | ||
| [[ -d /boot/syslinux ]] && cp -iv $config /boot/syslinux/syslinux.cfg | ||
|
|
| @@ -0,0 +1,36 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| # regular fonts | ||
| packages=( | ||
| 'ttf-bitstream-vera' 'ttf-cheapskate' 'ttf-dejavu' 'gsfonts' | ||
| 'ttf-freefont' 'ttf-linux-libertine' 'ttf-oxygen' 'ttf-inconsolata' | ||
| 'opendesktop-fonts' 'ttf-anonymous-pro' 'ttf-droid' 'ttf-ionicons' | ||
| 'ttf-fira-mono' 'ttf-fira-sans' 'ttf-gentium' 'gnu-free-fonts' | ||
| 'ttf-liberation' 'ttf-linux-libertine-g' 'ttf-symbola' 'ttf-ubuntu-font-family' | ||
| 'fontconfig' 'freetype2' 'terminus-font' | ||
| ) | ||
| # xorg font rendering packages | ||
| packages+=( | ||
| 'xorg-font-util' 'xorg-font-utils' 'xorg-fonts-100dpi' 'xorg-fonts-75dpi' | ||
| 'xorg-fonts-alias' 'xorg-fonts-encodings' 'xorg-fonts-misc' 'xorg-xlsfonts' | ||
| 'xorg-xfd' 'xorg-fonts-type1' 'xorg-fonts-cyrillic' | ||
| ) | ||
| # symbolic (kanji, mandarin, etc) fonts | ||
| packages+=( | ||
| 'ttf-arphic-ukai' 'ttf-arphic-uming' 'ttf-baekmuk' 'ttf-freebanglafont' | ||
| 'ttf-hannom' 'ttf-indic-otf' 'ttf-junicode' 'ttf-khmer' 'ttf-mph-2b-damase' | ||
| 'ttf-sazanami' 'ttf-tibetan-machine' 'ttf-tlwg' 'ttf-ubraille' 'ttf-hanazono' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,25 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'arch-wiki-lite' 'arch-wiki-docs' 'bash-docs' 'freedesktop-docs' | ||
| 'gcc-docs' 'gconfmm-docs' 'glib2-docs' 'grails-docs' 'groovy-docs' | ||
| 'linux-docs' 'linux-grsec-docs' 'linux-lts-docs' 'linux-zen-docs' | ||
| 'mygui-docs' 'ogre-docs' 'pangomm-docs' 'php-docs' 'postgresql-docs' | ||
| 'python2-docs' 'python-docs' 'python-lxml-docs' 'python-webob-docs' | ||
| 'ruby-docs' 'scala-docs' 'zsh-doc' 'flac-doc' 'gap-doc' 'gtk-doc' | ||
| 'qt5-doc' 'sqlite-doc' 'vigra-doc' 'sagemath-doc' 'xorg-docs' | ||
| 'imagemagick-doc' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,22 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'alsa-firmware' 'alsa-lib' 'alsa-plugins' 'alsa-tools' 'alsa-utils' 'libao' | ||
| 'pulseaudio' 'pulseaudio-alsa' 'libpulse' 'libcanberra-pulse' 'pulseaudio-lirc' | ||
| 'libcanberra' 'pavucontrol' | ||
| 'lib32-alsa-lib' 'lib32-alsa-plugins' 'lib32-libcanberra-pulse' | ||
| 'lib32-libpulse' 'lib32-libcanberra' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,22 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'bzip2' 'gzip' 'lz4' 'lzo' 'xz' 'zlib' 'gsm' 'libmspack' 'lzop' 'snappy' | ||
| 'p7zip' 'unrar' 'zip' 'avfs' 'blosc' 'libewf' 'lrzip' 'mac' 'ucl' | ||
| 'ecm-tools' 'rpmextract' 'unzip' 'libzip' 'zziplib' 'cpio' 'unp' | ||
| 'unarj' 'arj' 'atool' 'unace' 'libarchive' | ||
| 'lib32-bzip2' 'lib32-xz' 'lib32-zlib' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,24 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'btrfs-progs' 'dosfstools' 'f2fs-tools' 'exfat-utils' 'fatsort' | ||
| 'hfsprogs' 'shfs-utils' 'squashfs-tools' 'sshfs' 'mtools' | ||
| 'reiserfsprogs' 'progsreiserfs' 'e2fsprogs' 'filesystem' 'jfsutils' | ||
| 'xfsprogs' 'cifs-utils' 'fuse' 'ntfs-3g' 'curlftpfs' | ||
| 'encfs' 'ecryptfs-utils' 'ext4magic' 'fuseiso' 'lib32-e2fsprogs' | ||
| 'shfs-utils' 'schroot' 'mtpfs' 'nfs-utils' 'libnfs' | ||
| 'nilfs-utils' 's3fs-fuse' 'curlftpfs' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,21 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'vim' 'vim-runtime' 'vim-spell-en' 'vim-airline' 'vim-fugitive' | ||
| 'vim-nerdtree' 'vim-syntastic' 'vim-systemd' 'vimpager' | ||
| 'aspell' 'aspell-en' 'hunspell' 'hunspell-en' 'hyphen' 'hyphen-en' | ||
| 'libmythes' 'mythes-en' 'psiconv' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,23 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'xorg-server' 'xorg-server-common' 'xorg-server-utils' 'xorg-server-xdmx' | ||
| 'xorg-xinit' 'xorg-apps' 'xorg-appres' 'xorg-util-macros' 'xorg-utils' | ||
| 'xf86-input-synaptics' 'xf86-input-evdev' | ||
| ) | ||
|
|
||
| ## xorg.conf | ||
| config="/etc/X11/xorg.conf" | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'mesa' 'mesa-vdpau' 'mesa-demos' 'mesa-libgl' | ||
| 'glu' 'libvdpau-va-gl' 'libtxc_dxtn' | ||
| 'lib32-mesa' 'lib32-mesa-vdpau' 'lib32-mesa-demos' | ||
| 'lib32-mesa-libgl' 'lib32-glu' 'lib32-libtxc_dxtn' | ||
| 'xf86-video-vesa' | ||
| 'xf86-video-intel' 'intel-tbb' 'vulkan-intel' 'libva-intel-driver' | ||
| 'lib32-libva-intel-driver' | ||
| 'xf86-input-synaptics' | ||
| #'xf86-video-ati' | ||
| #'' | ||
| #'xf86-video-nouveau' | ||
| #'' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'gst-plugins-base' 'gst-plugins-base-libs' 'gst-plugins-good' 'gst-libav' | ||
| 'lib32-gst-plugins-base' 'lib32-gst-plugins-base-libs' 'lib32-gst-plugins-good' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER != "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| '' | ||
| '' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,18 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER != "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| 'openbox' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER != "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| '' | ||
| '' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4: | ||
| ## start of file | ||
|
|
||
| [[ $USER == "root" ]] || return 1 | ||
|
|
||
| ## define packages | ||
| packages=( | ||
| '' | ||
| '' | ||
| ) | ||
|
|
||
| ## define pacman -S options | ||
| pacargs=( '--asexplicit' '--needed' '--noconfirm' ) | ||
|
|
||
| ## install all the packages | ||
| for _i in "${packages[@]}"; do pacman -S "${pacargs[@]}" -- $_i; done | ||
|
|
||
| ## end of file |
| @@ -0,0 +1,201 @@ | ||
| #!/usr/bin/zsh | ||
| ## vim:nonu:ai:et:ts=4:sw=4:fenc=utf8:fdm=marker: | ||
|
|
||
| ## pacman.conf {{{ | ||
| cp -v /etc/pacman.conf /etc/default/pacman-default.conf | ||
| cat > /etc/pacman.conf <<EOF | ||
| ## vim:nonu:ai:et:ts=4:sw=4 | ||
| ## General Options | ||
| ##---------------- | ||
| [options] | ||
| #RootDir = / | ||
| #DBPath = /var/lib/pacman/ | ||
| #CacheDir = /var/cache/pacman/pkg/ | ||
| #LogFile = /var/log/pacman.log | ||
| #GPGDir = /etc/pacman.d/gnupg/ | ||
| #HookDir = /etc/pacman.d/hooks/ | ||
| HoldPkg = pacman glibc | ||
| #XferCommand = /usr/bin/curl -C - -f %u > %o | ||
| #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u | ||
| #CleanMethod = KeepInstalled | ||
| #UseDelta = 0.7 | ||
| Architecture = auto | ||
| ## blacklist packages/groups | ||
| ##-------------------------- | ||
| #IgnorePkg = | ||
| #IgnoreGroup = | ||
| #NoUpgrade = | ||
| #NoExtract = | ||
| ## Misc Options | ||
| ##------------- | ||
| ILoveCandy | ||
| UseSyslog | ||
| Color | ||
| TotalDownload | ||
| CheckSpace | ||
| VerbosePkgLists | ||
| ## Default trust | ||
| ##-------------- | ||
| SigLevel = Required DatabaseOptional | ||
| LocalFileSigLevel = Optional | ||
| #RemoteFileSigLevel = Required | ||
| ## Main Repositories | ||
| ##------------- | ||
| [core] | ||
| Include = /etc/pacman.d/mirrorlist | ||
| [extra] | ||
| Include = /etc/pacman.d/mirrorlist | ||
| [community] | ||
| Include = /etc/pacman.d/mirrorlist | ||
| [multilib] | ||
| Include = /etc/pacman.d/mirrorlist | ||
| ## Testing Repositories | ||
| ##--------------------- | ||
| #[testing] | ||
| #Include = /etc/pacman.d/mirrorlist | ||
| #[community-testing] | ||
| #Include = /etc/pacman.d/mirrorlist | ||
| #[multilib-testing] | ||
| #Include = /etc/pacman.d/mirrorlist | ||
| ## Other Repositories | ||
| ##------------------- | ||
| EOF | ||
| #}}} | ||
| ## mkinitcpio.conf {{{ | ||
| cp /etc/mkinitcpio.conf /etc/default/mkinitcpio-default.conf | ||
| cat > /etc/mkinitcpio.conf <<EOF | ||
| ## vim:nonu:ft=sh: | ||
| MODULES="vfat ext4 nvme dm_mod dm_crypt aes_x86_64" | ||
| BINARIES="" | ||
| FILES="" | ||
| HOOKS="base udev block autodetect modconf lvm2 filesystems keyboard fsck shutdown" | ||
| COMPRESSION="gzip" | ||
| #COMPRESSION_OPTIONS="" | ||
| EOF | ||
| #}}} | ||
| ## makepkg.conf {{{ | ||
| cp -v /etc/makepkg.conf /etc/default/makepkg-default.conf | ||
| sed -i 's|^#MAKEFLAGS|MAKEFLAGS|;s|^MAKEFLAGS=.*$|MAKEFLAGS="-j$()"|' /etc/makepkg.conf | ||
| sed -i 's|^#BUILDDIR|BUILDDIR|;s|^BUILDDIR=.*$|BUILDDIR=/pkgtmp|' /etc/makepkg.conf | ||
| #}}} | ||
| ## en.network {{{ | ||
| cat > /etc/systemd/network/en.network <<EOF | ||
| [Match] | ||
| Name=en* | ||
| [Network] | ||
| DHCP=ipv4 | ||
| EOF | ||
| #}}} | ||
| ## wl.network {{{ | ||
| cat > /etc/systemd/network/wl.network <<EOF | ||
| [Match] | ||
| Name=wl* | ||
| [Network] | ||
| DHCP=ipv4 | ||
| EOF | ||
| #}}} | ||
| ## wpa_supplicant-default.conf {{{ | ||
| cat > /etc/wpa_supplicant/wpa_supplicant-default.conf <<EOF | ||
| ctrl_interface=/var/run/wpa_supplicant | ||
| ctrl_interface_group=wheel | ||
| update_config=1 | ||
| fast_reauth=1 | ||
| ap_scan=1 | ||
| network={ | ||
| ssid="BHNTG852G11A2" | ||
| psk="425517eb" | ||
| priority=1 | ||
| } | ||
| network={ | ||
| ssid="CF Net" | ||
| key_mgmt=NONE | ||
| priority=2 | ||
| } | ||
| EOF | ||
| #}}} | ||
| ## loader.conf {{{ | ||
| cat > /boot/loader/loader.conf <<EOF | ||
| #vim:nonu:ai:et:ts=4:sw=4:ft=conf:syn=conf:fenc=utf8: | ||
| timeout 3 | ||
| default cli | ||
| editor 1 | ||
| EOF | ||
| #}}} | ||
| ## arch.conf {{{ | ||
| cat > /boot/loader/entries/arch.conf <<EOF | ||
| #vim:nonu:ai:et:ts=4:sw=4:ft=conf:syn=conf:fenc=utf8: | ||
| title Linux Arch | ||
| linux /vmlinuz-linux | ||
| initrd /intel-ucode.img | ||
| initrd /initramfs-linux.img | ||
| options rw | ||
| EOF | ||
| #}}} | ||
| ## archlive.conf {{{ | ||
| cat > /boot/loader/entries/archlive.conf <<EOF | ||
| #vim:nonu:ai:et:ts=4:sw=4:ft=conf:syn=conf:fenc=utf8: | ||
| title Archiso | ||
| linux memdisk | ||
| initrd /archlinux.iso | ||
| options iso vmalloc=2048Mi | ||
| EOF | ||
| #}}} | ||
| ## syslinux.cfg {{{ | ||
| cat > /boot/syslinux/syslinux.cfg <<EOF | ||
| # Config file for Syslinux - | ||
| # /boot/syslinux/syslinux.cfg | ||
| #vim:nonu:ai:et:ts=4:sw=4:ft=cfg:syn=cfg:fenc=utf8: | ||
| DEFAULT arch | ||
| PROMPT 0 | ||
| TIMEOUT 30 | ||
| UI menu.c32 | ||
| MENU TITLE Arch Linux | ||
| #MENU BACKGROUND splash.png | ||
| MENU COLOR border 30;44 #40ffffff #a0000000 std | ||
| MENU COLOR title 1;36;44 #9033ccff #a0000000 std | ||
| MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all | ||
| MENU COLOR unsel 37;44 #50ffffff #a0000000 std | ||
| MENU COLOR help 37;40 #c0ffffff #a0000000 std | ||
| MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std | ||
| MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std | ||
| MENU COLOR msg07 37;40 #90ffffff #a0000000 std | ||
| MENU COLOR tabmsg 31;40 #30ffffff #00000000 std | ||
| LABEL arch | ||
| MENU LABEL Linux | ||
| LINUX ../vmlinuz-linux | ||
| APPEND rw | ||
| INITRD ../intel-ucode.img,../initramfs-linux.img | ||
| LABEL hdt | ||
| MENU LABEL HDT (Hardware Detection Tool) | ||
| COM32 hdt.c32 | ||
| EOF | ||
| #}}} | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
| @@ -0,0 +1,8 @@ | ||
| [Desktop Entry] | ||
| Version=1.0 | ||
| Type=Application | ||
| Terminal=false | ||
| Exec=gksudo /home/jb/bin/wlan-add-netzen | ||
| Name=Add Network | ||
| Comment=Adds a Network to wpa supplicant | ||
| Icon=/usr/share/icons/Adwaita/48x48/apps/web-browser.png |
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/zsh | ||
| SSID="$1" | ||
| PSK="$2" | ||
| interface=`ip link | awk '/: wl/ {gsub(/:/,"") ; print$2 }` | ||
| if [[ $SSID != "" && $PSK != "" ]]; then | ||
| wpa_passphrase $SSID $PSK >> /etc/wpa_supplicant/wpa_supplicant-*.conf | ||
| fi | ||
| if [[ $interface != "" ]]; then | ||
| systemctl restart wpa_supplicant@${interface}.service | ||
| fi |
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/sh | ||
| ## vim:nu:ai:et:ts=4:sw=4: | ||
|
|
||
| ## variables | ||
| interface=$(ip link | awk '/: wl/ {gsub(/:/,"") ; print $2}') | ||
| SSIDS=$(sudo iw dev ${interface} scan | awk '/SSID/ {gsub(/SSID:/,"") ; print $0}' | sed 's|\ |-|') | ||
| SSIDS="$(echo ${SSIDS} | sed 's| -|" FALSE "|g;s|-|FALSE "|')" | ||
| NETWORK=$(zenity --width 300 --height 500 --list --text "Wireless Networks..." --radiolist --column "Select" --column "Network SSID" ${SSIDS}) | ||
| if [[ $NETWORK != "" ]]; then | ||
| PSWD=$(zenity --title "Network Setup" --text "Enter Password for $NETWORK " --entry ) | ||
| else | ||
| exit 1 | ||
| fi | ||
|
|
||
| ## write to wpa_supplicant | ||
| if [[ $(grep "$NETWORK" /etc/wpa_supplicant/wpa_supplicant-${interface}.conf) != "" ]]; then | ||
| if [[ $PSWD == "" ]]; then | ||
| echo -e "\nnetwork={\n ssid=\"$NETWORK\"\n key_mgmt=NONE\n}" >> /etc/wpa_supplicant/wpa_supplicant-${interface}.conf | ||
| else | ||
| echo -e "\nnetwork={\n ssid=\"$NETWORK\"\n psk=\"$PSWD\"\n}" >> /etc/wpa_supplicant/wpa_supplicant-${interface}.conf | ||
| fi | ||
| else | ||
| exit 1 | ||
| fi | ||
|
|
||
| ## restart wpa_supplicant | ||
| sudo systemctl enable wpa_supplicant@${interface}.service |
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/zsh | ||
| interface=`ip link | awk '/: wl/ {gsub(/:/,"") ; print $2}'` | ||
| if [[ ! -s /etc/wpa_supplicant/wpa_supplicant-${interface}.conf && -s /etc/wpa_supplicant/wpa_supplicant-default.conf ]]; then | ||
| cp /etc/wpa_supplicant/wpa_supplicant-default.conf /etc/wpa_supplicant/wpa_supplicant-${interface}.conf | ||
| fi | ||
| if [[ ${interface} != "" ]]; then | ||
| systemctl start wpa_supplicant@${interface}.service | ||
| else | ||
| exit 1 | ||
| fi |