Replaced st/tabbed with alacritty/tmux, added dbc tool for emulating .ssh/config for dropbear
This commit is contained in:
parent
0e232ae3a5
commit
c70c34fcaa
|
@ -0,0 +1,58 @@
|
|||
font:
|
||||
normal:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
bold:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
italic:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
bold_italic:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
size: 8
|
||||
|
||||
|
||||
colors:
|
||||
primary:
|
||||
background: '0x000000'
|
||||
foreground: '0xC6C6C4'
|
||||
|
||||
normal:
|
||||
black: '0x10100E'
|
||||
red: '0xC40233'
|
||||
green: '0x009F6B'
|
||||
yellow: '0xFFD700'
|
||||
blue: '0x0087BD'
|
||||
magenta: '0x9A4EAE'
|
||||
cyan: '0x20B2AA'
|
||||
white: '0xC6C6C4'
|
||||
|
||||
bright:
|
||||
black: '0x696969'
|
||||
red: '0xFF2400'
|
||||
green: '0x03C03C'
|
||||
yellow: '0xFDFF00'
|
||||
blue: '0x007FFF'
|
||||
magenta: '0xFF1493'
|
||||
cyan: '0x00CCCC'
|
||||
white: '0xFFFAFA'
|
||||
|
||||
selection:
|
||||
save_to_clipboard: true
|
||||
|
||||
|
||||
key_bindings:
|
||||
- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
|
||||
shell:
|
||||
program: /usr/bin/tmux
|
||||
args:
|
||||
- new-session
|
|
@ -1,45 +1,4 @@
|
|||
#!/bin/sh
|
||||
asn2ranges() {
|
||||
local cache_file="/tmp/.bgp_tools_table_cache"
|
||||
local current_time=$(date +%s)
|
||||
local update_interval=$((2 * 60 * 60)) # 2 hours in seconds
|
||||
if [ -f "$cache_file" ]; then
|
||||
local last_update=$(date -r "$cache_file" +%s)
|
||||
local time_diff=$(($current_time - $last_update))
|
||||
if [ $time_diff -gt $update_interval ]; then
|
||||
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/table.txt -o "$cache_file"
|
||||
fi
|
||||
else
|
||||
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/table.txt -o "$cache_file"
|
||||
fi
|
||||
awk -v asn="$1" '$NF == asn {print $1}' "$cache_file"
|
||||
}
|
||||
|
||||
asn2search() {
|
||||
local search_string="$1"
|
||||
local cache_file="/tmp/.bgp_tools_asn_cache"
|
||||
local current_time=$(date +%s)
|
||||
local update_interval=$((24 * 60 * 60)) # 24 hours in seconds
|
||||
if [ -f "$cache_file" ]; then
|
||||
local last_update=$(date -r "$cache_file" +%s)
|
||||
local time_diff=$(($current_time - $last_update))
|
||||
if [ $time_diff -gt $update_interval ]; then
|
||||
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/asns.csv -o "$cache_file"
|
||||
fi
|
||||
else
|
||||
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/asns.csv -o "$cache_file"
|
||||
fi
|
||||
grep -i "$search_string" "$cache_file"
|
||||
}
|
||||
|
||||
bgplookup() {
|
||||
if [ -f "$1" ]; then
|
||||
{ echo "begin"; echo "verbose"; echo "count"; cat "$1"; echo "end"; } | nc bgp.tools 43
|
||||
else
|
||||
whois -h bgp.tools " -v $1"
|
||||
fi
|
||||
}
|
||||
|
||||
cheat() {
|
||||
curl cht.sh/$1
|
||||
}
|
||||
|
@ -119,6 +78,10 @@ keys() {
|
|||
echo "Ctrl + _ UNDO"
|
||||
}
|
||||
|
||||
mntusb() {
|
||||
sudo mount $1 /mnt -o uid=$(id -u),gid=$(id -g)
|
||||
}
|
||||
|
||||
repo() {
|
||||
if [ ! -z "$1" ]; then
|
||||
for d in $(find $HOME/dev/git -type d -name mirrors -prune -o -type d -name .git -print); do
|
||||
|
|
106
bash/.bash_recon
106
bash/.bash_recon
|
@ -1,7 +1,5 @@
|
|||
#!/bin/sh
|
||||
httpscrape() {
|
||||
subfinder -silent -d $1 | dnsx -a -aaaa -silent | httpx -sc -ip -title -td -favicon -mc 200,301
|
||||
}
|
||||
# List of recon related functions for BASH - developed by acidvegas (https://git.acid.vegas/void)
|
||||
|
||||
asn2ranges() {
|
||||
local cache_file="/tmp/.bgp_tools_table_cache"
|
||||
|
@ -44,104 +42,10 @@ bgplookup() {
|
|||
fi
|
||||
}
|
||||
|
||||
cheat() {
|
||||
curl cht.sh/$1
|
||||
crtsh() {
|
||||
curl -s "https://crt.sh/?q=$1&output=json" | jq -r '.[].name_value' | sort | uniq
|
||||
}
|
||||
|
||||
clbin() {
|
||||
local url=$(cat $1 | curl -sF 'clbin=<-' https://clbin.com)
|
||||
echo "$url?<hl>"
|
||||
}
|
||||
|
||||
color() {
|
||||
for color in {0..255}; do
|
||||
printf "\e[48;5;%sm %3s \e[0m" $color $color
|
||||
if [ $((($color + 1) % 6)) == 4 ]; then
|
||||
echo
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
extract() {
|
||||
if [ ! -z "$1" ]; then
|
||||
if [ -f $1 ]; then
|
||||
case $1 in
|
||||
*.tar.bz2) tar xvjf $1 ;;
|
||||
*.tar.gz) tar xvzf $1 ;;
|
||||
*.tar.xz) tar xvJf $1 ;;
|
||||
*.lzma) unlzma $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.rar) unrar x -ad $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
*.tar) tar xvf $1 ;;
|
||||
*.tbz2) tar xvjf $1 ;;
|
||||
*.tgz) tar xvzf $1 ;;
|
||||
*.zip) unzip $1 ;;
|
||||
*.Z) uncompress $1 ;;
|
||||
*.7z) 7z x $1 ;;
|
||||
*.xz) unxz $1 ;;
|
||||
*) echo "$1 - unknown archive format" ;;
|
||||
esac
|
||||
else
|
||||
echo "$1 - file does not exist"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
gcp() {
|
||||
git add .
|
||||
git commit -S -m "$*"
|
||||
git push
|
||||
}
|
||||
|
||||
hf() {
|
||||
curl -F file=@$1 https://hardfiles.org/ # yeah thats right motherfucker, real bay shit, for real bay motherfuckers.
|
||||
}
|
||||
|
||||
iso2usb() {
|
||||
sudo dd bs=4M if=$1 of=$2 status=progress
|
||||
sudo /bin/sync
|
||||
}
|
||||
|
||||
keys() {
|
||||
echo "Ctrl + a move to the beginning of line."
|
||||
echo "Ctrl + d if you've type something, Ctrl + d deletes the character under the cursor, else, it escapes the current shell."
|
||||
echo "Ctrl + e move to the end of line."
|
||||
echo "Ctrl + k delete all text from the cursor to the end of line."
|
||||
echo "Ctrl + l CLEAR"
|
||||
echo "Ctrl + n DOWN"
|
||||
echo "Ctrl + p UP"
|
||||
echo "Ctrl + q to resume output to terminal after Ctrl + s."
|
||||
echo "Ctrl + r begins a backward search through command history.(keep pressing Ctrl + r to move backward)"
|
||||
echo "Ctrl + s to stop output to terminal."
|
||||
echo "Ctrl + t transpose the character before the cursor with the one under the cursor, press Esc + t to transposes the two words before the cursor."
|
||||
echo "Ctrl + u cut the line before the cursor; then Ctrl + y paste it"
|
||||
echo "Ctrl + w cut the word before the cursor; then Ctrl + y paste it"
|
||||
echo "Ctrl + x + backspace delete all text from the beginning of line to the cursor."
|
||||
echo "Ctrl + x + Ctrl + e launch editor defined by \$EDITOR to input your command. Useful for multi-line commands."
|
||||
echo "Ctrl + z stop current running process and keep it in background. You can use \`fg\` to continue the process in the foreground, or \`bg\` to continue the process in the background."
|
||||
echo "Ctrl + _ UNDO"
|
||||
}
|
||||
|
||||
repo() {
|
||||
if [ ! -z "$1" ]; then
|
||||
for d in $(find $HOME/dev/git -type d -name mirrors -prune -o -type d -name .git -print); do
|
||||
r=$(basename $(dirname $d))
|
||||
if [ $1 = $r ]; then
|
||||
cd $d
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
qr() {
|
||||
curl qrenco.de/$1
|
||||
}
|
||||
|
||||
rnd() {
|
||||
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $1 | head -n 1
|
||||
}
|
||||
|
||||
title() {
|
||||
echo -ne "\033]0;$1\007"
|
||||
shidb() {
|
||||
curl https://internetdb.shodan.io/$1
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ static const char *colors[][3] = {
|
|||
|
||||
static char dmenumon[2] = "0"; // TODO: Do we really need this?
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", "0", "-fn", dmenufont, "-nb", "#000000", "-nf", "#FFFFFF", "-sb", "#000000", "-sf", "#00D787", NULL };
|
||||
static const char *termcmd[] = { "tabbed", "-cf", "st", "-w", NULL };
|
||||
static const char *termcmd[] = { "alacritty", NULL };
|
||||
static const char *volume_toggle[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
||||
static const char *volume_down[] = { "amixer", "-q", "set", "Master", "10-", NULL };
|
||||
static const char *volume_up[] = { "amixer", "-q", "set", "Master", "10+", NULL };
|
||||
|
|
12
enterthezoid
12
enterthezoid
|
@ -72,10 +72,10 @@ setup_zfs() {
|
|||
setup_chroot() {
|
||||
passwd
|
||||
|
||||
xbps-install -Su
|
||||
xbps-install void-repo-nonfree
|
||||
xbps-install -Su
|
||||
xbps-install -S intel-ucode
|
||||
xbps-install -Suy
|
||||
xbps-install -y void-repo-nonfree
|
||||
xbps-install -Suy
|
||||
xbps-install -y intel-ucode
|
||||
ln -sf /etc/sv/intel-ucode /etc/runit/runsvdir/default/
|
||||
|
||||
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||
|
@ -89,7 +89,7 @@ setup_chroot() {
|
|||
|
||||
printf "nofsck=\"yes\"\nadd_dracutmodules+=\" zfs \"\nomit_dracutmodules+=\" btrfs \"\n" > /etc/dracut.conf.d/zol.conf
|
||||
|
||||
xbps-install -S zfs
|
||||
xbps-install -y zfs
|
||||
zfs set org.zfsbootmenu:commandline="quiet loglevel=4" zroot/ROOT
|
||||
|
||||
mkfs.vfat -F32 ${BOOT_DRIVE}1
|
||||
|
@ -109,7 +109,7 @@ setup_chroot() {
|
|||
yq -iy '.Global.ManageImages=true | .Global.BootMountPoint="/boot/efi" | .Components.Enabled=false | .EFI.ImageDir="/boot/efi/EFI/zbm" | .EFI.Versions=false | .EFI.Enabled=true | .Kernel.CommandLine="quiet loglevel=0"' /etc/zfsbootmenu/config.yaml
|
||||
generate-zbm
|
||||
|
||||
xbps-install -S refind
|
||||
xbps-install -y refind
|
||||
refind-install
|
||||
rm /boot/refind_linux.conf
|
||||
printf "\"Boot default\" \"quiet loglevel=0 zbm.skip\"\n\"Boot to menu\" \"quiet loglevel=0 zbm.show\"\n" > /boot/efi/EFI/ZBM/refind_linux.conf
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/sh
|
||||
# Dropbear Connect Script (DBC) - Developed by acidvegas (https://git.acid.vegas/void)
|
||||
|
||||
# Store your SSH connections in pass with the following format:
|
||||
# NAME USER HOST PORT [KEY]
|
||||
|
||||
# Check if exactly one argument is provided
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NAME=$1
|
||||
CONFIG_DIR="$HOME/.dropbear"
|
||||
CONFIG_PASS_ENTRY="dropbear" # Replace with your pass entry for the config
|
||||
CONFIG_PASS_ENABLED=1 # Set to 0 to disable pass
|
||||
|
||||
# Read the config file
|
||||
if [ "$CONFIG_PASS_ENABLED" -eq 1 ]; then
|
||||
CONFIG_DATA=$(pass "$CONFIG_PASS_ENTRY")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to decrypt config with pass"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [ ! -f "$CONFIG_DIR/config" ]; then
|
||||
echo "Error: Config file not found"
|
||||
exit 1
|
||||
fi
|
||||
CONFIG_DATA=$(cat "$CONFIG_DIR/config")
|
||||
fi
|
||||
|
||||
if [ -z "$CONFIG_DATA" ]; then
|
||||
echo "Error: Config file is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use grep to find the matching line
|
||||
MATCHING_LINES=$(echo "$CONFIG_DATA" | grep "^$NAME ")
|
||||
|
||||
# Check if exactly one matching line is found
|
||||
LINE_COUNT=$(echo "$MATCHING_LINES" | wc -l)
|
||||
if [ "$LINE_COUNT" -ne 1 ]; then
|
||||
echo "Error: The NAME '$NAME' matches multiple or no lines."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read parameters from the matching line
|
||||
read -r line_name line_user line_host line_port line_key <<< "$MATCHING_LINES"
|
||||
|
||||
# Build and execute the dbclient command
|
||||
DBCLIENT_CMD="dbclient -p $line_port -l $line_user $line_host"
|
||||
|
||||
# Append key to the command if it is provided and exists
|
||||
if [ -n "$line_key" ]; then
|
||||
KEY_PATH="$CONFIG_DIR/$line_key"
|
||||
if [ -f "$KEY_PATH" ]; then
|
||||
DBCLIENT_CMD="$DBCLIENT_CMD -i $KEY_PATH"
|
||||
else
|
||||
echo "Warning: Key file $KEY_PATH not found, proceeding without it"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Execute the command
|
||||
$DBCLIENT_CMD
|
|
@ -43,6 +43,7 @@ update_repo() {
|
|||
git -C $DIR remote add origin git@github.com:$USER/$REPO.git
|
||||
git -C $DIR remote set-url --add --push origin git@github.com:$USER/$REPO.git
|
||||
git -C $DIR remote set-url --add --push origin git@gitlab.com:$USER/$REPO.git
|
||||
git -C $DIR remote set-url --add --push origin git@codeberg.org:$USER/$REPO.git
|
||||
git -C $DIR remote set-url --add --push origin git@$ACIDGIT:$USER/$REPO.git
|
||||
git -C $DIR remote set-url --add --push origin acidgit:$REPO.git
|
||||
fi
|
||||
|
|
47
setup
47
setup
|
@ -16,32 +16,34 @@ REMOTE_PORT=2023 # CHANGE THIS
|
|||
GIT_URL="https://raw.githubusercontent.com/acidvegas/void/master"
|
||||
|
||||
setup_root() {
|
||||
xbps-install -Su && xbps-install void-repo-nonfree && xbps-install -Su
|
||||
xbps-install -Suy && xbps-install -y void-repo-nonfree && xbps-install -Suy
|
||||
|
||||
if [ $GFX_DRIVER = "intel" ]; then
|
||||
xbps-install linux-firmware-intel mesa-dri vulkan-loader mesa-vulkan-intel intel-video-accel
|
||||
xbps-install -y linux-firmware-intel mesa-dri vulkan-loader mesa-vulkan-intel intel-video-accel
|
||||
fi
|
||||
|
||||
if [ $DISPLAY_SERVER = "xorg" ]; then
|
||||
xbps-install xorg libX11-devel libX11 libXft-devel libXft libXinerama-devel libXinerama libXrandr-devel libXrandr
|
||||
xbps-install dmenu pinentry-dmenu scrot unclutter xclip
|
||||
xbps-install -y xorg libX11-devel libX11 libXft-devel libXft libXinerama-devel libXinerama libXrandr-devel libXrandr
|
||||
xbps-install -y alacritty dmenu pinentry-dmenu scrot unclutter xclip
|
||||
fi
|
||||
|
||||
if [ ! -z $DISPLAY_SERVER ]; then
|
||||
xbps-install dunst firefox Signal-Desktop
|
||||
xbps-install ohsnap-font font-unifont-bdf freefont-ttf noto-fonts-ttf noto-fonts-ttf-extra noto-fonts-cjk noto-fonts-emoji
|
||||
xbps-install -y dunst firefox Signal-Desktop
|
||||
xbps-install -y ohsnap-font font-unifont-bdf freefont-ttf noto-fonts-ttf noto-fonts-ttf-extra noto-fonts-cjk noto-fonts-emoji
|
||||
fi
|
||||
|
||||
xbps-install alsa-utils cmus ffmpeg id3v2 eyeD3 youtube-dl
|
||||
xbps-install checkbashisms go make patch pkg-config python3 python3-pip shellcheck
|
||||
xbps-install -y alsa-utils cmus ffmpeg id3v2 eyeD3 youtube-dl
|
||||
xbps-install -y checkbashisms go make patch pkg-config python3 python3-pip shellcheck
|
||||
|
||||
if [ $ARCH = "x86_64" ]; then
|
||||
xbps-install gcc vscode
|
||||
xbps-install -y gcc vscode
|
||||
fi
|
||||
|
||||
xbps-install bandwhich bind-utils btop curl earlyoom exa git gitui net-tools ncdu oath-toolkit progress rsync socklog-void tmate tor tree unzip weechat zip
|
||||
xbps-install asciiquarium cointop cmatrix no-more-secrets tty-solitaire
|
||||
xbps-install kismet masscan nmap termshark wireshark
|
||||
xbps-install -y bandwhich bind-utils btop curl earlyoom exa git gitui gnupg2-scdaemon mlocate net-tools ncdu oath-toolkit progress rsync socklog-void tmate tmux tor tree unzip weechat zip
|
||||
xbps-install -y asciiquarium cointop cmatrix no-more-secrets tty-solitaire
|
||||
xbps-install -y kismet masscan nmap termshark wireshark
|
||||
|
||||
updatedb
|
||||
|
||||
useradd -m -s /bin/bash acidvegas && gpasswd -a acidvegas wheel && passwd acidvegas
|
||||
|
||||
|
@ -62,11 +64,12 @@ setup_root() {
|
|||
if [ $REMOTE_ACCESS = "ssh" ]; then
|
||||
printf "AuthenticationMethods publickey\nBanner /etc/issue\nClientAliveInterval 0\nDisableForwarding yes\nPermitRootLogin no\nPort CHANGEME\nPrintLastLog no\n" > /etc/ssh/sshd_config
|
||||
elif [ $REMOTE_ACCESS = "dropbear" ]; then
|
||||
xbps-install dropbear
|
||||
xbps-install -y dropbear
|
||||
printf '#!/bin/sh\nexec 2>&1\n[ -r conf ] && . ./conf\npkill -9 dropbear\nexec dropbear -p $REMOTE_PORT -w -s -R -F\n' > /etc/sv/dropbear/run
|
||||
ln -sf /etc/sv/dropbear /var/service/
|
||||
fi
|
||||
|
||||
printf "\nnohook resolv.conf\n" >> /etc/dhcpcd.conf
|
||||
printf "Defaults lecture = always\nDefaults lecture_file = /etc/sudoers.d/sudoers.lecture\nroot ALL=(ALL) ALL\n%%wheel ALL=(ALL) ALL\n" > /etc/sudoers
|
||||
printf "\n\033[1m \033[32m\"Bee\" careful \033[34m__\n \033[32mwith sudo! \033[34m// \ \n \\\\\\_/ \033[33m//\n \033[35m''-.._.-''-.._.. \033[33m-(||)(')\n '''\033[0m\n" > /etc/sudoers.d/sudoers.lecture
|
||||
printf "#\!/bin/sh\nclear && (printf \"\" && printf \" E N T E R T H E V O I D\" && printf \"\") | nms -af red\n" > /etc/profile.d/motd.sh
|
||||
|
@ -76,6 +79,9 @@ setup_root() {
|
|||
|
||||
|
||||
setup_configs() {
|
||||
wget -O $HOME/.alacritty.yml $GIT_URL/alacritty/.alacritty.yml
|
||||
wget -O $HOME/.tmux.conf $GIT_URL/tmux/.tmux.conf
|
||||
|
||||
wget -O $HOME/.bashrc $GIT_URL/bash/.bashrc
|
||||
wget -O $HOME/.bash_aliases $GIT_URL/bash/.bash_aliases
|
||||
wget -O $HOME/.bash_functions $GIT_URL/bash/.bash_functions
|
||||
|
@ -96,7 +102,7 @@ setup_configs() {
|
|||
wget -O $HOME/.xinitrc $GIT_URL/xorg/.xinitrc
|
||||
|
||||
mkdir $HOME/.scripts
|
||||
for SCRIPT in cmus-now gitremote irc-post-commit-hook mutag shotz sync todo; do
|
||||
for SCRIPT in cmus-now dbc gitremote irc-post-commit-hook mutag shotz sync todo; do
|
||||
wget -O $HOME/.scripts/$SCRIPT $GIT_URL/scripts/$SCRIPT && chmod +x $HOME/.scripts/$SCRIPT
|
||||
done
|
||||
wget -O $HOME/.scripts/irc2ansi.py https://github.com/internet-relay-chat/archive/blob/master/art/irc2ansi.py
|
||||
|
@ -121,19 +127,6 @@ setup_builds() {
|
|||
wget -O $BUILD/slstatus/config.h $GIT_URL/slstatus/config.h
|
||||
sudo make -C $BUILD/slstatus clean install
|
||||
|
||||
git clone --depth 1 git://git.suckless.org/st $BUILD/st
|
||||
wget -O $BUILD/st/config.h $GIT_URL/st/config.h
|
||||
sed -i 's/it#8,/it#4,/g' $BUILD/st/st.info
|
||||
sudo make -C $BUILD/st clean install
|
||||
|
||||
git clone --depth 1 git://git.suckless.org/tabbed $BUILD/tabbed
|
||||
wget -O $BUILD/tabbed/config.h $GIT_URL/tabbed/config.h
|
||||
wget -O $BUILD/tabbed/patch_autohide.diff $GIT_URL/tabbed/patch_autohide.diff
|
||||
wget -O $BUILD/tabbed/patch_clientnumber.diff $GIT_URL/tabbed/patch_clientnumber.diff
|
||||
patch $BUILD/tabbed/tabbed.c $BUILD/tabbed/patch_autohide.diff
|
||||
patch $BUILD/tabbed/tabbed.c $BUILD/tabbed/patch_clientnumber.diff
|
||||
sudo make -C $BUILD/tabbed clean install
|
||||
|
||||
git clone https://github.com/AngelJumbo/lavat.git $BUILD/lavat
|
||||
sudo make -C $BUILD/lavat clean install
|
||||
}
|
||||
|
|
472
st/config.h
472
st/config.h
|
@ -1,472 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/*
|
||||
* appearance
|
||||
*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font = "BlockZone";
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
* What program is execed by st depends of these precedence rules:
|
||||
* 1: program passed with -e
|
||||
* 2: scroll and/or utmp
|
||||
* 3: SHELL environment variable
|
||||
* 4: value of shell in /etc/passwd
|
||||
* 5: value of shell in config.h
|
||||
*/
|
||||
static char *shell = "/bin/sh";
|
||||
char *utmp = NULL;
|
||||
/* scroll program: to enable use a string like "scroll" */
|
||||
char *scroll = NULL;
|
||||
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
|
||||
|
||||
/* identification sequence returned in DA and DECID */
|
||||
char *vtiden = "\033[?6c";
|
||||
|
||||
/* Kerning / character bounding-box multipliers */
|
||||
static float cwscale = 1.0;
|
||||
static float chscale = 1.0;
|
||||
|
||||
/*
|
||||
* word delimiter string
|
||||
*
|
||||
* More advanced example: L" `'\"()[]{}"
|
||||
*/
|
||||
wchar_t *worddelimiters = L" ";
|
||||
|
||||
/* selection timeouts (in milliseconds) */
|
||||
static unsigned int doubleclicktimeout = 300;
|
||||
static unsigned int tripleclicktimeout = 600;
|
||||
|
||||
/* alt screens */
|
||||
int allowaltscreen = 1;
|
||||
|
||||
/* allow certain non-interactive (insecure) window operations such as:
|
||||
setting the clipboard text */
|
||||
int allowwindowops = 0;
|
||||
|
||||
/*
|
||||
* draw latency range in ms - from new content/keypress/etc until drawing.
|
||||
* within this range, st draws when content stops arriving (idle). mostly it's
|
||||
* near minlatency, but it waits longer for slow updates to avoid partial draw.
|
||||
* low minlatency will tear/flicker more, as it can "detect" idle too early.
|
||||
*/
|
||||
static double minlatency = 8;
|
||||
static double maxlatency = 33;
|
||||
|
||||
/*
|
||||
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
||||
* attribute.
|
||||
*/
|
||||
static unsigned int blinktimeout = 800;
|
||||
|
||||
/*
|
||||
* thickness of underline and bar cursors
|
||||
*/
|
||||
static unsigned int cursorthickness = 2;
|
||||
|
||||
/*
|
||||
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
|
||||
* it
|
||||
*/
|
||||
static int bellvolume = 0;
|
||||
|
||||
/* default TERM value */
|
||||
char *termname = "st-256color";
|
||||
|
||||
/*
|
||||
* spaces per tab
|
||||
*
|
||||
* When you are changing this value, don't forget to adapt the »it« value in
|
||||
* the st.info and appropriately install the st.info in the environment where
|
||||
* you use this st version.
|
||||
*
|
||||
* it#$tabspaces,
|
||||
*
|
||||
* Secondly make sure your kernel is not expanding tabs. When running `stty
|
||||
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
|
||||
* running following command:
|
||||
*
|
||||
* stty tabs
|
||||
*/
|
||||
unsigned int tabspaces = 4;
|
||||
|
||||
/* Terminal colors (16 first used in escape sequence) */
|
||||
static const char *colorname[] = {
|
||||
/* colors */
|
||||
"#000000",
|
||||
"#CC0000",
|
||||
"#4E9A06",
|
||||
"#C4A000",
|
||||
"#3465A4",
|
||||
"#75507B",
|
||||
"#06989A",
|
||||
"#D3D7CF",
|
||||
|
||||
/* bright */
|
||||
"#555753",
|
||||
"#EF2929",
|
||||
"#00BA13",
|
||||
"#FCE94F",
|
||||
"#729FCF",
|
||||
"#F200CB",
|
||||
"#00B5BD",
|
||||
"#EEEEEC",
|
||||
|
||||
[255] = 0,
|
||||
|
||||
/* more colors can be added after 255 to use with DefaultXX */
|
||||
"#cccccc",
|
||||
"#555555",
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Default colors (colorname index)
|
||||
* foreground, background, cursor, reverse cursor
|
||||
*/
|
||||
unsigned int defaultfg = 7;
|
||||
unsigned int defaultbg = 0;
|
||||
unsigned int defaultcs = 256;
|
||||
static unsigned int defaultrcs = 257;
|
||||
|
||||
/*
|
||||
* Default shape of cursor
|
||||
* 2: Block ("█")
|
||||
* 4: Underline ("_")
|
||||
* 6: Bar ("|")
|
||||
* 7: Snowman ("☃")
|
||||
*/
|
||||
static unsigned int cursorshape = 2;
|
||||
|
||||
/*
|
||||
* Default columns and rows numbers
|
||||
*/
|
||||
|
||||
static unsigned int cols = 80;
|
||||
static unsigned int rows = 24;
|
||||
|
||||
/*
|
||||
* Default colour and shape of the mouse cursor
|
||||
*/
|
||||
static unsigned int mouseshape = XC_xterm;
|
||||
static unsigned int mousefg = 7;
|
||||
static unsigned int mousebg = 0;
|
||||
|
||||
/*
|
||||
* Color used to display font attributes when fontconfig selected a font which
|
||||
* doesn't match the ones requested.
|
||||
*/
|
||||
static unsigned int defaultattr = 11;
|
||||
|
||||
/*
|
||||
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
|
||||
* Note that if you want to use ShiftMask with selmasks, set this to an other
|
||||
* modifier, set to 0 to not use it.
|
||||
*/
|
||||
static uint forcemousemod = ShiftMask;
|
||||
|
||||
/*
|
||||
* Internal mouse shortcuts.
|
||||
* Beware that overloading Button1 will disable the selection.
|
||||
*/
|
||||
static MouseShortcut mshortcuts[] = {
|
||||
/* mask button function argument release */
|
||||
// { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
|
||||
// { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
|
||||
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
|
||||
// { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
|
||||
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
|
||||
};
|
||||
|
||||
/* Internal keyboard shortcuts. */
|
||||
#define MODKEY Mod1Mask
|
||||
#define TERMMOD (ControlMask|ShiftMask)
|
||||
|
||||
static Shortcut shortcuts[] = {
|
||||
/* mask keysym function argument */
|
||||
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
|
||||
// { ControlMask, XK_Print, toggleprinter, {.i = 0} },
|
||||
// { ShiftMask, XK_Print, printscreen, {.i = 0} },
|
||||
// { XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
|
||||
{ TERMMOD, XK_Up, zoom, {.f = +1} },
|
||||
{ TERMMOD, XK_Down, zoom, {.f = -1} },
|
||||
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
|
||||
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
|
||||
{ TERMMOD, XK_V, clippaste, {.i = 0} },
|
||||
// { TERMMOD, XK_Y, selpaste, {.i = 0} },
|
||||
// { ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||
// { TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
||||
};
|
||||
|
||||
/*
|
||||
* Special keys (change & recompile st.info accordingly)
|
||||
*
|
||||
* Mask value:
|
||||
* * Use XK_ANY_MOD to match the key no matter modifiers state
|
||||
* * Use XK_NO_MOD to match the key alone (no modifiers)
|
||||
* appkey value:
|
||||
* * 0: no value
|
||||
* * > 0: keypad application mode enabled
|
||||
* * = 2: term.numlock = 1
|
||||
* * < 0: keypad application mode disabled
|
||||
* appcursor value:
|
||||
* * 0: no value
|
||||
* * > 0: cursor application mode enabled
|
||||
* * < 0: cursor application mode disabled
|
||||
*
|
||||
* Be careful with the order of the definitions because st searches in
|
||||
* this table sequentially, so any XK_ANY_MOD must be in the last
|
||||
* position for a key.
|
||||
*/
|
||||
|
||||
/*
|
||||
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
|
||||
* to be mapped below, add them to this array.
|
||||
*/
|
||||
static KeySym mappedkeys[] = { -1 };
|
||||
|
||||
/*
|
||||
* State bits to ignore when matching key or button events. By default,
|
||||
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
|
||||
*/
|
||||
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
|
||||
|
||||
/*
|
||||
* This is the huge key array which defines all compatibility to the Linux
|
||||
* world. Please decide about changes wisely.
|
||||
*/
|
||||
static Key key[] = {
|
||||
/* keysym mask string appkey appcursor */
|
||||
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
|
||||
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
|
||||
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
|
||||
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
|
||||
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
|
||||
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
|
||||
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
|
||||
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
|
||||
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
|
||||
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
|
||||
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
|
||||
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
|
||||
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
|
||||
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
|
||||
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
|
||||
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
|
||||
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
|
||||
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
|
||||
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
|
||||
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
|
||||
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
|
||||
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
|
||||
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
|
||||
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
|
||||
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
|
||||
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
|
||||
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
|
||||
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
|
||||
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
|
||||
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
|
||||
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
|
||||
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
|
||||
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
|
||||
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
|
||||
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
|
||||
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
|
||||
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
|
||||
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
|
||||
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
|
||||
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
|
||||
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
|
||||
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
|
||||
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
|
||||
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
|
||||
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
|
||||
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
|
||||
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
|
||||
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
|
||||
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
|
||||
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
|
||||
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
|
||||
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
|
||||
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
|
||||
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
|
||||
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
|
||||
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
|
||||
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
|
||||
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
|
||||
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
|
||||
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
|
||||
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
|
||||
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
|
||||
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
|
||||
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
|
||||
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
|
||||
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
|
||||
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
|
||||
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
|
||||
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
|
||||
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
|
||||
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
|
||||
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
|
||||
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
|
||||
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
|
||||
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
|
||||
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
|
||||
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
|
||||
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
|
||||
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
|
||||
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
|
||||
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
|
||||
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
|
||||
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
|
||||
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
|
||||
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
|
||||
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
|
||||
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
|
||||
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
|
||||
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
|
||||
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
|
||||
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
|
||||
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
|
||||
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
|
||||
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
|
||||
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
|
||||
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
|
||||
{ XK_Insert, ControlMask, "\033[L", -1, 0},
|
||||
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
|
||||
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
|
||||
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
|
||||
{ XK_Delete, ControlMask, "\033[M", -1, 0},
|
||||
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
|
||||
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
|
||||
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
|
||||
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
|
||||
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
|
||||
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
|
||||
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
|
||||
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
|
||||
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
|
||||
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
|
||||
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
|
||||
{ XK_End, ControlMask, "\033[J", -1, 0},
|
||||
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
|
||||
{ XK_End, ShiftMask, "\033[K", -1, 0},
|
||||
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
|
||||
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
|
||||
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
|
||||
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
|
||||
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
|
||||
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
|
||||
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
|
||||
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
|
||||
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
|
||||
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
|
||||
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
|
||||
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
|
||||
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
|
||||
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
|
||||
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
|
||||
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
|
||||
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
|
||||
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
|
||||
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
|
||||
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
|
||||
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
|
||||
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
|
||||
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
|
||||
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
|
||||
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
|
||||
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
|
||||
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
|
||||
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
|
||||
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
|
||||
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
|
||||
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
|
||||
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
|
||||
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
|
||||
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
|
||||
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
|
||||
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
|
||||
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
|
||||
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
|
||||
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
|
||||
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
|
||||
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
|
||||
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
|
||||
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
|
||||
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
|
||||
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
|
||||
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
|
||||
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
|
||||
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
|
||||
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
|
||||
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
|
||||
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
|
||||
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
|
||||
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
|
||||
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
|
||||
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
|
||||
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
|
||||
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
|
||||
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
|
||||
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
|
||||
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
|
||||
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
|
||||
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
|
||||
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
|
||||
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
|
||||
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
|
||||
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
|
||||
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
|
||||
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
|
||||
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
|
||||
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
|
||||
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
|
||||
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
|
||||
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
|
||||
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
|
||||
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
|
||||
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
|
||||
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
|
||||
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
|
||||
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
|
||||
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
|
||||
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
|
||||
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
|
||||
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
|
||||
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
|
||||
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
|
||||
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
|
||||
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
|
||||
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
|
||||
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
|
||||
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
|
||||
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
|
||||
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
|
||||
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
|
||||
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
|
||||
};
|
||||
|
||||
/*
|
||||
* Selection types' masks.
|
||||
* Use the same masks as usual.
|
||||
* Button1Mask is always unset, to make masks match between ButtonPress.
|
||||
* ButtonRelease and MotionNotify.
|
||||
* If no match is found, regular selection is used.
|
||||
*/
|
||||
static uint selmasks[] = {
|
||||
[SEL_RECTANGULAR] = Mod1Mask,
|
||||
};
|
||||
|
||||
/*
|
||||
* Printable characters in ASCII, used to estimate the advance width
|
||||
* of single wide characters.
|
||||
*/
|
||||
static char ascii_printable[] =
|
||||
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
||||
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
|
@ -1,47 +0,0 @@
|
|||
static const char font[] = "Misc Ohsnap.Icons:style=Regular:size=11";
|
||||
static const char* normbgcolor = "#222222";
|
||||
static const char* normfgcolor = "#cccccc";
|
||||
static const char* selbgcolor = "#555555";
|
||||
static const char* selfgcolor = "#ffffff";
|
||||
static const char* urgbgcolor = "#111111";
|
||||
static const char* urgfgcolor = "#cc0000";
|
||||
static const char before[] = "<";
|
||||
static const char after[] = ">";
|
||||
static const char titletrim[] = "...";
|
||||
static const int tabwidth = 50;
|
||||
static const Bool foreground = True;
|
||||
static Bool urgentswitch = False;
|
||||
static int newposition = 0;
|
||||
static Bool npisrelative = False;
|
||||
|
||||
#define SETPROP(p) { \
|
||||
.v = (char *[]){ "/bin/sh", "-c", \
|
||||
"prop=\"`xwininfo -children -id $1 | grep '^ 0x' |" \
|
||||
"sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' |" \
|
||||
"xargs -0 printf %b | dmenu -l 10 -w $1`\" &&" \
|
||||
"xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
|
||||
p, winid, NULL \
|
||||
} \
|
||||
}
|
||||
|
||||
#define MODKEY ControlMask
|
||||
static Key keys[] = {
|
||||
{ MODKEY|ShiftMask, XK_Return, focusonce, { 0 } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, { 0 } },
|
||||
{ MODKEY, XK_Left, rotate, { .i = -1 } },
|
||||
{ MODKEY, XK_Right, rotate, { .i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_Left, movetab, { .i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_Right, movetab, { .i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_k, killclient, { 0 } },
|
||||
{ MODKEY, XK_1, move, { .i = 0 } },
|
||||
{ MODKEY, XK_2, move, { .i = 1 } },
|
||||
{ MODKEY, XK_3, move, { .i = 2 } },
|
||||
{ MODKEY, XK_4, move, { .i = 3 } },
|
||||
{ MODKEY, XK_5, move, { .i = 4 } },
|
||||
{ MODKEY, XK_6, move, { .i = 5 } },
|
||||
{ MODKEY, XK_7, move, { .i = 6 } },
|
||||
{ MODKEY, XK_8, move, { .i = 7 } },
|
||||
{ MODKEY, XK_9, move, { .i = 8 } },
|
||||
{ MODKEY, XK_0, move, { .i = 9 } },
|
||||
};
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
diff --git a/tabbed.c b/tabbed.c
|
||||
index eafe28a..b0b9662 100644
|
||||
--- a/tabbed.c
|
||||
+++ b/tabbed.c
|
||||
@@ -152,7 +152,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = {
|
||||
[MapRequest] = maprequest,
|
||||
[PropertyNotify] = propertynotify,
|
||||
};
|
||||
-static int bh, obh, wx, wy, ww, wh;
|
||||
+static int bh, obh, wx, wy, ww, wh, vbh;
|
||||
static unsigned int numlockmask;
|
||||
static Bool running = True, nextfocus, doinitspawn = True,
|
||||
fillagain = False, closelastclient = False,
|
||||
@@ -324,7 +324,7 @@ void
|
||||
drawbar(void)
|
||||
{
|
||||
XftColor *col;
|
||||
- int c, cc, fc, width;
|
||||
+ int c, cc, fc, width, nbh, i;
|
||||
char *name = NULL;
|
||||
|
||||
if (nclients == 0) {
|
||||
@@ -332,12 +332,21 @@ drawbar(void)
|
||||
dc.w = ww;
|
||||
XFetchName(dpy, win, &name);
|
||||
drawtext(name ? name : "", dc.norm);
|
||||
- XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, bh, 0, 0);
|
||||
+ XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, vbh, 0, 0);
|
||||
XSync(dpy, False);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+ nbh = nclients > 1 ? vbh : 0;
|
||||
+ if (bh != nbh) {
|
||||
+ bh = nbh;
|
||||
+ for (i = 0; i < nclients; i++)
|
||||
+ XMoveResizeWindow(dpy, clients[i]->win, 0, bh, ww, wh - bh);
|
||||
+ }
|
||||
+ if (bh == 0)
|
||||
+ return;
|
||||
+
|
||||
width = ww;
|
||||
cc = ww / tabwidth;
|
||||
if (nclients > cc)
|
||||
@@ -984,7 +993,7 @@ setup(void)
|
||||
screen = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, screen);
|
||||
initfont(font);
|
||||
- bh = dc.h = dc.font.height + 2;
|
||||
+ vbh = dc.h = dc.font.height + 2;
|
||||
|
||||
/* init atoms */
|
||||
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
|
|
@ -1,23 +0,0 @@
|
|||
diff --git a/tabbed.c b/tabbed.c
|
||||
index 9a44795..657909e 100644
|
||||
--- a/tabbed.c
|
||||
+++ b/tabbed.c
|
||||
@@ -318,6 +318,7 @@ drawbar(void)
|
||||
XftColor *col;
|
||||
int c, cc, fc, width;
|
||||
char *name = NULL;
|
||||
+ char tabtitle[256];
|
||||
|
||||
if (nclients == 0) {
|
||||
dc.x = 0;
|
||||
@@ -359,7 +360,9 @@ drawbar(void)
|
||||
} else {
|
||||
col = clients[c]->urgent ? dc.urg : dc.norm;
|
||||
}
|
||||
- drawtext(clients[c]->name, col);
|
||||
+ snprintf(tabtitle, sizeof(tabtitle), "%d: %s",
|
||||
+ c + 1, clients[c]->name);
|
||||
+ drawtext(tabtitle, col);
|
||||
dc.x += dc.w;
|
||||
clients[c]->tabx = dc.x;
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
bind -n C-k kill-window
|
||||
bind -n C-n new-window
|
||||
bind -n C-t command-prompt -p "New title:" "rename-window '%%'"
|
||||
|
||||
bind -n C-M-t command-prompt -p "New session name:" "rename-session '%%'"
|
||||
bind -n C-M-Left switch-client -n
|
||||
bind -n C-M-Right switch-client -p
|
||||
|
||||
bind -n C-Left previous-window
|
||||
bind -n C-Right next-window
|
||||
bind -n C-S-Left swap-window -t -1 \; previous-window
|
||||
bind -n C-S-Right swap-window -t +1 \; next-window
|
||||
|
||||
bind -n C-Up split-window -h
|
||||
bind -n C-Down split-window -v
|
||||
bind -n C-S-Up select-pane -t :.+
|
||||
bind -n C-S-Down select-pane -t :.-
|
||||
|
||||
set -g mouse on
|
||||
|
||||
set -g status-interval 3
|
||||
set -g status-style bg=black
|
||||
|
||||
set -g status-right-length 100
|
||||
set -g status-right "#[fg=yellow]#H#[default] | #[fg=cyan]Disk:#[default] #(df -h | grep '/dev/sda2' | awk '{printf \"%3.0f%\", $5}') | #[fg=cyan]CPU: #[default]#(top -bn1 | grep 'Cpu(s)' | awk '{printf \"%3.0f%\", $2 + $4}') | #[fg=cyan]MEM: #[default]#(free | awk '/^Mem/ {printf \"%3.0f%\", $3/$2 * 100.0}') | %I:%M"
|
||||
|
||||
setw -g window-status-current-style fg=cyan,bg=default
|
||||
setw -g window-status-activity-style fg=yellow,bg=default
|
||||
setw -g window-status-style fg=grey,bg=black
|
||||
setw -g window-status-format "#I: #W"
|
||||
setw -g window-status-current-format "#[bold]#I: #W"
|
Loading…
Reference in New Issue