From 185b32bdb7e4c8b292c60accf5f867b5c4c27376 Mon Sep 17 00:00:00 2001 From: "Adam French [sc21a2f]" Date: Tue, 8 Oct 2024 11:45:07 +0100 Subject: [PATCH] initial commit --- .bashrc | 2 + .tmux.conf | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++ .vimrc | 3 ++ .zshrc | 1 + sh/getfile | 10 +++++ sh/sharefile | 11 ++++++ 6 files changed, 133 insertions(+) create mode 100644 .bashrc create mode 100644 .tmux.conf create mode 100644 .vimrc create mode 100644 .zshrc create mode 100755 sh/getfile create mode 100755 sh/sharefile diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..943ec3f --- /dev/null +++ b/.bashrc @@ -0,0 +1,2 @@ +setxkbmap -option caps:swapescape +export PATH="$(pwd)/sh:$PATH" diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..0cc7918 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,106 @@ +# Config that is very close to a i3 window manager's keybinding. +set -s escape-time 0 +setw -g aggressive-resize on + +# First remove *all* keybindings +unbind-key -a + +# List keys +bind-key ? list-keys + +# Copy mode +bind-key [ copy-mode + +# Paste buffer +bind-key ] paste-buffer + +# Refresh client +bind-key r refresh-client \; display-message "Refresh already" + +# Start with index 1 +set -g base-index 1 +setw -g pane-base-index 1 + +# Set new prefix +# Note : you can press super key by set M. +# (tested with tty only) +set -g prefix C-Space +bind-key Space send-prefix + +# Clock +setw -g clock-mode-style 24 + +# Config Reloads +bind R source-file ~/.tmux.conf \; display-message "Config reloaded" + +# Mouse on/off +set -g mouse off + +# Split window +bind-key g split-window -h +bind-key v split-window -v + +# Rotate Window +# bind-key -n M-o rotate-window + +# Swap pane +bind-key -r L swap-pane -U +bind-key -r K swap-pane -D + +# Move pane with Control (no prefix) +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R + +# Resize pane with Alt (prefix with repeat) +bind-key -r H resize-pane -L 5 \; display-message "Resize left" +bind-key -r J resize-pane -D 5 \; display-message "Resize down" +bind-key -r K resize-pane -U 5 \; display-message "Resize up" +bind-key -r L resize-pane -R 5 \; display-message "Resize right" + +# Automatically set window title +set-window-option -g automatic-rename on +set-option -g set-titles on + +# Choose Window +bind-key w choose-window + +# New Window with number +bind-key 1 new-window -t 1 +bind-key 2 new-window -t 2 +bind-key 3 new-window -t 3 +bind-key 4 new-window -t 4 +bind-key 5 new-window -t 5 +bind-key 6 new-window -t 6 +bind-key 7 new-window -t 7 +bind-key 8 new-window -t 8 +bind-key 9 new-window -t 9 +bind-key 0 new-window -t 10 + +# Switch windows alt+number +bind-key -n M-1 select-window -t 1 +bind-key -n M-2 select-window -t 2 +bind-key -n M-3 select-window -t 3 +bind-key -n M-4 select-window -t 4 +bind-key -n M-5 select-window -t 5 +bind-key -n M-6 select-window -t 6 +bind-key -n M-7 select-window -t 7 +bind-key -n M-8 select-window -t 8 +bind-key -n M-9 select-window -t 9 +bind-key -n M-0 select-window -t 10 + +# Change current pane to next window +bind-key ! join-pane -t :1 +bind-key @ join-pane -t :2 +bind-key '#' join-pane -t :3 +bind-key '$' join-pane -t :4 +bind-key '%' join-pane -t :5 +bind-key '^' join-pane -t :6 +bind-key '&' join-pane -t :7 +bind-key '*' join-pane -t :8 +bind-key '(' join-pane -t :9 +bind-key ')' join-pane -t :10 + +# Kill Selected Pane +bind-key q kill-pane diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..3419b1c --- /dev/null +++ b/.vimrc @@ -0,0 +1,3 @@ +set number +set autoindent +set clipboard=unnamedplus diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..787ff0b --- /dev/null +++ b/.zshrc @@ -0,0 +1 @@ +# Created by newuser for 5.8 diff --git a/sh/getfile b/sh/getfile new file mode 100755 index 0000000..eb2ce57 --- /dev/null +++ b/sh/getfile @@ -0,0 +1,10 @@ +#!/bin/bash +[ $# -eq 0 ] && read -p "What is the 0x0.st assigned name: " file || file=$1 +curl "http://0x0.st/$file" + +# !/bin/bash +# if [ $# -eq 0 ]; then + # echo "Add the 0x0.st linkname" +# else + # curl "http://0x0.st/$1" +# fi diff --git a/sh/sharefile b/sh/sharefile new file mode 100755 index 0000000..da60f24 --- /dev/null +++ b/sh/sharefile @@ -0,0 +1,11 @@ +#!/bin/bash +[ $# -eq 0 ] && read -p "Provide a file to share: " file || file=$1 +curl -F "file=@$file" 0x0.st + +# if [ $# -eq 0 ]; then + # echo "Please provide a file to share" +# else + # file=$1 + # curl -F "file=@$file" 0x0.st + # echo "Shared File!" +# fi