chore: removed unused files in prep for nixos

This commit is contained in:
Mohammad Rafiq 2025-02-22 05:05:45 +08:00
parent 96453a5503
commit 35a608591b
12 changed files with 298 additions and 394 deletions

View file

@ -1,7 +0,0 @@
# ~/.bash_logout: executed by bash(1) when login shell exits.
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi

View file

@ -1 +0,0 @@
source ~/.bashrc

135
.bashrc
View file

@ -1,135 +0,0 @@
# Pull the latest changes from the remote (but only once!)
if ! [ -v REPO_INITIALISED ]; then
cd ~ && git pull origin main --quiet && export REPO_INITIALISED=true
echo "dotfiles loaded!"
fi
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
# Rust/Cargo setup
. "$HOME/.cargo/env"
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This enables NVM
# Neovim
export PATH="$HOME/nvim/bin:$PATH"
# Theming
function set_title() {
echo -ne "\033]0;${PWD}\007"
}
PROMPT_COMMAND=set_title
GREEN="\[\033[0;32m\]"
YELLOW="\[\033[0;33m\]"
RED="\[\033[0;31m\]"
NC="\[\033[0m\]" # No Color
PS1="$GREEN\u@\h${NC}:$YELLOW\w${NC} $(git branch 2>/dev/null | sed -e '/^[^*]/ d' -e 's/* \(.*\)/\[\1\]/')"' $ '
# Path Setting - Make sure $HOME/bin exists and only add it once.
if [ -d "$HOME/bin" ] && ! echo "$PATH" | grep -q "$HOME/bin"; then
export PATH="$HOME/bin:$PATH"
fi
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

View file

@ -1,11 +0,0 @@
#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
*:"$HOME/.cargo/bin":*)
;;
*)
# Prepending path in case a system-installed rustc needs to be overridden
export PATH="$HOME/.cargo/bin:$PATH"
;;
esac

298
.config/hypr/hyprland.conf Normal file
View file

@ -0,0 +1,298 @@
# #######################################################################################
# AUTOGENERATED HYPR CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
autogenerated = 0 # remove this line to remove the warning
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
################
### MONITORS ###
################
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
monitor = HDMI-A-2, 3840x2160@60.00Hz, auto, 2
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
# Set programs that you use
$terminal = kitty
$fileManager = dolphin
$menu = wofi --show drun
#################
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
# exec-once = $terminal
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
#############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general
general {
gaps_in = 5
gaps_out = 20
border_size = 2
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = false
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
rounding = 10
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 1.0
shadow {
enabled = true
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {
enabled = true
size = 3
passes = 1
vibrancy = 0.1696
}
}
# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
enabled = yes, please :)
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = easeOutQuint,0.23,1,0.32,1
bezier = easeInOutCubic,0.65,0.05,0.36,1
bezier = linear,0,0,1,1
bezier = almostLinear,0.5,0.5,0.75,1.0
bezier = quick,0.15,0,0.1,1
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
}
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
}
#############
### INPUT ###
#############
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
name = epic-mouse-v1
sensitivity = -0.5
}
###################
### KEYBINDINGS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# Ignore maximize requests from apps. You'll probably like this.
windowrulev2 = suppressevent maximize, class:.*
# Fix some dragging issues with XWayland
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0

View file

@ -1,38 +0,0 @@
[style.description]
underline = false
bold = false
italic = false
[style.command_name]
foreground = "cyan"
underline = false
bold = false
italic = false
[style.example_text]
foreground = "green"
underline = false
bold = false
italic = false
[style.example_code]
foreground = "cyan"
underline = false
bold = false
italic = false
[style.example_variable]
foreground = "cyan"
underline = true
bold = false
italic = false
[display]
compact = false
use_pager = false
[updates]
auto_update = true
auto_update_interval_hours = 720
[directories]

View file

@ -7,8 +7,5 @@
helper = store
[push]
autoSetupRemote = true
[safe]
directory = /appdata
directory = /storage/emulated/0/Obsidian Vaults/second-brain
[pull]
rebase = false

View file

@ -1,12 +0,0 @@
name: test commands and stuff
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: cd ~
- run: git init
- run: git remote add origin https://github.com/bwfiq/dotfiles
- run: git fetch
- run: git checkout -f main
- run: exit

View file

@ -1,17 +0,0 @@
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
# Rust/Cargo
mesg n 2> /dev/null || true
. "$HOME/.cargo/env"
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

View file

@ -1,3 +0,0 @@
[settings]
api_url = https://timetrack.slayment.com/api
api_key = 6fb75a1d-fab6-4cfc-872d-3a25cebb9dbb

View file

@ -1,102 +0,0 @@
#!/bin/bash
# Functions:
# Get the list of specified file extensions from script arguments
get_extensions() {
if [ $# -gt 0 ]; then
# Create an array for extensions
EXTENSIONS=()
for ext in "$@"; do
# Remove the leading dot if present
ext="${ext#.}"
EXTENSIONS+=("$ext")
done
else
EXTENSIONS=() # No extensions specified, match everything
fi
}
# Get the current date in YYYY-MM-DD format
get_current_date() {
date +%F
}
# Check if a file is ignored according to .gitignore
is_ignored() {
local filepath="$1"
git check-ignore -q "$filepath" # Returns 0 if ignored, 1 otherwise
}
# Process a single file: append its header and content to the output file
process_file() {
local filepath="$1"
{
echo "# $filepath" # File header
echo "" # Blank line
cat "$filepath" # File content
echo "" # Blank line after content
} >> "$output_file"
}
# Recursively traverse directories to find and process files
traverse_directory() {
local dir="$1"
# Construct regex pattern based on provided extensions
if [ ${#EXTENSIONS[@]} -gt 0 ]; then
EXTENSIONS_PATTERN=$(printf '\\|%s' "${EXTENSIONS[@]}")
pattern=".*\.\($EXTENSIONS_PATTERN\)$" # Pattern for matching specified extensions
else
pattern=".*$" # Matches everything if no extensions specified
fi
# Array of filenames to exclude from processing
local EXCLUDED_FILES=("LICENSE" ".gitignore")
# Loop through entries in the specified directory
for entry in "$dir"/*; do
if [[ -e "$entry" ]]; then # Check if the entry exists
if [[ -d "$entry" ]]; then # Process directories
if [[ "$(basename "$entry")" != ".git" ]]; then
traverse_directory "$entry" # Recursive call
fi
elif [[ -f "$entry" ]]; then # Process files
# Check if the file should be excluded
local exclude=false
for excluded in "${EXCLUDED_FILES[@]}"; do
if [[ "$(basename "$entry")" == "$excluded" ]]; then
exclude=true
break
fi
done
# Process the file only if it's not excluded, not ignored, and matches the pattern
if [[ "$exclude" == false ]] &&
! is_ignored "$entry" &&
[[ "$entry" =~ $pattern ]]; then
process_file "$entry" # Process the file
fi
fi
fi
done
}
# Main function to execute the script logic
main() {
get_extensions "$@" # Pass all script arguments to get_extensions function
output_file="output-$(get_current_date).txt" # Define the output file name
# Clear previous output file if it exists
> "$output_file"
# Start the file traversal from the current directory
traverse_directory "."
echo "Consolidation complete! Output saved in: $output_file" # Completion message
}
# Execution begins here
echo "Consolidating..."
main "$@" # Invoke main function with script arguments

View file

@ -1,65 +0,0 @@
function display_menu {
echo "Select applications to install:"
echo "1. All of the following"
echo "2. Neovim (stable, linux-x86_64)"
echo "0. Exit"
echo -n "Enter your choice (0-2): "
}
# updates stable nvim
function install_neovim {
wget --output-document ~/nvim.tar.gz https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz > /dev/null 2>&1
tar xvf ~/nvim.tar.gz -C ~/ > /dev/null 2>&1
rm -rf ~/nvim
mv ~/nvim-linux-x86_64 ~/nvim
rm ~/nvim.tar.gz
}
# installs
function install_neovim {
wget --output-document ~/nvim.tar.gz https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz > /dev/null 2>&1
tar xvf ~/nvim.tar.gz -C ~/ > /dev/null 2>&1
rm -rf ~/nvim
mv ~/nvim-linux-x86_64 ~/nvim
rm ~/nvim.tar.gz
}
# Main Logic
if ! command -v wget &> /dev/null; then
echo "Error: wget is not installed. Please install it before running this script."
return 1
fi
display_menu
read choice
# 1 for all
case "$choice" in
1)
echo "Installing all apps..."
install_neovim
if [ $? -eq 0 ]; then
echo "Installation complete."
else
echo "Installation failed."
fi
;;
2)
echo "Installing neovim stable..."
install_neovim
if [ $? -eq 0 ]; then
echo "Installation complete."
else
echo "Installation failed."
fi
;;
0)
echo "Exiting..."
exit 0
;;
*)
echo "Invalid choice. Please enter a number between 0 and 2."
;;
esac
exit 0