Compare commits

..

No commits in common. "b02433c10c7000430638918e6e06a4efca5f1282" and "65f26da829994c859f28b92ebc3ac36de98b4b1b" have entirely different histories.

32 changed files with 50 additions and 484 deletions

View File

@ -1,6 +0,0 @@
[Desktop Entry]
Name=Latex document
Comment=A blank latex document
Type=Link
URL=src/Latex document.tex
Icon=text-x-bibtex

View File

@ -1,6 +0,0 @@
[Desktop Entry]
Name=Shell script
Comment=A blank shell script
Type=Link
URL=src/Shell script.sh
Icon=text-x-script

View File

@ -1,9 +0,0 @@
\documentclass{article} % This command is used to set the type of document you are working on such as an article, book, or presenation
\usepackage{geometry} % This package allows the editing of the page layout
\usepackage{amsmath} % This package allows the use of a large range of mathematical formula, commands, and symbols
\usepackage{graphicx} % This package allows the importing of images
\begin{document}
\end{document}

View File

@ -1 +0,0 @@
#!/usr/bin/env bash

View File

@ -380,9 +380,6 @@
# msg_urgency = critical # msg_urgency = critical
# fullscreen = show # fullscreen = show
[no-fullscreen]
fullscreen = pushback
#[espeak] #[espeak]
# summary = "*" # summary = "*"
# script = dunst_espeak.sh # script = dunst_espeak.sh

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ set $mod Mod4
font pango:DejaVu Sans Mono 8 font pango:DejaVu Sans Mono 8
# Launch picom on startup # Launch picom on startup
exec --no-startup-id picom --experimental-backends -bc exec --no-startup-id picom -bc
# Set a random desktop background # Set a random desktop background
exec --no-startup-id feh --bg-scale --random ~/Pictures/Wallpapers/ exec --no-startup-id feh --bg-scale --random ~/Pictures/Wallpapers/
@ -22,27 +22,6 @@ exec --no-startup-id mpd
# Launch flameshot # Launch flameshot
exec --no-startup-id flameshot exec --no-startup-id flameshot
# Launch green with envy
exec --no-startup-id com.leinardi.gwe --hide-window
# Launch a polkit daemon
exec --no-startup-id /usr/lib/polkit-kde-authentication-agent-1
# Launch KDE Connect on startup
exec --no-startup-id /usr/lib/kdeconnectd
#exec --no-startup-id kdeconnect-indicator
# Apply my wacom tablet config
exec --no-startup-id ~/bin/scripts/wacom-config
# Set menu key as my compose key
exec --no-startup-id setxkbmap -option compose:menu
# Disable screen off
exec --no-startup-id xset s off
exec --no-startup-id xset -dpms
exec --no-startup-id xset s noblank
# Use pactl to adjust volume in PulseAudio. # Use pactl to adjust volume in PulseAudio.
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
@ -53,13 +32,6 @@ bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioNext exec mpc next bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc previous bindsym XF86AudioPrev exec mpc previous
# Flameshot binds
bindsym Print exec --no-startup-id flameshot screen
bindsym ctrl+Print exec --no-startup-id flameshot gui
# Emoji menu
bindsym $mod+e exec --no-startup-id rofi -show emoji -modi emoji -theme appsmenu
# Use Mouse+$mod to drag floating windows to their wanted position # Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod floating_modifier $mod
@ -69,15 +41,8 @@ bindsym $mod+Return exec --no-startup-id kitty
# Kill focused window # Kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# Window options menu
bindsym $mod+Shift+w exec --no-startup-id ~/bin/scripts/window-menu
# Utility menu
bindsym $mod+u exec --no-startup-id ~/bin/scripts/utility-menu
# Start dmenu # Start dmenu
bindsym $mod+d exec --no-startup-id dmenu bindsym $mod+d exec --no-startup-id dmenu_run
#bindsym $mod+d exec --no-startup-id rofi -theme appsmenu -show drun
# Change focus # Change focus
bindsym $mod+h focus left bindsym $mod+h focus left
@ -94,6 +59,12 @@ bindsym $mod+Shift+l move right
# Enter fullscreen mode for the focused container # Enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
# TODO: Change these hotkeys. Cause they suck.
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Toggle tiling / floating # Toggle tiling / floating
bindsym $mod+Shift+space floating toggle bindsym $mod+Shift+space floating toggle
@ -104,13 +75,6 @@ gaps outer 0
# Disable borders # Disable borders
for_window [class="^.*"] border pixel 1 for_window [class="^.*"] border pixel 1
# Make my custom timer floating by default
for_window [class="timer"] floating enable
# Make my custom timer "sticky". Meaning it will also be on the active workspace.
for_window [class="timer"] sticky enable
# Disable border for my custom timer.
for_window [class="timer"] border pixel 0
# Define names for default workspaces for which we configure key bindings later on. # Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places. # We use variables to avoid repeating the names in multiple places.
set $ws1 "1" set $ws1 "1"
@ -148,8 +112,6 @@ bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10 bindsym $mod+Shift+0 move container to workspace number $ws10
assign [class="Kodi"] $ws4
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)

View File

@ -1 +0,0 @@
au BufRead,BufNewFile *.paret set filetype=paret

View File

@ -20,7 +20,7 @@ set undodir=~/.vim/undo
set list lcs=tab:\|- set list lcs=tab:\|-
set tabstop=4 set tabstop=4
set softtabstop=4 set softtabstop=4
set expandtab set noexpandtab
set shiftwidth=4 set shiftwidth=4
set smarttab set smarttab
@ -126,7 +126,7 @@ if &compatible
endif endif
" Required: " Required:
set runtimepath+=/home/kalle/.local/share/dein/repos/github.com/Shougo/dein.vim set runtimepath+=/home/kalle/.cache/dein/repos/github.com/Shougo/dein.vim
" Required: " Required:
if dein#load_state('/home/kalle/.local/share/dein') if dein#load_state('/home/kalle/.local/share/dein')

View File

@ -1,37 +0,0 @@
" Vim syntax file
" Language: Paret
" Maintainer: Kalle Struik
" Latest Revision: 17 March 2022
if exists("b:current_syntax")
finish
endif
" Binary builtins
syn keyword paretBinaryBuiltins '+' '*' '-' and or num= num< num> cons
" Unary builtins
syn keyword paretBinaryBuiltins not head tail is-nil is-list
" Variable size builtins
syn keyword paretVariableBuiltins list
" Misc builtins
syn keyword paretMiscBuiltins if lambda let letrec
" Number constants
syn match paretNumber '\d\+'
" Boolean constants
syn keyword paretBoolean true false
" Nil constants
syn keyword paretNil nil
let b:current_syntax = "paret"
hi def link paretBinaryBuiltins Statement
hi def link paretUnaryBuiltins Statement
hi def link paretVariableBuiltins Statement
hi def link paretMiscBuiltins Statement
hi def link paretNumber Constant
hi def link paretBoolean Constant
hi def link paretNil Constant

View File

@ -13,9 +13,7 @@ blur-background = true;
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
# #
# blur-kern = '' # blur-kern = ''
blur-method = "gaussian" blur-kern = "5x5box";
blur-size = 11
blur-deviation = 5
# Exclude conditions for background blur. # Exclude conditions for background blur.
@ -23,26 +21,6 @@ blur-deviation = 5
blur-background-exclude = [ blur-background-exclude = [
"window_type = 'dock'", "window_type = 'dock'",
"window_type = 'desktop'", "window_type = 'desktop'",
"class_g = 'timer'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# Shadows #
#################################
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"class_g = 'timer'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c"
]; ];
@ -54,7 +32,7 @@ shadow-exclude = [
# `xrender` is the default one. # `xrender` is the default one.
# #
# backend = 'glx' # backend = 'glx'
backend = "glx"; backend = "xrender";
# Enable/disable VSync. # Enable/disable VSync.
# vsync = false # vsync = false

View File

@ -3,7 +3,6 @@ transparent = #00000000
background = #282a36 background = #282a36
background-current = #44475a background-current = #44475a
foreground = #f8f8f2 foreground = #f8f8f2
button = #2d1349
cyan = #5ba9bd cyan = #5ba9bd
green = #209a4b green = #209a4b
orange = #cf885c orange = #cf885c
@ -36,10 +35,9 @@ font-0 = "Roboto Mono Nerd Font:pixelsize=12;2"
tray-position = right tray-position = right
tray-background = ${colors.background} tray-background = ${colors.background}
tray-reparent = true
modules-left = i3 modules-left = i3
modules-center = utility mpd calculator modules-center = mpd
modules-right = memory pulseaudio du_root date modules-right = memory pulseaudio du_root date
[module/i3] [module/i3]
@ -75,13 +73,6 @@ label-urgent = %index%
label-urgent-background = ${colors.red} label-urgent-background = ${colors.red}
label-urgent-padding = 2 label-urgent-padding = 2
[module/utility]
type = custom/text
content = "  "
content-background = ${colors.button}
click-left = "bash -c $HOME/.dots/scripts/utilities-menu"
[module/mpd] [module/mpd]
type = internal/mpd type = internal/mpd
@ -100,13 +91,22 @@ label-song = " %artist% - %title% "
label-song-maxlen = 25 label-song-maxlen = 25
label-song-ellipsis = true label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
[module/calculator] format = <label> <bar>
type = custom/text label = BL
content = "  "
content-background = ${colors.button}
click-left = "rofi -show calc -theme appsmenu -modi calc -no-persist-history -no-show-match -no-sort" bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/memory] [module/memory]
@ -173,4 +173,5 @@ format-prefix-background = ${colors.yellow}
label = %date% %time% label = %date% %time%
; vim:ft=dosini ; vim:ft=dosini

