first commit

This commit is contained in:
colben 2021-08-29 00:01:04 +08:00
commit 110ef3a578
60 changed files with 405 additions and 0 deletions

BIN
V/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
V/icons/antergos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

BIN
V/icons/archlinux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

BIN
V/icons/chakra.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

BIN
V/icons/crunchbang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

BIN
V/icons/debian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

BIN
V/icons/deepin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

BIN
V/icons/edubuntu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

BIN
V/icons/elementary.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

BIN
V/icons/fedora.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

BIN
V/icons/frugalware.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

BIN
V/icons/gentoo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

BIN
V/icons/gnu-linux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

BIN
V/icons/kaos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

BIN
V/icons/korora.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

BIN
V/icons/kubuntu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

BIN
V/icons/lfs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

BIN
V/icons/linux-mint.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

BIN
V/icons/lubuntu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

BIN
V/icons/mageia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

BIN
V/icons/manjaro.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

BIN
V/icons/opensuse.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

BIN
V/icons/siduction.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
V/icons/steamos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

BIN
V/icons/ubuntu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

BIN
V/icons/windows.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

BIN
V/icons/xubuntu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

BIN
V/select_c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

BIN
V/select_e.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

BIN
V/select_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

BIN
V/select_ne.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

BIN
V/select_nw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

BIN
V/select_s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

BIN
V/select_se.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

BIN
V/select_sw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

BIN
V/select_w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

BIN
V/terminal_box_c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

BIN
V/terminal_box_e.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

BIN
V/terminal_box_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

BIN
V/terminal_box_ne.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
V/terminal_box_nw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
V/terminal_box_s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

BIN
V/terminal_box_se.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
V/terminal_box_sw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
V/terminal_box_w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

40
V/theme.txt Normal file
View File

@ -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"
}

BIN
V/unifont-regular-16.pf2 Normal file

Binary file not shown.

BIN
YaHei.Consolas.1.11b.ttf Normal file

Binary file not shown.

220
arch-install.sh Executable file
View File

@ -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

BIN
desktop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 KiB

BIN
grub.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 MiB

BIN
lightdm/dm_background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

19
lightdm/index.css Normal file
View File

@ -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;
}

13
lightdm/index.html Normal file
View File

@ -0,0 +1,13 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="index.css">
<script src="../_vendor/js/jquery.min.js"></script>
</head>
<body>
<input type="text" id="input" placeholder="user" name="input">
<script src="main.js"></script>
</body>
</html>

58
lightdm/main.js Normal file
View File

@ -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);
}
}

31
mirrorlist Normal file
View File

@ -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

13
mirrorlist.archlinuxcn Normal file
View File

@ -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

11
mirrorlist.blackarch Normal file
View File

@ -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

BIN
show-apps.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
terminal.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB