I made the icy-nord and icy-nord-darker themes.

change suggestions

issues

update notifications

@promitheas:matrix.org

  • 2 Posts
  • 5 Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle
  • Heres my ~/.bin directory:

    https://github.com/promitheas17j/dotfiles/tree/main/dot_bin

    Hopefully thats what youre asking for.

    My favourite ones are:

    • bspwm-minimise.sh and bspwm-restore.sh which allow me to have window minimisation functionality in bspwm, which to my knowledge doesn’t exist natively
    • check_last_update.sh which I have in my .zshrc and gives me a count of packages available to update with some basic colouring, as well as if I have a kernel mismatch and need to restart

    One that Im still working on but will for sure be my favourite once its done is parse_keybinds.sh and keybind_cheatsheet.sh, which go through some of the software I have and parse their config files to extract all the keybinds into a file with a specific format. The latter script then launches a rofi menu where I can fuzzy search keybinds based on software name and what I want to do but cant remember the binding for. So far Ive got sxhkd and lf, but I consider it a work in progress because I want to also parse neovim bindings, but sxhkd and lf are single file configs while neovim has bindings in multiple files spread across multiple subdirectories in its config directory.



  • $ cat /usr/local/bin/login-alert.sh
    #!/bin/bash
    
    # Sends alerts only for real terminals not cron jobs
    if [[ -n "$SSH_CONNECTION" ]]; then
    	USERNAME=$(whoami)
    	IP=$(echo $SSH_CONNECTION | awk '{print $1}')
    	HOST=$(hostname)
    	DATETIME=$(date)
    	/usr/local/bin/semail \
    		-s "[CRITICAL] SSH Login to $HOST" \
    	 	-b "Login detected:\n\nUser: $USERNAME\nIP: $IP\nTime: $DATETIME\nTTY: $SSH_TTY"
    fi
    

    I feel like since Im already using systemd to monitor the directories it would be best to have everything working with systemd, also because I will be adding several other such functionalities to monitor various things. For example something I already implemented is a systemd service + timer combination to periodically check the main branch of the git repo for changes to the servers local repo, and if there are any to pull them and restart any services necessary to reflect these changes on the web app, then once again email me that that happened. This way i dont need to actually connect to the server to update any changes, just push code to github.

    This is my first time doing a project like this, so this might make you seasoned sysadmins yell out in horror, idk, but since Im the only one who can push code to the repo I feel its quite safe, and makes life a lot easier for me xD