View File

@ -1,19 +1,12 @@
/** /**
* This theme is intended for a 8x2 items list menu with a headerbar. * This theme is intended for a 8x2 items list menu with a headerbar.
*/ */
configuration {
show-icons: true;
}
@import "shared/settings.rasi" @import "shared/settings.rasi"
* { * {
background-color: transparent; background-color: transparent;
text-color: @foreground-list; text-color: @foreground-list;
font: @text-font; font: @text-font;
} }
#window { #window {
padding: @list-8-window-padding; padding: @list-8-window-padding;
} }
@ -21,7 +14,7 @@ inputbar,
prompt, prompt,
textbox-prompt-colon, textbox-prompt-colon,
entry { entry {
background-color: @background; background-color: @background-light;
} }
#inputbar { #inputbar {
children: [ prompt, textbox-prompt-colon, entry ]; children: [ prompt, textbox-prompt-colon, entry ];
@ -31,16 +24,9 @@ entry {
#prompt { #prompt {
padding: @prompt-padding; padding: @prompt-padding;
background-color: @accent; background-color: @accent;
text-color: @background-focus; text-color: @background;
width: 100%; width: 100%;
} }
#message {
padding: @list-element-padding;
margin: @list-element-margin;
background-color: @background-focus;
border: @list-element-border;
border-color: @on;
}
#textbox-prompt-colon { #textbox-prompt-colon {
expand: false; expand: false;
str: " : : "; str: " : : ";
@ -54,16 +40,12 @@ entry {
padding: @list-element-padding; padding: @list-element-padding;
margin: @list-element-margin; margin: @list-element-margin;
border: @list-element-border; border: @list-element-border;
background-color: @background-focus; background-color: @background-light;
border-color: @background-focus; border-color: @background-light;
} }
#element.selected { #element.selected {
background-color: @background; background-color: @background-focus;
text-color: @accent; text-color: @accent;
border-color: @accent; border-color: @accent;
} }
element-icon {
size: 24px;
}

View File

