commit 110ef3a578707f0329e5912cba7382ad385b624e Author: colben Date: Sun Aug 29 00:01:04 2021 +0800 first commit diff --git a/V/background.png b/V/background.png new file mode 100644 index 0000000..9f857b3 Binary files /dev/null and b/V/background.png differ diff --git a/V/icons/antergos.png b/V/icons/antergos.png new file mode 100644 index 0000000..3021a90 Binary files /dev/null and b/V/icons/antergos.png differ diff --git a/V/icons/archlinux.png b/V/icons/archlinux.png new file mode 100644 index 0000000..65dfdc2 Binary files /dev/null and b/V/icons/archlinux.png differ diff --git a/V/icons/chakra.png b/V/icons/chakra.png new file mode 100644 index 0000000..2971971 Binary files /dev/null and b/V/icons/chakra.png differ diff --git a/V/icons/crunchbang.png b/V/icons/crunchbang.png new file mode 100644 index 0000000..4db2982 Binary files /dev/null and b/V/icons/crunchbang.png differ diff --git a/V/icons/debian.png b/V/icons/debian.png new file mode 100644 index 0000000..bb3b8e8 Binary files /dev/null and b/V/icons/debian.png differ diff --git a/V/icons/deepin.png b/V/icons/deepin.png new file mode 100644 index 0000000..5cb58c6 Binary files /dev/null and b/V/icons/deepin.png differ diff --git a/V/icons/edubuntu.png b/V/icons/edubuntu.png new file mode 100644 index 0000000..319ea1c Binary files /dev/null and b/V/icons/edubuntu.png differ diff --git a/V/icons/elementary.png b/V/icons/elementary.png new file mode 100644 index 0000000..3614d33 Binary files /dev/null and b/V/icons/elementary.png differ diff --git a/V/icons/fedora.png b/V/icons/fedora.png new file mode 100644 index 0000000..25b8608 Binary files /dev/null and b/V/icons/fedora.png differ diff --git a/V/icons/frugalware.png b/V/icons/frugalware.png new file mode 100644 index 0000000..b1ffe20 Binary files /dev/null and b/V/icons/frugalware.png differ diff --git a/V/icons/gentoo.png b/V/icons/gentoo.png new file mode 100644 index 0000000..319ee61 Binary files /dev/null and b/V/icons/gentoo.png differ diff --git a/V/icons/gnu-linux.png b/V/icons/gnu-linux.png new file mode 100644 index 0000000..64b217e Binary files /dev/null and b/V/icons/gnu-linux.png differ diff --git a/V/icons/kaos.png b/V/icons/kaos.png new file mode 100644 index 0000000..e2ef5da Binary files /dev/null and b/V/icons/kaos.png differ diff --git a/V/icons/korora.png b/V/icons/korora.png new file mode 100644 index 0000000..dc0c748 Binary files /dev/null and b/V/icons/korora.png differ diff --git a/V/icons/kubuntu.png b/V/icons/kubuntu.png new file mode 100644 index 0000000..7676241 Binary files /dev/null and b/V/icons/kubuntu.png differ diff --git a/V/icons/lfs.png b/V/icons/lfs.png new file mode 100644 index 0000000..b5eac27 Binary files /dev/null and b/V/icons/lfs.png differ diff --git a/V/icons/linux-mint.png b/V/icons/linux-mint.png new file mode 100644 index 0000000..c8a946f Binary files /dev/null and b/V/icons/linux-mint.png differ diff --git a/V/icons/lubuntu.png b/V/icons/lubuntu.png new file mode 100644 index 0000000..cf8fa5f Binary files /dev/null and b/V/icons/lubuntu.png differ diff --git a/V/icons/mageia.png b/V/icons/mageia.png new file mode 100644 index 0000000..a6dbfb6 Binary files /dev/null and b/V/icons/mageia.png differ diff --git a/V/icons/manjaro.png b/V/icons/manjaro.png new file mode 100644 index 0000000..3150ee4 Binary files /dev/null and b/V/icons/manjaro.png differ diff --git a/V/icons/opensuse.png b/V/icons/opensuse.png new file mode 100644 index 0000000..1064d84 Binary files /dev/null and b/V/icons/opensuse.png differ diff --git a/V/icons/siduction.png b/V/icons/siduction.png new file mode 100644 index 0000000..774a17f Binary files /dev/null and b/V/icons/siduction.png differ diff --git a/V/icons/steamos.png b/V/icons/steamos.png new file mode 100644 index 0000000..bf6b52b Binary files /dev/null and b/V/icons/steamos.png differ diff --git a/V/icons/ubuntu.png b/V/icons/ubuntu.png new file mode 100644 index 0000000..2452c14 Binary files /dev/null and b/V/icons/ubuntu.png differ diff --git a/V/icons/windows.png b/V/icons/windows.png new file mode 100644 index 0000000..d059667 Binary files /dev/null and b/V/icons/windows.png differ diff --git a/V/icons/xubuntu.png b/V/icons/xubuntu.png new file mode 100644 index 0000000..623ace0 Binary files /dev/null and b/V/icons/xubuntu.png differ diff --git a/V/select_c.png b/V/select_c.png new file mode 100644 index 0000000..dfab69a Binary files /dev/null and b/V/select_c.png differ diff --git a/V/select_e.png b/V/select_e.png new file mode 100644 index 0000000..062fe62 Binary files /dev/null and b/V/select_e.png differ diff --git a/V/select_n.png b/V/select_n.png new file mode 100644 index 0000000..c034db1 Binary files /dev/null and b/V/select_n.png differ diff --git a/V/select_ne.png b/V/select_ne.png new file mode 100644 index 0000000..7be4d3a Binary files /dev/null and b/V/select_ne.png differ diff --git a/V/select_nw.png b/V/select_nw.png new file mode 100644 index 0000000..58c7379 Binary files /dev/null and b/V/select_nw.png differ diff --git a/V/select_s.png b/V/select_s.png new file mode 100644 index 0000000..036d9e6 Binary files /dev/null and b/V/select_s.png differ diff --git a/V/select_se.png b/V/select_se.png new file mode 100644 index 0000000..47a34c0 Binary files /dev/null and b/V/select_se.png differ diff --git a/V/select_sw.png b/V/select_sw.png new file mode 100644 index 0000000..9290695 Binary files /dev/null and b/V/select_sw.png differ diff --git a/V/select_w.png b/V/select_w.png new file mode 100644 index 0000000..b5bfb5d Binary files /dev/null and b/V/select_w.png differ diff --git a/V/terminal_box_c.png b/V/terminal_box_c.png new file mode 100644 index 0000000..d0dd52a Binary files /dev/null and b/V/terminal_box_c.png differ diff --git a/V/terminal_box_e.png b/V/terminal_box_e.png new file mode 100644 index 0000000..394cbe4 Binary files /dev/null and b/V/terminal_box_e.png differ diff --git a/V/terminal_box_n.png b/V/terminal_box_n.png new file mode 100644 index 0000000..476f8bc Binary files /dev/null and b/V/terminal_box_n.png differ diff --git a/V/terminal_box_ne.png b/V/terminal_box_ne.png new file mode 100644 index 0000000..9e26959 Binary files /dev/null and b/V/terminal_box_ne.png differ diff --git a/V/terminal_box_nw.png b/V/terminal_box_nw.png new file mode 100644 index 0000000..5c3cba8 Binary files /dev/null and b/V/terminal_box_nw.png differ diff --git a/V/terminal_box_s.png b/V/terminal_box_s.png new file mode 100644 index 0000000..85a8901 Binary files /dev/null and b/V/terminal_box_s.png differ diff --git a/V/terminal_box_se.png b/V/terminal_box_se.png new file mode 100644 index 0000000..d8627ee Binary files /dev/null and b/V/terminal_box_se.png differ diff --git a/V/terminal_box_sw.png b/V/terminal_box_sw.png new file mode 100644 index 0000000..67c600c Binary files /dev/null and b/V/terminal_box_sw.png differ diff --git a/V/terminal_box_w.png b/V/terminal_box_w.png new file mode 100644 index 0000000..d066e2d Binary files /dev/null and b/V/terminal_box_w.png differ diff --git a/V/theme.txt b/V/theme.txt new file mode 100644 index 0000000..0fcf08e --- /dev/null +++ b/V/theme.txt @@ -0,0 +1,40 @@ +# GRUB2 gfxmenu Linux Vimix theme +# Designed for any resolution + +# Global Property +title-text: "" +desktop-image: "background.png" +desktop-color: "#000000" +terminal-font: "Unifont Regular 16" +terminal-box: "terminal_box_*.png" +terminal-left: "0" +terminal-top: "0" +terminal-width: "100%" +terminal-height: "100%" +terminal-border: "0" + +# Show the boot menu ++ boot_menu { + left = 2% + top = 20% + width = 40% + height = 60% + item_font = "Unifont Regular 16" + item_color = "#cccccc" + selected_item_color = "#ffffff" + item_height = 24 + item_spacing = 12 + selected_item_pixmap_style = "select_*.png" +} + +# Show a countdown message using the label component ++ label { + top = 82% + left = 35% + width = 30% + align = "center" + id = "__timeout__" + text = "Booting in %d seconds" + color = "#cccccc" + font = "Unifont Regular 16" +} diff --git a/V/unifont-regular-16.pf2 b/V/unifont-regular-16.pf2 new file mode 100644 index 0000000..b87a776 Binary files /dev/null and b/V/unifont-regular-16.pf2 differ diff --git a/YaHei.Consolas.1.11b.ttf b/YaHei.Consolas.1.11b.ttf new file mode 100644 index 0000000..3d0e9b1 Binary files /dev/null and b/YaHei.Consolas.1.11b.ttf differ diff --git a/arch-install.sh b/arch-install.sh new file mode 100755 index 0000000..59e255b --- /dev/null +++ b/arch-install.sh @@ -0,0 +1,220 @@ +#!/bin/bash +#========================================= +# Filename : arch-install.sh +# Filetype : Shell +# Author : Colben +# Create : 2015-11-21 00:39:40 +#========================================= + +# git user and its home directory +GIT_USER='' +GIT_HOME='' + +OPTIONS=' + CreateGitUser + SetGitUserHome + ModifyMirrorlist + InitInstall + InstallTerminalSoftware + InstallGnomeSoftware + CloneGit + ConfigVim + ConfigBashTmuxGit + HideAppIcon + ConfigBackground + Quit +' + +# Add other change to a function below and +# append the function name to the options above ... + +#function other_change { +#} + +function Quit { + exit 0 +} + +function CheckNetwork { + local state= + local status= + echo 'Checking network connection ...' + curl -sI --connect-timeout 8 https://www.baidu.com &> /dev/null + status=$? + [ 0 -eq $status ] && state='online' || state='offline' + echo -e "\033[32mNetwork $state ...\033[0m" + return $status +} + +function CreateGitUser { + local userName= + while [ -z "$userName" ]; do + read -p 'Enter the new user name:' userName + done + GIT_USER="$userName" + if [ 'root' = "$GIT_USER" ] + then + mkdir -p /root/Git/ && GIT_HOME="/root" + return + fi + useradd -s /bin/bash -d /home/$GIT_USER -m $GIT_USER + mkdir -p /home/$GIT_USER/Git + chown -R ${GIT_USER}.${GIT_USER} /home/$GIT_USER + passwd $GIT_USER + GIT_HOME="/home/$GIT_USER" +} + +function SetGitUserHome { + local userName= + local userHome= + while :; do + read -p 'Enter the user keeping Git:' userName + [ -z "$userName" ] && continue + userHome=$(grep "^$userName" /etc/passwd 2>/dev/null|cut -d':' -f6 2>/dev/null) + [ ! -d ${userHome:-'/dev/zero'}/Git ] && echo -n "$userName no Git, " && continue + GIT_USER=$userName + GIT_HOME=$userHome + break + done +} + +function ModifyMirrorlist { + sed -i '/^\[archlinuxcn\]$/,+2d' /etc/pacman.conf + echo -e '[archlinuxcn] +SigLevel = Optional TrustAll +Include = /etc/pacman.d/mirrorlist.archlinuxcn' >> /etc/pacman.conf + cp -f mirrorlist.archlinuxcn /etc/pacman.d/ + sed -i '/^\[blackarch\]$/,+2d' /etc/pacman.conf + echo -e '[blackarch] +SigLevel = Optional TrustAll +Include = /etc/pacman.d/mirrorlist.blackarch' >> /etc/pacman.conf + cp -f mirrorlist.blackarch /etc/pacman.d/ + cp -f mirrorlist /etc/pacman.d/ +} + +function InitInstall { + CheckNetwork || return + timedatectl set-local-rtc yes + pacman -S networkmanager + systemctl enable NetworkManager.service +} + +function InstallTerminalSoftware { + CheckNetwork || return + pacman -S ctags cscope tmux expect git p7zip unrar zip unzip ntfs-3g + pacman -S espeak hostapd dnsmasq openssh tcpdump vim cdrtools + pacman -S tree ethtool openbsd-netcat arch-install-scripts +} + +function InstallGnomeSoftware { + CheckNetwork || return + mkdir -p /usr/share/fonts/MSYH/TrueType/ + cp -r YaHei.Consolas.1.11b.ttf /usr/share/fonts/MSYH/TrueType/ + chown root.root /usr/share/fonts/* -R + pacman -S wqy-zenhei ttf-liberation + pacman -S gnome + systemctl enable gdm.service + pacman -S gvim file-roller freerdp mpv ibus-sunpinyin +} + +function CloneGit { + local repos=' + https://gitee.com/colben/config.git + https://gitee.com/colben/vim.git + ' + #https://github.com/mlutfy/hidetopbar.git + #https://github.com/dmo60/CoverflowAltTab.git + local repoName= + [ -z "$GIT_HOME" ] && echo 'We need set git user first' && return + CheckNetwork || return + cd $GIT_HOME/Git + for repo in $repos; do + echo -e "\n\033[33;1mgit clone\033[0m $repo" + repoName=$(basename ${repo%.git}) + if [ -d $repoName/.git ]; then + cd $repoName && git pull && cd ../ + else + git clone $repo + fi + done + chown `grep "^$GIT_USER" /etc/passwd|cut -d':' -f3,4` ../Git -R +} + +function ConfigVim { + [ -z "$GIT_HOME" ] && echo 'We need set git user first' && return + cd $GIT_HOME/Git/ + [ 0 -ne $? ] && echo 'No vim-git found!' && return + cp -r vim .vim && rm -rf .vim/.git + rm -rf $GIT_HOME/.vim && cp -r .vim $GIT_HOME/ + chown `grep "^$GIT_USER" /etc/passwd|cut -d':' -f3,4` $GIT_HOME/.vim -R + [ 'root' != "$GIT_USER" ] && rm -rf /root/.vim && cp -r .vim /root/ + rm -rf .vim +} + +function ConfigBashTmuxGit { + [ -z "$GIT_HOME" ] && echo 'We need set git user first' && return + cd $GIT_HOME/Git/config + [ 0 -ne $? ] && echo 'No bash-tmux-git found!' && return + cp -f bash.bash_colben tmux.conf gitconfig /etc/ + sed -i '/colben/d' /etc/bash.bashrc + echo 'source /etc/bash.bash_colben' >> /etc/bash.bashrc +} + +function HideAppIcon { + local file= + cd /usr/share/applications + for file in \ + avahi-discover \ + bssh \ + bvnc \ + flash-player-properties \ + ibus-setup \ + qv4l2 \ + qvidcap \ + nm-connection-editor \ + lstopo \ + org.gnome.DiskUtility \ + org.gtk.IconBrowser4 \ + org.gtk.PrintEditor4 \ + org.gtk.Demo4 \ + org.gtk.WidgetFactory4 \ + cups \ + system-config-printer \ + ; do + if [ -f ${file}.desktop ]; then + sed -i '/NoDisplay/d' ${file}.desktop + echo 'NoDisplay=true' >> ${file}.desktop + fi + done + for file in vim; do + rm -f ${file}.desktop + done +} + +function ConfigBackground { + [ -z "$GIT_HOME" ] && echo 'We need set git user first' && return + cd $GIT_HOME/Git/archlinux + cp -af V /boot/grub/themes/ + chown -R root.root /boot/grub/themes/V/ + sed -i '/^GRUB_BACKGROUND=/c#GRUB_BACKGROUND="/path/to/grub.tga"' /etc/default/grub + sed -i '/GRUB_THEME=/cGRUB_THEME="/boot/grub/themes/V/theme.txt"' /etc/default/grub + grub-mkconfig -o /boot/grub/grub.cfg + cp -r desktop.png terminal.jpg /usr/share/backgrounds/ + chown root.root /usr/share/backgrounds/ -R +} + +function Main { + local option= + [ 0 -ne $UID ] && echo 'We need run this with root ...' && exit 1 + [ ! -x /usr/bin/pacman ] && echo 'Not Archlinux, quit ...' && exit 1 + select option in $OPTIONS; do + [ -z $option ] && clear && continue + echo -e "\n\033[36;47m ---- $option begin ---- \033[0m\n" + $option + echo -e "\n\033[36;47m ---- $option end ---- \033[0m\n" + done +} + +# start here +Main + diff --git a/desktop.png b/desktop.png new file mode 100644 index 0000000..3cfade7 Binary files /dev/null and b/desktop.png differ diff --git a/grub.tga b/grub.tga new file mode 100644 index 0000000..ea99e32 Binary files /dev/null and b/grub.tga differ diff --git a/lightdm/dm_background.png b/lightdm/dm_background.png new file mode 100644 index 0000000..95f7eca Binary files /dev/null and b/lightdm/dm_background.png differ diff --git a/lightdm/index.css b/lightdm/index.css new file mode 100644 index 0000000..1668587 --- /dev/null +++ b/lightdm/index.css @@ -0,0 +1,19 @@ +body { + background-size: cover; + background-color: #101010; + color: #ededed; +} + +#input { + color: #ededed; + background-color: #101010; + border: none; + outline: none; + padding: 5px; + font-family: "Source Code Pro", monospace; + font-size: 16px; + text-align: right; + position: absolute; + bottom: 20px; + right: 20px; +} diff --git a/lightdm/index.html b/lightdm/index.html new file mode 100644 index 0000000..e2d6d52 --- /dev/null +++ b/lightdm/index.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/lightdm/main.js b/lightdm/main.js new file mode 100644 index 0000000..bea6c1e --- /dev/null +++ b/lightdm/main.js @@ -0,0 +1,58 @@ +var input = document.getElementById("input"); +input.addEventListener("keydown", function (e) { + if (e.keyCode === 13) { + authenticate(e.target.value); + } +}); + +window.authentication_complete = function() { + if (lightdm.is_authenticated) { + console.log("Authenticated!"); + $( 'body' ).fadeOut( 1000, () => { + lightdm.login(lightdm.authentication_user, null); + } ); + } else { + getImg(); + input.value = ""; + input.placeholder = "user"; + input.type = "text"; + input.disabled = false; + input.focus(); + input.select(); + } +} + +function pad(a, b) { + return (1e15 + a + "").slice(-b); +} + +function getImg() { + index = Math.floor(Math.random() * 25); + console.log(pad(index,2)); + document.getElementsByTagName('body')[0].style.backgroundImage = + "url(dm_background.png)"; + //"url(wallpapers/" + pad(index, 2) + ".png)"; +} + +window.onload = function() { + getImg(); + input.focus(); + input.select(); + input.value = lightdm.select_user_hint; + if(input.value) { + authenticate(input.value); + } +} + +function authenticate(input_text) { + if(!lightdm.in_authentication || !lightdm.authentication_user) { + lightdm.authenticate(input_text); + input.value = ""; + input.type = "password"; + input.placeholder = "password"; + input.disabled = false; + } else { + input.disabled = true; + lightdm.respond(input_text); + } +} diff --git a/mirrorlist b/mirrorlist new file mode 100644 index 0000000..a10bdc1 --- /dev/null +++ b/mirrorlist @@ -0,0 +1,31 @@ +## +## Arch Linux repository mirrorlist +## Filtered by mirror score from mirror status page +## Generated on 2018-09-01 +## + +## China +Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch +## China +Server = http://mirrors.bit.edu.cn/archlinux/$repo/os/$arch +## China +Server = http://mirrors.aliyun.com/archlinux/$repo/os/$arch +## China +Server = https://mirrors.cloud.tencent.com/archlinux/$repo/os/$arch +## China +Server = http://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch +## China +Server = http://mirrors.zju.edu.cn/archlinux/$repo/os/$arch +## China +Server = http://mirrors.xjtu.edu.cn/archlinux/$repo/os/$arch +## China +Server = http://mirrors.163.com/archlinux/$repo/os/$arch +## China +Server = http://mirrors.sohu.com/archlinux/$repo/os/$arch +## China +Server = http://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch +## China +Server = http://mirrors.shu.edu.cn/archlinux/$repo/os/$arch +## China +Server = http://mirror.lzu.edu.cn/archlinux/$repo/os/$arch + diff --git a/mirrorlist.archlinuxcn b/mirrorlist.archlinuxcn new file mode 100644 index 0000000..4db78ea --- /dev/null +++ b/mirrorlist.archlinuxcn @@ -0,0 +1,13 @@ +## +## Arch Linux CN repository mirrorlist +## + +## Tsinghua +Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch +## Tencent +Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch +## USTC +Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch +## 163 +Server = http://mirrors.163.com/archlinux-cn/$arch + diff --git a/mirrorlist.blackarch b/mirrorlist.blackarch new file mode 100644 index 0000000..01b202d --- /dev/null +++ b/mirrorlist.blackarch @@ -0,0 +1,11 @@ +## +## Arch Linux CN repository mirrorlist +## + +## Tsinghua +Server = https://mirrors.tuna.tsinghua.edu.cn/blackarch/$repo/os/$arch +## Tencent +Server = https://mirrors.cloud.tencent.com/blackarch/$repo/os/$arch +## USTC +Server = https://mirrors.ustc.edu.cn/blackarch/$repo/os/$arch + diff --git a/show-apps.png b/show-apps.png new file mode 100644 index 0000000..c80adf3 Binary files /dev/null and b/show-apps.png differ diff --git a/terminal.jpg b/terminal.jpg new file mode 100644 index 0000000..fa2945c Binary files /dev/null and b/terminal.jpg differ