├── .gitignore ├── X11 ├── .Xresources └── .xinitrc ├── alacritty └── .config │ └── alacritty │ └── alacritty.toml ├── bin └── bin │ ├── applications │ └── radio │ ├── bugbounty │ ├── deadlinks │ └── vdp │ ├── just4fun │ ├── 2048 │ ├── 10print │ ├── bee │ ├── groot │ └── panes │ ├── keybinded │ ├── brightness │ │ ├── brightness │ │ ├── brightnessControl.sh │ │ └── restoreBrightness.sh │ ├── music_ctrl.sh │ ├── pop_mpv.sh │ ├── rofi_notes.sh │ └── vifm.py │ ├── light-theme │ └── libreoffice.sh │ └── utils │ ├── 0x0 │ ├── add-shadow │ ├── aperisolve │ ├── border │ ├── ce │ ├── cnf │ ├── darkmode.sh │ ├── duckmail │ ├── ew │ ├── ex │ ├── ffmpeg-wrappers │ ├── vid2 │ ├── vidcut │ └── vidmute │ ├── fwifi │ ├── gifgen │ ├── gym │ ├── h2s │ ├── kp │ ├── mmv │ ├── notes │ ├── ocr │ ├── pauseallmpv │ ├── qrshot │ ├── rofi-askpass │ ├── sk │ ├── sloc │ ├── tmpjn │ ├── tmpsh │ ├── touchpad │ ├── upld │ ├── urldecode │ ├── urlencode │ ├── webcam │ └── xcwd-helper ├── discord └── .config │ └── discord │ └── settings.json ├── duckmail └── .config │ └── duckmail │ └── ddg.png ├── dunst └── .config │ └── dunst │ └── dunstrc ├── flameshot └── .config │ └── flameshot │ └── flameshot.ini ├── gtk-2.0 └── .config │ └── gtk-2.0 │ └── gtkfilechooser.ini ├── gtk-3.0 └── .config │ └── gtk-3.0 │ ├── bookmarks │ └── settings.ini ├── i3 └── .config │ └── i3 │ └── config ├── mimetype ├── .config │ └── mimeapps.list └── .local │ └── share │ └── applications │ ├── browser.desktop │ ├── img.desktop │ ├── pdf.desktop │ ├── text.desktop │ └── video.desktop ├── mpv └── .config │ └── mpv │ ├── input.conf │ ├── mpv.conf │ └── scripts │ └── uosc.lua ├── nvim └── .config │ └── nvim │ ├── colors │ ├── idk.vim │ └── test.vim │ ├── init.lua │ ├── lua │ ├── mappings.lua │ ├── options.lua │ └── plugins │ │ ├── configs │ │ ├── bufferline.lua │ │ └── lualine.lua │ │ └── init.lua │ └── plugin │ └── packer_compiled.lua ├── other └── .config │ └── user-dirs.dirs ├── picom └── .config │ └── picom │ └── picom.conf ├── polybar └── .config │ └── polybar │ ├── config.ini │ ├── launch.sh │ └── scripts │ ├── battery_widget.sh │ ├── bluetooth.sh │ ├── mic_status.sh │ ├── today.sh │ ├── vpn-ip.sh │ └── wifi_widget.sh ├── rofi └── .config │ └── rofi │ ├── config.rasi │ ├── scripts │ ├── chars.txt │ ├── rofi-farge.sh │ ├── rofi-finder.sh │ └── rofi-picker.sh │ └── themes │ ├── askpass.rasi │ ├── default.rasi │ └── run.rasi ├── vifm └── .config │ └── vifm │ ├── colors │ ├── Default.vifm │ └── minimal.vifm │ ├── scripts │ └── README │ ├── vifm-help.txt │ └── vifmrc ├── wget └── .config │ └── wgetrc └── zsh ├── .config └── aliases ├── .zprofile ├── .zshenv └── .zshrc /.gitignore: -------------------------------------------------------------------------------- 1 | mpd/.config/mpd/mpd.log 2 | mpd/.config/mpd/mpdstate 3 | mpd/.config/mpd/mpd.pid 4 | mpd/.config/mpd/mpd.db 5 | 6 | nvim/.config/nvim/.netrwhist 7 | nvim/.config/nvim/tmp/* 8 | nvim/.config/nvim/plugged/* 9 | 10 | vifminfo.json 11 | token.txt 12 | battery-notify.sh 13 | packer_compiled.lua 14 | -------------------------------------------------------------------------------- /X11/.Xresources: -------------------------------------------------------------------------------- 1 | Xft.dpi: 120 2 | 3 | ! These might also be useful depending on your monitor and personal preference: 4 | Xft.autohint: 0 5 | Xft.lcdfilter: lcddefault 6 | Xft.hintstyle: hintfull 7 | Xft.hinting: 1 8 | Xft.antialias: 1 9 | Xft.rgba: rgb 10 | -------------------------------------------------------------------------------- /X11/.xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # ~/.xinitrc 4 | # 5 | # Executed by startx (run your window manager from here) 6 | # 7 | # NOTICE: the exec commands MUST be the last command in this file. 8 | # anything after it WON'T get executed! 9 | # 10 | 11 | # Dont clutter the home directory 12 | USERXSESSION="$XDG_CACHE_HOME/X11/xsession" 13 | USERXSESSIONRC="$XDG_CACHE_HOME/X11/xsessionrc" 14 | ALTUSERXSESSION="$XDG_CACHE_HOME/X11/Xsession" 15 | ERRFILE="$XDG_CACHE_HOME/X11/xsession-errors" 16 | 17 | xrdb -merge ~/.Xresources 18 | 19 | # Set keyboard layout to Norwegian for Xorg. Seems like 'loadkeys' is not 20 | # persistant and might only affect the TTY session. Same goes with the 21 | # /etc/vconsole.conf 22 | setxkbmap -layout no -variant nodeadkeys -option caps:swapescape -option altwin:swap_lalt_lwin 23 | 24 | exec i3 --shmlog-size 0 25 | 26 | -------------------------------------------------------------------------------- /alacritty/.config/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | [font] 2 | size = 10.4 3 | 4 | [font.bold] 5 | family = "JetBrainsMono NerdFont" 6 | style = "Bold" 7 | 8 | [font.bold_italic] 9 | family = "JetBrainsMono NerdFont" 10 | style = "Bold Italic" 11 | 12 | [font.italic] 13 | family = "JetBrainsMono NerdFont" 14 | style = "Italic" 15 | 16 | [font.normal] 17 | family = "JetBrainsMono NerdFont" 18 | style = "Regular" 19 | 20 | [window.padding] 21 | x = 15 22 | y = 15 23 | -------------------------------------------------------------------------------- /bin/bin/applications/radio: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Siddharth Dushantha 2020 4 | # 5 | 6 | version="1.0.0" 7 | config_file="$HOME/.config/radio/config.json" 8 | cache_dir="$HOME/.cache/radio" 9 | last_played="$cache_dir/last_played" 10 | pid_file="$cache_dir/pid" 11 | notification_icon_path="$cache_dir/icon.png" 12 | 13 | usage(){ 14 | cat << EOF 15 | radio 16 | radio -h | -l | --version 17 | radio {pause|resume} 18 | radio [STATION] 19 | 20 | Play your favorite radio station from the command line with ease 21 | 22 | Commands 23 | kill Same behavior as 'pause' 24 | pause Pause the radio. 25 | resume Resume the radio 26 | stop Same behavior as 'pause' 27 | 28 | Options 29 | -h, --help Show help 30 | -l, --list List available radio stations 31 | -n, --now-playing Show which station is playing 32 | --version Show version 33 | EOF 34 | } 35 | 36 | print_error() { 37 | printf "%b\n" "Error: $1" >&2 38 | exit 1 39 | } 40 | 41 | stop(){ 42 | kill -9 "$(cat "$pid_file")" 2> /dev/null 43 | # Remove the $pid_file when we stop the radio or else the script 44 | # will think that there is a "radio session" already playing 45 | rm "$pid_file" 2> /dev/null 46 | } 47 | 48 | play(){ 49 | # A very hacky form of fuzzy searching. 50 | # We list out the station names and then use grep to find the station name 51 | # which the user provided. This prevents the user from having to type out 52 | # the exact name of the station name. The reason for using 'head -n 1' is 53 | # is so that we can get the first match in case there are multiple matches. 54 | station_name=$(printf %s "$radio_stations" | jq -r keys[] | grep -i "$1" | head -n 1) 55 | 56 | if [ "$station_name" = "" ]; then 57 | notify-send "Radio" "Could not find a radio station named \"$1\"" -i "$notification_icon_path" 58 | exit 1 59 | fi 60 | 61 | cover_art_url=$(printf %s "$radio_stations" | jq -r ".\"$station_name\".coverArtUrl") 62 | cover_art_ext=$(printf "${cover_art_url##*.}") 63 | cover_art_path="$cache_dir/$(printf %s "$station_name" | tr -d ' ').$cover_art_ext" 64 | stream_url=$(printf %s "$radio_stations" | jq -r ".\"$station_name\".streamUrl") 65 | 66 | # The cover art of the station is saved in teh cache so that we dont need 67 | # redownload it everytime the user listens to a station. 68 | [ ! -f "$cover_art_path" ] && curl -s "$cover_art_url" -o "$cover_art_path" 69 | 70 | # If the $pid_file *does not* exist, that means there is no other active radio 71 | # playing. But if it does exist, then we must kill the proccess otherwise 72 | # there would be multiple audios playing which is unpleasent. 73 | if [ -f "$pid_file" ]; then 74 | pid=$(cat "$pid_file") 75 | # We cannot just 'killall mpv' in order to stop any other radios "sessions" 76 | # from playing. This is because the user may be using mpv to view a video/image. 77 | # Thus, 'killall mpv' would also kill those proccesses. 78 | # Instead, we take the PID and get the exact command belonging to that PID. We 79 | # then check if the $streamUrl of the selected station is in the command 80 | # belonging to that PID. If so, that mean 81 | # shellcheck disable=SC2009 82 | if ! ps -p "$pid" -o args | grep "$stream_url" > /dev/null; then 83 | stop 84 | else 85 | # The station the user specified is already being played, so there 86 | # there is nothing to do. 87 | return 0 88 | fi 89 | fi 90 | 91 | # This is just for some extra ★bling★ 92 | # Notify the user what radio is being played along with 93 | # the appropriate cover art. 94 | notify-send "Radio" "Playing $station_name" -i "$cover_art_path" 95 | 96 | # We save the current station name in the cache so that the user can easily 97 | # play/pause the radio without having to provide the station name again when 98 | # wanting to play the same station they previoulsy listened to. 99 | printf %s "$station_name" > "$last_played" 100 | 101 | # This is where the radio is actually played 102 | mpv --no-terminal "$stream_url" & 103 | 104 | # Save the PID of the command above so that we can kill that proccess 105 | # if we need to stop the radio 106 | printf %s "$!" > "$pid_file" 107 | } 108 | 109 | play_last_played(){ 110 | if [ -f "$last_played" ]; then 111 | play "$(cat "$last_played")" 112 | else 113 | notify-send "Radio" "Couldn't find recently played station" -i "$notification_icon_path" 114 | fi 115 | } 116 | 117 | toggle(){ 118 | if [ -f "$pid_file" ]; then 119 | stop 120 | exit 121 | else 122 | play_last_played 123 | exit 124 | fi 125 | } 126 | 127 | main(){ 128 | mkdir -p "$cache_dir" 129 | 130 | [ ! -f "$config_file" ] && print_error "Couldn't find config file: $config_file" 131 | 132 | radio_stations=$(jq -r ".stations" < "$config_file") 133 | notification_icon_url=$(jq -r ".settings.notificationIconUrl" < "$config_file") 134 | 135 | [ ! -f "$notification_icon_path" ] && curl -s "$notification_icon_url" -o "$notification_icon_path" 136 | 137 | # Running this script wihtout any arguments, toggles the play/pause 138 | [ $# -eq 0 ] && toggle 139 | 140 | while [ "$1" ]; do 141 | case "$1" in 142 | --help | -h) 143 | usage 144 | exit ;; 145 | --version) 146 | echo "$version" 147 | exit ;; 148 | --list | -l) 149 | printf %s "$radio_stations" | jq -r keys[] | sed "s/^/- /g" 150 | exit ;; 151 | --now-playing | -n) 152 | notify-send "Radio" "Now playing $(cat $last_played)" -i "$notification_icon_path" 153 | exit ;; 154 | stop|kill|pause) 155 | stop 156 | exit ;; 157 | resume) 158 | play_last_played 159 | exit ;; 160 | -*) 161 | print_error "option '$1' does not exist" 162 | exit 1 ;; 163 | *) 164 | play "$@" 165 | exit ;; 166 | esac 167 | shift 168 | done 169 | } 170 | 171 | main "$@" 172 | -------------------------------------------------------------------------------- /bin/bin/bugbounty/deadlinks: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # by Siddharth Dushantha 2021 4 | # 5 | # A wrapper around blc[1] and subfinder[2] which finds dead links that 6 | # may be used to find broken link hijacking vulnerabilities[3] 7 | # 8 | # [1] https://github.com/stevenvachon/broken-link-checker/ 9 | # [2] https://github.com/projectdiscovery/subfinder 10 | # [3] https://gist.github.com/EdOverflow/24e0bb929169eb948bb7f3d0a2d5528f 11 | # 12 | 13 | version="1.0.0" 14 | subdomain_file="/tmp/subdomains.txt" 15 | 16 | usage(){ 17 | cat <&2 30 | exit 1 31 | } 32 | 33 | scan_url(){ 34 | if ! printf "%s" "$1" | grep -Eq "https:\/\/"; then 35 | print_error "URL doesn't start with 'https://'" 36 | fi 37 | blc "$1" | grep "─BROKEN─" 38 | } 39 | 40 | scan_domain(){ 41 | # Add the domain into the list so that it is also included 42 | # when we scan the subdomains for dead links. 43 | printf "%s\n" "$1" > "$subdomain_file" 44 | 45 | printf "%s\n" "Fetching all subdomains for '$1'" 46 | subfinder -d "$1" -silent >> "$subdomain_file" 47 | 48 | while read -r line; do 49 | printf "%s\n" "Scanning $line" 50 | blc "https://$line" | grep "─BROKEN─" 51 | done <"$subdomain_file" 52 | 53 | rm "$subdomain_file" 54 | } 55 | 56 | main(){ 57 | for dependency in blc subfinder; do 58 | if ! command -v "$dependency" >/dev/null 2>&1; then 59 | print_error "Could not find '$dependency', is it installed?" 60 | fi 61 | done 62 | 63 | [ $# -eq 0 ] && usage && exit 64 | 65 | while [ "$1" ]; do 66 | case "$1" in 67 | --help | -h) usage && exit ;; 68 | --domain | -d) scan_domain "$2" ;; 69 | --url| -u) scan_url "$2" ;; 70 | --version) echo "$version" && exit ;; 71 | -*) print_error "option '$1' does not exist" ;; 72 | *) usage && exit ;; 73 | esac 74 | shift 75 | done 76 | } 77 | 78 | main "$@" 79 | -------------------------------------------------------------------------------- /bin/bin/bugbounty/vdp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # by Siddharth Dushantha 2022 4 | # 5 | 6 | usage(){ 7 | cat </dev/null 2>&1; then 21 | # Append to our list of missing dependencies 22 | dep_missing="$dep_missing $dependency" 23 | fi 24 | done 25 | 26 | if [ "${#dep_missing}" -gt 0 ]; then 27 | printf %s "Could not find the following dependencies: $dep_missing" 28 | exit 1 29 | fi 30 | 31 | while [ "$1" ]; do 32 | case "$1" in 33 | --help | -h) usage && exit ;; 34 | --domain | -d) domain="$2" ;; 35 | --list | -l) list="$2" ;; 36 | --target | -t) target="$2";; 37 | --version) echo "$version" && exit ;; 38 | -*) usage ;; 39 | esac 40 | shift 41 | done 42 | 43 | 44 | if [ ! -z "$domain" ]; then 45 | target=$domain 46 | tmp_dir="$target/tmp" 47 | 48 | mkdir -p "$target" 49 | mkdir -p "$tmp_dir" 50 | 51 | # If using screen or tmux, change the name of the window to the name of the target 52 | if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then 53 | tmux rename-window -t${TMUX_PANE} "$target" 54 | fi 55 | 56 | printf %b "[\e[34mi\e[0m] Finding subdomains for $target" 57 | subfinder -d "$target" > "$tmp_dir/subdomains.txt" --silent 58 | printf %b "\e[2K\r[\e[34mi\e[0m] Found $(cat "$tmp_dir/subdomains.txt" | wc -l) subdomains on \e[34m$target\e[0m\n" 59 | 60 | # Remove duplicates 61 | sort -u "$tmp_dir/subdomains.txt" > "$tmp_dir/sorted_subdomains.txt" 62 | 63 | printf %b "[\e[34mi\e[0m] Removing dead subdomains\n" 64 | httpx -l "$tmp_dir/sorted_subdomains.txt" > "$tmp_dir/working_subdomains.txt" --silent 65 | 66 | printf %b "[\e[34mi\e[0m] Scanning vulnerabilities on $(cat "$tmp_dir/working_subdomains.txt" | wc -l) subdomains\n" 67 | nuclei -es info -list "$tmp_dir/working_subdomains.txt" -me "$target" --silent 68 | 69 | elif [ ! -z "$list" ] && [ ! -z "$target" ]; then 70 | printf %b "[\e[34mi\e[0m] Scanning for vulnerabilities" 71 | mkdir -p "$target" 72 | 73 | # If using screen or tmux, change the name of the window to the name of the target 74 | if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then 75 | tmux rename-window -t${TMUX_PANE} "$target" 76 | fi 77 | 78 | # Find vulnerabilities 79 | nuclei -es info -list "$list" -me "$target" --silent 80 | fi 81 | 82 | -------------------------------------------------------------------------------- /bin/bin/just4fun/10print: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Creates the famous 10print art, nothing special 4 | import random 5 | for i in range(100000):print(chr(9585+random.randint(0,1)), end="") 6 | 7 | -------------------------------------------------------------------------------- /bin/bin/just4fun/2048: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdushantha/dotfiles/69553b4a626c410269898bffe57961820e6573cc/bin/bin/just4fun/2048 -------------------------------------------------------------------------------- /bin/bin/just4fun/bee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | BEE = """\n\033[1m \033[32m"Bee" careful \033[34m__ 4 | \033[32mwith sudo! \033[34m// \\ 5 | \\\_/ \033[33m// 6 | \033[35m''-.._.-''-.._.. \033[33m-(||)(') 7 | '''\033[0m""" 8 | 9 | print(BEE) 10 | -------------------------------------------------------------------------------- /bin/bin/just4fun/groot: -------------------------------------------------------------------------------- 1 |  \^V// 2 |  |. .|  I AM (G)ROOT! 3 | - \ - / _ 4 |  \_| |_/ 5 |  \ \ 6 |  __/_/__ 7 | |_______|  With great power comes great responsibility. 8 |  \ /  Use sudo wisely. 9 |  \___/ 10 |  11 | -------------------------------------------------------------------------------- /bin/bin/just4fun/panes: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Author: GekkoP 4 | # Source: http://linuxbbq.org/bbs/viewtopic.php?f=4&t=1656#p33189 5 | 6 | f=3 b=4 7 | for j in f b; do 8 | for i in {0..7}; do 9 | printf -v $j$i %b "\e[${!j}${i}m" 10 | done 11 | done 12 | d=$'\e[1m' 13 | t=$'\e[0m' 14 | v=$'\e[7m' 15 | 16 | 17 | cat << EOF 18 | 19 | $f1███$d▄$t $f2███$d▄$t $f3███$d▄$t $f4███$d▄$t $f5███$d▄$t $f6███$d▄$t $f7███$d▄$t 20 | $f1███$d█$t $f2███$d█$t $f3███$d█$t $f4███$d█$t $f5███$d█$t $f6███$d█$t $f7███$d█$t 21 | $f1███$d█$t $f2███$d█$t $f3███$d█$t $f4███$d█$t $f5███$d█$t $f6███$d█$t $f7███$d█$t 22 | $d$f1 ▀▀▀ $f2▀▀▀ $f3▀▀▀ $f4▀▀▀ $f5▀▀▀ $f6▀▀▀ $f7▀▀▀ 23 | EOF 24 | -------------------------------------------------------------------------------- /bin/bin/keybinded/brightness/brightness: -------------------------------------------------------------------------------- 1 | 33.453367 2 | -------------------------------------------------------------------------------- /bin/bin/keybinded/brightness/brightnessControl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # You can call this script like this: 4 | # $ ./brightnessControl.sh up 5 | # $ ./brightnessControl.sh down 6 | 7 | # Script inspired by these wonderful people: 8 | # https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh 9 | # https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a 10 | 11 | function get_brightness { 12 | xbacklight -get | cut -d '.' -f 1 13 | } 14 | 15 | function send_notification { 16 | icon="preferences-system-brightness-lock" 17 | brightness=$(get_brightness) 18 | # Make the bar with the special character ─ (it's not dash -) 19 | # https://en.wikipedia.org/wiki/Box-drawing_character 20 | bar=$(seq -s "─" 0 $((brightness / 5)) | sed 's/[0-9]//g') 21 | # Send the notification 22 | dunstify -i "$icon" -r 5555 -u low " $bar" 23 | } 24 | 25 | case $1 in 26 | up) 27 | # increase the backlight by 5% 28 | xbacklight -inc 5 29 | 30 | # We output the current brightness into a file, so that when we reboot 31 | # or restart i3wm, the brightness can be restored by running a command 32 | # that is in my i3 config 33 | xbacklight -get > $HOME/bin/keybinded/brightness/brightness 34 | send_notification 35 | ;; 36 | down) 37 | # decrease the backlight by 5% 38 | xbacklight -dec 5 39 | xbacklight -get > $HOME/bin/keybinded/brightness/brightness 40 | send_notification 41 | ;; 42 | esac 43 | -------------------------------------------------------------------------------- /bin/bin/keybinded/brightness/restoreBrightness.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Restore the brightness by taking the value in the file, brightness 4 | 5 | VALUE=$(cat $HOME/bin/keybinded/brightness/brightness) 6 | 7 | xbacklight -set $VALUE 8 | -------------------------------------------------------------------------------- /bin/bin/keybinded/music_ctrl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # mpDris2 is needed 4 | _command="$1" 5 | 6 | if [ "$1" == "toggle" ]; then 7 | if [ $(playerctl status) == "Paused" ]; then 8 | _command="play" 9 | else 10 | _command="pause" 11 | fi 12 | fi 13 | 14 | 15 | 16 | playerctl --player="spotify,mpd" "$_command" 17 | -------------------------------------------------------------------------------- /bin/bin/keybinded/pop_mpv.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Created by Siddharth Dushantha (sdushantha) 4 | # 5 | # Dependencies: xdotool, mpv, xclip, youtube-dl 6 | # 7 | # This script lets you pop almost any video from your web browser 8 | # into mpv. If you are not using a browser, then the script will 9 | # look in your clipboard to see if you have copied an url which 10 | # can be played on mpv. 11 | # 12 | # The reason I made this script was because I fed up of dragging 13 | # the url into mpv everytime I wanted to view a YouTube video 14 | # on mpv. 15 | # 16 | # ==How you can use this== 17 | # - Copy a url to a video and run the script and it will show it in mpv 18 | # - While on the webpage with the video, run the script, and the 19 | # video will be shown in mpv 20 | # 21 | # This script was tested using Firefox, so if you use another 22 | # browser, replace the value for WEB_BROSWER with the name 23 | # of your web browser (e.g Google Chrome, Opera, etc.) 24 | 25 | 26 | # Edit this with the name of your web browser 27 | WEB_BROWSER="Mozilla Firefox" 28 | 29 | # Checking if the user is currently on the web browser 30 | CURRENT=$(xdotool getwindowfocus getwindowname | grep "$WEB_BROWSER") 31 | 32 | # Get the exit code of the command above. 33 | # If the user is using a web browser, then the 34 | # exit code will be 0 35 | STATUS=$? 36 | 37 | # If the user is using web browser... 38 | if [ $STATUS -eq 0 ];then 39 | # Then select the url bar and copy the url 40 | xdotool key ctrl+l 41 | xdotool key ctrl+c 42 | fi 43 | 44 | # Get the content from the clipboard 45 | URL=$(xclip -selection clipboard -o) 46 | 47 | notify-send "mpv" "Fetching video..." 48 | mpv $URL 49 | 50 | # Get the exit code if mpv 51 | STATUS=$? 52 | 53 | if [ $STATUS -ne 0 ];then 54 | notify-send "mpv" "Failed to fetch the video" 55 | exit 56 | fi 57 | 58 | 59 | -------------------------------------------------------------------------------- /bin/bin/keybinded/rofi_notes.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Use rofi to select/create notes and then edit them using nvim 4 | # 5 | 6 | notes_directory="$HOME/documents/notes" 7 | note_name=$(ls ~/documents/notes | rofi -dmenu) 8 | note_path="$notes_directory/$note_name" 9 | 10 | [ -n "$note_name" ] && kitty -e nvim "$note_path" 11 | -------------------------------------------------------------------------------- /bin/bin/keybinded/vifm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import subprocess 5 | import i3ipc 6 | import os 7 | 8 | i3 = i3ipc.Connection() 9 | 10 | def on(i3, e): 11 | e.container.command('floating enable') 12 | 13 | e.container.command("resize set 748 px 460 px, move window to position 347 px 230 px") 14 | sys.exit(0) 15 | 16 | 17 | os.popen("kitty -e /home/siddharth/bin/utils/vifmrun") 18 | 19 | i3.on('window::new', on) 20 | try: 21 | i3.main() 22 | finally: 23 | i3.main_quit() 24 | -------------------------------------------------------------------------------- /bin/bin/light-theme/libreoffice.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This script allows me to run libreoffice with a light GTK theme. 4 | # To be able to get the light theme when launching the apps from your app 5 | # launcher, edit the .desktop file for all of the libreoffice. All you have 6 | # to do is to replace "libreoffice" with the path to this script in the exec 7 | # variable. 8 | # 9 | # Keep note, there are usually 2 "Exec" variables in each .desktop file. 10 | # 11 | # Example (diff): 12 | # - Exec=libreoffice --writer 13 | # + Exec=/path/to/this/script.sh --writer 14 | 15 | GTK_THEME="Arc" libreoffice $1 16 | -------------------------------------------------------------------------------- /bin/bin/utils/0x0: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | URL="https://0x0.st" 3 | 4 | if [ $# -eq 0 ]; then 5 | echo "Usage: 0x0.st FILE\n" 6 | exit 1 7 | fi 8 | 9 | FILE=$1 10 | 11 | if [ ! -f "$FILE" ]; then 12 | echo "File ${FILE} not found" 13 | exit 1 14 | fi 15 | 16 | RESPONSE=$(curl -s -F "file=@${FILE}" "${URL}") 17 | 18 | echo "${RESPONSE}" 19 | -------------------------------------------------------------------------------- /bin/bin/utils/add-shadow: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script adds a cool shadow effect to images, just like MacOS screenshots. 4 | # I usually use this for screenshots that I take with scrot 5 | # Source: https://stefanscherer.github.io/how-to-take-screenshots-with-drop-shadow/ 6 | 7 | convert "$1" \( +clone -background grey25 -shadow 80x40+5+30 \) +swap -background transparent -layers merge +repage "$1-shadow.png" 8 | -------------------------------------------------------------------------------- /bin/bin/utils/aperisolve: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | HOST="https://www.aperisolve.com" 3 | ARGC=$# 4 | EXPECTED_ARGS=1 5 | 6 | if [ $# -eq $EXPECTED_ARGS ] 7 | then 8 | P=$(realpath $1) # Get File Path Browser 9 | REPHASH=$(curl -s -F file=@$P $HOST/upload | jq .File | tr -d '"') # Upload and get hash 10 | xdg-open $HOST/$REPHASH # Open Browser 11 | else 12 | echo "[?] Usage: aperisolve " 13 | fi; 14 | -------------------------------------------------------------------------------- /bin/bin/utils/border: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # Siddharth Dushantha 4 | # 5 | # Turn the i3wm border on/off and change the size 6 | # 7 | 8 | set_border(){ 9 | i3-msg "[class=.*] border pixel $1" > /dev/null 2>&1 10 | } 11 | 12 | # RegEx to match integers 13 | regex="^[0-9]+$" 14 | 15 | if [ "$1" = "on" ]; then 16 | set_border 1 17 | elif [ "$1" = "off" ]; then 18 | set_border 0 19 | elif printf %b "$1" | grep -Eq "$regex"; then 20 | set_border $1 21 | fi 22 | 23 | -------------------------------------------------------------------------------- /bin/bin/utils/ce: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This script lets me compile and execute in one go. 4 | # 5 | # Usage: ce CODE OUTPUT 6 | # 7 | # Example: 8 | # ce test.c test 9 | # 10 | 11 | code="$1" 12 | output="$2" 13 | 14 | gcc "$code" -o "$output" 15 | 16 | ./"$output" 17 | -------------------------------------------------------------------------------- /bin/bin/utils/cnf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # by Siddharth Dushantha 2021 4 | # 5 | # cnf - Command Not Found 6 | # 7 | # An utility which get the previous command that returned a 8 | # command not found error and then checks if there is package 9 | # which has that command. If a package is found, then it asks 10 | # you if you want to intall it. 11 | # 12 | # !!README!! 13 | # In order for this scrip to work, create a command-not-found handler 14 | # function in your shell's config file (e.g bashrc, zshrc, etc) and put the 15 | # command below in the function: 16 | # 17 | # mkdir -p "/tmp/command_not_found" 18 | # echo -n "$1" > "/tmp/command_not_found/command" 19 | # 20 | # echo "zsh: command not found: $1" && exit 1 21 | # 22 | # Each shell has a different command-not-found handler function name: 23 | # In the zsh its a function named command_not_found_handler[1] 24 | # In the bash its a function named command_not_found_handle[2] 25 | # 26 | # [1] https://zsh.sourceforge.io/Doc/Release/Command-Execution.html#Command-Execution 27 | # [2] https://www.gnu.org/software/bash/manual/bash.html#Command-Search-and-Execution 28 | # 29 | 30 | command_name=$(cat "/tmp/command_not_found/command") 31 | 32 | # Fetch the package name which contains the file /usr/bin/COMMAND 33 | package_name=$(pacman -Fq "/usr/bin/$command_name" | head) 34 | 35 | # If no package is found output the error message which ZSH shows by default 36 | if [ -z "$package_name" ]; then 37 | printf "%b\n" "Couldn't find the package containing the '\e[1m$command_name\e[0m' command" 38 | exit 1 39 | fi 40 | 41 | # Notify user and ask whether or not they want to install the package 42 | printf "%b\n" "Command '\e[1m$command_name\e[0m' not found, but was found in the '\e[1m$package_name\e[0m' package." 43 | 44 | read -p "Would you like to install it? [Y/n] " -N1 confirm 45 | 46 | # Just adding a few blank lines so that things look clean 47 | printf "%b" "\n\n" 48 | 49 | if printf %s "$confirm" | grep -Eq "[yY]"; then 50 | sudo pacman -S "$package_name" 51 | fi 52 | -------------------------------------------------------------------------------- /bin/bin/utils/darkmode.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | 4 | setGTKTheme(){ 5 | # I run i3 along with GNOME services in the background, therefore 6 | # I'm able to use 'gsettings'. Change the command according to your system 7 | if [ "$1" == "light" ]; then 8 | gsettings set org.gnome.desktop.interface gtk-theme "Kali-Light" 9 | elif [ "$1" == "dark" ]; then 10 | gsettings set org.gnome.desktop.interface gtk-theme "Kali-Dark" 11 | else 12 | printf %s "Error in setGTKTheme: got invalid argument '$1'" 13 | fi 14 | } 15 | 16 | 17 | setLightMode(){ 18 | setGTKTheme light 19 | } 20 | 21 | setDarkMode(){ 22 | setGTKTheme dark 23 | } 24 | 25 | main(){ 26 | while [ "$1" ]; do 27 | case "$1" in 28 | on) setDarkMode && exit ;; 29 | off) setLightMode && exit ;; 30 | esac 31 | shift 32 | done 33 | } 34 | 35 | main "$@" 36 | -------------------------------------------------------------------------------- /bin/bin/utils/duckmail: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # by Siddharth Dushantha 2023 4 | # 5 | # Dependencies: jq, curl, xclip 6 | # 7 | # duckmail is a POSIX shell script that generates @duck.com email address using 8 | # Duck Duck Go's Email Protection service. 9 | # 10 | 11 | # This file contains the auth token that is needed inorder to generate a duck email address 12 | auth_token_path="$HOME/.config/duckmail/token.txt" 13 | auth_token=$(cat "$auth_token_path") 14 | 15 | # This is DuckDuckGo's logo. This image gets used as an icon for notifications thats are sent 16 | ddg_icon_path="$HOME/.config/duckmail/ddg.png" 17 | 18 | output(){ 19 | # This function show output to STDOUT or as a notification depending on whether or not 20 | # the user executes duckmail through the terminal or a program such as 'rofi' 21 | message="$1" 22 | if [ -z "$TERM" ] || [ "$TERM" = "dumb" ]; then 23 | notify-send "DuckDuckGo" "$message" --icon "$ddg_icon_path" 24 | else 25 | printf "%b\n" "$message" 26 | fi 27 | 28 | } 29 | 30 | main(){ 31 | # Iterate of the array of dependencies and check if the user has them installed. 32 | # 33 | # dep_missing allows us to keep track of how many dependencies the user is missing 34 | # and then print out the missing dependencies once the checking is done. 35 | dep_missing="" 36 | 37 | for dependency in jq curl xclip; do 38 | if ! command -v "$dependency" >/dev/null 2>&1; then 39 | # Append to our list of missing dependencies 40 | dep_missing="$dep_missing $dependency" 41 | fi 42 | done 43 | 44 | if [ "${#dep_missing}" -gt 0 ]; then 45 | printf %s "Could not find the following dependencies:$dep_missing" 46 | exit 1 47 | fi 48 | 49 | # The user may provide a flag such as the ones mentioed in the list below: 50 | # --clipboard 51 | # --copy 52 | # -c 53 | # 54 | # Since they all start with one or more '-' and a 'c' we can simply check for "-{1,2}c" 55 | if printf "%b" "$1" | grep -Eq -- "-{1,2}c"; then 56 | copy_to_clipboard=true 57 | fi 58 | 59 | # Without the auth token, we're unable to genereate a @duck.com address 60 | if [ ! -f "$auth_token_path" ]; then 61 | output "Auth token file could not be found at $auth_token_path" 62 | exit 1 63 | fi 64 | 65 | if [ -z "$auth_token" ];then 66 | output "Auth token file is empty" 67 | exit 1 68 | fi 69 | 70 | # Using the DuckDuckGo's Email Protection service's API endpoint, we fetch the username 71 | response=$(curl -s "https://quack.duckduckgo.com/api/email/addresses" -X POST -H "Authorization: Bearer $auth_token") 72 | 73 | if printf "%b" "$response" | grep -Eq "invalid_token"; then 74 | output "Your token is invalid" 75 | exit 1 76 | fi 77 | 78 | username=$(printf "%b" "$response" | jq -r .address) 79 | duck_address="$username@duck.com" 80 | 81 | # If $TERM is not present or is set to 'dumb', we asume the user is executing duckmail 82 | # through a program such as 'rofi'. Therefore, we much force duckmail to save the duck 83 | # adress to the clipboard as the user will be unable to copy the output sent to STDOUT 84 | if [ -z "$TERM" ] || [ "$TERM" = "dumb" ]; then 85 | copy_to_clipboard=true 86 | fi 87 | 88 | if [ "$copy_to_clipboard" = true ]; then 89 | printf "%b" "$duck_address" | xclip -sel c 90 | output "Duck address copied!" 91 | exit 92 | fi 93 | 94 | printf "%b\n" "$duck_address" 95 | 96 | } 97 | 98 | main "$@" 99 | -------------------------------------------------------------------------------- /bin/bin/utils/ew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Siddharth Dushantha 2020 4 | # 5 | # https://github.com/sdushantha/bin 6 | # 7 | # ew - Edit Which 8 | # Quickly edit the source code of a command. This is pretty much a short 9 | # cut for doing --> vim $(which mycommand) 10 | 11 | file_path=$(command -v "$1" 2>/dev/null) 12 | 13 | if [ -z "$file_path" ]; then 14 | printf "%s\n" "Error: $1 not found" 15 | exit 1 16 | fi 17 | 18 | $EDITOR "$file_path" 19 | -------------------------------------------------------------------------------- /bin/bin/utils/ex: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # A better way to extract archives. 4 | # I got this from the web, so credits goes to who ever wrote this. 5 | SAVEIFS=$IFS 6 | IFS="$(printf '\n\t')" 7 | 8 | extract() { 9 | if [ -z "$1" ]; then 10 | # display usage if no parameters given 11 | echo "Usage: extract ." 12 | echo " extract [path/file_name_2.ext] [path/file_name_3.ext]" 13 | else 14 | for n in "$@" 15 | do 16 | if [ -f "$n" ] ; then 17 | case "${n%,}" in 18 | *.cbt|*.tar.bz2|*.tar.gz|*.tar.xz|*.tbz2|*.tgz|*.txz|*.tar) 19 | tar xvf "$n" ;; 20 | *.lzma) unlzma ./"$n" ;; 21 | *.bz2) bunzip2 ./"$n" ;; 22 | *.cbr|*.rar) unrar x -ad ./"$n" ;; 23 | *.gz) gunzip ./"$n" ;; 24 | *.cbz|*.epub) unzip ./"$n" ;; 25 | *.z) uncompress ./"$n" ;; 26 | *.7z|*.apk|*.arj|*.zip|*.cab|*.cb7|*.chm|*.deb|*.dmg|*.iso|*.lzh|*.msi|*.pkg|*.rpm|*.udf|*.wim|*.xar) 27 | 7z x ./"$n" ;; 28 | *.xz) unxz ./"$n" ;; 29 | *.exe) cabextract ./"$n" ;; 30 | *.cpio) cpio -id < ./"$n" ;; 31 | *.cba|*.ace) unace x ./"$n" ;; 32 | *.zpaq) zpaq x ./"$n" ;; 33 | *.arc) arc e ./"$n" ;; 34 | *.cso) ciso 0 ./"$n" ./"$n.iso" && \ 35 | extract "$n.iso" && \rm -f "$n" ;; 36 | *) 37 | echo "extract: '$n' - unknown archive method" 38 | return 1 39 | ;; 40 | esac 41 | else 42 | echo "'$n' - file does not exist" 43 | return 1 44 | fi 45 | done 46 | fi 47 | } 48 | 49 | IFS=$SAVEIFS 50 | extract "$@" 51 | -------------------------------------------------------------------------------- /bin/bin/utils/ffmpeg-wrappers/vid2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Convert a video to...MP4, AVI, etc 4 | # 5 | # usage: vid2 FILE_FORMAT FILE 6 | # 7 | 8 | FILE_FORMAT="$1" 9 | FILE="$2" 10 | OUTPUT="$FILENAME.$FILE_FORMAT" 11 | 12 | FILENAME=$(basename -- "$2") 13 | FILENAME="${FILENAME%.*}" 14 | 15 | ffmpeg -hide_banner \ 16 | -i "$FILE" \ 17 | -codec copy \ 18 | "$OUTPUT" 19 | -------------------------------------------------------------------------------- /bin/bin/utils/ffmpeg-wrappers/vidcut: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Cut a video from timestamp x to y. 4 | # 5 | # Example: 6 | # vid-cut myvideo.mp4 00:01 00:12 output.mp4 7 | # 8 | 9 | VIDEO="$1" 10 | FROM="$2" 11 | TO="$3" 12 | OUTPUT="$4" 13 | 14 | # This is where the actual cutting happens 15 | ffmpeg -i "$VIDEO" \ 16 | -ss "$FROM" \ 17 | -t "$TO" \ 18 | -async 1 \ 19 | "$OUTPUT" 20 | 21 | 22 | -------------------------------------------------------------------------------- /bin/bin/utils/ffmpeg-wrappers/vidmute: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Remove audio from a video file 4 | # 5 | # usage: vid-mute myvideo.mp4 myvideo-muted.mp4 6 | # 7 | 8 | INPUT="$1" 9 | OUTPUT="$2" 10 | 11 | ffmpeg -i "$INPUT" \ 12 | -c copy \ 13 | -an \ 14 | "$OUTPUT" 15 | -------------------------------------------------------------------------------- /bin/bin/utils/fwifi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | has() { 5 | local verbose=false 6 | if [[ $1 == '-v' ]]; then 7 | verbose=true 8 | shift 9 | fi 10 | for c in "$@"; do c="${c%% *}" 11 | if ! command -v "$c" &> /dev/null; then 12 | [[ "$verbose" == true ]] && err "$c not found" 13 | return 1 14 | fi 15 | done 16 | } 17 | 18 | err() { 19 | printf '\e[31m%s\e[0m\n' "$*" >&2 20 | } 21 | 22 | die() { 23 | (( $# > 0 )) && err "$*" 24 | exit 1 25 | } 26 | 27 | has -v nmcli fzf || die 28 | 29 | SSID=$(nmcli --color yes device wifi | fzf --ansi --height=40% --reverse --cycle --inline-info --header-lines=1 | awk '{print $2}') 30 | [[ -z "$SSID" ]] && exit 31 | echo "connecting to \"${SSID}\"..." 32 | nmcli -a device wifi connect "$SSID" 33 | -------------------------------------------------------------------------------- /bin/bin/utils/gifgen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Echo help/usage message 4 | show_help() { 5 | echo "gifgen 1.1.2" 6 | echo 7 | echo "Usage: gifgen [options] [input]" 8 | echo 9 | echo "Options:" 10 | echo " -o Output file [input.gif]" 11 | echo " -f Frames per second [10]" 12 | echo " -s Optimize for static background" 13 | echo " -v Display verbose output from ffmpeg" 14 | echo 15 | echo "Examples:" 16 | echo " $ gifgen video.mp4" 17 | echo " $ gifgen -o demo.gif SCM_1457.mp4" 18 | echo " $ gifgen -sf 15 screencap.mov" 19 | } 20 | 21 | # Setup defaults 22 | pid=$$ 23 | palette="/tmp/gif-palette-$pid.png" 24 | fps="10" 25 | verbosity="warning" 26 | stats_mode="full" 27 | dither="sierra2_4a" 28 | 29 | # Parse args 30 | while getopts "hi:o:f:sv" opt; do 31 | case "$opt" in 32 | h) 33 | show_help=true 34 | ;; 35 | o) 36 | output=$OPTARG 37 | ;; 38 | f) 39 | fps=$OPTARG 40 | ;; 41 | s) 42 | stats_mode="diff" 43 | dither="none" 44 | ;; 45 | v) 46 | verbosity="info" 47 | ;; 48 | esac 49 | done 50 | shift "$((OPTIND-1))" 51 | 52 | # Grab input file from end of command 53 | input=$1 54 | 55 | # Show help and exit if we have no input 56 | [[ "$input" = "" ]] || [[ $show_help = true ]] && show_help && exit 57 | 58 | # Check for ffmpeg before encoding 59 | type ffmpeg >/dev/null 2>&1 || { 60 | echo "Error: gifgen requires ffmpeg to be installed" 61 | exit 1 62 | } 63 | 64 | # Set output if not specified 65 | if [[ "$output" = "" ]]; then 66 | input_filename=${input##*/} 67 | output=${input_filename%.*}.gif 68 | fi 69 | 70 | echo -e "[\033[1mI\033[0m] Using video \033[1m$input\033[0m" 71 | echo -e "[\033[1mI\033[0m] Extracting frames from video" 72 | 73 | # Encode GIF 74 | ffmpeg -v "$verbosity" -i "$input" -vf "fps=$fps,palettegen=stats_mode=$stats_mode" -y "$palette" 75 | 76 | [[ "$verbosity" = "info" ]] && echo 77 | 78 | echo -e "[\033[1mI\033[0m] Encoding GIF" 79 | ffmpeg -v "$verbosity" -i "$input" -i "$palette" -lavfi "fps=$fps [x]; [x][1:v] paletteuse=dither=$dither" -y "$output" 80 | 81 | echo -e "[\033[1mI\033[0m] Saved GIF as \033[1m$output\033[0m" 82 | 83 | -------------------------------------------------------------------------------- /bin/bin/utils/gym: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Siddharth Dushantha 2022 4 | # 5 | # Check number of people at the gym 6 | # 7 | 8 | import requests 9 | import re 10 | 11 | r = requests.get("https://spicheren.no/besokstall/") 12 | html = r.text 13 | 14 | total_visits = re.findall(r"Total visits: (\d+) -->", html) 15 | 16 | print(f"Total visitors: {total_visits[0]}") 17 | -------------------------------------------------------------------------------- /bin/bin/utils/h2s: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # by Siddharth Dushantha 4 | # 5 | # Change the HTTPS git url to a SSH git url 6 | # 7 | 8 | url=$(git config --get remote.origin.url) 9 | 10 | if [ $(echo "$url" | grep "git@github.com") ]; then 11 | printf "%s\n" "Already SSH compatible url" 12 | exit 13 | fi 14 | 15 | username_reponame=$(echo $url | cut -d "/" -f 4-5) 16 | ssh_url="git@github.com:$username_reponame" 17 | 18 | git remote set-url origin "$ssh_url" 19 | printf "Changed remote git url to SSH compatible: %s\n" "$ssh_url" 20 | -------------------------------------------------------------------------------- /bin/bin/utils/kp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # mnemonic: [K]ill [P]rocess 3 | # show output of "ps -ef", use [tab] to select one or multiple entries 4 | # press [enter] to kill selected processes and go back to the process list. 5 | # or press [escape] to go back to the process list. Press [escape] twice to exit completely. 6 | 7 | pid=$(ps -ef | sed 1d | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='Select proccess to kill'" | awk '{print $2}') 8 | 9 | if [ "x$pid" != "x" ] 10 | then 11 | echo "$pid" | xargs kill "-${1:-9}" 12 | kp 13 | fi 14 | -------------------------------------------------------------------------------- /bin/bin/utils/mmv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | # Lists the current directory's files in Vim, so you can edit it and save to rename them 5 | # USAGE: vimv [file1 file2] 6 | # https://github.com/thameera/vimv 7 | 8 | declare -r FILENAMES_FILE=$(mktemp "${TMPDIR:-/tmp}/vimv.XXX") 9 | 10 | trap '{ rm -f "${FILENAMES_FILE}" ; }' EXIT 11 | 12 | if [ $# -ne 0 ]; then 13 | src=( "$@" ) 14 | else 15 | IFS=$'\r\n' GLOBIGNORE='*' command eval 'src=($(ls))' 16 | fi 17 | 18 | for ((i=0;i<${#src[@]};++i)); do 19 | echo "${src[i]}" >> "${FILENAMES_FILE}" 20 | done 21 | 22 | ${EDITOR:-vi} "${FILENAMES_FILE}" 23 | 24 | IFS=$'\r\n' GLOBIGNORE='*' command eval 'dest=($(cat "${FILENAMES_FILE}"))' 25 | 26 | if (( ${#src[@]} != ${#dest[@]} )); then 27 | echo "WARN: Number of files changed. Did you delete a line by accident? Aborting.." >&2 28 | exit 1 29 | fi 30 | 31 | declare -i count=0 32 | for ((i=0;i<${#src[@]};++i)); do 33 | if [ "${src[i]}" != "${dest[i]}" ]; then 34 | mkdir -p "$(dirname "${dest[i]}")" 35 | if git ls-files --error-unmatch "${src[i]}" > /dev/null 2>&1; then 36 | git mv --verbose "${src[i]}" "${dest[i]}" 37 | else 38 | mv --interactive --verbose "${src[i]}" "${dest[i]}" 39 | fi 40 | ((++count)) 41 | fi 42 | done 43 | 44 | echo "$count" files renamed. 45 | -------------------------------------------------------------------------------- /bin/bin/utils/notes: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | notes_dir="$HOME/documents/notes" 4 | file_name=$(ls "$notes_dir" | fzf) 5 | 6 | if [ -z "$file_name" ]; then 7 | nvim -c "cd $notes_dir" 8 | else 9 | nvim ~/documents/notes/$file_name 10 | fi 11 | -------------------------------------------------------------------------------- /bin/bin/utils/ocr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Siddharth Dushantha 2020 4 | # 5 | # https://github.com/sdushantha/bin 6 | # 7 | 8 | TEXT_FILE="/tmp/ocr.txt" 9 | IMAGE_FILE="/tmp/ocr.png" 10 | 11 | 12 | # Check if the needed dependencies are installed 13 | dependencies=(tesseract maim notify-send xclip) 14 | for dependency in "${dependencies[@]}"; do 15 | type -p "$dependency" &>/dev/null || { 16 | # The reason why we are sending the error as a notification is because 17 | # user is most likely going to run this script by binding it to their 18 | # keyboard, therefor they cant see any text that is outputed using echo 19 | notify-send "ocr" "Could not find '${dependency}', is it installed?" 20 | echo "Could not find '${dependency}', is it installed?" 21 | exit 1 22 | } 23 | done 24 | 25 | # Take screenshot by selecting the area 26 | maim -s "$IMAGE_FILE" 27 | 28 | # Get the exit code of the previous command. 29 | # So in this case, it is the screenshot command. If it did not exit with an 30 | # exit code 0, then it means the user canceled the process of taking a 31 | # screenshot by doing something like pressing the escape key 32 | STATUS=$? 33 | 34 | # If the user pressed the escape key or did something to terminate the proccess 35 | # taking a screenshot, then just exit 36 | [ $STATUS -ne 0 ] && exit 1 37 | 38 | # Do the magic (∩^o^)⊃━☆゚.*・。゚ 39 | # Notice how I have removing the extension .txt from the file path. This is 40 | # because tesseract adds .txt to the given file path anyways. So if we were to 41 | # specify /tmp/ocr.txt as the file path, tesseract would out the text to 42 | # /tmp/ocr.txt.txt 43 | tesseract "$IMAGE_FILE" "${TEXT_FILE//\.txt/}" 2> /dev/null 44 | 45 | # Remove the new page character. 46 | # Source: https://askubuntu.com/a/1276441/782646 47 | sed -i 's/\x0c//' "$TEXT_FILE" 48 | 49 | # Check if the text was detected by checking number 50 | # of lines in the file 51 | NUM_LINES=$(wc -l < $TEXT_FILE) 52 | if [ "$NUM_LINES" -eq 0 ]; then 53 | notify-send "ocr" "no text was detected" 54 | exit 1 55 | fi 56 | 57 | # Copy text to clipboard 58 | xclip -selection clip < "$TEXT_FILE" 59 | 60 | # Send a notification with the text that was grabbed using OCR 61 | notify-send "ocr" "$(cat $TEXT_FILE)" 62 | 63 | # Clean up 64 | # "Always leave the area better than you found it" 65 | # - My first grade teacher 66 | rm "$TEXT_FILE" 67 | rm "$IMAGE_FILE" 68 | -------------------------------------------------------------------------------- /bin/bin/utils/pauseallmpv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | for i in /tmp/mpvsoc*; do 3 | [ -e "$i" ] || break 4 | echo '{ "command": ["set_property", "pause", true] }' | socat - "$i"; 5 | done 6 | -------------------------------------------------------------------------------- /bin/bin/utils/qrshot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Siddharth Dushantha 2022 4 | # 5 | # https://github.com/sdushantha/bin 6 | # 7 | 8 | image_file="/tmp/ocr.png" 9 | 10 | # Check if the needed dependencies are installed 11 | dependencies=(maim notify-send zbarimg xclip) 12 | for dependency in "${dependencies[@]}"; do 13 | type -p "$dependency" &>/dev/null || { 14 | # The reason why we are sending the error as a notification is because 15 | # user is most likely going to run this script by binding it to their 16 | # keyboard, therefor they cant see any text that is outputed using echo 17 | notify-send "ocr" "Could not find '${dependency}', is it installed?" 18 | echo "Could not find '${dependency}', is it installed?" 19 | exit 1 20 | } 21 | done 22 | 23 | # Take screenshot by selecting the area 24 | maim -s "$image_file" 25 | 26 | # Get the exit code of the previous command. 27 | # So in this case, it is the screenshot command. If it did not exit with an 28 | # exit code 0, then it means the user canceled the process of taking a 29 | # screenshot by doing something like pressing the escape key 30 | status=$? 31 | 32 | # If the user pressed the escape key or did something to terminate the proccess 33 | # taking a screenshot, then just exit 34 | [ $status -ne 0 ] && exit 1 35 | 36 | # Use zbarimg to decode the text from the QR code 37 | decoded_text=$(zbarimg "$image_file" -q --raw) 38 | 39 | if [ -z "$decoded_text" ]; then 40 | notify-send "qrshot" "no qr code was found" 41 | rm $image_file && exit 1 42 | fi 43 | 44 | # Copy text to clipboard 45 | printf %b "$decoded_text" | xclip -selection clip 46 | 47 | # Let us know that something was decoded 48 | notify-send "qrshot" "$decoded_text" 49 | 50 | # Cleaning up the trash that was left behind 51 | rm $image_file 52 | -------------------------------------------------------------------------------- /bin/bin/utils/rofi-askpass: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rofi -dmenu\ 3 | -password\ 4 | -i\ 5 | -no-fixed-num-lines\ 6 | -p "Password:"\ 7 | -theme themes/askpass.rasi 8 | -------------------------------------------------------------------------------- /bin/bin/utils/sk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Toggle screenkey 4 | # 5 | 6 | if pgrep screenkey > /dev/null 2>&1; then 7 | killall screenkey > /dev/null 2>&1 & 8 | notify-send "Screenkey" "Turned off" 9 | else 10 | screenkey \ 11 | --geometry 350x700-20+430 \ 12 | --font "JetBrains Mono Nerd Font" \ 13 | --bg-color "#101010" \ 14 | --font-color "#e9e4e4" \ 15 | --no-systray \ 16 | > /dev/null 2>&1 & 17 | notify-send "Screenkey" "Turned on" 18 | 19 | fi 20 | -------------------------------------------------------------------------------- /bin/bin/utils/sloc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # http://github.com/mitchweaver/bin 4 | # 5 | # count lines of code in a shellscript 6 | # ignores comments and blank lines 7 | # 8 | 9 | usage() { 10 | >&2 printf 'Usage: %s [file] or %s < [file]\n' "${0##*/}" "${0##*/}" 11 | exit 1 12 | } 13 | 14 | if [ "$1" ] ; then 15 | case ${1#-} in 16 | h) 17 | usage 18 | ;; 19 | *) 20 | [ -f "$1" ] || usage 21 | esac 22 | 23 | printf '%s' 'SLOC: ' 24 | sed '/^\s*#/d;/^\s*$/d' "$1" | wc -l | sed 's/ //g' 25 | else 26 | printf '%s' 'SLOC: ' 27 | sed '/^\s*#/d;/^\s*$/d' | wc -l | sed 's/ //g' 28 | fi 29 | -------------------------------------------------------------------------------- /bin/bin/utils/tmpjn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # by Siddharth Dushantha 2020 4 | # 5 | # tmpjn - Temporary Jupyter Notebook 6 | # 7 | 8 | nb_file_name="notebook.ipynb" 9 | 10 | cd "$(mktemp -d)" 11 | 12 | # The content of an "empty" Jupyter Notebook file. 13 | # Even though the file is not empty, Jupyter Notebook will 14 | # detect that this a Interactive Python Notebook. 15 | cat >"$nb_file_name" << EOL 16 | { 17 | "cells": [], 18 | "metadata": {}, 19 | "nbformat": 4, 20 | "nbformat_minor": 5 21 | } 22 | EOL 23 | 24 | # Open the "empty" Notebook 25 | jupyter notebook "$nb_file_name" 26 | -------------------------------------------------------------------------------- /bin/bin/utils/tmpsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # http://github.com/mitchweaver 4 | # 5 | # open a shell in a temporary dir without adding commands to history 6 | # 7 | 8 | cd "$(mktemp -d)" || exit 9 | zsh 10 | -------------------------------------------------------------------------------- /bin/bin/utils/touchpad: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Siddharth Dushantha 2021 4 | # 5 | # Disable/enable the touchpad 6 | # 7 | 8 | position=$(xinput list --name-only | grep -n "Touchpad" | cut -d : -f 1) 9 | touchpad_id=$(xinput list --id-only | sed -n "$position p") 10 | touchpad_status=$(xinput list-props 12 | grep "Device Enabled" | cut -d : -f 2) 11 | 12 | if [ "$touchpad_status" -eq 1 ]; then 13 | xinput disable "$touchpad_id" 14 | notify-send "Touchpad" "Disabled touchpad" 15 | 16 | elif [ "$touchpad_status" -eq 0 ]; then 17 | xinput enable "$touchpad_id" 18 | notify-send "Touchpad" "Enabled touchpad" 19 | 20 | else 21 | notify "Touchpad" "Unknown status: $touchpad_status" 22 | 23 | fi 24 | -------------------------------------------------------------------------------- /bin/bin/utils/upld: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | if [ $# -eq 0 ];then 3 | echo -e "No arguments specified.\nUsage:\n transfer \n ... | transfer ">&2 4 | exit 1 5 | fi 6 | 7 | if tty -s;then 8 | file="$1" 9 | file_name=$(basename "$file") 10 | if [ ! -e "$file" ];then 11 | echo "$file: No such file or directory">&2 12 | return 1 13 | fi 14 | if [ -d "$file" ];then 15 | file_name="$file_name.zip" , 16 | (cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null, 17 | else 18 | cat "$file"|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null 19 | fi 20 | else 21 | file_name=$1;curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null 22 | fi 23 | -------------------------------------------------------------------------------- /bin/bin/utils/urldecode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import urllib.parse 4 | 5 | print(urllib.parse.unquote_plus(sys.argv[1])) 6 | -------------------------------------------------------------------------------- /bin/bin/utils/urlencode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys, urllib.parse 3 | print(urllib.parse.quote_plus(sys.argv[1])) 4 | -------------------------------------------------------------------------------- /bin/bin/utils/webcam: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Show webcam 4 | # 5 | 6 | mpv --demuxer-lavf-format=video4linux2 \ 7 | --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:"/dev/video0" \ 8 | --profile=low-latency \ 9 | --untimed \ 10 | --vf=hflip \ 11 | --no-keepaspect-window &> /dev/null & 12 | -------------------------------------------------------------------------------- /bin/bin/utils/xcwd-helper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # by Siddharth Dushantha 2023 4 | # 5 | # A script that only allows xcwd to be used for opening a terminal from certain applications. 6 | # If the current window is Discord, the xcwd will return '/usr/bin/' and that's not where we 7 | # want to open our terminal. So 'xcwd' only works properly when launching while our focused 8 | # window is a terminal such as Alacritty. Thunar used work, but no longer works. 9 | # 10 | # Example usage: 11 | # alacritty --working-directory=$(xcwd-helper) 12 | # 13 | 14 | current_dir="$(xcwd)" 15 | allowed_program_classes="Alacritty" 16 | active_window_class=$(xdotool getactivewindow getwindowclassname) 17 | 18 | if ! printf %s "$allowed_program_classes" | grep -q "$active_window_class"; then 19 | printf %s "$HOME" 20 | exit 21 | fi 22 | 23 | printf %s "$current_dir" 24 | 25 | -------------------------------------------------------------------------------- /discord/.config/discord/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "chromiumSwitches": {}, 3 | "IS_MAXIMIZED": false, 4 | "IS_MINIMIZED": false, 5 | "WINDOW_BOUNDS": { 6 | "x": 0, 7 | "y": 24, 8 | "width": 1536, 9 | "height": 936 10 | }, 11 | "SKIP_HOST_UPDATE": true 12 | } -------------------------------------------------------------------------------- /duckmail/.config/duckmail/ddg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdushantha/dotfiles/69553b4a626c410269898bffe57961820e6573cc/duckmail/.config/duckmail/ddg.png -------------------------------------------------------------------------------- /dunst/.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | 4 | # If this option is set to mouse or keyboard, the monitor option 5 | # will be ignored. 6 | follow = mouse 7 | 8 | # Geometery reference --> [{width}]x{height}[+/-{x}+/-{y}] 9 | geometry = "300x0-12+37" 10 | 11 | # Radius of the four corners of the notification 12 | corner_radius = 5 13 | 14 | # Show how many messages are currently hidden (because of geometry). 15 | indicate_hidden = yes 16 | 17 | # Shrink window if it's smaller than the width. Will be ignored if width is 0. 18 | shrink = no 19 | 20 | # The transparency of the window. Range: [0; 100]. 21 | transparency = 0 22 | 23 | # The height of the entire notification. If the height is smaller 24 | # than the font height and padding combined, it will be raised 25 | # to the font height and padding. 26 | notification_height = 0 27 | 28 | # Show multiple notifications in the same box 29 | separator_height = 2 30 | 31 | # Define a color for the separator. 32 | # possible values are: 33 | # * auto: dunst tries to find a color fitting to the background; 34 | # * foreground: use the same color as the foreground; 35 | # * frame: use the same color as the frame; 36 | # * anything else will be interpreted as a X color. 37 | separator_color = auto 38 | 39 | # Add vertical padding to the inside of the notification 40 | padding = 10 41 | 42 | # Add horizontal padding for when the text gets long enough 43 | horizontal_padding = 10 44 | 45 | # The frame color and width of the notification 46 | frame_width = 2 47 | frame_color = "#333333" 48 | 49 | 50 | sort = yes 51 | 52 | # How long a user needs to be idle for sticky notifications 53 | idle_threshold = 120 54 | 55 | # Font and typography settings 56 | font = JetBrains Mono Nerdfont 10 57 | alignment = left 58 | word_wrap = yes 59 | 60 | # The spacing between lines. If the height is smaller than the font height, it will get raised to the font height. 61 | line_height = 0 62 | 63 | # Allow some HTML tags like and in notifications 64 | markup = full 65 | 66 | # Format for how notifications will be displayed 67 | #format = "%s\n%b" 68 | format = "%s %p\n%b" 69 | 70 | show_age_threshold = 60 71 | 72 | # When word_wrap is set to no, specify where to make an ellipsis in long lines. 73 | # Possible values are "start", "middle" and "end". 74 | ellipsize = middle 75 | 76 | # Ignore newlines '\n' in notifications. 77 | ignore_newline = no 78 | 79 | # Stack together notifications with the same content 80 | stack_duplicates = true 81 | 82 | # Hide the count of stacked notifications with the same content 83 | hide_duplicate_count = true 84 | 85 | # Display indicators for URLs (U) and actions (A). 86 | show_indicators = no 87 | 88 | # Align icons left/right/off 89 | icon_position = left 90 | 91 | # Scale larger icons down to this size, set to 0 to disable 92 | max_icon_size = 48 93 | 94 | icon_path = /usr/share/icons/Paper/16x16/status/:/usr/share/icons/Paper/16x16/devices/:/usr/share/icons/Paper/16x16/apps/ 95 | 96 | sticky_history = yes 97 | history_length = 20 98 | 99 | # Always run rule-defined scripts, even if the notification is suppressed 100 | always_run_script = true 101 | 102 | startup_notification = false 103 | 104 | force_xinerama = false 105 | 106 | ### mouse 107 | # Defines action of mouse event 108 | # Possible values are: 109 | # * none: Don't do anything. 110 | # * do_action: If the notification has exactly one action, or one is marked as default, 111 | # invoke it. If there are multiple and no default, open the context menu. 112 | # * close_current: Close current notification. 113 | # * close_all: Close all notifications. 114 | mouse_left_click = do_action 115 | mouse_middle_click = close_all 116 | mouse_right_click = close_current 117 | 118 | [urgency_low] 119 | # This urgency should be used only 120 | # for volume/brightness notification 121 | background = "#111116" 122 | foreground = "#a8a8a8" 123 | timeout = 1 124 | icon = /dev/null 125 | 126 | [urgency_normal] 127 | background = "#111116" 128 | foreground = "#a8a8a8" 129 | timeout = 10 130 | icon = /dev/null 131 | 132 | [urgency_critical] 133 | background = "#d64e4e" 134 | foreground = "#f0e0e0" 135 | frame_color = "#d64e4e" 136 | timeout = 0 137 | icon = /usr/share/icons/Paper/16x16/status/dialog-warning.png 138 | 139 | [skip-rule] 140 | appname=discord 141 | skip_display=true 142 | 143 | -------------------------------------------------------------------------------- /flameshot/.config/flameshot/flameshot.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | checkForUpdates=false 3 | contrastOpacity=102 4 | contrastUiColor=#7c8fa3 5 | disabledTrayIcon=true 6 | drawColor=#ff0000 7 | drawFontSize=27 8 | drawThickness=4 9 | filenamePattern=%F-%H%M%S 10 | saveAfterCopy=true 11 | saveAsFileExtension=png 12 | savePath=/home/siddharth/pictures/screenshots 13 | savePathFixed=true 14 | showDesktopNotification=false 15 | showHelp=false 16 | showSidePanelButton=false 17 | showStartupLaunchMessage=false 18 | startupLaunch=false 19 | uiColor=#abc4e0 20 | undoLimit=104 21 | uploadHistoryMax=22 22 | 23 | [Shortcuts] 24 | TYPE_COPY=Return 25 | -------------------------------------------------------------------------------- /gtk-2.0/.config/gtk-2.0/gtkfilechooser.ini: -------------------------------------------------------------------------------- 1 | [Filechooser Settings] 2 | LocationMode=path-bar 3 | ShowHidden=false 4 | ShowSizeColumn=true 5 | GeometryX=1020 6 | GeometryY=0 7 | GeometryWidth=840 8 | GeometryHeight=630 9 | SortColumn=name 10 | SortOrder=ascending 11 | StartupMode=recent 12 | -------------------------------------------------------------------------------- /gtk-3.0/.config/gtk-3.0/bookmarks: -------------------------------------------------------------------------------- 1 | file:///home/siddharth/documents 2 | file:///home/siddharth/downloads 3 | file:///home/siddharth/pictures 4 | file:///home/siddharth/videos 5 | file:///home/siddharth/pictures/screenshots 6 | file:///home/siddharth/projects 7 | -------------------------------------------------------------------------------- /gtk-3.0/.config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-theme-name=Arc-Dark 3 | gtk-icon-theme-name=Paper 4 | gtk-font-name=Noto Sans 11 5 | gtk-cursor-theme-name=Adwaita 6 | gtk-cursor-theme-size=0 7 | gtk-toolbar-style=GTK_TOOLBAR_BOTH 8 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR 9 | gtk-button-images=1 10 | gtk-menu-images=1 11 | gtk-enable-event-sounds=1 12 | gtk-enable-input-feedback-sounds=1 13 | gtk-xft-antialias=1 14 | gtk-xft-hinting=1 15 | gtk-xft-hintstyle=hintfull 16 | gtk-xft-rgba=rgb 17 | -------------------------------------------------------------------------------- /i3/.config/i3/config: -------------------------------------------------------------------------------- 1 | # Norwegian speacial letters 2 | # Æ = ae 3 | # Ø = oslash 4 | # Å = aring 5 | 6 | # General {{{ 7 | # Define names for default workspaces for which we configure key bindings later on. 8 | # We use variables to avoid repeating the names in multiple places. 9 | set $ws1 "1" 10 | set $ws2 "2" 11 | set $ws3 "3" 12 | set $ws4 "4" 13 | set $ws5 "5" 14 | set $ws6 "6" 15 | set $ws7 "7" 16 | set $ws8 "8" 17 | set $ws9 "9" 18 | set $ws10 "10" 19 | 20 | # The pixles of the gaps 21 | gaps inner 0 22 | gaps outer 0 23 | smart_borders on 24 | 25 | font pango:Hack 9 26 | #}}} 27 | 28 | 29 | # Keybindings {{{ 30 | 31 | set $mod Mod4 32 | 33 | # Use Mouse+$mod to drag floating windows to their wanted position 34 | floating_modifier $mod 35 | 36 | # kill focused window 37 | bindsym $mod+q kill 38 | 39 | # change focus 40 | bindsym $mod+h focus left 41 | bindsym $mod+j focus down 42 | bindsym $mod+k focus up 43 | bindsym $mod+l focus right 44 | 45 | # move focused window 46 | bindsym $mod+Shift+h move left 47 | bindsym $mod+Shift+j move down 48 | bindsym $mod+Shift+k move up 49 | bindsym $mod+Shift+l move right 50 | 51 | # split in horizontal orientation 52 | bindsym $mod+period split h 53 | 54 | # split in vertical orientation 55 | bindsym $mod+comma split v 56 | 57 | # enter fullscreen mode for the focused container 58 | bindsym $mod+f fullscreen toggle 59 | 60 | # change container layout (tacked, tabbed, toggle split) 61 | bindsym $mod+t layout tabbed 62 | bindsym $mod+Shift+t layout splith 63 | 64 | # toggle tiling / floating 65 | bindsym $mod+Shift+space floating toggle,move absolute position center 66 | 67 | # focus the parent container 68 | bindsym $mod+a focus parent 69 | 70 | # switch to workspace 71 | bindsym $mod+1 workspace $ws1 72 | bindsym $mod+2 workspace $ws2 73 | bindsym $mod+3 workspace $ws3 74 | bindsym $mod+4 workspace $ws4 75 | bindsym $mod+5 workspace $ws5 76 | bindsym $mod+6 workspace $ws6 77 | bindsym $mod+7 workspace $ws7 78 | bindsym $mod+8 workspace $ws8 79 | bindsym $mod+9 workspace $ws9 80 | bindsym $mod+0 workspace $ws10 81 | 82 | # move focused container to workspace 83 | bindsym $mod+Shift+1 move container to workspace $ws1 84 | bindsym $mod+Shift+2 move container to workspace $ws2 85 | bindsym $mod+Shift+3 move container to workspace $ws3 86 | bindsym $mod+Shift+4 move container to workspace $ws4 87 | bindsym $mod+Shift+5 move container to workspace $ws5 88 | bindsym $mod+Shift+6 move container to workspace $ws6 89 | bindsym $mod+Shift+7 move container to workspace $ws7 90 | bindsym $mod+Shift+8 move container to workspace $ws8 91 | bindsym $mod+Shift+9 move container to workspace $ws9 92 | bindsym $mod+Shift+0 move container to workspace $ws10 93 | 94 | # Restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 95 | bindsym $mod+Shift+r restart 96 | 97 | # Exit i3 (logs you out of your X session) 98 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" 99 | 100 | # Resize window 101 | # Mod1 = Alt 102 | bindsym $mod+Mod1+h resize shrink width 1 px or 1 ppt 103 | bindsym $mod+Mod1+j resize grow height 1 px or 1 ppt 104 | bindsym $mod+Mod1+k resize shrink height 1 px or 1 ppt 105 | bindsym $mod+Mod1+l resize grow width 1 px or 1 ppt 106 | 107 | # Launch terminal 108 | bindsym $mod+Return exec alacritty --working-directory="$(command -v xcwd >/dev/null && xcwd | awk -F '\n' '{print $1}'|| echo $HOME)" 109 | 110 | # Launch a terminal with vifm 111 | bindsym $mod+Shift+Return exec alacritty --working-directory="$(command -v xcwd >/dev/null && xcwd | awk -F '\n' '{print $1}' || echo $HOME)" -e vifmrun 112 | 113 | # Keybindings that do things using rofi 114 | bindsym $mod+space exec --no-startup-id rofi -show drun 115 | bindsym $mod+n exec bash $HOME/bin/keybinded/rofi_notes.sh 116 | bindsym $mod+ae exec bash $HOME/bin/keybinded/rofi_todo.sh 117 | bindsym $mod+v exec rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' && xdotool key ctrl+shift+v 118 | bindsym $mod+Shift+d exec bash $HOME/.config/rofi/scripts/rofi-picker.sh 119 | bindsym $mod+o exec zsh -c "bash $HOME/.config/rofi/scripts/rofi-finder.sh $HOME" 120 | bindsym $mod+Shift+c exec bash $HOME/.config/rofi/scripts/rofi-farge.sh 121 | 122 | # Lauch my Calculator 123 | bindsym XF86Calculator exec qalculate-gtk 124 | 125 | # Volume controls 126 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ 0 && pactl set-sink-volume @DEFAULT_SINK@ +5% 127 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ 0 && pactl set-sink-volume @DEFAULT_SINK@ -5% 128 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle 129 | 130 | # Music control 131 | bindsym XF86AudioNext exec --no-startup-id bash $HOME/bin/keybinded/music_ctrl.sh next 132 | bindsym XF86AudioPrev exec --no-startup-id bash $HOME/bin/keybinded/music_ctrl.sh previous 133 | bindsym XF86AudioPlay exec --no-startup-id bash $HOME/bin/keybinded/music_ctrl.sh toggle 134 | bindsym XF86AudioStop exec --no-startup-id bash $HOME/bin/keybinded/music_ctrl.sh pause 135 | 136 | # Toggle mic 137 | bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 0 toggle 138 | 139 | # Brightness control 140 | bindsym XF86MonBrightnessUp exec brightnessctl s 5%+ 141 | bindsym XF86MonBrightnessDown exec brightnessctl s 5%- 142 | 143 | # Screenshot selected area 144 | # You need to use `--release` in the binding. 145 | # See "4.3. Keyboard bindings" on i3wm docs 146 | bindsym $mod+Shift+x --release exec flameshot gui 147 | 148 | # Select color from screen and save the value to clipboard 149 | bindsym $mod+c --release exec farge --no-color-code --no-preview 150 | 151 | # Rotating the display. Keybinings taken from Windows. 152 | bindsym Control+Mod1+Up exec xrandr -o normal 153 | bindsym Control+Mod1+Down exec xrandr -o inverted 154 | bindsym Control+Mod1+Right exec xrandr -x 155 | 156 | # Hide/unhide windows. A little similar to minimizing/maximizing 157 | # windows on a DE 158 | bindsym $mod+m move scratchpad 159 | bindsym $mod+shift+m scratchpad show 160 | 161 | # Control dunst notifications 162 | bindsym Control+space exec dunstctl close 163 | #bindsym Control+Shift+space exec dunstctl all 164 | bindsym Control+Shift+period exec dunstctl context 165 | 166 | # Lock my screen 167 | bindsym $mod+x exec betterlockscreen --lock 168 | 169 | # Launch Thunar 170 | bindsym $mod+E exec thunar & 171 | 172 | #}}} 173 | 174 | 175 | # Autorun {{{ 176 | # exec -> On start-up 177 | # exec_always -> On start-up and reload 178 | exec_always --no-startup-id feh pictures/current/* --bg-fill --no-fehbg 179 | exec_always --no-startup-id picom 180 | exec_always --no-startup-id bash $HOME/bin/keybinded/brightness/restoreBrightness.sh 181 | exec_always --no-startup-id bash $HOME/.config/polybar/launch.sh 182 | exec_always --no-startup-id dunst 183 | exec_always --no-startup-id i3-auto-layout 184 | exec_always --no-startup-id flameshot 185 | exec_always --no-startup-id xfce4-power-manager 186 | exec_always --no-startup-id greenclip daemon 187 | exec_always --no-startup-id nm-applet 188 | 189 | #exec --no-startup-id /usr/lib/gsd-xsettings 190 | exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 191 | #}}} 192 | 193 | 194 | # Window rules {{{ 195 | # Gives a border to the windows. 196 | for_window [class="^.*"] border pixel 1 197 | 198 | # class border backgr. text indicator child_border 199 | client.focused #2c2f3e #2c2f3e #F5C2E7 #8c8c8c #8c8c8c 200 | client.focused_inactive #2c2f3e #2c2f3e #F5C2E7 #333333 #333333 201 | client.unfocused #121317 #121317 #D9E0EE #333333 #333333 202 | client.urgent #f28fad #f28fad #000000 #333333 #f28fad 203 | client.placeholder #333333 #333333 #000000 #333333 #333333 204 | 205 | # Dialogs, popups, etc should be floating and in the center of the screen 206 | for_window [window_role="task_dialog"] floating enable, move absolute position center, border pixel 0 207 | for_window [window_role="Dialog"] floating enable, move absolute position center, border pixel 0 208 | for_window [window_role="pop-up"] floating enable, move absolute position center 209 | for_window [window_role="bubble"] floating enable, move absolute position center 210 | for_window [window_role="Preferences"] floating enable, move absolute position center 211 | for_window [window_type="dialog"] floating enable, move absolute position center, border pixel 0 212 | for_window [window_type="menu"] floating enable, move absolute position center 213 | for_window [title="(Open File|File Upload)"] floating enable, move absolute position center 214 | 215 | for_window [class="zoom"] floating enable 216 | for_window [class="[Bb]lueberry.py"] floating enable 217 | for_window [class="mpv"] floating enable 218 | for_window [class="[qQ]alculate-gtk"] floating enable 219 | for_window [class="[Ss]imple[Ss]creen[Rr]ecorder"] floating enable 220 | for_window [class="[Gg]nome-calendar"] floating enable 221 | for_window [class="[Dd]ragon-drag-and-drop"] floating enable, border pixel 0 222 | for_window [class="Windscribe[2]"] floating enable, border pixel 0 223 | for_window [class="die"] floating enable 224 | for_window [class="[Xx][Cc]alc"] floating enable 225 | for_window [class="[N]sxiv"] floating enable 226 | 227 | # Prevent mouse from changing the focus 228 | focus_follows_mouse yes 229 | 230 | # Fixes graphics glitch 231 | new_window none 232 | #}}} 233 | 234 | -------------------------------------------------------------------------------- /mimetype/.config/mimeapps.list: -------------------------------------------------------------------------------- 1 | [Default Applications] 2 | inode/directory=thunar.desktop; 3 | text/x-shellscript=text.desktop; 4 | text/plain=text.desktop; 5 | text/x-makefile=text.desktop; 6 | image/png=img.desktop; 7 | image/jpeg=img.desktop; 8 | image/gif=img.desktop; 9 | application/pdf=pdf.desktop; 10 | video/x-matroska=video.desktop; 11 | video/mp4=video.desktop; 12 | x-scheme-handler/http=browser.desktop; 13 | x-scheme-handler/https=browser.desktop; 14 | 15 | [Added Associations] 16 | application/json=text.desktop; 17 | -------------------------------------------------------------------------------- /mimetype/.local/share/applications/browser.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Web Browser 4 | Exec=/usr/bin/firefox %u 5 | -------------------------------------------------------------------------------- /mimetype/.local/share/applications/img.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Image viewer 4 | Exec=/usr/bin/nsxiv -a %f 5 | -------------------------------------------------------------------------------- /mimetype/.local/share/applications/pdf.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=PDF reader 4 | Exec=/usr/bin/firefox %u 5 | -------------------------------------------------------------------------------- /mimetype/.local/share/applications/text.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Text editor 4 | Exec=/usr/bin/alacritty -e nvim %u 5 | -------------------------------------------------------------------------------- /mimetype/.local/share/applications/video.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Video viewer 4 | Exec=/usr/bin/mpv -quiet "%u" 5 | -------------------------------------------------------------------------------- /mpv/.config/mpv/input.conf: -------------------------------------------------------------------------------- 1 | # Seeking 2 | l seek 5 # Forward 3 | h seek -5 # Rewind 4 | 5 | # Volume controle 6 | j add volume -2 # Decrease volume 7 | k add volume 2 # Increase volume 8 | 9 | # Hit the space bar to play/pause 10 | SPACE cycle pause 11 | 12 | # Quit mpv 13 | q quit 14 | 15 | # Zoom in and out 16 | + add video-zoom 0.1 17 | - add video-zoom -0.1 18 | 19 | # Vim like keybindings to pan 20 | H add video-pan-x 0.1 # Pan left 21 | L add video-pan-x -0.1 # Pan right 22 | K add video-pan-y 0.1 # Pan up 23 | J add video-pan-y -0.1 # Pan down 24 | 25 | # Reset the panning and zooming 26 | = set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 27 | 28 | # Mute/Unmute 29 | m cycle mute 30 | 31 | # Next/Prev in playlist 32 | n playlist-next 33 | p playlist-prev 34 | 35 | # Disable the arrow keys because I rather 36 | # get used to VIM keys 37 | left ignore 38 | right ignore 39 | up ignore 40 | down ignore 41 | 42 | # Rotate 43 | Ctrl+r no-osd cycle-values video-rotate "90" "180" "270" "0" 44 | 45 | # Open curren file in dragon so you can drag and drop it 46 | Ctrl+o run "/bin/bash" "-c" "dragon-drag-and-drop \"${path}\"" 47 | 48 | # Copy the full path of the current file 49 | Ctrl+c run "/bin/bash" "-c" "echo $PWD/${path} | xclip -selection c && dunstify mpv \"File path copied to clipboard\"" 50 | 51 | # Copy only the name of the file 52 | Ctrl+Shift+c run "/bin/bash" "-c" "echo ${path} | xclip -selection c && dunstify mpv \"File name copied to clipboard\"" 53 | -------------------------------------------------------------------------------- /mpv/.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | # Adjusting the initial window size 2 | geometry=36% 3 | 4 | # Disable On Screen Controlers 5 | osc=no 6 | 7 | # uosc provides its own seeking/volume indicators, so you also don't need this 8 | osd-bar=no 9 | # uosc will draw its own window controls if you disable window border 10 | border=no 11 | 12 | # Enable the best hardware decoder 13 | hwdec=yes 14 | 15 | # If the current file is an image, keep 16 | # it open forever 17 | image-display-duration=inf 18 | 19 | # Loops the playlist forever 20 | loop-playlist=inf 21 | 22 | # Loop files in case of webms or gifs 23 | loop-file=inf 24 | 25 | # I honestly dont know what these lines 26 | # do, but all I know is that these lines 27 | # allow me to display images properly 28 | # source: https://git.io/fjvtn 29 | scale=spline36 30 | cscale=spline36 31 | dscale=mitchell 32 | dither-depth=auto 33 | correct-downscaling 34 | sigmoid-upscaling 35 | 36 | script-opts=ytdl_hook-ytdl_path=yt-dlp 37 | 38 | [extension.mp3] 39 | geometry=250x250 40 | 41 | -------------------------------------------------------------------------------- /nvim/.config/nvim/colors/idk.vim: -------------------------------------------------------------------------------- 1 | " vi:syntax=vim 2 | " 3 | " Modified version of Base16 Tomorrow Night to tailored to my liking 4 | " Original by Chris Kempson 5 | " Modified by Siddharth Dushantha 6 | 7 | 8 | " GUI color definitions 9 | let s:gui00 = "101213" 10 | let g:base16_gui00 = "101213" 11 | let s:gui01 = "101213" 12 | let g:base16_gui01 = "282a2e" 13 | let s:gui02 = "373b41" 14 | let g:base16_gui02 = "373b41" 15 | let s:gui03 = "969896" 16 | let g:base16_gui03 = "969896" 17 | let s:gui04 = "b4b7b4" 18 | let g:base16_gui04 = "b4b7b4" 19 | let s:gui05 = "c5c8c6" 20 | let g:base16_gui05 = "c5c8c6" 21 | let s:gui06 = "e0e0e0" 22 | let g:base16_gui06 = "e0e0e0" 23 | let s:gui07 = "ffffff" 24 | let g:base16_gui07 = "ffffff" 25 | let s:gui08 = "cc6666" 26 | let g:base16_gui08 = "cc6666" 27 | let s:gui09 = "de935f" 28 | let g:base16_gui09 = "de935f" 29 | let s:gui0A = "f0c674" 30 | let g:base16_gui0A = "f0c674" 31 | let s:gui0B = "b5bd68" 32 | let g:base16_gui0B = "b5bd68" 33 | let s:gui0C = "8abeb7" 34 | let g:base16_gui0C = "8abeb7" 35 | let s:gui0D = "81a2be" 36 | let g:base16_gui0D = "81a2be" 37 | let s:gui0E = "b294bb" 38 | let g:base16_gui0E = "b294bb" 39 | let s:gui0F = "a3685a" 40 | let g:base16_gui0F = "a3685a" 41 | 42 | " Terminal color definitions 43 | let s:cterm00 = "00" 44 | let g:base16_cterm00 = "00" 45 | let s:cterm03 = "08" 46 | let g:base16_cterm03 = "08" 47 | let s:cterm05 = "07" 48 | let g:base16_cterm05 = "07" 49 | let s:cterm07 = "15" 50 | let g:base16_cterm07 = "15" 51 | let s:cterm08 = "01" 52 | let g:base16_cterm08 = "01" 53 | let s:cterm0A = "03" 54 | let g:base16_cterm0A = "03" 55 | let s:cterm0B = "02" 56 | let g:base16_cterm0B = "02" 57 | let s:cterm0C = "06" 58 | let g:base16_cterm0C = "06" 59 | let s:cterm0D = "04" 60 | let g:base16_cterm0D = "04" 61 | let s:cterm0E = "05" 62 | let g:base16_cterm0E = "05" 63 | if exists("base16colorspace") && base16colorspace == "256" 64 | let s:cterm01 = "18" 65 | let g:base16_cterm01 = "18" 66 | let s:cterm02 = "19" 67 | let g:base16_cterm02 = "19" 68 | let s:cterm04 = "20" 69 | let g:base16_cterm04 = "20" 70 | let s:cterm06 = "21" 71 | let g:base16_cterm06 = "21" 72 | let s:cterm09 = "16" 73 | let g:base16_cterm09 = "16" 74 | let s:cterm0F = "17" 75 | let g:base16_cterm0F = "17" 76 | else 77 | let s:cterm01 = "10" 78 | let g:base16_cterm01 = "10" 79 | let s:cterm02 = "11" 80 | let g:base16_cterm02 = "11" 81 | let s:cterm04 = "12" 82 | let g:base16_cterm04 = "12" 83 | let s:cterm06 = "13" 84 | let g:base16_cterm06 = "13" 85 | let s:cterm09 = "09" 86 | let g:base16_cterm09 = "09" 87 | let s:cterm0F = "14" 88 | let g:base16_cterm0F = "14" 89 | endif 90 | 91 | " Neovim terminal colours 92 | if has("nvim") 93 | let g:terminal_color_0 = "#1d1f21" 94 | let g:terminal_color_1 = "#cc6666" 95 | let g:terminal_color_2 = "#b5bd68" 96 | let g:terminal_color_3 = "#f0c674" 97 | let g:terminal_color_4 = "#81a2be" 98 | let g:terminal_color_5 = "#b294bb" 99 | let g:terminal_color_6 = "#8abeb7" 100 | let g:terminal_color_7 = "#c5c8c6" 101 | let g:terminal_color_8 = "#969896" 102 | let g:terminal_color_9 = "#cc6666" 103 | let g:terminal_color_10 = "#b5bd68" 104 | let g:terminal_color_11 = "#f0c674" 105 | let g:terminal_color_12 = "#81a2be" 106 | let g:terminal_color_13 = "#b294bb" 107 | let g:terminal_color_14 = "#8abeb7" 108 | let g:terminal_color_15 = "#ffffff" 109 | let g:terminal_color_background = g:terminal_color_0 110 | let g:terminal_color_foreground = g:terminal_color_5 111 | if &background == "light" 112 | let g:terminal_color_background = "#000000" 113 | let g:terminal_color_foreground = g:terminal_color_2 114 | endif 115 | elseif has("terminal") 116 | let g:terminal_ansi_colors = [ 117 | \ "#1d1f21", 118 | \ "#cc6666", 119 | \ "#b5bd68", 120 | \ "#f0c674", 121 | \ "#81a2be", 122 | \ "#b294bb", 123 | \ "#8abeb7", 124 | \ "#c5c8c6", 125 | \ "#969896", 126 | \ "#cc6666", 127 | \ "#b5bd68", 128 | \ "#f0c674", 129 | \ "#81a2be", 130 | \ "#b294bb", 131 | \ "#8abeb7", 132 | \ "#ffffff", 133 | \ ] 134 | endif 135 | 136 | " Theme setup 137 | hi clear 138 | syntax reset 139 | let g:colors_name = "base16-tomorrow-night" 140 | 141 | " Highlighting function 142 | " Optional variables are attributes and guisp 143 | function! g:Base16hi(group, guifg, guibg, ctermfg, ctermbg, ...) 144 | let l:attr = get(a:, 1, "") 145 | let l:guisp = get(a:, 2, "") 146 | 147 | if a:guifg != "" 148 | exec "hi " . a:group . " guifg=#" . a:guifg 149 | endif 150 | if a:guibg != "" 151 | exec "hi " . a:group . " guibg=#" . a:guibg 152 | endif 153 | if a:ctermfg != "" 154 | exec "hi " . a:group . " ctermfg=" . a:ctermfg 155 | endif 156 | if a:ctermbg != "" 157 | exec "hi " . a:group . " ctermbg=" . a:ctermbg 158 | endif 159 | if l:attr != "" 160 | exec "hi " . a:group . " gui=" . l:attr . " cterm=" . l:attr 161 | endif 162 | if l:guisp != "" 163 | exec "hi " . a:group . " guisp=#" . l:guisp 164 | endif 165 | endfunction 166 | 167 | 168 | fun hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) 169 | call g:Base16hi(a:group, a:guifg, a:guibg, a:ctermfg, a:ctermbg, a:attr, a:guisp) 170 | endfun 171 | 172 | " Vim editor colors 173 | call hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") 174 | call hi("Bold", "", "", "", "", "bold", "") 175 | call hi("Debug", s:gui08, "", s:cterm08, "", "", "") 176 | call hi("Directory", s:gui0D, "", s:cterm0D, "", "", "") 177 | call hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "") 178 | call hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") 179 | call hi("Exception", s:gui08, "", s:cterm08, "", "", "") 180 | call hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "") 181 | call hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 182 | call hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "") 183 | call hi("Italic", "", "", "", "", "none", "") 184 | call hi("Macro", s:gui08, "", s:cterm08, "", "", "") 185 | call hi("MatchParen", "", s:gui03, "", s:cterm03, "", "") 186 | call hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "") 187 | call hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "") 188 | call hi("Question", s:gui0D, "", s:cterm0D, "", "", "") 189 | call hi("Search", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "", "") 190 | call hi("Substitute", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "none", "") 191 | call hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "") 192 | call hi("TooLong", s:gui08, "", s:cterm08, "", "", "") 193 | call hi("Underlined", s:gui08, "", s:cterm08, "", "", "") 194 | call hi("Visual", "", s:gui02, "", s:cterm02, "", "") 195 | call hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "") 196 | call hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "") 197 | call hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "") 198 | call hi("Title", s:gui0D, "", s:cterm0D, "", "none", "") 199 | call hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") 200 | call hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "") 201 | call hi("NonText", s:gui03, "", s:cterm03, "", "", "") 202 | call hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 203 | call hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 204 | call hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "") 205 | call hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") 206 | call hi("VertSplit", s:gui02, s:gui02, s:cterm02, s:cterm02, "none", "") 207 | call hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "") 208 | call hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "") 209 | call hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "") 210 | call hi("CursorLineNr", s:gui04, s:gui01, s:cterm04, s:cterm01, "", "") 211 | call hi("QuickFixLine", "", s:gui01, "", s:cterm01, "none", "") 212 | call hi("PMenu", s:gui05, s:gui01, s:cterm05, s:cterm01, "none", "") 213 | call hi("PMenuSel", s:gui01, s:gui05, s:cterm01, s:cterm05, "", "") 214 | call hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") 215 | call hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") 216 | call hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "") 217 | 218 | " Standard syntax highlighting 219 | call hi("Boolean", s:gui09, "", s:cterm09, "", "", "") 220 | call hi("Character", s:gui08, "", s:cterm08, "", "", "") 221 | call hi("Comment", s:gui03, "", s:cterm03, "", "", "") 222 | call hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "") 223 | call hi("Constant", s:gui09, "", s:cterm09, "", "", "") 224 | call hi("Define", s:gui0E, "", s:cterm0E, "", "none", "") 225 | call hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "") 226 | call hi("Float", s:gui09, "", s:cterm09, "", "", "") 227 | call hi("Function", s:gui0D, "", s:cterm0D, "", "", "") 228 | call hi("Identifier", s:gui08, "", s:cterm08, "", "none", "") 229 | call hi("Include", s:gui0D, "", s:cterm0D, "", "", "") 230 | call hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "") 231 | call hi("Label", s:gui0A, "", s:cterm0A, "", "", "") 232 | call hi("Number", s:gui09, "", s:cterm09, "", "", "") 233 | call hi("Operator", s:gui05, "", s:cterm05, "", "none", "") 234 | call hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "") 235 | call hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "") 236 | call hi("Special", s:gui0C, "", s:cterm0C, "", "", "") 237 | call hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "") 238 | call hi("Statement", s:gui08, "", s:cterm08, "", "", "") 239 | call hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "") 240 | call hi("String", s:gui0B, "", s:cterm0B, "", "", "") 241 | call hi("Structure", s:gui0E, "", s:cterm0E, "", "", "") 242 | call hi("Tag", s:gui0A, "", s:cterm0A, "", "", "") 243 | call hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "") 244 | call hi("Type", s:gui0A, "", s:cterm0A, "", "none", "") 245 | call hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "") 246 | 247 | " C highlighting 248 | call hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "") 249 | call hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "") 250 | 251 | " C# highlighting 252 | call hi("csClass", s:gui0A, "", s:cterm0A, "", "", "") 253 | call hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "") 254 | call hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "") 255 | call hi("csType", s:gui08, "", s:cterm08, "", "", "") 256 | call hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "") 257 | call hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "") 258 | call hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "") 259 | 260 | " CSS highlighting 261 | call hi("cssBraces", s:gui05, "", s:cterm05, "", "", "") 262 | call hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "") 263 | call hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "") 264 | 265 | " Diff highlighting 266 | call hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") 267 | call hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 268 | call hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") 269 | call hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") 270 | call hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") 271 | call hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") 272 | call hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") 273 | call hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") 274 | call hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") 275 | 276 | " Git highlighting 277 | call hi("gitcommitOverflow", s:gui08, "", s:cterm08, "", "", "") 278 | call hi("gitcommitSummary", s:gui0B, "", s:cterm0B, "", "", "") 279 | call hi("gitcommitComment", s:gui03, "", s:cterm03, "", "", "") 280 | call hi("gitcommitUntracked", s:gui03, "", s:cterm03, "", "", "") 281 | call hi("gitcommitDiscarded", s:gui03, "", s:cterm03, "", "", "") 282 | call hi("gitcommitSelected", s:gui03, "", s:cterm03, "", "", "") 283 | call hi("gitcommitHeader", s:gui0E, "", s:cterm0E, "", "", "") 284 | call hi("gitcommitSelectedType", s:gui0D, "", s:cterm0D, "", "", "") 285 | call hi("gitcommitUnmergedType", s:gui0D, "", s:cterm0D, "", "", "") 286 | call hi("gitcommitDiscardedType", s:gui0D, "", s:cterm0D, "", "", "") 287 | call hi("gitcommitBranch", s:gui09, "", s:cterm09, "", "bold", "") 288 | call hi("gitcommitUntrackedFile", s:gui0A, "", s:cterm0A, "", "", "") 289 | call hi("gitcommitUnmergedFile", s:gui08, "", s:cterm08, "", "bold", "") 290 | call hi("gitcommitDiscardedFile", s:gui08, "", s:cterm08, "", "bold", "") 291 | call hi("gitcommitSelectedFile", s:gui0B, "", s:cterm0B, "", "bold", "") 292 | 293 | " GitGutter highlighting 294 | call hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") 295 | call hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") 296 | call hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") 297 | call hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "") 298 | 299 | " HTML highlighting 300 | call hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "") 301 | call hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "") 302 | call hi("htmlEndTag", s:gui05, "", s:cterm05, "", "", "") 303 | call hi("htmlTag", s:gui05, "", s:cterm05, "", "", "") 304 | 305 | " JavaScript highlighting 306 | call hi("javaScript", s:gui05, "", s:cterm05, "", "", "") 307 | call hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "") 308 | call hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "") 309 | " pangloss/vim-javascript highlighting 310 | call hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "") 311 | call hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "") 312 | call hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "") 313 | call hi("jsThis", s:gui08, "", s:cterm08, "", "", "") 314 | call hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "") 315 | call hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "") 316 | call hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "") 317 | call hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "") 318 | call hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "") 319 | call hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "") 320 | call hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "") 321 | call hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "") 322 | call hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "") 323 | call hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "") 324 | call hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "") 325 | 326 | " Mail highlighting 327 | call hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "") 328 | call hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "") 329 | call hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "") 330 | call hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "") 331 | call hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "") 332 | call hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "") 333 | call hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "") 334 | call hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "") 335 | 336 | " Markdown highlighting 337 | call hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "") 338 | call hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") 339 | call hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "") 340 | call hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "") 341 | 342 | " NERDTree highlighting 343 | call hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "") 344 | call hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "") 345 | 346 | " PHP highlighting 347 | call hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "") 348 | call hi("phpComparison", s:gui05, "", s:cterm05, "", "", "") 349 | call hi("phpParent", s:gui05, "", s:cterm05, "", "", "") 350 | call hi("phpMethodsVar", s:gui0C, "", s:cterm0C, "", "", "") 351 | 352 | " Python highlighting 353 | call hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "") 354 | call hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "") 355 | call hi("pythonInclude", s:gui0E, "", s:cterm0E, "", "", "") 356 | call hi("pythonStatement", s:gui0E, "", s:cterm0E, "", "", "") 357 | 358 | " Ruby highlighting 359 | call hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "") 360 | call hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "") 361 | call hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "") 362 | call hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "") 363 | call hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "") 364 | call hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "") 365 | 366 | " SASS highlighting 367 | call hi("sassidChar", s:gui08, "", s:cterm08, "", "", "") 368 | call hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "") 369 | call hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "") 370 | call hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "") 371 | call hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "") 372 | 373 | " Signify highlighting 374 | call hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") 375 | call hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") 376 | call hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") 377 | 378 | " Spelling highlighting 379 | call hi("SpellBad", "", "", "", "", "undercurl", s:gui08) 380 | call hi("SpellLocal", "", "", "", "", "undercurl", s:gui0C) 381 | call hi("SpellCap", "", "", "", "", "undercurl", s:gui0D) 382 | call hi("SpellRare", "", "", "", "", "undercurl", s:gui0E) 383 | 384 | " Startify highlighting 385 | call hi("StartifyBracket", s:gui03, "", s:cterm03, "", "", "") 386 | call hi("StartifyFile", s:gui07, "", s:cterm07, "", "", "") 387 | call hi("StartifyFooter", s:gui03, "", s:cterm03, "", "", "") 388 | call hi("StartifyHeader", s:gui0B, "", s:cterm0B, "", "", "") 389 | call hi("StartifyNumber", s:gui09, "", s:cterm09, "", "", "") 390 | call hi("StartifyPath", s:gui03, "", s:cterm03, "", "", "") 391 | call hi("StartifySection", s:gui0E, "", s:cterm0E, "", "", "") 392 | call hi("StartifySelect", s:gui0C, "", s:cterm0C, "", "", "") 393 | call hi("StartifySlash", s:gui03, "", s:cterm03, "", "", "") 394 | call hi("StartifySpecial", s:gui03, "", s:cterm03, "", "", "") 395 | 396 | " Java highlighting 397 | call hi("javaOperator", s:gui0D, "", s:cterm0D, "", "", "") 398 | 399 | " Remove functions 400 | delf hi 401 | 402 | " Remove color variables 403 | unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F 404 | unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F 405 | -------------------------------------------------------------------------------- /nvim/.config/nvim/colors/test.vim: -------------------------------------------------------------------------------- 1 | " vi:syntax=vim 2 | 3 | " base16-vim (https://github.com/chriskempson/base16-vim) 4 | " by Chris Kempson (http://chriskempson.com) 5 | " Tomorrow Night scheme by Chris Kempson (http://chriskempson.com) 6 | 7 | " This enables the coresponding base16-shell script to run so that 8 | " :colorscheme works in terminals supported by base16-shell scripts 9 | " User must set this variable in .vimrc 10 | " let g:base16_shell_path=base16-builder/output/shell/ 11 | if !has("gui_running") 12 | if exists("g:base16_shell_path") 13 | execute "silent !/bin/sh ".g:base16_shell_path."/base16-tomorrow-night.sh" 14 | endif 15 | endif 16 | 17 | " GUI color definitions 18 | let s:gui00 = "1d1f21" 19 | let g:base16_gui00 = "1d1f21" 20 | let s:gui01 = "282a2e" 21 | let g:base16_gui01 = "282a2e" 22 | let s:gui02 = "373b41" 23 | let g:base16_gui02 = "373b41" 24 | let s:gui03 = "969896" 25 | let g:base16_gui03 = "969896" 26 | let s:gui04 = "b4b7b4" 27 | let g:base16_gui04 = "b4b7b4" 28 | let s:gui05 = "c5c8c6" 29 | let g:base16_gui05 = "c5c8c6" 30 | let s:gui06 = "e0e0e0" 31 | let g:base16_gui06 = "e0e0e0" 32 | let s:gui07 = "ffffff" 33 | let g:base16_gui07 = "ffffff" 34 | let s:gui08 = "cc6666" 35 | let g:base16_gui08 = "cc6666" 36 | let s:gui09 = "de935f" 37 | let g:base16_gui09 = "de935f" 38 | let s:gui0A = "f0c674" 39 | let g:base16_gui0A = "f0c674" 40 | let s:gui0B = "b5bd68" 41 | let g:base16_gui0B = "b5bd68" 42 | let s:gui0C = "8abeb7" 43 | let g:base16_gui0C = "8abeb7" 44 | let s:gui0D = "81a2be" 45 | let g:base16_gui0D = "81a2be" 46 | let s:gui0E = "b294bb" 47 | let g:base16_gui0E = "b294bb" 48 | let s:gui0F = "a3685a" 49 | let g:base16_gui0F = "a3685a" 50 | 51 | " Terminal color definitions 52 | let s:cterm00 = "00" 53 | let g:base16_cterm00 = "00" 54 | let s:cterm03 = "08" 55 | let g:base16_cterm03 = "08" 56 | let s:cterm05 = "07" 57 | let g:base16_cterm05 = "07" 58 | let s:cterm07 = "15" 59 | let g:base16_cterm07 = "15" 60 | let s:cterm08 = "01" 61 | let g:base16_cterm08 = "01" 62 | let s:cterm0A = "03" 63 | let g:base16_cterm0A = "03" 64 | let s:cterm0B = "02" 65 | let g:base16_cterm0B = "02" 66 | let s:cterm0C = "06" 67 | let g:base16_cterm0C = "06" 68 | let s:cterm0D = "04" 69 | let g:base16_cterm0D = "04" 70 | let s:cterm0E = "05" 71 | let g:base16_cterm0E = "05" 72 | if exists("base16colorspace") && base16colorspace == "256" 73 | let s:cterm01 = "18" 74 | let g:base16_cterm01 = "18" 75 | let s:cterm02 = "19" 76 | let g:base16_cterm02 = "19" 77 | let s:cterm04 = "20" 78 | let g:base16_cterm04 = "20" 79 | let s:cterm06 = "21" 80 | let g:base16_cterm06 = "21" 81 | let s:cterm09 = "16" 82 | let g:base16_cterm09 = "16" 83 | let s:cterm0F = "17" 84 | let g:base16_cterm0F = "17" 85 | else 86 | let s:cterm01 = "10" 87 | let g:base16_cterm01 = "10" 88 | let s:cterm02 = "11" 89 | let g:base16_cterm02 = "11" 90 | let s:cterm04 = "12" 91 | let g:base16_cterm04 = "12" 92 | let s:cterm06 = "13" 93 | let g:base16_cterm06 = "13" 94 | let s:cterm09 = "09" 95 | let g:base16_cterm09 = "09" 96 | let s:cterm0F = "14" 97 | let g:base16_cterm0F = "14" 98 | endif 99 | 100 | " Neovim terminal colours 101 | if has("nvim") 102 | let g:terminal_color_0 = "#1d1f21" 103 | let g:terminal_color_1 = "#cc6666" 104 | let g:terminal_color_2 = "#b5bd68" 105 | let g:terminal_color_3 = "#f0c674" 106 | let g:terminal_color_4 = "#81a2be" 107 | let g:terminal_color_5 = "#b294bb" 108 | let g:terminal_color_6 = "#8abeb7" 109 | let g:terminal_color_7 = "#c5c8c6" 110 | let g:terminal_color_8 = "#969896" 111 | let g:terminal_color_9 = "#cc6666" 112 | let g:terminal_color_10 = "#b5bd68" 113 | let g:terminal_color_11 = "#f0c674" 114 | let g:terminal_color_12 = "#81a2be" 115 | let g:terminal_color_13 = "#b294bb" 116 | let g:terminal_color_14 = "#8abeb7" 117 | let g:terminal_color_15 = "#ffffff" 118 | let g:terminal_color_background = g:terminal_color_0 119 | let g:terminal_color_foreground = g:terminal_color_5 120 | if &background == "light" 121 | let g:terminal_color_background = g:terminal_color_7 122 | let g:terminal_color_foreground = g:terminal_color_2 123 | endif 124 | elseif has("terminal") 125 | let g:terminal_ansi_colors = [ 126 | \ "#1d1f21", 127 | \ "#cc6666", 128 | \ "#b5bd68", 129 | \ "#f0c674", 130 | \ "#81a2be", 131 | \ "#b294bb", 132 | \ "#8abeb7", 133 | \ "#c5c8c6", 134 | \ "#969896", 135 | \ "#cc6666", 136 | \ "#b5bd68", 137 | \ "#f0c674", 138 | \ "#81a2be", 139 | \ "#b294bb", 140 | \ "#8abeb7", 141 | \ "#ffffff", 142 | \ ] 143 | endif 144 | 145 | " Theme setup 146 | hi clear 147 | syntax reset 148 | let g:colors_name = "base16-tomorrow-night" 149 | 150 | " Highlighting function 151 | " Optional variables are attributes and guisp 152 | function! g:Base16hi(group, guifg, guibg, ctermfg, ctermbg, ...) 153 | let l:attr = get(a:, 1, "") 154 | let l:guisp = get(a:, 2, "") 155 | 156 | if a:guifg != "" 157 | exec "hi " . a:group . " guifg=#" . a:guifg 158 | endif 159 | if a:guibg != "" 160 | exec "hi " . a:group . " guibg=#" . a:guibg 161 | endif 162 | if a:ctermfg != "" 163 | exec "hi " . a:group . " ctermfg=" . a:ctermfg 164 | endif 165 | if a:ctermbg != "" 166 | exec "hi " . a:group . " ctermbg=" . a:ctermbg 167 | endif 168 | if l:attr != "" 169 | exec "hi " . a:group . " gui=" . l:attr . " cterm=" . l:attr 170 | endif 171 | if l:guisp != "" 172 | exec "hi " . a:group . " guisp=#" . l:guisp 173 | endif 174 | endfunction 175 | 176 | 177 | fun hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) 178 | call g:Base16hi(a:group, a:guifg, a:guibg, a:ctermfg, a:ctermbg, a:attr, a:guisp) 179 | endfun 180 | 181 | " Vim editor colors 182 | call hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") 183 | call hi("Bold", "", "", "", "", "bold", "") 184 | call hi("Debug", s:gui08, "", s:cterm08, "", "", "") 185 | call hi("Directory", s:gui0D, "", s:cterm0D, "", "", "") 186 | call hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "") 187 | call hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") 188 | call hi("Exception", s:gui08, "", s:cterm08, "", "", "") 189 | call hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "") 190 | call hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 191 | call hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "") 192 | call hi("Italic", "", "", "", "", "none", "") 193 | call hi("Macro", s:gui08, "", s:cterm08, "", "", "") 194 | call hi("MatchParen", "", s:gui03, "", s:cterm03, "", "") 195 | call hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "") 196 | call hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "") 197 | call hi("Question", s:gui0D, "", s:cterm0D, "", "", "") 198 | call hi("Search", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "", "") 199 | call hi("Substitute", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "none", "") 200 | call hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "") 201 | call hi("TooLong", s:gui08, "", s:cterm08, "", "", "") 202 | call hi("Underlined", s:gui08, "", s:cterm08, "", "", "") 203 | call hi("Visual", "", s:gui02, "", s:cterm02, "", "") 204 | call hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "") 205 | call hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "") 206 | call hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "") 207 | call hi("Title", s:gui0D, "", s:cterm0D, "", "none", "") 208 | call hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") 209 | call hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "") 210 | call hi("NonText", s:gui03, "", s:cterm03, "", "", "") 211 | call hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 212 | call hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 213 | call hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "") 214 | call hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") 215 | call hi("VertSplit", s:gui02, s:gui02, s:cterm02, s:cterm02, "none", "") 216 | call hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "") 217 | call hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "") 218 | call hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "") 219 | call hi("CursorLineNr", s:gui04, s:gui01, s:cterm04, s:cterm01, "", "") 220 | call hi("QuickFixLine", "", s:gui01, "", s:cterm01, "none", "") 221 | call hi("PMenu", s:gui05, s:gui01, s:cterm05, s:cterm01, "none", "") 222 | call hi("PMenuSel", s:gui01, s:gui05, s:cterm01, s:cterm05, "", "") 223 | call hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") 224 | call hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") 225 | call hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "") 226 | 227 | " Standard syntax highlighting 228 | call hi("Boolean", s:gui09, "", s:cterm09, "", "", "") 229 | call hi("Character", s:gui08, "", s:cterm08, "", "", "") 230 | call hi("Comment", s:gui03, "", s:cterm03, "", "", "") 231 | call hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "") 232 | call hi("Constant", s:gui09, "", s:cterm09, "", "", "") 233 | call hi("Define", s:gui0E, "", s:cterm0E, "", "none", "") 234 | call hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "") 235 | call hi("Float", s:gui09, "", s:cterm09, "", "", "") 236 | call hi("Function", s:gui0D, "", s:cterm0D, "", "", "") 237 | call hi("Identifier", s:gui08, "", s:cterm08, "", "none", "") 238 | call hi("Include", s:gui0D, "", s:cterm0D, "", "", "") 239 | call hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "") 240 | call hi("Label", s:gui0A, "", s:cterm0A, "", "", "") 241 | call hi("Number", s:gui09, "", s:cterm09, "", "", "") 242 | call hi("Operator", s:gui05, "", s:cterm05, "", "none", "") 243 | call hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "") 244 | call hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "") 245 | call hi("Special", s:gui0C, "", s:cterm0C, "", "", "") 246 | call hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "") 247 | call hi("Statement", s:gui08, "", s:cterm08, "", "", "") 248 | call hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "") 249 | call hi("String", s:gui0B, "", s:cterm0B, "", "", "") 250 | call hi("Structure", s:gui0E, "", s:cterm0E, "", "", "") 251 | call hi("Tag", s:gui0A, "", s:cterm0A, "", "", "") 252 | call hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "") 253 | call hi("Type", s:gui0A, "", s:cterm0A, "", "none", "") 254 | call hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "") 255 | 256 | " C highlighting 257 | call hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "") 258 | call hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "") 259 | 260 | " C# highlighting 261 | call hi("csClass", s:gui0A, "", s:cterm0A, "", "", "") 262 | call hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "") 263 | call hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "") 264 | call hi("csType", s:gui08, "", s:cterm08, "", "", "") 265 | call hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "") 266 | call hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "") 267 | call hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "") 268 | 269 | " CSS highlighting 270 | call hi("cssBraces", s:gui05, "", s:cterm05, "", "", "") 271 | call hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "") 272 | call hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "") 273 | 274 | " Diff highlighting 275 | call hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") 276 | call hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") 277 | call hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") 278 | call hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") 279 | call hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") 280 | call hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") 281 | call hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") 282 | call hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") 283 | call hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") 284 | 285 | " Git highlighting 286 | call hi("gitcommitOverflow", s:gui08, "", s:cterm08, "", "", "") 287 | call hi("gitcommitSummary", s:gui0B, "", s:cterm0B, "", "", "") 288 | call hi("gitcommitComment", s:gui03, "", s:cterm03, "", "", "") 289 | call hi("gitcommitUntracked", s:gui03, "", s:cterm03, "", "", "") 290 | call hi("gitcommitDiscarded", s:gui03, "", s:cterm03, "", "", "") 291 | call hi("gitcommitSelected", s:gui03, "", s:cterm03, "", "", "") 292 | call hi("gitcommitHeader", s:gui0E, "", s:cterm0E, "", "", "") 293 | call hi("gitcommitSelectedType", s:gui0D, "", s:cterm0D, "", "", "") 294 | call hi("gitcommitUnmergedType", s:gui0D, "", s:cterm0D, "", "", "") 295 | call hi("gitcommitDiscardedType", s:gui0D, "", s:cterm0D, "", "", "") 296 | call hi("gitcommitBranch", s:gui09, "", s:cterm09, "", "bold", "") 297 | call hi("gitcommitUntrackedFile", s:gui0A, "", s:cterm0A, "", "", "") 298 | call hi("gitcommitUnmergedFile", s:gui08, "", s:cterm08, "", "bold", "") 299 | call hi("gitcommitDiscardedFile", s:gui08, "", s:cterm08, "", "bold", "") 300 | call hi("gitcommitSelectedFile", s:gui0B, "", s:cterm0B, "", "bold", "") 301 | 302 | " GitGutter highlighting 303 | call hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") 304 | call hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") 305 | call hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") 306 | call hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "") 307 | 308 | " HTML highlighting 309 | call hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "") 310 | call hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "") 311 | call hi("htmlEndTag", s:gui05, "", s:cterm05, "", "", "") 312 | call hi("htmlTag", s:gui05, "", s:cterm05, "", "", "") 313 | 314 | " JavaScript highlighting 315 | call hi("javaScript", s:gui05, "", s:cterm05, "", "", "") 316 | call hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "") 317 | call hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "") 318 | " pangloss/vim-javascript highlighting 319 | call hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "") 320 | call hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "") 321 | call hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "") 322 | call hi("jsThis", s:gui08, "", s:cterm08, "", "", "") 323 | call hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "") 324 | call hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "") 325 | call hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "") 326 | call hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "") 327 | call hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "") 328 | call hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "") 329 | call hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "") 330 | call hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "") 331 | call hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "") 332 | call hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "") 333 | call hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "") 334 | 335 | " Mail highlighting 336 | call hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "") 337 | call hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "") 338 | call hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "") 339 | call hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "") 340 | call hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "") 341 | call hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "") 342 | call hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "") 343 | call hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "") 344 | 345 | " Markdown highlighting 346 | call hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "") 347 | call hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") 348 | call hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "") 349 | call hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "") 350 | 351 | " NERDTree highlighting 352 | call hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "") 353 | call hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "") 354 | 355 | " PHP highlighting 356 | call hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "") 357 | call hi("phpComparison", s:gui05, "", s:cterm05, "", "", "") 358 | call hi("phpParent", s:gui05, "", s:cterm05, "", "", "") 359 | call hi("phpMethodsVar", s:gui0C, "", s:cterm0C, "", "", "") 360 | 361 | " Python highlighting 362 | call hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "") 363 | call hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "") 364 | call hi("pythonInclude", s:gui0E, "", s:cterm0E, "", "", "") 365 | call hi("pythonStatement", s:gui0E, "", s:cterm0E, "", "", "") 366 | 367 | " Ruby highlighting 368 | call hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "") 369 | call hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "") 370 | call hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "") 371 | call hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "") 372 | call hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "") 373 | call hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "") 374 | 375 | " SASS highlighting 376 | call hi("sassidChar", s:gui08, "", s:cterm08, "", "", "") 377 | call hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "") 378 | call hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "") 379 | call hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "") 380 | call hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "") 381 | 382 | " Signify highlighting 383 | call hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") 384 | call hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") 385 | call hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") 386 | 387 | " Spelling highlighting 388 | call hi("SpellBad", "", "", "", "", "undercurl", s:gui08) 389 | call hi("SpellLocal", "", "", "", "", "undercurl", s:gui0C) 390 | call hi("SpellCap", "", "", "", "", "undercurl", s:gui0D) 391 | call hi("SpellRare", "", "", "", "", "undercurl", s:gui0E) 392 | 393 | " Startify highlighting 394 | call hi("StartifyBracket", s:gui03, "", s:cterm03, "", "", "") 395 | call hi("StartifyFile", s:gui07, "", s:cterm07, "", "", "") 396 | call hi("StartifyFooter", s:gui03, "", s:cterm03, "", "", "") 397 | call hi("StartifyHeader", s:gui0B, "", s:cterm0B, "", "", "") 398 | call hi("StartifyNumber", s:gui09, "", s:cterm09, "", "", "") 399 | call hi("StartifyPath", s:gui03, "", s:cterm03, "", "", "") 400 | call hi("StartifySection", s:gui0E, "", s:cterm0E, "", "", "") 401 | call hi("StartifySelect", s:gui0C, "", s:cterm0C, "", "", "") 402 | call hi("StartifySlash", s:gui03, "", s:cterm03, "", "", "") 403 | call hi("StartifySpecial", s:gui03, "", s:cterm03, "", "", "") 404 | 405 | " Java highlighting 406 | call hi("javaOperator", s:gui0D, "", s:cterm0D, "", "", "") 407 | 408 | " Remove functions 409 | delf hi 410 | 411 | " Remove color variables 412 | unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F 413 | unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F 414 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | local core_modules = { 2 | "options", 3 | "plugins", 4 | "mappings", 5 | } 6 | 7 | for _, module in ipairs(core_modules) do 8 | local ok, err = pcall(require, module) 9 | if not ok then 10 | vim.notify("Failed to load " .. module .. "\n\n" .. err) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/mappings.lua: -------------------------------------------------------------------------------- 1 | local function map(mode, lhs, rhs, opts) 2 | local options = {noremap = true} 3 | if opts then 4 | options = vim.tbl_extend("force", options, opts) 5 | end 6 | vim.api.nvim_set_keymap(mode, lhs, rhs, options) 7 | end 8 | 9 | -- Scroll up/down 10 | map("n", "J", "") 11 | map("n", "K", "") 12 | 13 | -- Since I have mapped Shift-J or uppercase J to scrolling down, 14 | -- we have to map ctrl-j to join so that we can join two lines 15 | map("n", "", ":join") 16 | 17 | -- More intuitive way of... 18 | map("n", "H", "0") -- going home in normal mode 19 | map("v", "H", "0") -- going home in visual mode 20 | map("n", "L", "A") -- going to end of line and appending in normal mode 21 | map("v", "L", "$") -- going to end of line in visual mode 22 | 23 | -- Move up and down visual lines 24 | map("n", "j", "v:count == 0 ? 'gj' : 'j'", {expr = true}) 25 | map("n", "k", "v:count == 0 ? 'gk' : 'k'", {expr = true}) 26 | 27 | -- Quickly access the vim command line 28 | map("n", ",", ":") 29 | 30 | -- Move between splits 31 | map("n", "", "") 32 | map("n", "", "") 33 | map("n", "", "") 34 | map("n", "", "") 35 | 36 | -- Top/bottom of fold 37 | map("n", "fj", "zo]zk") 38 | map("n", "fk", "zo[zj") 39 | 40 | -- Create new file or edit an existing file 41 | map("n", "", ":e " .. vim.fn.expand('%:p:h') .. "/") 42 | 43 | -- Close current buffer 44 | map("n", "", ":bp:bdelete #", {silent = true}) 45 | 46 | -- Go to Nth buffer 47 | map("", "", "lua require'bufferline'.go_to_buffer(1)") 48 | map("", "", "lua require'bufferline'.go_to_buffer(2)") 49 | map("", "", "lua require'bufferline'.go_to_buffer(3)") 50 | map("", "", "lua require'bufferline'.go_to_buffer(4)") 51 | map("", "", "lua require'bufferline'.go_to_buffer(5)") 52 | map("", "", "lua require'bufferline'.go_to_buffer(6)") 53 | map("", "", "lua require'bufferline'.go_to_buffer(7)") 54 | map("", "", "lua require'bufferline'.go_to_buffer(8)") 55 | map("", "", "lua require'bufferline'.go_to_buffer(9)") 56 | map("", "", "lua require'bufferline'.go_to_buffer(10)") 57 | 58 | -- Move buffer tabs (like moving tabs in web browser) 59 | map("n", "", ":BufferLineMoveNext", {silent = true}) 60 | map("n", "", ":BufferLineMovePrev", {silent = true}) 61 | 62 | -- Toggle the NvimTree 63 | map("n", "", ":NvimTreeToggle", {silent = true}) 64 | 65 | -- Turn off highlighting 66 | map("n", "", ":noh", {silent = true}) 67 | 68 | -- Open a file through Telescope 69 | map("n", "", ":Telescope find_files hidden=true", {silent = true}) 70 | 71 | -- Rename a variable throughout the file 72 | map('i', '', 'lua require("renamer").rename()', { noremap = true, silent = true }) 73 | map('n', 'rn', 'lua require("renamer").rename()', { noremap = true, silent = true }) 74 | map('v', 'rn', 'lua require("renamer").rename()', { noremap = true, silent = true }) 75 | 76 | -- Presistant indent mode 77 | map("v", "<", "", ">gv") 79 | 80 | -- Reload current file 81 | map("n", "", ":luafile %", {silent = true}) 82 | 83 | -- More sensible undo 84 | -- https://stackoverflow.com/a/4360415/9215267 85 | map("i", "", "u") 86 | 87 | -- Paste without losing text 88 | -- https://andrewcourter.substack.com/i/137693539/paste-without-losing-text 89 | map("v", "p", '"_dP') 90 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/options.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | local g = vim.g 3 | local cmd = vim.cmd 4 | 5 | opt.relativenumber = true 6 | opt.lazyredraw = true 7 | opt.termguicolors = true 8 | opt.clipboard = "unnamedplus" 9 | opt.cursorline = true 10 | opt.ignorecase = true 11 | opt.undofile = true 12 | opt.foldmethod="marker" 13 | opt.mouse="a" 14 | g.mapleader = " " 15 | 16 | -- Autowrite, this is very useful because when you have edited a file 17 | -- and want to edit another one using :e or move to another buffer, 18 | -- you dont have to write the current one manually every time you switch 19 | -- buffers. 20 | opt.autowriteall = true 21 | -- 22 | -- Show quotes in JSON files because they are usually hidden and 23 | -- it honestly messes up what you are typing/seeing 24 | opt.conceallevel = 0 25 | 26 | -- Dont show welcome menu 27 | opt.shortmess:append("sI") 28 | 29 | -- Disable tilde on end of buffer 30 | opt.fillchars = {eob = " "} 31 | 32 | -- Indenting 33 | opt.tabstop = 4 34 | opt.shiftwidth = 4 35 | opt.expandtab = true 36 | 37 | -- Dont show "INSERT", "VISUAL BLOCK", etc 38 | cmd("set noshowmode") 39 | 40 | -- Colorscheme 41 | opt.background = "dark" 42 | cmd("colorscheme idk") 43 | 44 | -- Don't wrap lines 45 | -- vim.wo.wrap = false 46 | 47 | g.python3_host_prog = "python3" 48 | 49 | -- Telescope colors (TODO: need organise this) 50 | fg_bg = function(group, fgcol, bgcol) 51 | cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) 52 | end 53 | 54 | bg = function(group, col) 55 | cmd("hi " .. group .. " guibg=" .. col) 56 | end 57 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/configs/bufferline.lua: -------------------------------------------------------------------------------- 1 | local present, telescope = pcall(require, "bufferline") 2 | if not present then 3 | return 4 | end 5 | 6 | require("bufferline").setup { 7 | options = { 8 | offsets = { {filetype = "NvimTree", text = "Explorer", adding = 1}} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/configs/lualine.lua: -------------------------------------------------------------------------------- 1 | local present, telescope = pcall(require, "lualine") 2 | if not present then 3 | return 4 | end 5 | 6 | require("lualine").setup{ 7 | options = { 8 | theme = 'onedark', 9 | section_separators = {"", ""}, 10 | component_separators = {"", ""}, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/init.lua: -------------------------------------------------------------------------------- 1 | local g = vim.g 2 | local fn = vim.fn 3 | local cmd = vim.cmd 4 | 5 | local packer_status_ok, packer = pcall(require, "packer") 6 | if not packer_status_ok then 7 | return 8 | end 9 | 10 | packer.startup { 11 | function(use) 12 | -- Package mananger 13 | use {"wbthomason/packer.nvim"} 14 | 15 | -- Statusline 16 | use {"nvim-lualine/lualine.nvim", requires = {"kyazdani42/nvim-web-devicons", opt = true}} 17 | require("plugins.configs.lualine") 18 | 19 | -- Bufferline (emulates tabs in GUI IDEs) 20 | use {"akinsho/bufferline.nvim", requires = "kyazdani42/nvim-web-devicons"} 21 | require("plugins.configs.bufferline") 22 | 23 | -- Syntax highlighting for i3 config 24 | use {"mboughaba/i3config.vim"} 25 | cmd("au BufNewFile,BufRead ~/.config/i3/config set filetype=i3config") 26 | 27 | -- Highlight/colorize hexcolors 28 | use { 29 | "norcalli/nvim-colorizer.lua", 30 | config = function() 31 | require "colorizer".setup() 32 | end 33 | } 34 | end 35 | } 36 | -------------------------------------------------------------------------------- /nvim/.config/nvim/plugin/packer_compiled.lua: -------------------------------------------------------------------------------- 1 | -- Automatically generated packer.nvim plugin loader code 2 | 3 | if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then 4 | vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') 5 | return 6 | end 7 | 8 | vim.api.nvim_command('packadd packer.nvim') 9 | 10 | local no_errors, error_msg = pcall(function() 11 | 12 | _G._packer = _G._packer or {} 13 | _G._packer.inside_compile = true 14 | 15 | local time 16 | local profile_info 17 | local should_profile = false 18 | if should_profile then 19 | local hrtime = vim.loop.hrtime 20 | profile_info = {} 21 | time = function(chunk, start) 22 | if start then 23 | profile_info[chunk] = hrtime() 24 | else 25 | profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 26 | end 27 | end 28 | else 29 | time = function(chunk, start) end 30 | end 31 | 32 | local function save_profiles(threshold) 33 | local sorted_times = {} 34 | for chunk_name, time_taken in pairs(profile_info) do 35 | sorted_times[#sorted_times + 1] = {chunk_name, time_taken} 36 | end 37 | table.sort(sorted_times, function(a, b) return a[2] > b[2] end) 38 | local results = {} 39 | for i, elem in ipairs(sorted_times) do 40 | if not threshold or threshold and elem[2] > threshold then 41 | results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' 42 | end 43 | end 44 | if threshold then 45 | table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') 46 | end 47 | 48 | _G._packer.profile_output = results 49 | end 50 | 51 | time([[Luarocks path setup]], true) 52 | local package_path_str = "/home/siddharth/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?.lua;/home/siddharth/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?/init.lua;/home/siddharth/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?.lua;/home/siddharth/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?/init.lua" 53 | local install_cpath_pattern = "/home/siddharth/.cache/nvim/packer_hererocks/2.1.1702233742/lib/lua/5.1/?.so" 54 | if not string.find(package.path, package_path_str, 1, true) then 55 | package.path = package.path .. ';' .. package_path_str 56 | end 57 | 58 | if not string.find(package.cpath, install_cpath_pattern, 1, true) then 59 | package.cpath = package.cpath .. ';' .. install_cpath_pattern 60 | end 61 | 62 | time([[Luarocks path setup]], false) 63 | time([[try_loadstring definition]], true) 64 | local function try_loadstring(s, component, name) 65 | local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) 66 | if not success then 67 | vim.schedule(function() 68 | vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) 69 | end) 70 | end 71 | return result 72 | end 73 | 74 | time([[try_loadstring definition]], false) 75 | time([[Defining packer_plugins]], true) 76 | _G.packer_plugins = { 77 | ["bufferline.nvim"] = { 78 | loaded = true, 79 | path = "/home/siddharth/.local/share/nvim/site/pack/packer/start/bufferline.nvim", 80 | url = "https://github.com/akinsho/bufferline.nvim" 81 | }, 82 | ["i3config.vim"] = { 83 | loaded = true, 84 | path = "/home/siddharth/.local/share/nvim/site/pack/packer/start/i3config.vim", 85 | url = "https://github.com/mboughaba/i3config.vim" 86 | }, 87 | ["lualine.nvim"] = { 88 | loaded = true, 89 | path = "/home/siddharth/.local/share/nvim/site/pack/packer/start/lualine.nvim", 90 | url = "https://github.com/nvim-lualine/lualine.nvim" 91 | }, 92 | ["nvim-colorizer.lua"] = { 93 | config = { "\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14colorizer\frequire\0" }, 94 | loaded = true, 95 | path = "/home/siddharth/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", 96 | url = "https://github.com/norcalli/nvim-colorizer.lua" 97 | }, 98 | ["nvim-web-devicons"] = { 99 | loaded = false, 100 | needs_bufread = false, 101 | path = "/home/siddharth/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", 102 | url = "https://github.com/kyazdani42/nvim-web-devicons" 103 | }, 104 | ["packer.nvim"] = { 105 | loaded = true, 106 | path = "/home/siddharth/.local/share/nvim/site/pack/packer/start/packer.nvim", 107 | url = "https://github.com/wbthomason/packer.nvim" 108 | } 109 | } 110 | 111 | time([[Defining packer_plugins]], false) 112 | -- Config for: nvim-colorizer.lua 113 | time([[Config for nvim-colorizer.lua]], true) 114 | try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") 115 | time([[Config for nvim-colorizer.lua]], false) 116 | 117 | _G._packer.inside_compile = false 118 | if _G._packer.needs_bufread == true then 119 | vim.cmd("doautocmd BufRead") 120 | end 121 | _G._packer.needs_bufread = false 122 | 123 | if should_profile then save_profiles() end 124 | 125 | end) 126 | 127 | if not no_errors then 128 | error_msg = error_msg:gsub('"', '\\"') 129 | vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') 130 | end 131 | -------------------------------------------------------------------------------- /other/.config/user-dirs.dirs: -------------------------------------------------------------------------------- 1 | # This file is written by xdg-user-dirs-update 2 | # If you want to change or add directories, just edit the line you're 3 | # interested in. All local changes will be retained on the next run. 4 | # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped 5 | # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an 6 | # absolute path. No other format is supported. 7 | # 8 | XDG_DESKTOP_DIR="$HOME/" 9 | XDG_DOWNLOAD_DIR="$HOME/downloads" 10 | XDG_TEMPLATES_DIR="$HOME/" 11 | XDG_PUBLICSHARE_DIR="$HOME/" 12 | XDG_DOCUMENTS_DIR="$HOME/documents" 13 | XDG_MUSIC_DIR="$HOME/music" 14 | XDG_PICTURES_DIR="$HOME/pictures" 15 | XDG_VIDEOS_DIR="$HOME/videos" 16 | -------------------------------------------------------------------------------- /picom/.config/picom/picom.conf: -------------------------------------------------------------------------------- 1 | # Prevent screen tearing 2 | backend = "glx"; 3 | vsync = true; 4 | glx-swap-method = 2; 5 | xrender-sync-fence = true; 6 | 7 | # Fade windows in/out when opening/closing and when opacity changes, 8 | # unless no-fading-openclose is used. 9 | #fading = true; 10 | 11 | # The time between steps in fade step, in milliseconds. (> 0, defaults to 10) 12 | fade-delta = 0.01; 13 | 14 | # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) 15 | fade-in-step = 0.01; 16 | 17 | # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) 18 | fade-out-step = 0.01; 19 | 20 | corner-radius = 0 21 | -------------------------------------------------------------------------------- /polybar/.config/polybar/config.ini: -------------------------------------------------------------------------------- 1 | [bar/bar1] 2 | ;------------; 3 | ; DIMENSIONS ; 4 | ;------------; 5 | 6 | width = 100% 7 | height = 30 8 | offset-y = 0 9 | offset-x = 0 10 | 11 | border-top-size = 0 12 | border-bottom-size = 0 13 | border-right-size = 0 14 | border-left-size = 0 15 | 16 | ;----------; 17 | ; LOCATION ; 18 | ;----------; 19 | 20 | bottom = false 21 | monitor = ${env:MONITOR:} 22 | override-redirect = false 23 | 24 | ;-------; 25 | ; FONTS ; 26 | ;-------; 27 | 28 | font-0 = JetBrains Mono Nerd Font:Semibold:size=11;3 29 | ;--------; 30 | ; COLORS ; 31 | ;--------; 32 | 33 | background = #101010 34 | foreground = #e9e4e4 35 | 36 | ;---------------; 37 | ; MISCELLANEOUS ; 38 | ;---------------; 39 | fixed-center = true 40 | padding-left = 2 41 | padding-right = 2 42 | module-margin = 1.5 43 | 44 | modules-left = i3 45 | modules-center = 46 | modules-right = openvpn micstatus volume battery wlan today 47 | 48 | tray-position = right 49 | tray-detached = false 50 | 51 | ;---------; 52 | ; MODULES ; 53 | ;---------; 54 | 55 | 56 | [module/openvpn] 57 | type = custom/script 58 | exec = $HOME/.config/polybar/scripts/vpn-ip.sh 59 | interval = 2 60 | click-left = $HOME/.config/polybar/scripts/vpn-ip.sh --copy & 61 | 62 | [module/today] 63 | type = custom/script 64 | exec = $HOME/.config/polybar/scripts/today.sh 65 | interval = 5 66 | click-left = $HOME/.config/polybar/scripts/today.sh --calendar & 67 | 68 | [module/battery] 69 | type = internal/battery 70 | 71 | battery = BAT0 72 | adapter = ADP1 73 | 74 | poll-interval = 1 75 | 76 | full-at = 100 77 | 78 | label-discharging = %percentage%% 79 | label-charging = %percentage%% 80 | label-full = %percentage%% 81 | 82 | format-discharging = 83 | format-full = 84 | format-charging =  85 | 86 | ramp-capacity-0 =  87 | ramp-capacity-1 =  88 | ramp-capacity-2 =  89 | ramp-capacity-3 =  90 | ramp-capacity-4 =  91 | 92 | [module/volume] 93 | type = internal/alsa 94 | 95 | format-volume = 96 | format-muted =  mute 97 | 98 | ramp-volume-0 =  99 | ramp-volume-1 =  100 | ramp-volume-2 =  101 | 102 | [module/micstatus] 103 | type = custom/script 104 | exec = $HOME/.config/polybar/scripts/mic_status.sh 105 | interval = 1 106 | click-left = pactl set-source-mute 0 toggle 107 | 108 | [module/i3] 109 | type = internal/i3 110 | format = 111 | index-sort = true 112 | wrapping-scroll = false 113 | enable-scroll = false 114 | enable-click = true 115 | reverse-scroll = false 116 | 117 | label-mode-padding = 2 118 | label-mode-foreground = #000 119 | label-mode-background = #ffb52a 120 | 121 | ; focused = Active workspace on focused monitor 122 | label-focused = %index% 123 | label-focused-background = #444 124 | label-focused-padding = 1 125 | 126 | ; unfocused = Inactive workspace on any monitor 127 | label-unfocused = %index% 128 | label-unfocused-padding = 1 129 | 130 | ; visible = Active workspace on unfocused monitor 131 | label-visible = %index% 132 | label-visible-background = #ffb52a 133 | label-visible-padding = 1 134 | 135 | ; urgent = Workspace with urgency hint set 136 | label-urgent = %index% 137 | label-urgent-background = #bd2c40 138 | label-urgent-padding = 1 139 | ; vim:ft=dosini 140 | -------------------------------------------------------------------------------- /polybar/.config/polybar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Terminate already runnning bar instances 4 | killall -q polybar 5 | 6 | # Wait until the processes have been shut down 7 | #while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 8 | 9 | # Launch bar 10 | #polybar bar1 & 11 | 12 | if type "xrandr"; then 13 | for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do 14 | MONITOR=$m polybar --reload bar1 & 15 | done 16 | else 17 | polybar --reload bar1 & 18 | fi 19 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/battery_widget.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | TIME_TO_EMPTY=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "time" | xargs | sed -z "s/time to empty: //g") 3 | PERCENTAGE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "percent" | xargs | sed -z "s/percentage: //g") 4 | STATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "state" | xargs | sed -z "s/state: //g") 5 | 6 | # This line is very messy. That is why the I have left the 7 | # above lines so that I can refer back to them in the future 8 | #kitty --hold --title="batterywidget" -e sh -c 'printf "\\e]11;#0d0b0a\\e\\\\" && echo "" && tput civis && PS1="" && stty -echo && printf "\033[1mpercentage: \033[0m" && upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "percent" | xargs | sed -z "s/percentage: //g" && printf "\033[1mstate: \033[0m" && upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "state" | xargs | sed -z "s/state: //g"' & 9 | 10 | #sleep 0.25 11 | 12 | #i3-msg [title="batterywidget"] focus, floating enable, resize set 160 110, move position 1230 23 13 | 14 | dunstify "percent: $PERCENTAGE" 15 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/bluetooth.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | bt_connected_icon="" 3 | bt_disconnected_icon="" 4 | 5 | device_name=$(bluetoothctl info | sed -n "s/Name: //p" | awk '{$1=$1};1') 6 | 7 | if bluetoothctl show | grep -q "Powered: no"; then 8 | echo -n "$bt_disconnected_icon" 9 | exit 10 | fi 11 | 12 | if bluetoothctl info | grep -q "Missing device address argument"; then 13 | echo -n "$bt_disconnected_icon" 14 | exit 15 | fi 16 | 17 | if [ ! -z "$device_name" ]; then 18 | echo -n "$bt_connected_icon $device_name" 19 | exit 20 | fi 21 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/mic_status.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | current_source=$(pactl info | grep "Default Source" | cut -f3 -d" ") 4 | mic_is_on=$(pactl list sources | grep -A 10 $current_source | grep "Mute: no" ) 5 | 6 | if [ $? -eq 0 ]; then 7 | printf %s " " 8 | else 9 | printf %s " " 10 | fi 11 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/today.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DATE="$(date +"%a %d %H:%M")" 4 | 5 | case "$1" in 6 | --calendar) 7 | gnome-calendar 8 | ;; 9 | *) 10 | echo "$DATE" 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/vpn-ip.sh: -------------------------------------------------------------------------------- 1 | # TODO: add xclip checker and ability to copy the IP 2 | # send notification upon copying 3 | interface="$(ip tuntap show | cut -d : -f1 | head -n 1)" 4 | ip="$(ip a s "${interface}" 2>/dev/null | grep -o -P '(?<=inet )[0-9]{1,3}(\.[0-9]{1,3}){3}')" 5 | 6 | 7 | case "$1" in 8 | --copy) 9 | if [ -n "$ip" ]; then 10 | echo -n "$ip" | xclip -sel c 11 | notify-send "OpenVPN" "IP copied to clipboard" 12 | fi 13 | ;; 14 | *) 15 | if [ -n "$ip" ]; then 16 | echo "󰒄 $ip" 17 | else 18 | echo "" 19 | fi 20 | ;; 21 | esac 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/wifi_widget.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | dunstify "wifi" "IP: $(hostname --ip-address)\nRouter: $(ip route show | awk '/default/ {print $3}')" 4 | -------------------------------------------------------------------------------- /rofi/.config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | show-icons: false; 3 | drun-display-format: "{name}"; 4 | cycle: false; 5 | sidebar-mode: false; 6 | m: "-1"; 7 | click-to-exit: true; 8 | modi: "drun"; 9 | } 10 | 11 | 12 | @theme "~/.config/rofi/themes/default.rasi" 13 | -------------------------------------------------------------------------------- /rofi/.config/rofi/scripts/rofi-farge.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | for file in $(ls -tl /tmp/farge | cut -d " " -f 9); do 3 | hex_code=$(echo $file | cut -d"." -f 1) 4 | echo -en "#$hex_code\0icon\x1f/tmp/farge/$file\n" 5 | done | rofi -dmenu | tr -d "\n" | xclip -sel c 6 | -------------------------------------------------------------------------------- /rofi/.config/rofi/scripts/rofi-finder.sh: -------------------------------------------------------------------------------- 1 | selection=$(fd . --hidden --type file $HOME 2>/dev/null | \ 2 | sed "s;$HOME;~;" | \ 3 | rofi -sort -sorting-method fzf -disable-history -dmenu -theme default-no-icon -no-custom -p "" | \ 4 | sed "s;\~;$HOME;" 5 | ) 6 | 7 | open "$selection" 8 | -------------------------------------------------------------------------------- /rofi/.config/rofi/scripts/rofi-picker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | char_file="$HOME/.config/rofi/scripts/chars.txt" 3 | selection="$(cat "$char_file" | rofi -dmenu -i -p '')" 4 | char=$(printf %b "$selection" | cut -d " " -f1) 5 | printf %b "$char" | xclip -selection c 6 | -------------------------------------------------------------------------------- /rofi/.config/rofi/themes/askpass.rasi: -------------------------------------------------------------------------------- 1 | /* 2 | * by Siddharth Dushantha 2020 3 | * A very minimal graphical helper for sudo's askpass. 4 | * 5 | * Preview: https://0x0.st/iu4y.png 6 | * 7 | * Put the code below in a location such as ~/bin/askpass-rofi 8 | * #!/usr/bin/env bash 9 | * rofi -dmenu\ 10 | * -password\ 11 | * -i\ 12 | * -no-fixed-num-lines\ 13 | * -p "Password:"\ 14 | * -theme ~/.config/rofi/themes/askpass.rasi 15 | * 16 | * Then the code below in your bashrc, zshrc, or something similar 17 | * SUDO_ASKPASS=~/bin/askpass-rofi 18 | * 19 | */ 20 | 21 | 22 | * { 23 | background-color: #111116; 24 | text-color: #D8DEE9; 25 | font: "SF Mono 12"; 26 | } 27 | 28 | #window { 29 | /* Change the this according to your screen width */ 30 | width: 380px; 31 | 32 | /* Change this value according to your screen height */ 33 | y-offset: -10%; 34 | 35 | /* This padding is given just for aesthetic purposes */ 36 | padding: 40px; 37 | 38 | /* Add a border so that it is noticeable when the prompt appears. 39 | * This is because the prompt blends in with my terminal color 40 | */ 41 | border-color: #333333; 42 | border: 2px; 43 | border-radius: 5px; 44 | } 45 | 46 | 47 | #entry { 48 | /* 49 | * For some reason, without this option, a dash/hyphen appears 50 | * at the end of the entry 51 | */ 52 | expand: true; 53 | 54 | /* Keeping using 200px so that long passwords can be typed */ 55 | width: 200px; 56 | } 57 | -------------------------------------------------------------------------------- /rofi/.config/rofi/themes/default.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | font: "JetBrainsMono Nerd Font Medium 11"; 3 | kb-row-up: "Up,Alt+k"; 4 | kb-row-down: "Down,Alt+j"; 5 | kb-mode-next: "Tab"; 6 | kb-element-next: ""; 7 | 8 | drun { 9 | display-name: ""; 10 | } 11 | 12 | run { 13 | display-name: ""; 14 | } 15 | 16 | window { 17 | display-name: ""; 18 | } 19 | 20 | clipboard { 21 | display-name: "󰅍"; 22 | } 23 | 24 | ssh { 25 | display-name: ""; 26 | } 27 | 28 | emoji { 29 | display-name: ":)"; 30 | } 31 | 32 | timeout { 33 | delay: 30; 34 | action: "kb-cancel"; 35 | } 36 | } 37 | 38 | * { 39 | margin: 0; 40 | padding: 0; 41 | spacing: 0; 42 | 43 | /* 44 | We use full transparency here so that we can simiulate the effect where 45 | the height gets reduced. Difficult to explain, easier to understand when 46 | the config is used. 47 | */ 48 | background-color: #00000000; 49 | text-color: #c5c8c6; 50 | } 51 | 52 | window { 53 | transparency: "real"; 54 | width: 500px; 55 | } 56 | 57 | mainbox { 58 | children: [inputbar, listview]; 59 | } 60 | 61 | inputbar { 62 | background-color: #17191d; 63 | children: [prompt, entry]; 64 | } 65 | 66 | prompt { 67 | background-color: inherit; 68 | padding: 12px; 69 | } 70 | 71 | entry { 72 | background-color: inherit; 73 | padding: 12px 3px; 74 | } 75 | 76 | listview { 77 | lines: 5; 78 | } 79 | 80 | element { 81 | children: [element-icon, element-text]; 82 | text-color: #6c6c6c; 83 | background-color: #121416; 84 | padding: 8px 10px 8px 10px; 85 | } 86 | 87 | element run { 88 | children: [element-icon, element-text]; 89 | text-color: #6c6c6c; 90 | } 91 | element-icon { 92 | padding: 10px 10px; 93 | size: 20px; 94 | } 95 | 96 | element-icon selected { 97 | background-color: #17191d; 98 | } 99 | 100 | element-text { 101 | padding: 10px 0; 102 | text-color: inherit; 103 | } 104 | 105 | element-text selected { 106 | text-color: #a4aeab; 107 | background-color: #17191d; 108 | } 109 | -------------------------------------------------------------------------------- /rofi/.config/rofi/themes/run.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | font: "JetBrainsMono Nerd Font Medium 11"; 3 | 4 | dmenu { 5 | display-name: ""; 6 | } 7 | 8 | timeout { 9 | delay: 30; 10 | action: "kb-cancel"; 11 | } 12 | } 13 | 14 | * { 15 | border: 3px; 16 | margin: 0; 17 | padding: 0; 18 | spacing: 0; 19 | 20 | background-color: #121416; 21 | text-color: #c5c8c6; 22 | } 23 | 24 | window { 25 | transparency: "real"; 26 | width: 500px; 27 | x-offset: -5px; 28 | y-offset: -280px; 29 | } 30 | 31 | inputbar { 32 | background-color: #121416; 33 | children: [prompt, entry]; 34 | height: 100px; 35 | } 36 | 37 | prompt { 38 | background-color: inherit; 39 | padding: 12px; 40 | } 41 | 42 | entry { 43 | background-color: inherit; 44 | padding: 12px 3px; 45 | } 46 | -------------------------------------------------------------------------------- /vifm/.config/vifm/colors/Default.vifm: -------------------------------------------------------------------------------- 1 | " You can edit this file by hand. 2 | " The " character at the beginning of a line comments out the line. 3 | " Blank lines are ignored. 4 | 5 | " The Default color scheme is used for any directory that does not have 6 | " a specified scheme and for parts of user interface like menus. A 7 | " color scheme set for a base directory will also 8 | " be used for the sub directories. 9 | 10 | " The standard ncurses colors are: 11 | " Default = -1 = None, can be used for transparency or default color 12 | " Black = 0 13 | " Red = 1 14 | " Green = 2 15 | " Yellow = 3 16 | " Blue = 4 17 | " Magenta = 5 18 | " Cyan = 6 19 | " White = 7 20 | 21 | " Light versions of colors are also available (set bold attribute): 22 | " LightBlack 23 | " LightRed 24 | " LightGreen 25 | " LightYellow 26 | " LightBlue 27 | " LightMagenta 28 | " LightCyan 29 | " LightWhite 30 | 31 | " Available attributes (some of them can be combined): 32 | " bold 33 | " underline 34 | " reverse or inverse 35 | " standout 36 | " italic (on unsupported systems becomes reverse) 37 | " none 38 | 39 | " Vifm supports 256 colors you can use color numbers 0-255 40 | " (requires properly set up terminal: set your TERM environment variable 41 | " (directly or using resources) to some color terminal name (e.g. 42 | " xterm-256color) from /usr/lib/terminfo/; you can check current number 43 | " of colors in your terminal with tput colors command) 44 | 45 | " highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color 46 | 47 | highlight clear 48 | 49 | highlight Win cterm=none ctermfg=white ctermbg=black 50 | highlight Directory cterm=bold ctermfg=cyan ctermbg=default 51 | highlight Link cterm=bold ctermfg=yellow ctermbg=default 52 | highlight BrokenLink cterm=bold ctermfg=red ctermbg=default 53 | highlight Socket cterm=bold ctermfg=magenta ctermbg=default 54 | highlight Device cterm=bold ctermfg=red ctermbg=default 55 | highlight Fifo cterm=bold ctermfg=cyan ctermbg=default 56 | highlight Executable cterm=bold ctermfg=green ctermbg=default 57 | highlight Selected cterm=bold ctermfg=magenta ctermbg=default 58 | highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default 59 | highlight TopLine cterm=none ctermfg=black ctermbg=white 60 | highlight TopLineSel cterm=bold ctermfg=black ctermbg=default 61 | highlight StatusLine cterm=bold ctermfg=black ctermbg=white 62 | highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black 63 | highlight CmdLine cterm=none ctermfg=white ctermbg=black 64 | highlight ErrorMsg cterm=none ctermfg=red ctermbg=black 65 | highlight Border cterm=none ctermfg=black ctermbg=white 66 | highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white 67 | highlight SuggestBox cterm=bold ctermfg=default ctermbg=default 68 | highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red 69 | highlight AuxWin cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 70 | highlight TabLine cterm=none ctermfg=white ctermbg=black 71 | highlight TabLineSel cterm=bold,reverse ctermfg=default ctermbg=default 72 | highlight User1 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 73 | highlight User2 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 74 | highlight User3 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 75 | highlight User4 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 76 | highlight User5 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 77 | highlight User6 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 78 | highlight User7 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 79 | highlight User8 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 80 | highlight User9 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 81 | highlight OtherWin cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default 82 | -------------------------------------------------------------------------------- /vifm/.config/vifm/colors/minimal.vifm: -------------------------------------------------------------------------------- 1 | " colortheme 2 | highlight clear 3 | 4 | highlight Win cterm=none ctermfg=default ctermbg=none 5 | highlight Directory cterm=bold ctermfg=12 ctermbg=default 6 | highlight Link cterm=bold ctermfg=216 ctermbg=default 7 | highlight BrokenLink cterm=bold ctermfg=9 ctermbg=default 8 | highlight Socket cterm=bold ctermfg=10 ctermbg=default 9 | highlight Device cterm=bold ctermfg=9 ctermbg=default 10 | highlight Fifo cterm=bold ctermfg=150 ctermbg=default 11 | highlight Executable cterm=none ctermfg=150 ctermbg=default 12 | highlight Selected cterm=none ctermfg=255 ctermbg=236 13 | highlight CurrLine cterm=reverse 14 | highlight TopLine cterm=none ctermfg=255 ctermbg=none 15 | highlight TopLineSel cterm=bold ctermfg=110 ctermbg=none 16 | highlight StatusLine cterm=none ctermfg=default ctermbg=none 17 | highlight WildMenu cterm=reverse ctermfg=255 ctermbg=black 18 | highlight CmdLine cterm=none ctermfg=default ctermbg=none 19 | highlight ErrorMsg cterm=none ctermfg=203 ctermbg=none 20 | highlight Border cterm=none ctermfg=black ctermbg=none 21 | highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=255 22 | highlight SuggestBox cterm=bold ctermfg=255 ctermbg=default 23 | highlight CmpMismatch cterm=bold ctermfg=255 ctermbg=9 24 | highlight AuxWin cterm=bold,reverse ctermfg=default ctermbg=default 25 | -------------------------------------------------------------------------------- /vifm/.config/vifm/scripts/README: -------------------------------------------------------------------------------- 1 | This directory is dedicated for user-supplied scripts/executables. 2 | vifm modifies its PATH environment variable to let user run those 3 | scripts without specifying full path. All subdirectories are added 4 | as well. File in a subdirectory overrules file with the same name 5 | in parent directories. Restart might be needed to recognize files 6 | in newly created or renamed subdirectories. -------------------------------------------------------------------------------- /vifm/.config/vifm/vifmrc: -------------------------------------------------------------------------------- 1 | 2 | " {{{ General config 3 | " This is the actual command used to start vi. The default is vim. 4 | " If you would like to use another vi clone such as Elvis or Vile 5 | " you will need to change this setting. 6 | set vicmd=nvim 7 | 8 | " This makes vifm perform file operations on its own instead of relying on 9 | " standard utilities like `cp`. While using `cp` and alike is a more universal 10 | " solution, it's also much slower when processing large amounts of files and 11 | " doesn't support progress measuring. 12 | set syscalls 13 | 14 | " Open with preview window 15 | view 16 | 17 | " Trash Directory 18 | " The default is to move files that are deleted with dd or :d to 19 | " the trash directory. If you change this you will not be able to move 20 | " files by deleting them and then using p to put the file in the new location. 21 | " I recommend not changing this until you are familiar with vifm. 22 | " This probably shouldn't be an option. 23 | set trash 24 | 25 | " This is how many directories to store in the directory history. 26 | set history=1000 27 | 28 | " Automatically resolve symbolic links on l or Enter. 29 | set nofollowlinks 30 | 31 | " Natural sort of (version) numbers within text. 32 | set sortnumbers 33 | 34 | " Maximum number of changes that can be undone. 35 | set undolevels=100 36 | 37 | " If you would like to run an executable file when you 38 | " press return on the file name set this. 39 | set norunexec 40 | 41 | " Selected color scheme 42 | colorscheme minimal 43 | 44 | " Format for displaying time in file list. For example: 45 | " TIME_STAMP_FORMAT=%m/%d-%H:%M 46 | " See man date or man strftime for details. 47 | set timefmt=%m/%d\ %H:%M 48 | 49 | " Show list of matches on tab completion in command-line mode 50 | set wildmenu 51 | 52 | " Display completions in a form of popup with descriptions of the matches 53 | set wildstyle=popup 54 | 55 | " Display suggestions in normal, visual and view modes for keys, marks and 56 | " registers (at most 5 files). In other view, when available. 57 | set suggestoptions=normal,visual,view,otherpane,keys,marks,registers 58 | 59 | " Ignore case in search patterns unless it contains at least one uppercase 60 | " letter 61 | set ignorecase 62 | set smartcase 63 | 64 | " Don't highlight search results automatically 65 | set nohlsearch 66 | 67 | " Use increment searching (search while typing) 68 | set incsearch 69 | 70 | " Try to leave some space from cursor to upper/lower border in lists 71 | set scrolloff=4 72 | 73 | " Don't do too many requests to slow file systems 74 | if !has('win') 75 | set slowfs=curlftpfs 76 | endif 77 | 78 | " Things that should be stored in vifminfo 79 | set vifminfo=dhistory,chistory,state,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks 80 | 81 | " Dont show delete confirmation 82 | set confirm-=delete 83 | " ------------------------------------------------------------------------------ 84 | 85 | " :com[mand][!] command_name action 86 | " The following macros can be used in a command 87 | " %a is replaced with the user arguments. 88 | " %c the current file under the cursor. 89 | " %C the current file under the cursor in the other directory. 90 | " %f the current selected file, or files. 91 | " %F the current selected file, or files in the other directory. 92 | " %b same as %f %F. 93 | " %d the current directory name. 94 | " %D the other window directory name. 95 | " %m run the command in a menu window 96 | 97 | command! df df -h %m 2> /dev/null 98 | command! diff vim -d %f %F 99 | command! zip zip -r %f.zip %f 100 | command! run !! ./%f 101 | command! make !!make %a 102 | command! mkcd :mkdir %a | cd %a 103 | command! vgrep vim "+grep %a" 104 | command! reload :write | restart 105 | 106 | " Empty the ruler. By default, it shows the number of directories+files. 107 | set rulerformat= 108 | 109 | " Having a relative numberline makes it very easy navigate to files 110 | set relativenumber 111 | highlight LineNr ctermbg=NONE ctermfg=243 112 | 113 | command! FZFfind : 114 | \| let $FZF_PICK = term('find . 2>/dev/null | fzf --reverse 2>/dev/tty') 115 | \| if $FZF_PICK != '' 116 | \| execute 'goto' fnameescape($FZF_PICK) 117 | \| endif 118 | " }}} 119 | 120 | 121 | " {{{ File preview & file opening 122 | " The file type is for the default programs to be used with 123 | " a file extension. 124 | " :filetype pattern1,pattern2 defaultprogram,program2 125 | " :fileviewer pattern1,pattern2 consoleviewer 126 | " The other programs for the file type can be accessed with the :file command 127 | " The command macros %f, %F, %d, %F may be used in the commands. 128 | " The %a macro is ignored. To use a % you must put %%. 129 | 130 | " For automated FUSE mounts, you must register an extension with :file[x]type 131 | " in one of following formats: 132 | " 133 | " :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables 134 | " %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime. 135 | " A sample line might look like this: 136 | " :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR 137 | " 138 | " :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables 139 | " %PARAM and %DESTINATION_DIR are filled in by vifm at runtime. 140 | " A sample line might look like this: 141 | " :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR 142 | " %PARAM value is filled from the first line of file (whole line). 143 | " Example first line for SshMount filetype: root@127.0.0.1:/ 144 | " 145 | " You can also add %CLEAR if you want to clear screen before running FUSE 146 | " program. 147 | 148 | 149 | fileviewer *.pdf 150 | \ vifmimg pdf %px %py %pw %ph %c 151 | \ %pc 152 | \ vifmimg clear 153 | 154 | fileviewer *.djvu 155 | \ vifmimg djvu %px %py %pw %ph %c 156 | \ %pc 157 | \ vifmimg clear 158 | 159 | fileviewer *.epub 160 | \ vifmimg epub %px %py %pw %ph %c 161 | \ %pc 162 | \ vifmimg clear 163 | 164 | fileviewer