@ -1,6 +1,6 @@
* { * {
/* General */ /* General */
text-font: "Comfortaa 16"; text-font: "Comfortaa 14";
text-font-mono: "RobotoMono Nerd Font Regular 14"; text-font-mono: "RobotoMono Nerd Font Regular 14";
icon-font: "Hurmit Nerd Font Mono 60"; icon-font: "Hurmit Nerd Font Mono 60";
icon-font-small: "Hurmit Nerd Font Mono 24"; icon-font-small: "Hurmit Nerd Font Mono 24";

View File

@ -1,11 +0,0 @@
#!/bin/bash
sleep 3
for i in $(seq 250); do
xdotool mousedown 3
sleep 0.010
xdotool mouseup 3
sleep 0.010
done

View File

@ -1,10 +0,0 @@
#!/bin/bash
options="No\nNo\nNo\nNo\nNo\nYes"
selected=$(echo -e $options | rofi -p "$1" -mesg "Are you sure you want to run \"$2\"?" -dmenu -theme appsmenu)
case $selected in
"Yes")
$2
;;
esac

View File

@ -1,32 +0,0 @@
#!/bin/bash
TOTALS=`git log --shortstat --author=$author | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print files, " ", inserted, " ", deleted }'`
TOTAL_INSERTS=`echo $TOTALS | cut -d' ' -f2`
TOTAL_DELETES=`echo $TOTALS | cut -d' ' -f3`
TOTAL_TOTAL=$(( $TOTAL_INSERTS + $TOTAL_DELETES ))
IFS="
"
for author in `git log --format='%aN' | sort -u`; do
echo $author":"
USER=`git log --shortstat --author=$author | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print files, " ", inserted, " ", deleted }'`
IFS=" "
USER_INSERTS=`echo $USER | cut -d' ' -f2`
USER_DELETES=`echo $USER | cut -d' ' -f3`
USER_TOTAL=`bc <<< "$USER_INSERTS + $USER_DELETES"`
PERC_INSERTS=`bc <<< $USER_INSERTS"* 100 /"$TOTAL_INSERTS`
PERC_DELETES=`bc <<< $USER_DELETES"* 100 /"$TOTAL_DELETES`
PERC_TOTAL=`bc <<< $USER_TOTAL"* 100 /"$TOTAL_TOTAL`
echo " TOTAL: $USER_TOTAL ($PERC_TOTAL%)"
echo " INSERTS: $USER_INSERTS ($PERC_INSERTS%)"
echo " DELETES: $USER_DELETES ($PERC_DELETES%)"
IFS="
"
done

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
TEMPLATE_DIR="$HOME/Templates/src"
src=`ls "$TEMPLATE_DIR" | fzf --preview="$HOME/.dots/scripts/template_preview $TEMPLATE_DIR/{}"`
if [ -n "$src" ]; then
read -p "File name: " name
if [ -n "$name" ]; then
cp "$TEMPLATE_DIR/$src" "$name" -r
fi
fi

View File

@ -1,17 +0,0 @@
#!/bin/bash
options="Shutdown\nReboot\nLogout"
selected=$(echo -e $options | rofi -p Power -dmenu -theme appsmenu)
case $selected in
"Shutdown")
confirm-menu "Shutdown?" "poweroff"
;;
"Reboot")
confirm-menu "Reboot?" "reboot"
;;
"Logout")
confirm-menu "Logout?" "i3-msg exit"
;;
esac

View File

@ -1,11 +0,0 @@
#!/bin/bash
USER=$(logname)
if [ -f "/tmp/$USER.screen-share" ]; then
screen -S "Screen Share" -X quit
rm "/tmp/$USER.screen-share"
else
screen -dmS "Screen Share" ffmpeg -f x11grab -video_size 1920x1080 -i :0+0,1050 -pix_fmt yuv420p -r 30 -f v4l2 /dev/video9
touch "/tmp/$USER.screen-share"
fi

View File

@ -1,30 +0,0 @@
#!/bin/python
import math
parts = input("First point? ").split(" ")
x1,z1,a1 = float(parts[6]),float(parts[8]),float(parts[9])
if a1 >= 90:
a1 = 180 - a1+90
else:
a1 = -1 * (a1+90)
s1 = -1 * math.tan(math.radians(a1))
i1 = z1 - s1 * x1
parts = input("Second point? ").split(" ")
x2,z2,a2 = float(parts[6]),float(parts[8]),float(parts[9])
if a2 >= 90:
a2 = 180 - a2+90
else:
a2 = -1 * (a2+90)
s2 = -1 * math.tan(math.radians(a2))
i2 = z2 - s2 * x2
x3 = (i2 - i1) / (s1 - s2)
z3 = s1 * x3 + i1
print(f"Stronghold at: {round(x3)}, {round(z3)}")
print(f"In nether: {round(x3/8)}, {round(z3/8)}")

View File

@ -1,7 +0,0 @@
#!/bin/bash
STARTTIME=$(date +%s.%3N)
echo "End timing with ctrl-c."
while true; do
DUR=$(printf "%.3f" $(bc <<< $(date +%s.%3N)-$STARTTIME))
printf "\r%s " $(date +%T.%3N -u -d "@${DUR}")
done

View File

@ -1,3 +0,0 @@
#!/bin/bash
krunner -d

View File

@ -1,3 +0,0 @@
#!/bin/bash
obs --startreplaybuffer --minimize-to-tray

View File

@ -1,8 +0,0 @@
#!/usr/bin/env bash
file="$TEMPLATE_DIR/$1"
if [ -d "$file" ]; then
tree -C "$file"
else
bat -pf "$file"
fi

