diff --git a/config/bashrc b/config/bashrc index a827d82..c489dcb 100644 --- a/config/bashrc +++ b/config/bashrc @@ -8,6 +8,8 @@ export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +export WORKSPACE_DIR="${WORKSPACE_DIR:-$HOME/.workspace}" + # Homebrew (macOS) if [[ "$OSTYPE" == "darwin"* ]]; then if [ -f "/opt/homebrew/bin/brew" ]; then @@ -19,21 +21,30 @@ fi # Go if [ -d "/usr/local/go" ]; then - export PATH="$PATH:/usr/local/go/bin" - export PATH="$PATH:$HOME/go/bin" + export GOROOT="/usr/local/go" + export GOPATH="${WORKSPACE_DIR}" + export GOBIN="${WORKSPACE_DIR}/bin" + export GO111MODULE=on + export GOPRIVATE=github.com/jchenry/* + export PATH=$PATH:$GOROOT/bin:$GOBIN fi # Plan 9 if [ -d "/usr/local/plan9" ]; then + # acme visible clicks + export visibleclicks=1 export PLAN9="/usr/local/plan9" export PATH="$PATH:$PLAN9/bin" + fi # History settings -export HISTSIZE=10000 -export HISTFILESIZE=20000 -export HISTCONTROL=ignoredups:erasedups shopt -s histappend +export HISTSIZE=100000 +export HISTFILESIZE=10000000 +export HISTCONTROL=ignoreboth +export PROMPT_COMMAND="history -a; history -n" +export HISTIGNORE="ls:ll:cd:pwd:bg:fg:history" # Aliases alias ll='ls -lah' diff --git a/config/link-dotfiles.sh b/config/link-dotfiles.sh index 10a5bc5..396755d 100755 --- a/config/link-dotfiles.sh +++ b/config/link-dotfiles.sh @@ -58,6 +58,11 @@ if is_linux; then chmod +x "$HOME/.xinitrc" fi + if [ -f "$SCRIPT_DIR/xsession" ]; then + safe_symlink "$SCRIPT_DIR/xsession" "$HOME/.xsession" + chmod +x "$HOME/.xsession" + fi + if [ -f "$SCRIPT_DIR/Xresources" ]; then safe_symlink "$SCRIPT_DIR/Xresources" "$HOME/.Xresources" fi @@ -65,6 +70,41 @@ if is_linux; then if [ -f "$SCRIPT_DIR/twmrc" ]; then safe_symlink "$SCRIPT_DIR/twmrc" "$HOME/.twmrc" fi + + # Install XDM customizations (requires sudo) + if [ -d "$SCRIPT_DIR/xdm" ]; then + log_info "Installing XDM customizations" + + # Determine XDM config directory based on distro + if [ -d "/etc/X11/xdm" ]; then + XDM_DIR="/etc/X11/xdm" + elif [ -d "/etc/xdm" ]; then + XDM_DIR="/etc/xdm" + else + log_warn "XDM config directory not found, skipping XDM customization" + XDM_DIR="" + fi + + if [ -n "$XDM_DIR" ]; then + # Backup existing files + for file in Xresources Xsetup Xstartup; do + if [ -f "$XDM_DIR/$file" ]; then + maybe_sudo cp "$XDM_DIR/$file" "$XDM_DIR/$file.backup" 2>/dev/null || true + fi + done + + # Install custom files + maybe_sudo cp "$SCRIPT_DIR/xdm/Xresources" "$XDM_DIR/Xresources" + maybe_sudo cp "$SCRIPT_DIR/xdm/Xsetup" "$XDM_DIR/Xsetup" + maybe_sudo cp "$SCRIPT_DIR/xdm/Xstartup" "$XDM_DIR/Xstartup" + + # Make scripts executable + maybe_sudo chmod +x "$XDM_DIR/Xsetup" + maybe_sudo chmod +x "$XDM_DIR/Xstartup" + + log_success "XDM customizations installed to $XDM_DIR" + fi + fi fi # Install VSCode extensions @@ -99,3 +139,6 @@ log_info "Next steps:" log_info " 1. Edit ~/.gitconfig to set your name and email" log_info " 2. Restart your shell: exec \$SHELL" log_info " 3. Install tmux plugins: press Ctrl+a then I in tmux" +if is_linux; then + log_info " 4. Enable XDM (optional): sudo systemctl enable xdm && sudo systemctl start xdm" +fi diff --git a/config/twm/icons/chromium.xbm b/config/twm/icons/chromium.xbm new file mode 100755 index 0000000..070b411 --- /dev/null +++ b/config/twm/icons/chromium.xbm @@ -0,0 +1,8 @@ +#define chromium_width 15 +#define chromium_height 15 +#define chromium_x_hot 7 +#define chromium_y_hot 7 +static unsigned char chromium_bits[] = { + 0xf0, 0x07, 0x88, 0x08, 0x04, 0x11, 0x02, 0x21, 0x81, 0x40, 0xc1, 0x41, + 0x21, 0x42, 0x21, 0x42, 0x21, 0x42, 0xe1, 0x47, 0x11, 0x44, 0x1a, 0x28, + 0x0c, 0x18, 0x08, 0x08, 0xf0, 0x07}; diff --git a/config/twm/icons/close.xbm b/config/twm/icons/close.xbm new file mode 100755 index 0000000..e545e4f --- /dev/null +++ b/config/twm/icons/close.xbm @@ -0,0 +1,4 @@ +#define close_width 7 +#define close_height 7 +static unsigned char close_bits[] = { + 0x41, 0x22, 0x14, 0x08, 0x14, 0x22, 0x41, }; diff --git a/config/twm/icons/maximize.xbm b/config/twm/icons/maximize.xbm new file mode 100755 index 0000000..b55f507 --- /dev/null +++ b/config/twm/icons/maximize.xbm @@ -0,0 +1,4 @@ +#define maximize_width 7 +#define maximize_height 7 +static unsigned char maximize_bits[] = { + 0x7f, 0x7f, 0x41, 0x41, 0x41, 0x41, 0x7f, }; diff --git a/config/twm/icons/maximize2.xbm b/config/twm/icons/maximize2.xbm new file mode 100755 index 0000000..16a9f5f --- /dev/null +++ b/config/twm/icons/maximize2.xbm @@ -0,0 +1,4 @@ +#define /home/jchenry/.twm/icons/maximize2.xbm_width 7 +#define /home/jchenry/.twm/icons/maximize2.xbm_height 7 +static unsigned char /home/jchenry/.twm/icons/maximize2.xbm_bits[] = { + 0x08, 0x08, 0x08, 0x7f, 0x08, 0x08, 0x08}; diff --git a/config/twm/icons/minimize.xbm b/config/twm/icons/minimize.xbm new file mode 100755 index 0000000..12fcf3a --- /dev/null +++ b/config/twm/icons/minimize.xbm @@ -0,0 +1,4 @@ +#define minimize_width 7 +#define minimize_height 7 +static unsigned char minimize_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, }; diff --git a/config/twm/icons/minimize2.xbm b/config/twm/icons/minimize2.xbm new file mode 100755 index 0000000..b464a4a --- /dev/null +++ b/config/twm/icons/minimize2.xbm @@ -0,0 +1,4 @@ +#define /home/jchenry/.twm/icons/minimize2.xbm_width 7 +#define /home/jchenry/.twm/icons/minimize2.xbm_height 7 +static unsigned char /home/jchenry/.twm/icons/minimize2.xbm_bits[] = { + 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00}; diff --git a/config/twm/icons/refresh.xbm b/config/twm/icons/refresh.xbm new file mode 100755 index 0000000..142f8f6 --- /dev/null +++ b/config/twm/icons/refresh.xbm @@ -0,0 +1,5 @@ +#define refresh_width 9 +#define refresh_height 9 +static unsigned char refresh_bits[] = { + 0x10, 0x00, 0x38, 0x00, 0x10, 0x00, 0x92, 0x00, 0xff, 0x01, 0x92, 0x00, + 0x10, 0x00, 0x38, 0x00, 0x10, 0x00, }; diff --git a/config/twm/icons/resize.xbm b/config/twm/icons/resize.xbm new file mode 100755 index 0000000..c3f7749 --- /dev/null +++ b/config/twm/icons/resize.xbm @@ -0,0 +1,5 @@ +#define resize_width 9 +#define resize_height 7 +static unsigned char resize_bits[] = { + 0xfe, 0x01, 0xfe, 0x01, 0x02, 0x01, 0x3f, 0x01, 0x21, 0x01, 0x21, 0x01, + 0xff, 0x01, }; diff --git a/config/twm/icons/resize2.xbm b/config/twm/icons/resize2.xbm new file mode 100755 index 0000000..2e15423 --- /dev/null +++ b/config/twm/icons/resize2.xbm @@ -0,0 +1,4 @@ +#define /home/jchenry/.twm/icons/resize2.xbm_width 7 +#define /home/jchenry/.twm/icons/resize2.xbm_height 7 +static unsigned char /home/jchenry/.twm/icons/resize2.xbm_bits[] = { + 0x78, 0x60, 0x50, 0x49, 0x05, 0x03, 0x0f}; diff --git a/config/twm/reduxbg.jpg b/config/twm/reduxbg.jpg new file mode 100755 index 0000000..c0d9fdd Binary files /dev/null and b/config/twm/reduxbg.jpg differ diff --git a/config/twmrc b/config/twm/twmrc similarity index 88% rename from config/twmrc rename to config/twm/twmrc index d08f2e1..dba3f66 100644 --- a/config/twmrc +++ b/config/twm/twmrc @@ -33,7 +33,6 @@ IconManagerDontShow { Icons { "chromium" "chromium.xbm" - } Color { @@ -155,14 +154,3 @@ menu "quit" { "No" f.nop "Yes" f.quit } - -#Button1 = : root : f.menu "TwmWindows" -#Button1 = m : window | icon : f.function "move-or-lower" -#Button2 = m : window | icon : f.iconify -#Button3 = m : window | icon : f.function "move-or-raise" -#Button1 = : title : f.function "move-or-raise" -#Button2 = : title : f.raiselower -#Button1 = : icon : f.function "move-or-iconify" -#Button2 = : icon : f.iconify -#Button1 = : iconmgr : f.iconify -#Button2 = : iconmgr : f.iconify \ No newline at end of file diff --git a/config/xdm/Xresources b/config/xdm/Xresources new file mode 100644 index 0000000..89380b1 --- /dev/null +++ b/config/xdm/Xresources @@ -0,0 +1,60 @@ +! XDM Configuration with Dracula theme +! This file customizes the XDM login screen appearance + +! Dracula color palette +#define Foreground #F8F8F2 +#define Background #282A36 +#define Selection #44475A +#define Comment #6272A4 +#define Red #FF5555 +#define Orange #FFB86C +#define Yellow #F1FA8C +#define Green #50FA7B +#define Purple #BD93F9 +#define Cyan #8BE9FD +#define Pink #FF79C6 + +! Login screen background +xlogin*background: Background +xlogin*foreground: Foreground + +! Greeting message +xlogin*greeting: CLIENTHOST +xlogin*greetFont: -adobe-helvetica-bold-r-normal--*-180-*-*-*-*-*-* +xlogin*greetColor: Cyan + +! Login prompt +xlogin*namePrompt: \040\040\040\040\040\040\040Login: +xlogin*passwdPrompt: \040\040\040Password: +xlogin*promptFont: -adobe-helvetica-bold-r-normal--*-140-*-*-*-*-*-* +xlogin*promptColor: Purple + +! Input field +xlogin*inputFont: -adobe-helvetica-medium-r-normal--*-140-*-*-*-*-*-* +xlogin*inputColor: Foreground + +! Failure message +xlogin*fail: Login incorrect +xlogin*failFont: -adobe-helvetica-bold-r-normal--*-140-*-*-*-*-*-* +xlogin*failColor: Red +xlogin*failTimeout: 10 + +! Login box geometry +xlogin*geometry: 400x300 +xlogin*borderWidth: 3 +xlogin*frameWidth: 0 +xlogin*innerFramesWidth: 0 + +! Cursor +xlogin*cursorColor: Pink +xlogin*pointerColor: Pink + +! Logo (if you want to add one) +! xlogin*logoFileName: /usr/share/pixmaps/xdm-logo.xpm +! xlogin*logoPadding: 10 + +! Allow root login (change to false for security) +xlogin*allowRootLogin: true + +! Session button +xlogin*allowShellResize: false diff --git a/config/xdm/Xsetup b/config/xdm/Xsetup new file mode 100644 index 0000000..acc2dc1 --- /dev/null +++ b/config/xdm/Xsetup @@ -0,0 +1,18 @@ +#!/bin/sh +# XDM Xsetup script - runs before the login screen appears +# Use this to customize the display before login + +# Set background color (Dracula background) +xsetroot -solid "#282A36" + +# Optionally set a background image with feh +# if [ -f "$HOME/.config/wallpaper.jpg" ]; then +# feh --bg-scale "$HOME/.config/wallpaper.jpg" +# fi + +# Start xclock in the corner (optional) +# xclock -digital -update 1 -geometry 150x50-10+10 & + +# Disable screen blanking +xset s off +xset -dpms diff --git a/config/xdm/Xstartup b/config/xdm/Xstartup new file mode 100644 index 0000000..40e3ec7 --- /dev/null +++ b/config/xdm/Xstartup @@ -0,0 +1,8 @@ +#!/bin/sh +# XDM Xstartup script - runs after successful login +# Use this for system-wide session initialization + +# Example: log session start +# echo "Session started for $USER at $(date)" >> /var/log/xdm-sessions.log + +exit 0 diff --git a/config/xsession b/config/xsession new file mode 100644 index 0000000..406f1b4 --- /dev/null +++ b/config/xsession @@ -0,0 +1,23 @@ +#!/bin/sh +# XDM session script (sourced by XDM) +# This file is used instead of .xinitrc when using a display manager + +# Load X resources +if [ -f "$HOME/.Xresources" ]; then + xrdb -merge "$HOME/.Xresources" +fi + +# Set keyboard repeat rate +xset r rate 200 30 + +# Disable screen blanking +xset s off +xset -dpms + +# Start terminal emulator in background +if command -v xterm >/dev/null 2>&1; then + xterm & +fi + +# Start TWM window manager +exec twm