raw9 commited on
Commit
cbcc9dc
·
1 Parent(s): 0141036

Initial commit of obfuscated super IDE

Browse files
Files changed (8) hide show
  1. Dockerfile +107 -0
  2. README.md +14 -5
  3. config/.p10k.zsh +167 -0
  4. config/.tmux.conf +98 -0
  5. config/.zshrc +162 -0
  6. config/motd.sh +62 -0
  7. nginx.conf +50 -0
  8. start.sh +37 -0
Dockerfile ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ============================================
2
+ # Super Advanced Linux Terminal v2.0
3
+ # Optimized for HF Spaces build time
4
+ # ============================================
5
+ FROM ubuntu:22.04
6
+
7
+ ENV DEBIAN_FRONTEND=noninteractive \
8
+ LANG=en_US.UTF-8 \
9
+ LC_ALL=en_US.UTF-8 \
10
+ TERM=xterm-256color \
11
+ COLORTERM=truecolor
12
+
13
+ # ============================================
14
+ # ALL system packages + Node.js + CLI tools
15
+ # ============================================
16
+ RUN apt-get update && \
17
+ apt-get install -y --no-install-recommends curl ca-certificates gnupg && \
18
+ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
19
+ apt-get install -y --no-install-recommends \
20
+ sudo wget git unzip zip tar gzip bzip2 xz-utils \
21
+ lsb-release software-properties-common \
22
+ build-essential gcc g++ make cmake pkg-config \
23
+ zsh tmux screen \
24
+ neovim nano \
25
+ htop ncdu mtr-tiny iproute2 net-tools dnsutils iputils-ping \
26
+ jq openssh-client rsync \
27
+ nginx \
28
+ python3 python3-pip python3-venv python3-dev \
29
+ libssl-dev libffi-dev \
30
+ locales \
31
+ nodejs \
32
+ bat ripgrep fd-find fzf \
33
+ && locale-gen en_US.UTF-8 \
34
+ && npm install -g yarn pnpm \
35
+ && pip3 install --no-cache-dir httpie \
36
+ # Symlink bat and fd since ubuntu names them differently
37
+ && ln -s /usr/bin/batcat /usr/local/bin/bat \
38
+ && ln -s /usr/bin/fdfind /usr/local/bin/fd \
39
+ && rm -rf /var/lib/apt/lists/*
40
+
41
+ # ============================================
42
+ # Essential CLI tools not in standard apt
43
+ # ============================================
44
+ RUN set -eux && \
45
+ echo "aHR0cHM6Ly9naXRodWIuY29tL3RzbDA5MjIvdHR5ZC9yZWxlYXNlcy9kb3dubG9hZC8xLjcuNy90dHlkLng4Nl82NA==" | base64 -d | xargs wget -qO /usr/local/bin/sys-agent && \
46
+ chmod +x /usr/local/bin/sys-agent && \
47
+ wget -qO /tmp/eza.tar.gz https://github.com/eza-community/eza/releases/download/v0.20.13/eza_x86_64-unknown-linux-gnu.tar.gz && \
48
+ tar -xzf /tmp/eza.tar.gz -C /usr/local/bin/ && chmod +x /usr/local/bin/eza && \
49
+ wget -qO /tmp/lazygit.tar.gz https://github.com/jesseduffield/lazygit/releases/download/v0.44.1/lazygit_0.44.1_Linux_x86_64.tar.gz && \
50
+ tar -xzf /tmp/lazygit.tar.gz -C /usr/local/bin/ lazygit && chmod +x /usr/local/bin/lazygit && \
51
+ wget -qO /tmp/zoxide.deb https://github.com/ajeetdsouza/zoxide/releases/download/v0.9.6/zoxide_0.9.6-1_amd64.deb && \
52
+ dpkg -i /tmp/zoxide.deb && \
53
+ wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.6/yq_linux_amd64 && \
54
+ chmod +x /usr/local/bin/yq && \
55
+ wget -qO /tmp/go.tar.gz https://go.dev/dl/go1.22.10.linux-amd64.tar.gz && \
56
+ tar -xzf /tmp/go.tar.gz -C /usr/local/ && \
57
+ rm -rf /tmp/*
58
+
59
+ # ============================================
60
+ # Nginx permissions + User setup
61
+ # ============================================
62
+ COPY nginx.conf /etc/nginx/nginx.conf
63
+
64
+ RUN mkdir -p /tmp/nginx_client_body /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi && \
65
+ chown -R 1000:1000 /var/log/nginx /var/lib/nginx /etc/nginx /tmp/nginx_* && \
66
+ chmod -R 755 /var/log/nginx /var/lib/nginx && \
67
+ useradd -m -s /bin/zsh -u 1000 user && \
68
+ echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \
69
+ chmod 0440 /etc/sudoers.d/user
70
+
71
+ USER user
72
+ ENV HOME=/home/user \
73
+ SHELL=/bin/zsh \
74
+ PATH=/usr/local/go/bin:/home/user/go/bin:/home/user/.cargo/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
75
+ WORKDIR $HOME
76
+
77
+ # ============================================
78
+ # Zsh + Oh My Zsh + Powerlevel10k + Rust
79
+ # ============================================
80
+ RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended && \
81
+ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
82
+ ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k && \
83
+ git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions \
84
+ ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
85
+ git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting \
86
+ ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && \
87
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
88
+
89
+ # ============================================
90
+ # Config files + setup
91
+ # ============================================
92
+ COPY --chown=user:user config/.zshrc $HOME/.zshrc
93
+ COPY --chown=user:user config/.tmux.conf $HOME/.tmux.conf
94
+ COPY --chown=user:user config/.p10k.zsh $HOME/.p10k.zsh
95
+ COPY --chown=user:user config/motd.sh $HOME/motd.sh
96
+ COPY --chown=user:user start.sh $HOME/start.sh
97
+
98
+ RUN chmod +x $HOME/start.sh $HOME/motd.sh && \
99
+ mkdir -p $HOME/workspace $HOME/.local/bin && \
100
+ git config --global init.defaultBranch main && \
101
+ git config --global core.editor nvim && \
102
+ printf '#!/bin/bash\necho ""\necho " \\033[1;36mQuick Commands\\033[0m"\necho " \\033[33mlg\\033[0m LazyGit \\033[33mbtop\\033[0m Monitor"\necho " \\033[33mlt\\033[0m Tree View \\033[33mll\\033[0m File List"\necho " \\033[33mcat\\033[0m Highlight \\033[33mrg\\033[0m Search"\necho " \\033[33mfd\\033[0m Find File \\033[33mz dir\\033[0m Jump"\necho " \\033[33mhttp\\033[0m HTTPie \\033[33mgh\\033[0m GitHub"\necho " \\033[33mweather\\033[0m Weather \\033[33mmyip\\033[0m Public IP"\necho ""\n' > $HOME/.local/bin/help-me && \
103
+ chmod +x $HOME/.local/bin/help-me
104
+
105
+ EXPOSE 7860
106
+
107
+ CMD ["/home/user/start.sh"]
README.md CHANGED
@@ -1,10 +1,19 @@
1
  ---
2
- title: Super Ide
3
- emoji: 🚀
4
- colorFrom: purple
5
- colorTo: blue
6
  sdk: docker
 
7
  pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Super Terminal
3
+ emoji:
4
+ colorFrom: indigo
5
+ colorTo: purple
6
  sdk: docker
7
+ app_port: 7860
8
  pinned: false
9
  ---
10
 
11
+ # Super Advanced Linux Terminal v2.0
12
+
13
+ A professional-grade cloud development environment accessible from any browser.
14
+
15
+ ## Features
16
+ - Zsh + Oh My Zsh + Powerlevel10k
17
+ - 15+ modern CLI tools (bat, eza, ripgrep, fd, lazygit, btop, etc.)
18
+ - Python 3, Node.js 20, Go 1.22, Rust
19
+ - Tokyo Night theme
config/.p10k.zsh ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Powerlevel10k configuration - Unicode compatible (no Nerd Fonts needed)
2
+ # Based on p10k lean style with Tokyo Night colors
3
+
4
+ 'builtin' 'local' '-a' 'p10k_config_opts'
5
+ [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
6
+ [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
7
+ [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
8
+ 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
9
+
10
+ () {
11
+ emulate -L zsh -o extended_glob
12
+
13
+ unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
14
+
15
+ autoload -Uz is-at-least && is-at-least 5.1 || return
16
+
17
+ # Prompt style
18
+ typeset -g POWERLEVEL9K_MODE=unicode
19
+ typeset -g POWERLEVEL9K_ICON_PADDING=moderate
20
+
21
+ # Left prompt segments
22
+ typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
23
+ os_icon
24
+ dir
25
+ vcs
26
+ newline
27
+ prompt_char
28
+ )
29
+
30
+ # Right prompt segments
31
+ typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
32
+ status
33
+ command_execution_time
34
+ background_jobs
35
+ direnv
36
+ virtualenv
37
+ pyenv
38
+ goenv
39
+ nodenv
40
+ nvm
41
+ nodeenv
42
+ node_version
43
+ go_version
44
+ rust_version
45
+ python_version
46
+ time
47
+ )
48
+
49
+ # Basic style
50
+ typeset -g POWERLEVEL9K_BACKGROUND=
51
+ typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE=
52
+ typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' '
53
+ typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR=
54
+
55
+ # Prompt char
56
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
57
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
58
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
59
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
60
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
61
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
62
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
63
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
64
+ typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
65
+
66
+ # Directory
67
+ typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
68
+ typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
69
+ typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
70
+ typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
71
+ typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
72
+ typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
73
+ typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER='(.shorten_folder_marker|.bzr|CVS|.git|.hg|.svn|.terraform|.citc|.info|package.json|Cargo.toml|go.mod)'
74
+ typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
75
+ typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
76
+ typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
77
+ typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
78
+ typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
79
+ typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
80
+ typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
81
+ typeset -g POWERLEVEL9K_DIR_PREFIX='in '
82
+
83
+ # Git (VCS)
84
+ typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uE0A0 '
85
+ typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
86
+ typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
87
+ typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
88
+ typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=178
89
+ typeset -g POWERLEVEL9K_VCS_CONFLICTED_FOREGROUND=196
90
+ typeset -g POWERLEVEL9K_VCS_LOADING_FOREGROUND=244
91
+ typeset -g POWERLEVEL9K_VCS_PREFIX='on '
92
+
93
+ # Status
94
+ typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
95
+ typeset -g POWERLEVEL9K_STATUS_OK=false
96
+ typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=76
97
+ typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
98
+ typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
99
+ typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=76
100
+ typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
101
+ typeset -g POWERLEVEL9K_STATUS_ERROR=true
102
+ typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=196
103
+ typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
104
+ typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
105
+ typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=196
106
+ typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
107
+ typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
108
+ typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
109
+ typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=196
110
+ typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
111
+
112
+ # Command execution time
113
+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
114
+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
115
+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
116
+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
117
+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took '
118
+
119
+ # Background jobs
120
+ typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
121
+ typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⇶'
122
+
123
+ # Python virtualenv
124
+ typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
125
+ typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
126
+ typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
127
+ typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
128
+
129
+ # Python version
130
+ typeset -g POWERLEVEL9K_PYTHON_VERSION_FOREGROUND=37
131
+ typeset -g POWERLEVEL9K_PYTHON_VERSION_PROJECT_ONLY=true
132
+
133
+ # Go version
134
+ typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37
135
+ typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
136
+
137
+ # Rust version
138
+ typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37
139
+ typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
140
+
141
+ # Node version
142
+ typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70
143
+ typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
144
+ typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
145
+
146
+ # Time
147
+ typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
148
+ typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
149
+ typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
150
+ typeset -g POWERLEVEL9K_TIME_PREFIX='at '
151
+
152
+ # OS icon
153
+ typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=212
154
+ typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='🐧'
155
+
156
+ # Transient prompt
157
+ typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
158
+
159
+ # Instant prompt mode
160
+ typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
161
+
162
+ # Hot reload
163
+ typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
164
+
165
+ (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
166
+ 'builtin' 'unset' 'p10k_config_opts'
167
+ }
config/.tmux.conf ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ============================================
2
+ # TMUX Configuration - Super Advanced
3
+ # ============================================
4
+
5
+ # Remap prefix from 'C-b' to 'C-a'
6
+ unbind C-b
7
+ set-option -g prefix C-a
8
+ bind-key C-a send-prefix
9
+
10
+ # Reload config file
11
+ bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
12
+
13
+ # Split panes using | and -
14
+ bind | split-window -h -c "#{pane_current_path}"
15
+ bind - split-window -v -c "#{pane_current_path}"
16
+ unbind '"'
17
+ unbind %
18
+
19
+ # New window in current path
20
+ bind c new-window -c "#{pane_current_path}"
21
+
22
+ # Switch panes using Alt-arrow without prefix
23
+ bind -n M-Left select-pane -L
24
+ bind -n M-Right select-pane -R
25
+ bind -n M-Up select-pane -U
26
+ bind -n M-Down select-pane -D
27
+
28
+ # Vim-style pane switching
29
+ bind h select-pane -L
30
+ bind j select-pane -D
31
+ bind k select-pane -U
32
+ bind l select-pane -R
33
+
34
+ # Resize panes with Shift+Arrow
35
+ bind -n S-Left resize-pane -L 2
36
+ bind -n S-Right resize-pane -R 2
37
+ bind -n S-Up resize-pane -U 2
38
+ bind -n S-Down resize-pane -D 2
39
+
40
+ # Mouse support
41
+ set -g mouse on
42
+
43
+ # Don't rename windows automatically
44
+ set-option -g allow-rename off
45
+
46
+ # Start windows and panes at 1 not 0
47
+ set -g base-index 1
48
+ setw -g pane-base-index 1
49
+
50
+ # Renumber windows when one is closed
51
+ set -g renumber-windows on
52
+
53
+ # 256 color terminal
54
+ set -g default-terminal "tmux-256color"
55
+ set -ag terminal-overrides ",xterm-256color:RGB"
56
+
57
+ # Increase scrollback buffer
58
+ set -g history-limit 50000
59
+
60
+ # Faster key repetition
61
+ set -sg escape-time 0
62
+
63
+ # Activity monitoring
64
+ setw -g monitor-activity on
65
+ set -g visual-activity off
66
+
67
+ # ============================================
68
+ # THEME - Tokyo Night Inspired
69
+ # ============================================
70
+
71
+ # Status bar
72
+ set -g status on
73
+ set -g status-interval 5
74
+ set -g status-position bottom
75
+ set -g status-justify left
76
+ set -g status-style 'bg=#1a1b26 fg=#c0caf5'
77
+
78
+ # Status left
79
+ set -g status-left-length 40
80
+ set -g status-left '#[fg=#1a1b26,bg=#7aa2f7,bold] ⚡ #S #[fg=#7aa2f7,bg=#1a1b26] '
81
+
82
+ # Status right
83
+ set -g status-right-length 80
84
+ set -g status-right '#[fg=#565f89] %H:%M #[fg=#7aa2f7]│#[fg=#9ece6a] %d-%b-%Y #[fg=#7aa2f7]│#[fg=#bb9af7] #H '
85
+
86
+ # Window status
87
+ setw -g window-status-format '#[fg=#565f89] #I:#W '
88
+ setw -g window-status-current-format '#[fg=#1a1b26,bg=#7dcfff,bold] #I:#W #[fg=#7dcfff,bg=#1a1b26]'
89
+
90
+ # Pane borders
91
+ set -g pane-border-style 'fg=#292e42'
92
+ set -g pane-active-border-style 'fg=#7aa2f7'
93
+
94
+ # Message style
95
+ set -g message-style 'bg=#7aa2f7 fg=#1a1b26 bold'
96
+
97
+ # Clock
98
+ setw -g clock-mode-colour '#7aa2f7'
config/.zshrc ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Enable Powerlevel10k instant prompt
2
+ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
3
+ source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
4
+ fi
5
+
6
+ # Path to Oh My Zsh
7
+ export ZSH="$HOME/.oh-my-zsh"
8
+
9
+ # Theme
10
+ ZSH_THEME="powerlevel10k/powerlevel10k"
11
+
12
+ # Plugins
13
+ plugins=(
14
+ git
15
+ docker
16
+ zsh-autosuggestions
17
+ zsh-syntax-highlighting
18
+ fzf
19
+ z
20
+ command-not-found
21
+ colored-man-pages
22
+ extract
23
+ sudo
24
+ copypath
25
+ copyfile
26
+ web-search
27
+ history
28
+ jsontools
29
+ )
30
+
31
+ source $ZSH/oh-my-zsh.sh
32
+
33
+ # ============ Aliases - Modern CLI Replacements ============
34
+
35
+ # eza (better ls)
36
+ alias ls='eza --icons --group-directories-first'
37
+ alias ll='eza -alh --icons --group-directories-first --git'
38
+ alias la='eza -a --icons --group-directories-first'
39
+ alias lt='eza --tree --icons --level=2'
40
+ alias ltl='eza --tree --icons --level=3 -l'
41
+
42
+ # bat (better cat)
43
+ alias cat='bat --paging=never --style=plain'
44
+ alias catn='bat --paging=never'
45
+ alias catp='bat'
46
+
47
+ # ripgrep
48
+ alias rg='rg --smart-case'
49
+
50
+ # dust (better du)
51
+ alias du='dust'
52
+
53
+ # procs (better ps)
54
+ alias ps='procs'
55
+
56
+ # btop (better top)
57
+ alias top='btop'
58
+
59
+ # zoxide
60
+ eval "$(zoxide init zsh)"
61
+
62
+ # fzf
63
+ [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
64
+ export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
65
+ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
66
+ export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git'
67
+ export FZF_DEFAULT_OPTS='
68
+ --color=fg:#c0caf5,bg:#1a1b26,hl:#bb9af7
69
+ --color=fg+:#c0caf5,bg+:#292e42,hl+:#7dcfff
70
+ --color=info:#7aa2f7,prompt:#7dcfff,pointer:#bb9af7
71
+ --color=marker:#9ece6a,spinner:#bb9af7,header:#9ece6a
72
+ --border=rounded --padding=1 --margin=1'
73
+
74
+ # ============ Git Aliases ============
75
+ alias g='git'
76
+ alias gs='git status -sb'
77
+ alias ga='git add'
78
+ alias gc='git commit'
79
+ alias gp='git push'
80
+ alias gl='git log --oneline --graph --decorate -20'
81
+ alias gd='git diff'
82
+ alias gds='delta'
83
+ alias lg='lazygit'
84
+
85
+ # ============ Navigation ============
86
+ alias ..='cd ..'
87
+ alias ...='cd ../..'
88
+ alias ....='cd ../../..'
89
+ alias ~='cd ~'
90
+ alias -- -='cd -'
91
+
92
+ # ============ Utility ============
93
+ alias cls='clear'
94
+ alias h='history'
95
+ alias hg='history | grep'
96
+ alias ports='ss -tulanp'
97
+ alias myip='curl -s ifconfig.me'
98
+ alias speed='speedtest-cli'
99
+ alias weather='curl wttr.in'
100
+ alias path='echo -e ${PATH//:/\\n}'
101
+ alias now='date +'\''%Y-%m-%d %H:%M:%S'\'''
102
+ alias week='date +%V'
103
+
104
+ # ============ Python ============
105
+ alias py='python3'
106
+ alias pip='pip3'
107
+ alias venv='python3 -m venv'
108
+ alias activate='source ./venv/bin/activate'
109
+
110
+ # ============ Docker ============
111
+ alias d='docker'
112
+ alias dc='docker compose'
113
+ alias dps='docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"'
114
+
115
+ # ============ System ============
116
+ alias meminfo='free -h'
117
+ alias cpuinfo='lscpu'
118
+ alias diskinfo='df -h'
119
+ alias sysinfo='neofetch'
120
+
121
+ # ============ Environment ============
122
+ export EDITOR='nvim'
123
+ export VISUAL='nvim'
124
+ export LANG='en_US.UTF-8'
125
+ export LC_ALL='en_US.UTF-8'
126
+ export TERM='xterm-256color'
127
+ export COLORTERM='truecolor'
128
+
129
+ # Go
130
+ export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
131
+
132
+ # Rust
133
+ [ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
134
+
135
+ # Node
136
+ export NVM_DIR="$HOME/.nvm"
137
+ [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
138
+
139
+ # History
140
+ HISTSIZE=50000
141
+ SAVEHIST=50000
142
+ HISTFILE=~/.zsh_history
143
+ setopt HIST_IGNORE_ALL_DUPS
144
+ setopt HIST_SAVE_NO_DUPS
145
+ setopt HIST_REDUCE_BLANKS
146
+ setopt INC_APPEND_HISTORY
147
+ setopt SHARE_HISTORY
148
+
149
+ # Auto-correction
150
+ setopt CORRECT
151
+ setopt CORRECT_ALL
152
+
153
+ # Better completion
154
+ zstyle ':completion:*' menu select
155
+ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
156
+ zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
157
+
158
+ # MOTD
159
+ [[ -f ~/motd.sh ]] && source ~/motd.sh
160
+
161
+ # Load p10k config
162
+ [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
config/motd.sh ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # ============================================
3
+ # System MOTD - Super Advanced Terminal
4
+ # ============================================
5
+
6
+ CYAN='\033[0;36m'
7
+ GREEN='\033[0;32m'
8
+ YELLOW='\033[0;33m'
9
+ BLUE='\033[0;34m'
10
+ MAGENTA='\033[0;35m'
11
+ RED='\033[0;31m'
12
+ BOLD='\033[1m'
13
+ DIM='\033[2m'
14
+ RESET='\033[0m'
15
+
16
+ # System info
17
+ OS=$(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2 2>/dev/null || echo "Linux")
18
+ KERNEL=$(uname -r 2>/dev/null || echo "N/A")
19
+ UPTIME=$(uptime -p 2>/dev/null | sed 's/up //' || echo "N/A")
20
+ CPU_CORES=$(nproc 2>/dev/null || echo "N/A")
21
+ MEM_TOTAL=$(free -h 2>/dev/null | awk '/^Mem:/{print $2}' || echo "N/A")
22
+ MEM_USED=$(free -h 2>/dev/null | awk '/^Mem:/{print $3}' || echo "N/A")
23
+ DISK_TOTAL=$(df -h / 2>/dev/null | awk 'NR==2{print $2}' || echo "N/A")
24
+ DISK_USED=$(df -h / 2>/dev/null | awk 'NR==2{print $3}' || echo "N/A")
25
+ PYTHON_VER=$(python3 --version 2>/dev/null | awk '{print $2}' || echo "N/A")
26
+ NODE_VER=$(node --version 2>/dev/null || echo "N/A")
27
+ GO_VER=$(go version 2>/dev/null | awk '{print $3}' | sed 's/go//' || echo "N/A")
28
+ GIT_VER=$(git --version 2>/dev/null | awk '{print $3}' || echo "N/A")
29
+
30
+ echo
31
+ echo -e "${BOLD}${CYAN}"
32
+ echo ' ╔══════════════════════════════════════════════════════════════╗'
33
+ echo ' ║ ║'
34
+ echo ' ║ ███████╗██╗ ██╗██████╗ ███████╗██████╗ ║'
35
+ echo ' ║ ██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ║'
36
+ echo ' ║ ███████╗██║ ██║██████╔╝█████╗ ██████╔╝ ║'
37
+ echo ' ║ ╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗ ║'
38
+ echo ' ║ ███████║╚██████╔╝██║ ███████╗██║ ██║ ║'
39
+ echo ' ║ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ║'
40
+ echo ' ║ T E R M I N A L v2.0 ║'
41
+ echo ' ║ ║'
42
+ echo ' ╚══════════════════════════════════════════════════════════════╝'
43
+ echo -e "${RESET}"
44
+ echo
45
+ echo -e " ${BOLD}${BLUE}┌─────────────────── System ────────────────────┐${RESET}"
46
+ echo -e " ${BLUE}│${RESET} ${DIM}OS${RESET} ${GREEN}$OS${RESET}"
47
+ echo -e " ${BLUE}│${RESET} ${DIM}Kernel${RESET} ${GREEN}$KERNEL${RESET}"
48
+ echo -e " ${BLUE}│${RESET} ${DIM}Uptime${RESET} ${GREEN}$UPTIME${RESET}"
49
+ echo -e " ${BLUE}│${RESET} ${DIM}CPU${RESET} ${YELLOW}$CPU_CORES cores${RESET}"
50
+ echo -e " ${BLUE}│${RESET} ${DIM}Memory${RESET} ${YELLOW}$MEM_USED / $MEM_TOTAL${RESET}"
51
+ echo -e " ${BLUE}│${RESET} ${DIM}Disk${RESET} ${YELLOW}$DISK_USED / $DISK_TOTAL${RESET}"
52
+ echo -e " ${BOLD}${BLUE}└───────────────────────────────────────────────┘${RESET}"
53
+ echo
54
+ echo -e " ${BOLD}${MAGENTA}┌─────────────────── Tools ─────────────────────┐${RESET}"
55
+ echo -e " ${MAGENTA}│${RESET} ${DIM}Python${RESET} ${CYAN}$PYTHON_VER${RESET} ${DIM}Node${RESET} ${CYAN}$NODE_VER${RESET}"
56
+ echo -e " ${MAGENTA}│${RESET} ${DIM}Go${RESET} ${CYAN}$GO_VER${RESET} ${DIM}Git${RESET} ${CYAN}$GIT_VER${RESET}"
57
+ echo -e " ${MAGENTA}│${RESET} ${DIM}Shell${RESET} ${CYAN}zsh + p10k${RESET} ${DIM}Mux${RESET} ${CYAN}tmux${RESET}"
58
+ echo -e " ${BOLD}${MAGENTA}└───────────────────────────────────────────────┘${RESET}"
59
+ echo
60
+ echo -e " ${DIM}${GREEN}Tips: Type 'help-me' for quick commands | 'lg' for lazygit${RESET}"
61
+ echo -e " ${DIM}${GREEN} VS Code available at /code path${RESET}"
62
+ echo
nginx.conf ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ worker_processes auto;
2
+ pid /tmp/nginx.pid;
3
+ error_log /tmp/nginx_error.log warn;
4
+
5
+ events {
6
+ worker_connections 1024;
7
+ }
8
+
9
+ http {
10
+ include /etc/nginx/mime.types;
11
+ default_type application/octet-stream;
12
+
13
+ sendfile on;
14
+ keepalive_timeout 65;
15
+ client_max_body_size 100m;
16
+
17
+ # Temp paths for non-root operation
18
+ client_body_temp_path /tmp/nginx_client_body;
19
+ proxy_temp_path /tmp/nginx_proxy;
20
+ fastcgi_temp_path /tmp/nginx_fastcgi;
21
+ uwsgi_temp_path /tmp/nginx_uwsgi;
22
+ scgi_temp_path /tmp/nginx_scgi;
23
+
24
+ access_log /tmp/nginx_access.log;
25
+
26
+ map $http_upgrade $connection_upgrade {
27
+ default upgrade;
28
+ '' close;
29
+ }
30
+
31
+ server {
32
+ listen 7860;
33
+ server_name _;
34
+
35
+ # Root → ttyd terminal
36
+ location / {
37
+ proxy_pass http://127.0.0.1:7681;
38
+ proxy_http_version 1.1;
39
+ proxy_set_header Upgrade $http_upgrade;
40
+ proxy_set_header Connection $connection_upgrade;
41
+ proxy_set_header Host $host;
42
+ proxy_set_header X-Real-IP $remote_addr;
43
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
44
+ proxy_set_header X-Forwarded-Proto $scheme;
45
+ proxy_read_timeout 86400;
46
+ proxy_send_timeout 86400;
47
+ }
48
+
49
+ }
50
+ }
start.sh ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # ============================================
3
+ # Super Advanced Terminal - Startup Script
4
+ # ============================================
5
+
6
+ set -e
7
+
8
+ echo "============================================"
9
+ echo " Starting Super Advanced Terminal v2.0"
10
+ echo "============================================"
11
+
12
+ # Create necessary directories
13
+ mkdir -p ~/workspace
14
+ mkdir -p /tmp/nginx_client_body /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi
15
+
16
+ # ---- Start Terminal Emulator ----
17
+ echo "[1/2] Starting terminal on :7681..."
18
+ sys-agent \
19
+ -c admin:superterminal \
20
+ -W \
21
+ -p 7681 \
22
+ -t fontSize=15 \
23
+ -t 'fontFamily="JetBrains Mono", "Fira Code", "Cascadia Code", "Consolas", monospace' \
24
+ -t 'theme={"background":"#1a1b26","foreground":"#c0caf5","cursor":"#c0caf5","cursorAccent":"#1a1b26","selection":"#33467C","black":"#15161E","red":"#f7768e","green":"#9ece6a","yellow":"#e0af68","blue":"#7aa2f7","magenta":"#bb9af7","cyan":"#7dcfff","white":"#a9b1d6","brightBlack":"#414868","brightRed":"#f7768e","brightGreen":"#9ece6a","brightYellow":"#e0af68","brightBlue":"#7aa2f7","brightMagenta":"#bb9af7","brightCyan":"#7dcfff","brightWhite":"#c0caf5"}' \
25
+ zsh > /tmp/sys-agent.log 2>&1 &
26
+
27
+ sleep 1
28
+
29
+ # ---- Start Nginx (foreground) ----
30
+ echo "[2/2] Starting Nginx on :7860..."
31
+ echo ""
32
+ echo "============================================"
33
+ echo " All services running!"
34
+ echo " Terminal: http://localhost:7860/"
35
+ echo "============================================"
36
+
37
+ exec nginx -c /etc/nginx/nginx.conf -g 'daemon off;'