View File

@ -1,21 +0,0 @@
#!/bin/bash
hours=$(echo -e "0\n1\n2\n3\n4\n5\n6" | rofi -dmenu -theme appsmenu)
if [ -z $hours ]; then
exit 0
fi
minutes=$(echo -e "0\n5\n10\n15\n30\n45" | rofi -dmenu -theme appsmenu)
if [ -z $minutes ]; then
exit 0
fi
seconds=$(echo -e "0\n10\n15\n30\n45" | rofi -dmenu -theme appsmenu)
if [ -z $seconds ]; then
exit 0
fi
timer $hours $minutes $seconds &

View File

@ -1,40 +0,0 @@
#!/bin/bash
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/
SCREEN_SHARE_OPTION="Start screen share"
if [ -f "/tmp/$USER.screen-share" ]; then
SCREEN_SHARE_OPTION="Stop screen share"
fi
WEBCAM_OPTION="Start good webcam"
if [ -f "/tmp/$USER.webcam" ]; then
WEBCAM_OPTION="Stop good webcam"
fi
DUNST_PAUSE_OPTION="Pause dunst notifications"
if [[ $(dunstctl is-paused) == "true" ]]; then
DUNST_PAUSE_OPTION="Resume dunst notifications"
fi
options="Power menu\nTimer\n$SCREEN_SHARE_OPTION\n$WEBCAM_OPTION\n$DUNST_PAUSE_OPTION"
selected=$(echo -e $options | rofi -p Utility -dmenu -theme appsmenu)
case $selected in
"Timer")
timer-launcher
;;
"$SCREEN_SHARE_OPTION")
screen-share-toggle
;;
"$WEBCAM_OPTION")
webcam-toggle
;;
"Power menu")
power-menu
;;
"$DUNST_PAUSE_OPTION")
dunstctl set-paused toggle
;;
esac

View File

@ -1,5 +0,0 @@
#!/bin/bash
xsetwacom --set "Wacom Intuos3 6x8 Pad pad" MapToOutput HEAD-0
xsetwacom --set "Wacom Intuos3 6x8 Pen stylus" MapToOutput HEAD-0
xsetwacom --set "Wacom Intuos3 6x8 Pen eraser" MapToOutput HEAD-0
xsetwacom --set "Wacom Intuos3 6x8 Pen cursor" MapToOutput HEAD-0

View File

@ -1,11 +0,0 @@
#!/bin/bash
USER=$(logname)
if [ -f "/tmp/$USER.webcam" ]; then
screen -S "Webcam" -X quit
rm "/tmp/$USER.webcam"
else
screen -dmS "Webcam" ffmpeg -video_size 1920x1080 -framerate 30 -c:v mjpeg -i /dev/video0 -c:v mjpeg -vf lenscorrection=k1=-0.1:k2=-0.05 -f v4l2 /dev/video8
touch "/tmp/$USER.webcam"
fi

View File

@ -1,20 +0,0 @@
#!/bin/bash
options="Close\nToggle floating\nToggle sticky\nToggle fullscreen"
selected=$(echo -e $options | rofi -p Window -dmenu -theme appsmenu)
case $selected in
"Close")
i3-msg "kill"
;;
"Toggle floating")
i3-msg "floating toggle"
;;
"Toggle sticky")
i3-msg "sticky toggle"
;;
"Toggle fullscreen")
i3-msg "fullscreen toggle"
;;
esac

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash #!/bin/env bash
set -x
cd $(dirname $0) cd $(dirname $0)
DOTS_DIR=$(pwd) DOTS_DIR=$(pwd)
@ -65,7 +67,7 @@ KITTY_DIR="$HOME/.config/kitty"
# Check if the kitty directory exists. If it does we skip this part of the script and inform the user. # Check if the kitty directory exists. If it does we skip this part of the script and inform the user.
if [ -d $KITTY_DIR ]; then if [ -d $KITTY_DIR ]; then
echo "[KITTY] Configuration directory exists. Skipping." echo "[Kitty] Configuration directory exists. Skipping."
else else
ln -s $DOTS_DIR/kitty $KITTY_DIR ln -s $DOTS_DIR/kitty $KITTY_DIR
fi fi
@ -95,25 +97,7 @@ ROFI_DIR="$HOME/.config/rofi"
# Check if the rofi directory exists. If it does we skip this part of the script and inform the user. # Check if the rofi directory exists. If it does we skip this part of the script and inform the user.
if [ -d $ROFI_DIR ]; then if [ -d $ROFI_DIR ]; then
echo "[ROFI] Configuration file exists. Skipping." echo "[RDF] Configuration file exists. Skipping."
else else
ln -s $DOTS_DIR/rofi $ROFI_DIR ln -s $DOTS_DIR/rofi $ROFI_DIR
fi fi
# Scripts
SCRIPT_DIR="$HOME/bin/scripts"
# Check if the scripts directory exists. If it does we skip this part of the script and inform the user.
if [ -d $SCRIPT_DIR ]; then
echo "[SCRIPTS] Configuration directory exists. Skipping."
else
mkdir "$HOME/bin"
ln -s $DOTS_DIR/scripts $SCRIPT_DIR
fi
# Templates
TEMPLATE_DIR="$HOME/Templates"
rmdir "$TEMPLATE_DIR"
ln -s "$DOTS_DIR/Templates" "$TEMPLATE_DIR"

View File

@ -1,6 +1,8 @@
autoload compinit autoload -Uz compinit promptinit
compinit compinit
promptinit
prompt suse
# Menu driven command completion. # Menu driven command completion.
zstyle ':completion:*' menu select zstyle ':completion:*' menu select
@ -8,24 +10,15 @@ zstyle ':completion:*' menu select
setopt COMPLETE_ALIASES setopt COMPLETE_ALIASES
# Allow ZSH to complete in priviliged environments. # Allow ZSH to complete in priviliged environments.
zstyle ':completion::complete:*' gain-privileges 1 zstyle ':completion::complete:*' gain-privileges 1
## case-insensitive (uppercase from lowercase) completion
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
autoload -U colors && colors
# When typing a directory name cd to it. # VI Mode
setopt autocd bindkey -v
# Add ~/bin and ~/bin.scripts to my path
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/:$HOME/.emacs.d/bin/
# Set the prompt.
export PS1="[%F{6}%n%f@%M %F{4}%(5~|%-1~/…/%3~|%4~)%f] "
# Function to download a full youtube playlist using youtube-dl. # Function to download a full youtube playlist using youtube-dl.
function playlist-dl { function playlist-dl {
echo "Looking up playlist name..." echo "Looking up playlist name..."
pl_line=$(youtube-dl --flat-playlist "$1" | grep "\[download\] Downloading playlist: ") pl_line=$(youtube-dl --flat-playlist "$1" | grep "\[youtube:playlist\] playlist")
pl_name=$(echo ${pl_line:33} | tr '/' ' ') pl_name=$(echo ${pl_line:28} | awk -F ':' '{print $1}' | tr '/' ' ')
echo "Found playlist by name: $pl_name" echo "Found playlist by name: $pl_name"
echo "Downloading it into directory: $pl_name" echo "Downloading it into directory: $pl_name"
@ -35,30 +28,6 @@ function playlist-dl {
cd ../ cd ../
} }
function cd-courses {
dir=$(ls ~/Uni | fzf)
cd ~/Uni/$dir
}
function cd-projects {
dir=$(find ~/Projects -maxdepth 3 -type d | fzf)
cd $dir
}
function script-edit {
scripts=$(ls ~/bin/scripts/)"$(echo -e "\nzshrc")"
selected=$(echo $scripts | fzf)
case $selected in
"zshrc")
nvim ~/.zshrc
;;
*)
nvim ~/bin/scripts/$selected
;;
esac
}
function compile { function compile {
gcc -no-pie -g -o $2 $1 gcc -no-pie -g -o $2 $1
} }
@ -69,15 +38,9 @@ export EDITOR=nvim
# Aliases # Aliases
alias ls="lsd" alias ls="lsd"
alias grep="grep --color" alias grep="grep --color"
alias p="sudo pacman"
alias vim="nvim" alias vim="nvim"
alias vi="nvim" alias vi="nvim"
alias open="xdg-open"
alias gg="git-graph --model simple --color always | less -r"
alias gi="gitinspector --grading=true -f \"java,fxml,css,py,html\" -F html -x author:\"OOP Project Team\""
alias se="script-edit"
alias c="cd-courses"
alias proj="cd-projects"
# Add fish like syntax highlighting to zsh. # Add fish like syntax highlighting to zsh.
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh