move stuff to common and half figured out the install script

This commit is contained in:
Benjamin Kyd
2023-02-02 00:34:50 +00:00
parent 3e508fb613
commit 27a774acfe
78 changed files with 80 additions and 938 deletions

291
common/.Xresources Normal file
View File

@@ -0,0 +1,291 @@
Xft.dpi: 120
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
XTerm*background: #222D31
XTerm*foreground: #d8d8d8
XTerm*pointerColor: #1ABB9B
XTerm*faceName: Fixed
XTerm*faceSize: 11
XTerm*reverseVideo: on
XTerm*selectToClipboard: true
*background: #222D31
*foreground: #d8d8d8
*fading: 8
*fadeColor: black
*cursorColor: #1ABB9B
*pointerColorBackground: #2B2C2B
*pointerColorForeground: #16A085
!! black dark/light
*color0: #222D31
*color8: #585858
!! red dark/light
*color1: #ab4642
*color9: #ab4642
!! green dark/light
*color2: #7E807E
*color10: #8D8F8D
!! yellow dark/light
*color3: #f7ca88
*color11: #f7ca88
!! blue dark/light
*color4: #7cafc2
*color12: #7cafc2
!! magenta dark/light
*color5: #ba8baf
*color13: #ba8baf
!! cyan dark/light
*color6: #1ABB9B
*color14: #1ABB9B
!! white dark/light
*color7: #d8d8d8
*color15: #f8f8f8
Xcursor.theme: xcursor-breeze
Xcursor.size: 0
!! URxvt.font: xft:TerminessTTFNerdFontMono:pixelsize=24
URxvt.font: xft:DejaVu Sans Mono:size=11
! alternative font settings with 'terminus':
! URxvt.font: -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
! URxvt.bold.font: -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
!! terminus names see end of file!
URxvt.depth: 32
URxvt*background: rgba:0000/0000/0200/c800
URxvt*scrollBar: false
URxvt*mouseWheelScrollPage: false
URxvt*cursorBlink: true
! URxvt*background: black
URxvt*foreground: grey
URxvt*saveLines: 5000
! for 'fake' transparency (without Compton) uncomment the following three lines
URxvt*inheritPixmap: false
URxvt*transparent: false
! URxvt*shading: 138
! :Bind C-0, C-+ and C-= to activate small, medium, and big font size resp.
URxvt.keysym.C-0: command:\033]710;xft:DejaVu Sans Mono:size=12\007
URxvt.keysym.C-minus: command:\033]710;xft:DejaVu Sans Mono:size=8\007
URxvt.keysym.C-equal: command:\033]710;xft:DejaVu Sans Mono:size=11\007
! Normal copy-paste keybindings without perls
URxvt.iso14755: false
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
!Xterm escape codes, word by word movement
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.Shift-Control-Left: \033[1;6D
URxvt.keysym.Control-Right: \033[1;5C
URxvt.keysym.Shift-Control-Right: \033[1;6C
URxvt.keysym.Control-Up: \033[1;5A
URxvt.keysym.Shift-Control-Up: \033[1;6A
URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Shift-Control-Down: \033[1;6B
! Rxvt.perl-ext-common: ...,clipboard
! URxvt.keysym.M-C-c: perl:clipboard:copy
! URxvt.keysym.M-v: perl:clipboard:paste
! URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
! URxvt*termName: string
! URxvt*geometry: geometry
! URxvt*chdir: string
! URxvt*loginShell: boolean
! URxvt*multiClickTime: number
! URxvt*jumpScroll: boolean
! URxvt*skipScroll: boolean
! URxvt*pastableTabs: boolean
! URxvt*scrollstyle: plain
! URxvt*scrollBar_right: boolean
! URxvt*scrollBar_floating: true
! URxvt*scrollBar_align: mode
! URxvt*thickness: number
! URxvt*scrollTtyOutput: boolean
! URxvt*scrollTtyKeypress: boolean
! URxvt*scrollWithBuffer: boolean
! URxvt*tintColor: !7DA55
! URxvt*blurRadius: HxV
! URxvt*fading: number
! URxvt*fadeColor: color
! URxvt*utmpInhibit: boolean
! URxvt*urgentOnBell: boolean
! URxvt*visualBell: boolean
! URxvt*mapAlert: boolean
! URxvt*meta8: boolean
! URxvt*tripleclickwords: boolean
! URxvt*insecure: boolean
! URxvt*cursorUnderline: boolean
! URxvt*pointerBlank: boolean
! URxvt*color0: color
! URxvt*color1: color
! URxvt*color2: color
! URxvt*color3: color
! URxvt*color4: color
! URxvt*color5: color
! URxvt*color6: color
! URxvt*color7: color
! URxvt*color8: color
! URxvt*color9: color
! URxvt*color10: color
! URxvt*color11: color
! URxvt*color12: color
! URxvt*color13: color
! URxvt*color14: color
! URxvt*color15: color
! URxvt*colorBD: color
! URxvt*colorIT: color
! URxvt*colorUL: color
! URxvt*colorRV: color
! URxvt*underlineColor: color
! URxvt*scrollColor: color
! URxvt*troughColor: color
! URxvt*highlightColor: color
! URxvt*highlightTextColor: color
! URxvt*cursorColor: color
! URxvt*cursorColor2: color
! URxvt*pointerColor: color
! URxvt*pointerColor2: color
! URxvt*borderColor: color
! URxvt*iconFile: file
! URxvt*boldFont: fontname
! URxvt*italicFont: fontname
! URxvt*boldItalicFont: fontname
! URxvt*intensityStyles: boolean
! URxvt*inputMethod: name
! URxvt*preeditType: style
! URxvt*imLocale: string
! URxvt*imFont: fontname
! URxvt*title: string
! URxvt*iconName: string
! URxvt*buffered: boolean
! URxvt*depth: number
! URxvt*visual: number
! URxvt*transient-for: windowid
! URxvt*override-redirect: boolean
! URxvt*hold: boolean
! URxvt*externalBorder: number
! URxvt*internalBorder: number
! URxvt*borderLess: true
! URxvt*lineSpace: number
! URxvt*letterSpace: number
! URxvt*skipBuiltinGlyphs: boolean
! URxvt*pointerBlankDelay: number
! URxvt*backspacekey: string
! URxvt*deletekey: string
! URxvt*print-pipe: string
! URxvt*modifier: modifier
! URxvt*cutchars: string
! URxvt*answerbackString: string
! URxvt*secondaryScreen: boolean
! URxvt*secondaryScroll: boolean
! URxvt*perl-lib: string
! URxvt*perl-eval: perl-eval
! URxvt*perl-ext-common: string
! URxvt*perl-ext: string
! URxvt*iso14755: boolean
! URxvt*iso14755_52: boolean
! URxvt*xrm: string
! URxvt*keysym.sym: keysym
! URxvt*background.border: boolean
! URxvt*background.expr: string
! URxvt*background.interval: seconds
! URxvt*bell-command: string
! URxvt*kuake.hotkey: string
! URxvt*matcher.button: string
! URxvt*matcher.launcher: string
! URxvt*matcher.launcher.*: string
! URxvt*matcher.pattern.*: string
! URxvt*matcher.rend.*: string
! URxvt*remote-clipboard.fetch: string
! URxvt*remote-clipboard.store: string
! URxvt*searchable-scrollback: string
! URxvt*selection-autotransform.*: string
! URxvt*selection-pastebin.cmd: string
! URxvt*selection-pastebin.url: string
! URxvt*selection.pattern-0: string
! URxvt*tab-bg: colour
! URxvt*tab-fg: colour
! URxvt*tabbar-bg: colour
! URxvt*tabbar-fg: colour
! URxvt*url-launcher: string
! The Terminus font uses the following X-names:
! -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
! -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
! -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
! -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
! -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1
! -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
! -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1
! -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1
! -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso10646-1
! -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso10646-1
! -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
! -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso10646-1
! -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso10646-1
! -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso10646-1
! -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso10646-1
! special
URxvt.foreground: #DADAE8
URxvt.background: #1E1E29
URxvt.cursorColor: #B1E3AD
! black
URxvt.color0: #6E6C7E
URxvt.color8: #6E6C7E
! red
URxvt.color1: #E38C8F
URxvt.color9: #E38C8F
! green
URxvt.color2: #B1E3AD
URxvt.color10: #B1E3AD
! yellow
URxvt.color3: #EBDDAA
URxvt.color11: #EBDDAA
! blue
URxvt.color4: #A4B9EF
URxvt.color12: #A4B9EF
! magenta
URxvt.color5: #C6AAE8
URxvt.color13: #C6AAE8
! cyan
URxvt.color6: #E5B4E2
URxvt.color14: #E5B4E2
! white
URxvt.color7: #DADAE8
URxvt.color15: #DADAE8
!! URxvt Appearance
URxvt.letterSpace: 0
URxvt.lineSpace: 0
URxvt.geometry: 92x24
URxvt.internalBorder: 10
URxvt.cursorBlink: true
URxvt.cursorUnderline: false
URxvt.saveline: 2048
URxvt.scrollBar: false
URxvt.scrollBar_right: false
URxvt.urgentOnBell: true

24
common/.config/dolphinrc Normal file
View File

@@ -0,0 +1,24 @@
[$Version]
update_info=dolphin_detailsmodesettings.upd:rename-leading-padding
[General]
Version=202
ViewPropsTimestamp=2022,8,14,17,19,21.178
[KFileDialog Settings]
Places Icons Auto-resize=false
Places Icons Static Size=22
[KPropertiesDialog]
eDP-1 Height 1920x1200=468
eDP-1 Width 1920x1200=445
[MainWindow]
MenuBar=Disabled
ToolBarsMovable=Disabled
[PreviewSettings]
Plugins=opendocumentthumbnail,ebookthumbnail,windowsexethumbnail,comicbookthumbnail,jpegthumbnail,djvuthumbnail,kraorathumbnail,imagethumbnail,cursorthumbnail,appimagethumbnail,svgthumbnail,exrthumbnail,windowsimagethumbnail,audiothumbnail,directorythumbnail
[Search]
Location=Everywhere

View File

@@ -0,0 +1,302 @@
[global]
frame_width = 1
frame_color = "#788388"
font = Noto Sans 10
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# If markup is not allowed, those tags will be stripped out of the
# message.
markup = yes
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# Markup is allowed
format = "%s %p\n%b"
# Sort messages by urgency.
sort = yes
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# The frequency with wich text that is longer than the notification
# window allows bounces back and forth.
# This option conflicts with "word_wrap".
# Set to 0 to disable.
bounce_freq = 5
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = no
# Ignore newlines '\n' in notifications.
ignore_newline = no
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "0x4-25+25"
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 15
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# default 120
idle_threshold = 120
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a windowmanager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern windowmanagers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
# The height of a single line. If the height is smaller than the
# font height, it will get raised to the font height.
# This adds empty space above and under the text.
line_height = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 1
# Padding between text and separator.
# padding = 8
padding = 8
# Horizontal padding.
horizontal_padding = 10
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = #263238
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = palemoon
# Align icons left/right/off
icon_position = left
# Paths to default icons.
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/
# Limit icons size.
max_icon_size=128
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = mod1+space
# Close all notifications.
# close_all = ctrl+shift+space
close_all = ctrl+mod1+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1".
history = ctrl+mod4+h
# Context menu.
context = ctrl+mod1+c
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#263238"
foreground = "#556064"
timeout = 10
[urgency_normal]
background = "#263238"
foreground = "#F9FAF9"
timeout = 10
[urgency_critical]
background = "#D62929"
foreground = "#F9FAF9"
timeout = 0
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[Claws Mail]
# appname = claws-mail
# category = email.arrived
# urgency = normal
# background = "#2F899E"
# foreground = "#FFA247"
#
#[mute.sh]
# appname = mute
# category = mute.sound
# script = mute.sh
#
#[JDownloader]
# appname = JDownloader
# category = JD
# background = "#FFA247"
# foreground = "#FFFFFF"
#
#[newsbeuter]
# summary = *Feeds*
# background = "#A8EB41"
# foreground = "#FFFFFF"
#
[irc]
appname = weechat
timeout = 0
background = "#0033bb"
foreground = "#dddddd"
#
[weechat hl]
appname = weechat
category = weechat.HL
background = "#FF5C47"
foreground = "#FFFFFF"
#
[weechat pn]
appname = weechat
category = weechat.PM
background = "#D53B84"
foreground = "#FFFFFF"
#
#[CMUS]
# appname = CMUS
# category = cmus
# background = "#6C4AB7"
# foreground = "#FFE756"
#
#
# background = "#30AB70"
# foreground = "#F67245"
#
# vim: ft=cfg

View File

@@ -0,0 +1,2 @@
[General]
uploadWithoutConfirmation=true

View File

@@ -0,0 +1,44 @@
#!/bin/sh
# If ACPI was not installed, this probably is a battery-less computer.
ACPI_RES=$(acpi -b)
ACPI_CODE=$?
if [ $ACPI_CODE -eq 0 ]
then
# Get essential information. Due to som bug with some versions of acpi it is
# worth filtering the ACPI result from all lines containing "unavailable".
BAT_LEVEL_ALL=$(echo "$ACPI_RES" | grep -E -o "[0-9][0-9]?[0-9]?%")
BAT_LEVEL=$(echo "$BAT_LEVEL_ALL" | awk -F"%" 'BEGIN{tot=0;i=0} {i++; tot+=$1} END{printf("%d%%\n", tot/i)}')
TIME_LEFT=$(echo "$ACPI_RES" | grep -E -o "[0-9]{2}:[0-9]{2}:[0-9]{2}")
IS_CHARGING=$(echo "$ACPI_RES" | awk '{ printf("%s\n", substr($3, 0, length($3)-1) ) }')
# If there is no 'time left' information (when almost fully charged) we
# provide information ourselvs.
if [ -z "$TIME_LEFT" ]
then
TIME_LEFT="00:00:00"
fi
# Print full text. The charging data.
TIME_LEFT=$(echo $TIME_LEFT | awk '{ printf("%s\n", substr($1, 0, 5)) }')
echo "🔋$BAT_LEVEL$TIME_LEFT "
# Print the short text.
echo "BAT: $BAT_LEVEL"
# Change the font color, depending on the situation.
if [ "$IS_CHARGING" = "Charging" ]
then
# Charging yellow color.
echo "#D0D000"
else
if [ "${BAT_LEVEL%?}" -le 15 ]
then
# Battery very low. Red color.
echo "#FA1E44"
else
# Battery not charging but at decent level. Green color.
echo "#007872"
fi
fi
fi

View File

@@ -0,0 +1,28 @@
[NOW_PLAYING]
command=mpris-ctl info '🎶 %player_name: %track_name - %artist_name'
interval=1
color=#1DB954
[DISK]
command=df -h / | awk '/\//{ printf(" 💾 %sB \n", $4) }'
interval=10
color=#C9E3DB
[BATTERY]
command=~/.config/i3blocks/battery/battery_info.sh
interval=20
[CPU]
full_text= CPU: 0.00% @ +00.0°C
command=~/.config/i3blocks/cpu/cpu_info.sh
interval=2
color=#00B4EB
[MEM]
command=free -h | awk '/Mem:/ { printf(" %5s/%s \n", $3, $2) }'
interval=5
color=#FEC925
[TIME_DATE]
command=date +" %a, %d %b - %H:%M:%S"
interval=1

View File

@@ -0,0 +1,4 @@
#!/bin/sh
TEMP=$(sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
echo "$CPU_USAGE $TEMP" | awk '{ printf(" CPU:%6s% @ %s \n"), $1, $2 }'

View File

@@ -0,0 +1,6 @@
#!/bin/sh
for i in $(seq 1 5)
do
sleep 0.2
pkill -RTMIN+1 i3blocks
done

View File

@@ -0,0 +1,27 @@
#!/bin/sh
VOLUME_MUTE="🔇"
VOLUME_LOW="🔈"
VOLUME_MID="🔉"
VOLUME_HIGH="🔊"
SOUND_LEVEL=$(amixer -M get Master | awk -F"[][]" '/%/ { print $2 }' | awk -F"%" 'BEGIN{tot=0; i=0} {i++; tot+=$1} END{printf("%s\n", tot/i) }')
MUTED=$(amixer get Master | awk ' /%/{print ($NF=="[off]" ? 1 : 0); exit;}')
ICON=$VOLUME_MUTE
if [ "$MUTED" = "1" ]
then
ICON="$VOLUME_MUTE"
else
if [ "$SOUND_LEVEL" -lt 34 ]
then
ICON="$VOLUME_LOW"
elif [ "$SOUND_LEVEL" -lt 67 ]
then
ICON="$VOLUME_MID"
else
ICON="$VOLUME_HIGH"
fi
fi
echo "$ICON" "$SOUND_LEVEL" | awk '{ printf(" %s:%3s%% \n", $1, $2) }'

View File

@@ -0,0 +1,76 @@
font_family DejaVu Sans Mono
bold_font auto
font_size 10
# The basic colors
foreground #CAD3F5
background #24273A
selection_foreground #24273A
selection_background #F4DBD6
# Cursor colors
cursor #F4DBD6
cursor_text_color #24273A
# URL underline color when hovering with mouse
url_color #F4DBD6
# Kitty window border colors
active_border_color #B7BDF8
inactive_border_color #6E738D
bell_border_color #EED49F
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #181926
active_tab_background #C6A0F6
inactive_tab_foreground #CAD3F5
inactive_tab_background #1E2030
tab_bar_background #181926
# Colors for marks (marked text in the terminal)
mark1_foreground #24273A
mark1_background #B7BDF8
mark2_foreground #24273A
mark2_background #C6A0F6
mark3_foreground #24273A
mark3_background #7DC4E4
# The 16 terminal colors
# black
color0 #494D64
color8 #5B6078
# red
color1 #ED8796
color9 #ED8796
# green
color2 #A6DA95
color10 #A6DA95
# yellow
color3 #EED49F
color11 #EED49F
# blue
color4 #8AADF4
color12 #8AADF4
# magenta
color5 #F5BDE6
color13 #F5BDE6
# cyan
color6 #8BD5CA
color14 #8BD5CA
# white
color7 #B8C0E0
color15 #A5ADCB

View File

@@ -0,0 +1 @@
{"locale": "en"}

View File

@@ -0,0 +1,6 @@
[mainwindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x2\x94\0\0\x1|\0\0\x4\xed\0\0\x3\x35\0\0\x2\x95\0\0\x1}\0\0\x4\xec\0\0\x3\x34\0\0\0\0\0\0\0\0\a\x80\0\0\x2\x95\0\0\x1}\0\0\x4\xec\0\0\x3\x34)
maximized=false
pos=@Point(660 380)
savestate=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x2X\0\0\x1\xb8\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
size=@Size(600 440)

View File

@@ -0,0 +1,5 @@
[Added Associations]
application/x-extension-html=google-chrome-unstable
[Default Applications]
application/x-extension-html=google-chrome-unstable

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

View File

@@ -0,0 +1,6 @@
require('basics')
require('globals')
require('keymappings')
require('plugins')
require('lsp-general')
require('post-plugin-basics')

View File

@@ -0,0 +1,100 @@
-- ================= Holy leader key ================= --
vim.g.mapleader = ','
-- ================= File management ================= --
-- swapfile has global & local config, eventhough help says otherwise
vim.o.swapfile = false -- can open already open files
vim.bo.swapfile = false
vim.o.backup = false
vim.o.writebackup = false
vim.o.autoread = true -- auto file change detection
-- autocmds are currently not supported by nvim (0.5 nighlty)
vim.api.nvim_command([[
" Triger `autoread` when files changes on disk
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif
" Notification after file change
autocmd FileChangedShellPost *
\ echohl WarningMsg | echo "File changed on disk. Buffer reloaded." | echohl None
]])
-- ================= Scrolling ================= --
vim.o.scrolloff = 8 -- start scrolling when 8 lines away from margins
-- ================= Indentation ================= --
-- pay attention to 'vim.bo' (buffer local options) and 'vim.o' (global options)
-- see :help options.txt
-- for some reason these values need to be set in both o and bo objects
-- eventhough these options are supposed to be local to buffer
vim.o.tabstop = 4 -- maximum width of tab character (measured in spaces)
vim.bo.tabstop = 4
vim.o.shiftwidth = 4 -- size of indent (measured in spaces), should equal tabstop
vim.bo.shiftwidth = 4
vim.o.softtabstop = 4 -- should be the same as the other two above
vim.bo.softtabstop = 4
vim.o.expandtab = true -- expand tabs to spaces
vim.bo.expandtab = true -- expand tabs to spaces
vim.o.smartindent = true -- smart indenting on new line for C-like programs
vim.bo.smartindent = true
vim.o.autoindent = true -- copy the indentation from previous line
vim.bo.autoindent = true
vim.o.smarttab = true -- tab infront of a line inserts blanks based on shiftwidth
-- ================= Number column ================= --
vim.wo.number = true
vim.cmd [[
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
augroup END
]] -- h/t https://jeffkreeftmeijer.com/vim-number/
-- ================= Search ================= --
vim.o.ignorecase = true -- Ignorecase when searching
vim.o.incsearch = true -- start searching on each keystroke
vim.o.smartcase = true -- ignore case when lowercase, match case when capital case is used
vim.o.hlsearch = true -- highlight the search results
-- ================= Performance ================= --
vim.o.lazyredraw = false -- useful for when executing macros.
vim.o.ttimeoutlen = 30 -- ms to wait for a key code seq to complete
-- ================= Misc ================= --
vim.wo.wrap = true -- wrap long text into multiple lines
vim.o.history = 10000 -- numbers of entries in history for ':' commands and search patterns (10000 = max)
vim.o.updatetime = 300 -- used for CursorHold event (for document highlighting detection)
vim.o.mouse = 'nv' -- allow mose in normal & visual mode
-- we want splits to be to the bottom and to the right
vim.o.splitright = true
vim.o.splitbelow = true
-- better autocomplete behaviour
-- menuone - show popup menu also when there is only one match available
-- preview - show extra information about currently selected completion
-- noinsert - do not insert any text for match until the user selects it from the menu
vim.o.completeopt='menuone,preview,noinsert'
-- allows hidden buffers
-- this means that a modified buffer doesn't need to be saved when changing
-- tabs/windows.
vim.o.hidden=true
-- Copy paste between vim and everything else
vim.o.clipboard = "unnamedplus"

View File

@@ -0,0 +1,2 @@
DATA_PATH = vim.fn.stdpath('data')
CACHE_PATH = vim.fn.stdpath('cache')

View File

@@ -0,0 +1,83 @@
-- defaults
local opts = { noremap = true, silent = true }
-- copy
vim.api.nvim_set_keymap('', '<C-c>', '"+y', opts)
-- paste
vim.api.nvim_set_keymap('', '<C-v>', '"+p', opts)
-- cut
vim.api.nvim_set_keymap('', '<C-x>', '"+d', opts)
-- paste in insert mode
vim.api.nvim_set_keymap('i', '<C-v>', '<Esc>"+pa', opts)
-- better tree
vim.api.nvim_set_keymap('n', '<C-b>', ":Lexplore<CR> :vertical resize 30<CR>", { noremap = true })
-- make the cursor stay on the same character when leaving insert mode
vim.api.nvim_set_keymap('i', 'ć', '<Esc>l', opts)
vim.api.nvim_set_keymap('i', 'Ć', '<Esc>l', opts)
-- make ctrl-shift arrows movement
vim.api.nvim_set_keymap('n', '<C-A-Up>', 'ddkP', opts)
vim.api.nvim_set_keymap('v', '<C-A-Up>', ':m \'<-2<CR>gv=gv', opts)
vim.api.nvim_set_keymap('n', '<C-A-Down>', 'ddp', opts)
vim.api.nvim_set_keymap('v', '<C-A-Down>', ':m \'>+1<CR>gv=gv', opts)
-- fast scrolling
--vim.api.nvim_set_keymap('n', '<C-Down>', '9j', opts)
--vim.api.nvim_set_keymap('n', '<C-Up>', '9k', opts)
--vim.api.nvim_set_keymap('v', '<C-Down>', '9j', opts)
--vim.api.nvim_set_keymap('v', '<C-Up>', '9k', opts)
-- stay in normal mode after inserting a new line
vim.api.nvim_set_keymap('', 'o', 'o <Bs><Esc>', opts)
vim.api.nvim_set_keymap('', 'O', 'O <Bs><Esc>', opts)
-- mapping that opens .vimrc in a new tab for quick editing
vim.api.nvim_set_keymap('n', '<Leader>ev', '<Cmd>tabe $MYVIMRC<CR>', opts)
-- mapping that sources the vimrc in the current filea doesn't work, should change all require calls to dofile
-- or clear all require cache and reimport
-- vim.api.nvim_set_keymap('n', '<Leader>sv', '<Cmd>lua dofile(vim.fn.stdpath(\'config\')..\'/init.lua\')<CR>', { noremap = true, silent = false })
-- Mapping U to Redo.
vim.api.nvim_set_keymap('', 'U', '<C-r>', opts)
vim.api.nvim_set_keymap('', '<C-r>', '<NOP>', opts)
-- indent via Tab
vim.api.nvim_set_keymap('n', '<Tab>', '>>_', opts)
vim.api.nvim_set_keymap('n', '<S-Tab>', '<<_', opts)
vim.api.nvim_set_keymap('v', '<Tab>', '>>_', opts)
vim.api.nvim_set_keymap('v', '<S-Tab>', '<<_', opts)
vim.api.nvim_set_keymap('i', '<Tab>', '\t', opts)
vim.api.nvim_set_keymap('i', '<S-Tab>', '\b', opts)
-- window movement
--vim.api.nvim_set_keymap('', '<C-w>j', '<C-w>h', opts)
--vim.api.nvim_set_keymap('', '<C-w>k', '<C-w>j', opts)
--vim.api.nvim_set_keymap('', '<C-w>l', '<C-w>k', opts)
--vim.api.nvim_set_keymap('', '<C-w>č', '<C-w>l', opts)
-- opening terminal with shortcut
vim.api.nvim_set_keymap('', '<Leader><CR>', '<Cmd>silent !$TERM &<CR>', opts)
-- jumping back and forth
vim.api.nvim_set_keymap('', '<C-K>', '<C-O>', opts)
vim.api.nvim_set_keymap('', '<C-L>', '<C-I>', opts)
-- LSP
vim.api.nvim_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
vim.api.nvim_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
vim.api.nvim_set_keymap('n', 'gt', '<Cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
vim.api.nvim_set_keymap('n', 'gi', '<Cmd>lua vim.lsp.buf.implementation()<CR>', opts)
vim.api.nvim_set_keymap('n', 'gf', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
-- usages replaced by LspSaga plugin
-- vim.api.nvim_set_keymap('n', 'ga', '<Cmd>lua vim.lsp.buf.code_action()<CR>', opts) -- eg. autoimport
-- vim.api.nvim_set_keymap('n', 'gn', '<Cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
-- vim.api.nvim_set_keymap('n', 'gN', '<Cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
-- vim.api.nvim_set_keymap('n', 'h', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
-- vim.api.nvim_set_keymap('n', 'gr', '<Cmd>lua vim.lsp.buf.rename()<CR>', opts)
-- autocomplete
-- if autocomplete popup menu opens pressing enter will complete the first match
--vim.api.nvim_set_keymap('i', '<Tab>', 'v:lua.smart_tab()', {expr = true, noremap = true})
vim.api.nvim_set_keymap('i', '<CR>', 'pumvisible() ? "<C-n><Esc>a" : "<CR>"', {expr = true, noremap = true, silent = true})

View File

@@ -0,0 +1,74 @@
local lsp_installer = require'nvim-lsp-installer'
local lsp_installer_servers = require'nvim-lsp-installer.servers'
-- install LSP servers
local function installServer(name)
local ok, server = lsp_installer_servers.get_server(name)
if ok then
if not server:is_installed() then
server:install()
end
end
end
local function installServers(names)
for _,name in pairs(names) do
installServer(name)
end
end
-- find a list of available ones here: https://github.com/williamboman/nvim-lsp-installer
installServers({'angularls', 'bashls', 'dockerls', 'sumneko_lua', 'pyright', 'jsonls', 'cssls', 'tsserver'})
-- setup installed servers
lsp_installer.on_server_ready(function(server)
local opts = {}
-- (optional) Customize the options passed to the server
-- if server.name == "tsserver" then
-- opts.root_dir = function() ... end
-- end
if server.name == 'sumneko_lua' then
opts = require'lsp-server-config.lua'
end
-- This setup() function is exactly the same as lspconfig's setup function.
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/ADVANCED_README.md
server:setup(opts)
end)
-- diagnostic symbols
local signs = { Error = "", Warn = "", Hint = "", Info = ""}
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
-- completion symbols
vim.lsp.protocol.CompletionItemKind = {
"  (Text) ",
"  (Method)",
"  (Function)",
"  (Constructor)",
" ﴲ (Field)",
"[] (Variable)",
"  (Class)",
" ﰮ (Interface)",
"  (Module)",
" 襁 (Property)",
"  (Unit)",
"  (Value)",
" 練 (Enum)",
"  (Keyword)",
"  (Snippet)",
"  (Color)",
"  (File)",
"  (Reference)",
"  (Folder)",
"  (EnumMember)",
" ﲀ (Constant)",
" ﳤ (Struct)",
"  (Event)",
"  (Operator)",
"  (TypeParameter)"
}

View File

@@ -0,0 +1,18 @@
local opts = {
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
},
maxPreload = 100000,
preloadFileSize = 10000,
},
},
},
}
return opts

View File

@@ -0,0 +1,159 @@
require('dressing').setup({
input = {
-- Set to false to disable the vim.ui.input implementation
enabled = true,
-- Default prompt string
default_prompt = "Input:",
-- Can be 'left', 'right', or 'center'
prompt_align = "center",
-- When true, <Esc> will close the modal
insert_only = true,
-- When true, input will start in insert mode.
start_in_insert = true,
-- These are passed to nvim_open_win
anchor = "SW",
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "cursor",
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
prefer_width = 40,
width = nil,
-- min_width and max_width can be a list of mixed types.
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
max_width = { 140, 0.9 },
min_width = { 20, 0.2 },
buf_options = {},
win_options = {
-- Window transparency (0-100)
winblend = 10,
-- Disable line wrapping
wrap = false,
},
-- Set to `false` to disable
mappings = {
n = {
["<Esc>"] = "Close",
["<CR>"] = "Confirm",
},
i = {
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
["<Up>"] = "HistoryPrev",
["<Down>"] = "HistoryNext",
},
},
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end,
-- see :help dressing_get_config
get_config = nil,
},
select = {
-- Set to false to disable the vim.ui.select implementation
enabled = true,
-- Priority list of preferred vim.select implementations
backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
-- Trim trailing `:` from prompt
trim_prompt = true,
-- Options for telescope selector
-- These are passed into the telescope picker directly. Can be used like:
-- telescope = require('telescope.themes').get_ivy({...})
telescope = nil,
-- Options for fzf selector
fzf = {
window = {
width = 0.5,
height = 0.4,
},
},
-- Options for fzf_lua selector
fzf_lua = {
winopts = {
width = 0.5,
height = 0.4,
},
},
-- Options for nui Menu
nui = {
position = "50%",
size = nil,
relative = "editor",
border = {
style = "rounded",
},
buf_options = {
swapfile = false,
filetype = "DressingSelect",
},
win_options = {
winblend = 10,
},
max_width = 80,
max_height = 40,
min_width = 40,
min_height = 10,
},
-- Options for built-in selector
builtin = {
-- These are passed to nvim_open_win
anchor = "NW",
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "editor",
buf_options = {},
win_options = {
-- Window transparency (0-100)
winblend = 10,
},
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- the min_ and max_ options can be a list of mixed types.
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
width = nil,
max_width = { 140, 0.8 },
min_width = { 40, 0.2 },
height = nil,
max_height = 0.9,
min_height = { 10, 0.2 },
-- Set to `false` to disable
mappings = {
["<Esc>"] = "Close",
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
},
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end,
},
-- Used to override format_item. See :help dressing-format
format_item_override = {},
-- see :help dressing_get_config
get_config = nil,
},
})

View File

@@ -0,0 +1,284 @@
local gl = require('galaxyline')
local section = gl.section
local condition = require('galaxyline.condition')
-- TODO: move to util - credit to kraftwerk28/dotfiles
local function u(code)
if type(code) == 'string' then code = tonumber('0x' .. code) end
local c = string.char
if code <= 0x7f then return c(code) end
local t = {}
if code <= 0x07ff then
t[1] = c(bit.bor(0xc0, bit.rshift(code, 6)))
t[2] = c(bit.bor(0x80, bit.band(code, 0x3f)))
elseif code <= 0xffff then
t[1] = c(bit.bor(0xe0, bit.rshift(code, 12)))
t[2] = c(bit.bor(0x80, bit.band(bit.rshift(code, 6), 0x3f)))
t[3] = c(bit.bor(0x80, bit.band(code, 0x3f)))
else
t[1] = c(bit.bor(0xf0, bit.rshift(code, 18)))
t[2] = c(bit.bor(0x80, bit.band(bit.rshift(code, 12), 0x3f)))
t[3] = c(bit.bor(0x80, bit.band(bit.rshift(code, 6), 0x3f)))
t[4] = c(bit.bor(0x80, bit.band(code, 0x3f)))
end
return table.concat(t)
end
-- li - line icon
local li = {
-- block
b = '',
-- bottom left
bl = u'e0b8', -- '',
-- bottom right
br = u'e0ba', -- '',
-- top left
tl = u'e0bc', -- '',
-- top right
tr = u'e0be' -- '',
}
-- taken from LunarVim
local colors = {
bg = '#292D38',
yellow = '#FFEB68',
dark_yellow = '#D7BA7D',
cyan = '#4EC9B0',
green = '#608B4E',
light_green = '#B5CEA8',
string_orange = '#CE9178',
orange = '#FF8800',
purple = '#C586C0',
magenta = '#D16D9E',
grey = '#858585',
blue = '#569CD6',
vivid_blue = '#4FC1FF',
light_blue = '#9CDCFE',
red = '#D16969',
error_red = '#F44747',
info_yellow = '#FFCC66',
white = '#FFFFFF'
}
-- list of windows for which short line will be used
-- short line is just a shorter status line. it's normally used in
-- places where it's not really needed/desired
gl.short_line_list = {'NvimTree', 'vista', 'dbui', 'packer'}
-- first section to the left will be a colored block shape that will
-- tell in which mode we're in
section.left[1] = {
ViMode = {
provider = function()
-- define color for each mode
local mode_color = {
n = colors.blue, -- normal
i = colors.grey, -- insert
v = colors.purple, -- visual
[''] = colors.purple, -- visual block
V = colors.purple, -- visual line
c = colors.dark_yellow, -- command
no = colors.blue, -- normal ??
s = colors.orange, -- select ??
S = colors.orange, -- select line ??
[''] = colors.orange, -- select block??
ic = colors.yellow,
R = colors.red, -- Replace
Rv = colors.red, -- replace visual?
cv = colors.blue, -- command ??
ce = colors.blue, -- command ??
r = colors.cyan, -- ??
rm = colors.cyan, -- ??
['r?'] = colors.cyan,
['!'] = colors.blue,
t = colors.blue
}
-- set color with nvim command
vim.api.nvim_command('hi GalaxyViMode guifg=' .. mode_color[vim.fn.mode()])
-- returns the text that will be displayed in this section
return li.b..li.tl..' '
end,
highlight = {colors.red, colors.bg}
}
}
-- git branch icon
section.left[2] = {
GitIcon = {
-- main text
provider = function()
return ''
end,
-- enable only if vim is open in git workspace
condition = condition.check_git_workspace,
-- separator is the stuff after the main text
separator = ' ',
-- separator foreground & background color
separator_highlight = {'NONE', colors.bg},
-- main text foreground & background color
highlight = {colors.orange, colors.bg}
}
}
-- git branch name
section.left[3] = {
GitBranch = {
provider = 'GitBranch',
-- enable only if vim is open in git workspace
condition = condition.check_git_workspace,
separator = ' ',
separator_highlight = {'NONE', colors.bg},
highlight = {colors.grey, colors.bg}
}
}
-- git added files
section.left[4] = {
DiffAdd = {
provider = 'DiffAdd',
condition = condition.hide_in_width,
icon = '',
highlight = {colors.green, colors.bg}
}
}
-- git modified files
section.left[5] = {
DiffModified = {
provider = 'DiffModified',
condition = condition.hide_in_width,
icon = '',
highlight = {colors.blue, colors.bg}
}
}
-- git removed files
section.left[6] = {
DiffRemove = {
provider = 'DiffRemove',
condition = condition.hide_in_width,
icon = '',
highlight = {colors.red, colors.bg}
}
}
-- diagnostics
section.right[1] = {
DiagnosticError = {
provider = 'DiagnosticError',
icon = '',
highlight = {colors.error_red, colors.bg}
}
}
section.right[2] = {
DiagnosticWarn = {
provider = 'DiagnosticWarn',
icon = '',
highlight = {colors.orange, colors.bg}
}
}
section.right[3] = {
DiagnosticHint = {
provider = 'DiagnosticHint',
icon = '',
highlight = {colors.vivid_blue, colors.bg}
}
}
section.right[4] = {
DiagnosticInfo = {
provider = 'DiagnosticInfo',
icon = '',
highlight = {
colors.info_yellow,
colors.bg
}
}
}
-- cosmetics
section.right[5] = {
Space2 = {
provider = function()
return li.br..li.b
end,
separator = ' ',
separator_highlight = {'NONE', colors.bg},
highlight = {colors.white, colors.bg}
}
}
-- lsp info
section.right[7] = {
ShowLspClient = {
provider = 'GetLspClient',
condition = function()
local tbl = {['dashboard'] = true, [' '] = true}
if tbl[vim.bo.filetype] then return false end
return true
end,
separator = ' ',
separator_highlight = {colors.grey, colors.white},
icon = '',
highlight = {colors.grey, colors.white}
}
}
-- file type
section.right[8] = {
BufferType = {
provider = 'FileTypeName',
separator = li.b..li.tl..' ',
separator_highlight = {colors.white, colors.bg},
highlight = {colors.grey, colors.bg}
}
}
section.right[9] = {
FileEncode = {
provider = 'FileEncode',
condition = condition.hide_in_width,
separator = ' ',
separator_highlight = {'NONE', colors.bg},
highlight = {colors.grey, colors.bg}
}
}
-- cosmetics: right dash
section.right[10] = {
LastDash = {
provider = function()
return li.tr..li.b
end,
separator = ' ',
separator_highlight = {'NONE', colors.bg},
highlight = {colors.white, colors.bg}
}
}
-- short line settings
section.short_line_left[1] = {
BufferType = {
provider = 'FileTypeName',
separator = ' ',
separator_highlight = {'NONE', colors.bg},
highlight = {colors.grey, colors.bg}
}
}
section.short_line_left[2] = {
SFileName = {
provider = 'SFileName',
condition = condition.buffer_not_empty,
highlight = {
colors.grey,
colors.bg
}
}
}
section.short_line_right[1] = {
BufferIcon = {
provider = 'BufferIcon',
highlight = {
colors.grey,
colors.bg
}
}
}

View File

@@ -0,0 +1,56 @@
require('gitsigns').setup {
keymaps = {
-- Default keymap options
noremap = tue,
buffer = true,
['n <leader>hn'] = { expr = true, "&diff ? '<leader>hn' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
['n <leader>hN'] = { expr = true, "&diff ? '<leader>hN' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
['n <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
['n <leader>hu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
['n <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
['n <leader>hR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
['n <leader>hp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
['n <leader>hb'] = '<cmd>lua require"gitsigns".blame_line()<CR>',
},
signs = {
add = {hl = 'GitSignsAdd' , text = '', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
interval = 1000,
follow_files = true
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 100,
ignore_whitespace = false,
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000,
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
yadm = {
enable = false
},
}

View File

@@ -0,0 +1,8 @@
-- settings for both plugins:
-- 'lukas-reineke/indent-blankline.nvim'
-- 'Yggdroot/indentLine'
vim.api.nvim_command("let g:indentLine_char = '⎸'")
vim.api.nvim_command("let g:indentLine_fileTypeExclude = ['text', 'markdown', 'help']")
vim.api.nvim_command("let g:indentLine_bufNameExclude = ['STARTIFY', 'NVIMTREE']")
vim.api.nvim_command("let g:indent_blankline_extra_indent_level = -1")

View File

@@ -0,0 +1,7 @@
-- Lua
require('lsp-colors').setup({
Error = '#F44747',
Warning = '#FF8800',
Hint = '#4FC1FF',
Information = '#FFCC66'
})

View File

@@ -0,0 +1,40 @@
local opts = {silent = true, noremap = true}
vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>TroubleToggle<cr>", opts)
require('trouble').setup{
position = "bottom", -- position of the list can be: bottom, top, left, right
icons = true, -- use devicons for filenames
mode = "document_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
fold_open = "", -- icon used for open folds
fold_closed = "", -- icon used for closed folds
group = true, -- group results by file
padding = true, -- add an extra new line on top of the list
action_keys = { -- key mappings for actions in the trouble list
close = "q", -- close the list
cancel = {"ć", "Ć"}, -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh
jump = {"<cr>", "<tab>"}, -- jump to the diagnostic or open / close folds
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
toggle_preview = "P", -- toggle auto_preview
hover = "H", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location
close_folds = {"zM", "zm"}, -- close all folds
open_folds = {"zR", "zr"}, -- open all folds
toggle_fold = {"zA", "za"}, -- toggle fold of current file
previous = "l", -- preview item
next = "k" -- next item
},
indent_lines = true, -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics
auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
auto_fold = false, -- automatically fold a file trouble list at creation
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
information = "",
other = ""
},
use_diagnostic_signs = true -- enabling this will use the signs defined in your lsp client
}

View File

@@ -0,0 +1,64 @@
local keymap = vim.keymap.set
-- LSP finder - Find the symbol's definition
-- If there is no definition, it will instead be hidden
-- When you use an action in finder like "open vsplit",
-- you can use <C-t> to jump back
keymap("n", "gh", "<cmd>Lspsaga lsp_finder<CR>")
-- Code action
keymap({"n","v"}, "<leader>ca", "<cmd>Lspsaga code_action<CR>")
-- Rename all occurrences of the hovered word for the entire file
keymap("n", "gr", "<cmd>Lspsaga rename<CR>")
-- Rename all occurrences of the hovered word for the selected files
keymap("n", "gr", "<cmd>Lspsaga rename ++project<CR>")
-- Peek definition
-- You can edit the file containing the definition in the floating window
-- It also supports open/vsplit/etc operations, do refer to "definition_action_keys"
-- It also supports tagstack
-- Use <C-t> to jump back
keymap("n", "gp", "<cmd>Lspsaga peek_definition<CR>")
-- Go to definition
keymap("n", "gd", "<cmd>Lspsaga goto_definition<CR>")
-- Diagnostic jump
-- You can use <C-o> to jump back to your previous location
keymap("n", "[e", "<cmd>Lspsaga diagnostic_jump_prev<CR>")
keymap("n", "]e", "<cmd>Lspsaga diagnostic_jump_next<CR>")
-- Diagnostic jump with filters such as only jumping to an error
keymap("n", "[E", function()
require("lspsaga.diagnostic"):goto_prev({ severity = vim.diagnostic.severity.ERROR })
end)
keymap("n", "]E", function()
require("lspsaga.diagnostic"):goto_next({ severity = vim.diagnostic.severity.ERROR })
end)
-- Toggle outline
keymap("n","<leader>o", "<cmd>Lspsaga outline<CR>")
-- Hover Doc
-- If there is no hover doc,
-- there will be a notification stating that
-- there is no information available.
-- To disable it just use ":Lspsaga hover_doc ++quiet"
-- Pressing the key twice will enter the hover window
keymap("n", "K", "<cmd>Lspsaga hover_doc<CR>")
-- If you want to keep the hover window in the top right hand corner,
-- you can pass the ++keep argument
-- Note that if you use hover with ++keep, pressing this key again will
-- close the hover window. If you want to jump to the hover window
-- you should use the wincmd command "<C-w>w"
keymap("n", "K", "<cmd>Lspsaga hover_doc ++keep<CR>")
-- Call hierarchy
keymap("n", "<Leader>ci", "<cmd>Lspsaga incoming_calls<CR>")
keymap("n", "<Leader>co", "<cmd>Lspsaga outgoing_calls<CR>")
-- Floating terminal
keymap({"n", "t"}, "<A-d>", "<cmd>Lspsaga term_toggle<CR>")

View File

@@ -0,0 +1,38 @@
local status, starter = pcall(require, "mini.starter")
if not status then
return
end
starter.setup({
content_hooks = {
starter.gen_hook.adding_bullet(""),
starter.gen_hook.aligning("center", "center"),
},
evaluate_single = true,
footer = os.date(),
header = table.concat({
[[██████╗ ███████╗███╗ ██╗██╗ ██╗██╗███╗ ███╗]],
[[██╔══██╗██╔════╝████╗ ██║██║ ██║██║████╗ ████║]],
[[██████╔╝█████╗ ██╔██╗ ██║██║ ██║██║██╔████╔██║]],
[[██╔══██╗██╔══╝ ██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║]],
[[██████╔╝███████╗██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║]],
[[╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]],
[[─────────────────────────────────────────────────]],
}, "\n"),
query_updaters = [[abcdefghilmoqrstuvwxyz0123456789_-,.ABCDEFGHIJKLMOQRSTUVWXYZ]],
items = {
{ action = "PackerSync", name = "U: Update Plugins", section = "Plugins" },
{ action = "enew", name = "E: New Buffer", section = "Builtin actions" },
{ action = "qall!", name = "Q: Quit Neovim", section = "Builtin actions" },
},
})
vim.cmd([[
augroup MiniStarterJK
au!
au User MiniStarterOpened nmap <buffer> j <Cmd>lua MiniStarter.update_current_item('next')<CR>
au User MiniStarterOpened nmap <buffer> k <Cmd>lua MiniStarter.update_current_item('prev')<CR>
au User MiniStarterOpened nmap <buffer> <C-p> <Cmd>Telescope find_files<CR>
au User MiniStarterOpened nmap <buffer> <C-n> <Cmd>Telescope file_browser<CR>
augroup END
]])

View File

@@ -0,0 +1,18 @@
require("noice").setup({
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})

View File

@@ -0,0 +1,58 @@
-- TODO( fix
local cmp = require'cmp'
cmp.setup({
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
end,
},
mapping = {
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' }, -- For vsnip users.
}, {
{ name = 'buffer' },
})
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline('/', {
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
-- Setup lspconfig.
-- local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
-- require('lspconfig')['<YOUR_LSP_SERVER>'].setup {
--capabilities = capabilities
-- }

View File

@@ -0,0 +1,67 @@
-- local opts = {silent = true, noremap = true}
-- vim.api.nvim_set_keymap('n', '<C-n>', '<Cmd>NvimTreeToggle<CR>', opts)
-- vim.api.nvim_set_keymap('n', '<leader>r', '<Cmd>NvimTreeRefresh<CR>', opts)
-- -- find the currently open file in tree
-- vim.api.nvim_set_keymap('n', '<leader>n', '<Cmd>NvimTreeFindFile<CR>', opts)
-- local tree_cb = require'nvim-tree.config'.nvim_tree_callback
-- local list = {
-- { key = "<C-t>", cb = tree_cb("tabnew") },
-- { key = "<CR>", cb = tree_cb("edit") },
-- { key = "o", cb = tree_cb("edit") },
-- { key = "<2-LeftMouse>", cb = tree_cb("edit") },
-- { key = "<2-RightMouse>", cb = tree_cb("cd") },
-- { key = "<Tab>", cb = tree_cb("preview") },
-- { key = "R", cb = tree_cb("refresh") },
-- { key = "a", cb = tree_cb("create") },
-- { key = "d", cb = tree_cb("remove") },
-- { key = "r", cb = tree_cb("rename") },
-- { key = "x", cb = tree_cb("cut") },
-- { key = "y", cb = tree_cb("copy") },
-- { key = "p", cb = tree_cb("paste") },
-- { key = "<", cb = tree_cb("dir_up") },
-- { key = "q", cb = tree_cb("close") }
-- }
-- require'nvim-tree'.setup {
-- disable_netrw = true,
-- hijack_netrw = true,
-- open_on_setup = false,
-- ignore_ft_on_setup = {},
-- open_on_tab = false,
-- hijack_cursor = false,
-- update_cwd = false,
-- diagnostics = {
-- enable = false,
-- icons = {
-- hint = "",
-- info = "",
-- warning = "",
-- error = "",
-- }
-- },
-- update_focused_file = {
-- enable = false,
-- update_cwd = false,
-- ignore_list = {}
-- },
-- system_open = {
-- cmd = nil,
-- args = {}
-- },
-- filters = {
-- dotfiles = false,
-- custom = {}
-- },
-- view = {
-- width = 30,
-- height = 30,
-- hide_root_folder = false,
-- side = 'left',
-- mappings = {
-- custom_only = false,
-- list = list,
-- }
-- }
-- }

View File

@@ -0,0 +1,8 @@
require'nvim-treesitter.configs'.setup {
-- will install treesitter for all available languages
ensure_installed = 'all',
ignore_install = {'haskell'}, -- broken
highlight = {
enable = true
}
}

View File

@@ -0,0 +1,62 @@
require('smart-splits').setup({
-- Ignored filetypes (only while resizing)
ignored_filetypes = {
'nofile',
'quickfix',
'prompt',
},
-- Ignored buffer types (only while resizing)
ignored_buftypes = { 'NvimTree' },
-- the default number of lines/columns to resize by at a time
default_amount = 3,
-- whether to wrap to opposite side when cursor is at an edge
-- e.g. by default, moving left at the left edge will jump
-- to the rightmost window, and vice versa, same for up/down.
wrap_at_edge = true,
-- when moving cursor between splits left or right,
-- place the cursor on the same row of the *screen*
-- regardless of line numbers. False by default.
-- Can be overridden via function parameter, see Usage.
move_cursor_same_row = false,
-- resize mode options
resize_mode = {
-- key to exit persistent resize mode
quit_key = '<ESC>',
-- keys to use for moving in resize mode
-- in order of left, down, up' right
resize_keys = { 'Left', 'Down', 'Up', 'Right' },
-- set to true to silence the notifications
-- when entering/exiting persistent resize mode
silent = false,
-- must be functions, they will be executed when
-- entering or exiting the resize mode
hooks = {
on_enter = nil,
on_leave = nil,
},
},
-- ignore these autocmd events (via :h eventignore) while processing
-- smart-splits.nvim computations, which involve visiting different
-- buffers and windows. These events will be ignored during processing,
-- and un-ignored on completed. This only applies to resize events,
-- not cursor movement events.
ignored_events = {
'BufEnter',
'WinEnter',
},
-- enable or disable the tmux integration
tmux_integration = true,
-- disable tmux navigation if current tmux pane is zoomed
disable_tmux_nav_when_zoomed = true,
})
vim.keymap.set('n', '<A-Left>', require('smart-splits').resize_left)
vim.keymap.set('n', '<A-Down>', require('smart-splits').resize_down)
vim.keymap.set('n', '<A-Up>', require('smart-splits').resize_up)
vim.keymap.set('n', '<A-Right>', require('smart-splits').resize_right)
-- moving between splits
vim.keymap.set('n', '<C-Left>', require('smart-splits').move_cursor_left)
vim.keymap.set('n', '<C-Down>', require('smart-splits').move_cursor_down)
vim.keymap.set('n', '<C-Up>', require('smart-splits').move_cursor_up)
vim.keymap.set('n', '<C-Right>', require('smart-splits').move_cursor_right)

View File

@@ -0,0 +1,64 @@
-- Find files using lua fuctions
local opts = { silent = true, noremap = true }
vim.api.nvim_set_keymap('n', '<Leader>ff', "<Cmd>lua require'telescope.builtin'.find_files()<CR>", {silent=false, noremap=true})
vim.api.nvim_set_keymap('n', '<Leader>fg', "<Cmd>lua require'telescope.builtin'.live_grep()<CR>", opts)
vim.api.nvim_set_keymap('n', '<Leader>fb', "<Cmd>lua require'telescope.builtin'.buffers()<CR>", opts)
vim.api.nvim_set_keymap('n', '<Leader>fh', "<Cmd>lua require'telescope.builtin'.help_tags()<CR>", opts)
local actions = require('telescope.actions')
require('telescope').setup {
defaults = {
-- program to use for searching with its arguments
find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'},
-- prompt_position = 'top', -- have prompt at the top (has no effect on vertical configuration)
prompt_prefix = '', -- symbol on prompt window
selection_caret = '', -- symbol on selected row in results window
entry_prefix = ' ', -- symbol on non-selected rows in results window
initial_mode = 'insert', -- start in insert mode
selection_strategy = 'reset', -- what happens to selection when list changes
sorting_strategy = 'ascending', -- start with most important search on top
layout_strategy = 'vertical', -- vertical layout
layout_config = {
vertical = {
mirror = true, -- windows should be in this order from top to bottom: search, results, preview
preview_height = 0.5 -- preview window takes 0.5 of the total window height
}
},
file_sorter = require'telescope.sorters'.get_fuzzy_file,
file_ignore_patterns = {'node_modules/.*'}, -- never search in node_modules/ dir
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
display_path = true,
winblend = 0, -- window should not be transparent
border = {}, -- no border?
borderchars = {'', '', '', '', '', '', '', ''}, -- border chars
color_devicons = true, -- colorize used icons
use_less = true, -- less is bash program for preview file contents
set_env = {['COLORTERM'] = 'truecolor'}, -- use all the colors
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker,
-- preview_cutoff = 120,
mappings = {
i = {
['<C-k>'] = actions.move_selection_next,
['<C-l>'] = actions.move_selection_previous,
['<C-q>'] = actions.smart_send_to_qflist + actions.open_qflist,
['<C-d>'] = 'delete_buffer',
['<CR>'] = actions.select_default + actions.center,
},
n = {
['<C-k>'] = actions.move_selection_next,
['<C-l>'] = actions.move_selection_previous,
['<C-q>'] = actions.smart_send_to_qflist + actions.open_qflist,
['<C-d>'] = 'delete_buffer',
}
}
},
extensions = {
fzy_native = {
override_generic_sorter = false,
override_file_sorter = true,
}
}
}

View File

@@ -0,0 +1,165 @@
local fn = vim.fn
local installPath = DATA_PATH..'/site/pack/packer/start/packer.nvim'
-- install packer if it's not installed already
local packerBootstrap = nil
if fn.empty(fn.glob(installPath)) > 0 then
packerBootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', installPath})
vim.cmd [[packadd packer.nvim]]
end
local packer = require('packer').startup(function(use)
-- Packer should manage itself
use 'wbthomason/packer.nvim'
-- QUALITY OF LIFE INTEGRATIONS
-- git integration
use {
'lewis6991/gitsigns.nvim',
requires = {
'nvim-lua/plenary.nvim'
}
}
-- speedy searching
use 'ggandor/leap.nvim'
-- telescope - searching / navigation
use {
'nvim-telescope/telescope.nvim',
requires = { {'nvim-lua/plenary.nvim'} }
}
-- better hotfix window (for showing and searching through results in telescope's find usages)
use {"kevinhwang91/nvim-bqf"}
-- better highlighting
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
-- better split navigation
use 'mrjones2014/smart-splits.nvim'
-- gorbit's codewindow
use {
'gorbit99/codewindow.nvim',
config = function()
local codewindow = require('codewindow')
codewindow.setup()
codewindow.apply_default_keybinds()
end,
}
-- surround vim
use 'tpope/vim-surround'
-- nerd commenter
use 'scrooloose/nerdcommenter'
-- nice diagnostic pane on the bottom
use 'folke/lsp-trouble.nvim'
-- support the missing lsp diagnostic colors
use 'folke/lsp-colors.nvim'
-- better LSP UI (for code actions, rename etc.)
use({
"glepnir/lspsaga.nvim",
branch = "main",
config = function()
require("lspsaga").setup({})
end,
requires = { {"nvim-tree/nvim-web-devicons"} }
})
-- better find and replace
use 'nvim-lua/plenary.nvim'
use 'windwp/nvim-spectre'
-- VISUAL CHANGES
-- start page
use 'echasnovski/mini.starter'
-- status line
use 'glepnir/galaxyline.nvim'
-- colorscheme
use { 'catppuccin/nvim', as = 'catppuccin' }
-- nicer looking tab display
use 'lukas-reineke/indent-blankline.nvim'
use 'echasnovski/mini.indentscope'
-- show startup time
use 'dstein64/vim-startuptime'
-- UX improvements
use({
"folke/noice.nvim",
requires = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
}
})
use 'stevearc/dressing.nvim'
use 'rcarriga/nvim-notify'
-- FUNCTIONAL CODING STUFF
-- lsp config
use {
'neovim/nvim-lspconfig',
'williamboman/nvim-lsp-installer',
}
-- for LSP autocompletion
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-cmdline'
use 'hrsh7th/nvim-cmp'
-- For vsnip users.
use 'hrsh7th/cmp-vsnip'
use 'hrsh7th/vim-vsnip'
-- highlight variables under cursor
use 'RRethy/vim-illuminate'
-- this will automatically install listed dependencies
-- only the first time NeoVim is opened, because that's when Packer gets installed
if packerBootstrap then
require('packer').sync()
end
end)
require('leap').add_default_mappings()-- small plugin pre-init goes here
require("indent_blankline").setup {
char = "",
filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" },
--show_current_context = true,
--show_current_context_start = true,
}
require('mini.indentscope').setup({
symbol = "",
options = { try_as_border = true },
})
-- plugin specific configs go here
require('plugin-config/nvim-cmp')
require('plugin-config/telescope')
require('plugin-config/nvim-treesitter')
require('plugin-config/lsp-trouble')
require('plugin-config/lspsaga')
require('plugin-config/galaxyline')
require('plugin-config/gitsigns')
require('plugin-config/indent-guide-lines')
require('plugin-config/dressing')
require('plugin-config/noice')
require('plugin-config/ministarter')
require('plugin-config/smart-splits')
return packer

View File

@@ -0,0 +1,8 @@
-- ################# Basic settings dependent on plugins ################ --
-- ================= Visualization ================= --
vim.o.termguicolors = true
vim.o.background = 'dark'
vim.cmd('colorscheme catppuccin-macchiato')

View File

@@ -0,0 +1,284 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
catppuccin = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/catppuccin",
url = "https://github.com/catppuccin/nvim"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-cmdline"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
url = "https://github.com/hrsh7th/cmp-cmdline"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-path"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
["cmp-vsnip"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-vsnip",
url = "https://github.com/hrsh7th/cmp-vsnip"
},
["codewindow.nvim"] = {
config = { "\27LJ\2\nW\0\0\3\0\4\0\b6\0\0\0'\2\1\0B\0\2\0029\1\2\0B\1\1\0019\1\3\0B\1\1\1K\0\1\0\27apply_default_keybinds\nsetup\15codewindow\frequire\0" },
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/codewindow.nvim",
url = "https://github.com/gorbit99/codewindow.nvim"
},
["dressing.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/dressing.nvim",
url = "https://github.com/stevearc/dressing.nvim"
},
["galaxyline.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/galaxyline.nvim",
url = "https://github.com/glepnir/galaxyline.nvim"
},
["gitsigns.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
url = "https://github.com/lewis6991/gitsigns.nvim"
},
["indent-blankline.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
},
["leap.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/leap.nvim",
url = "https://github.com/ggandor/leap.nvim"
},
["lsp-colors.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim",
url = "https://github.com/folke/lsp-colors.nvim"
},
["lsp-trouble.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/lsp-trouble.nvim",
url = "https://github.com/folke/lsp-trouble.nvim"
},
["lspsaga.nvim"] = {
config = { "\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\flspsaga\frequire\0" },
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
url = "https://github.com/glepnir/lspsaga.nvim"
},
["mini.indentscope"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/mini.indentscope",
url = "https://github.com/echasnovski/mini.indentscope"
},
["mini.starter"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/mini.starter",
url = "https://github.com/echasnovski/mini.starter"
},
nerdcommenter = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nerdcommenter",
url = "https://github.com/scrooloose/nerdcommenter"
},
["noice.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/noice.nvim",
url = "https://github.com/folke/noice.nvim"
},
["nui.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nui.nvim",
url = "https://github.com/MunifTanjim/nui.nvim"
},
["nvim-bqf"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-bqf",
url = "https://github.com/kevinhwang91/nvim-bqf"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lsp-installer"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
url = "https://github.com/williamboman/nvim-lsp-installer"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-notify"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-notify",
url = "https://github.com/rcarriga/nvim-notify"
},
["nvim-spectre"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-spectre",
url = "https://github.com/windwp/nvim-spectre"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["smart-splits.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/smart-splits.nvim",
url = "https://github.com/mrjones2014/smart-splits.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["vim-illuminate"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-illuminate",
url = "https://github.com/RRethy/vim-illuminate"
},
["vim-startuptime"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-startuptime",
url = "https://github.com/dstein64/vim-startuptime"
},
["vim-surround"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-surround",
url = "https://github.com/tpope/vim-surround"
},
["vim-vsnip"] = {
loaded = true,
path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-vsnip",
url = "https://github.com/hrsh7th/vim-vsnip"
}
}
time([[Defining packer_plugins]], false)
-- Config for: lspsaga.nvim
time([[Config for lspsaga.nvim]], true)
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\flspsaga\frequire\0", "config", "lspsaga.nvim")
time([[Config for lspsaga.nvim]], false)
-- Config for: codewindow.nvim
time([[Config for codewindow.nvim]], true)
try_loadstring("\27LJ\2\nW\0\0\3\0\4\0\b6\0\0\0'\2\1\0B\0\2\0029\1\2\0B\1\1\0019\1\3\0B\1\1\1K\0\1\0\27apply_default_keybinds\nsetup\15codewindow\frequire\0", "config", "codewindow.nvim")
time([[Config for codewindow.nvim]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end

View File

@@ -0,0 +1,8 @@
[window]
width=1902
height=2336
sinkInputType=1
sourceOutputType=0
sinkType=0
sourceType=1
showVolumeMeters=1

View File

@@ -0,0 +1,64 @@
<h3 align="center">
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
Catppuccin for <a href="https://github.com/catppuccin/rofi">Rofi - Deathemonic Theme</a>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
</h3>
<p align="center">
<a href="https://github.com/catppuccin/rofi/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/rofi?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/rofi/issues"><img src="https://img.shields.io/github/issues/catppuccin/rofi?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/rofi/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/rofi?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/catppuccin/rofi/main/assets/deathemonic-rofi-launcher.png"/></br>
<img src="https://raw.githubusercontent.com/catppuccin/rofi/main/assets/deathemonic-rofi-powermenu.png"/></br>
<img src="https://raw.githubusercontent.com/catppuccin/rofi/main/assets/deathemonic-rofi-runmenu.png"/></br>
<img src="https://raw.githubusercontent.com/catppuccin/rofi/main/assets/deathemonic-rofi-screenshot.png"/></br>
</p>
## Usage
1. Clone this repository locally
```sh
git clone https://github.com/catppuccin/rofi && cd rofi/deathemonic
```
2. Copy the content of this Theme to Rofi's config location
```sh
cp -r * ~/.config/rofi
```
3. Open Rofi with your Shortcutmanager (in this case sxhkd)
```sh
super + {d,r,p,s}
sh $HOME/.config/rofi/bin/{launcher,runner,powermenu,screenshot}
```
### Keybinds
Key | Action |
|---|---|
|Meta + D | Open the Launcher |
|Meta + R| Open the Run Menu (Run Commands without opening a terminal)|
|Meta + P | Open the Powermenu |
|Meta + S | Open the Screenshot Menu |
## 💝 Thanks to
- [Deathemonic](https://github.com/Deathemonic)
- [justTOBBI](https://github.com/justTOBBI)
&nbsp;
<p align="center">
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" />
</p>
<p align="center">
Copyright &copy; 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
</p>
<p align="center">
<a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
</p>

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
rofi \
-show drun \
-modi run,drun,ssh \
-scroll-method 0 \
-drun-match-fields all \
-drun-display-format "{name}" \
-no-drun-show-actions \
-terminal kitty \
-kb-cancel Alt-F1 \
-theme "$HOME"/.config/rofi/config/launcher.rasi

119
common/.config/rofi/bin/powermenu Executable file
View File

@@ -0,0 +1,119 @@
#!/usr/bin/env bash
rofi_command="rofi -theme $HOME/.config/rofi/config/powermenu.rasi"
uptime=$(uptime -p | sed -e 's/up //g')
# Options
if [[ "$DIR" == "powermenus" ]]; then
shutdown=""
reboot=""
lock=""
suspend=""
logout=""
ddir="$HOME/.config/rofi/config"
else
# For some reason the Icons are mess up I don't know why but to fix it uncomment section 2 and comment section 1 but if the section 1 icons are mess up uncomment section 2 and comment section 1
# Buttons
layout=`cat $HOME/.config/rofi/config/powermenu.rasi | grep BUTTON | cut -d'=' -f2 | tr -d '[:blank:],*/'`
if [[ "$layout" == "TRUE" ]]; then
# Section 1
shutdown=""
reboot=""
lock=""
suspend=""
logout=""
# Section 2
# shutdown="襤"
# reboot="ﰇ"
# lock=""
# suspend="鈴"
# logout=" "
else
# Section 1
shutdown=" Shutdown"
reboot=" Restart"
lock=" Lock"
suspend=" Sleep"
logout=" Logout"
# Section 2
# shutdown="襤Shutdown"
# reboot="ﰇ Restart"
# lock=" Lock"
# suspend="鈴Sleep"
# logout=" Logout"
fi
ddir="$HOME/.config/rofi/config"
fi
# Ask for confirmation
rdialog () {
rofi -dmenu\
-i\
-no-fixed-num-lines\
-p "Are You Sure? : "\
-theme "$ddir/confirm.rasi"
}
# Display Help
show_msg() {
rofi -theme "$ddir/askpass.rasi" -e "Options : yes / no / y / n"
}
# Variable passed to rofi
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
chosen="$(echo -e "$options" | $rofi_command -p "UP - $uptime" -dmenu -selected-row 0)"
case $chosen in
$shutdown)
ans=$(rdialog &)
if [[ $ans == "yes" ]] || [[ $ans == "YES" ]] || [[ $ans == "y" ]]; then
systemctl poweroff
elif [[ $ans == "no" ]] || [[ $ans == "NO" ]] || [[ $ans == "n" ]]; then
exit
else
show_msg
fi
;;
$reboot)
ans=$(rdialog &)
if [[ $ans == "yes" ]] || [[ $ans == "YES" ]] || [[ $ans == "y" ]]; then
systemctl reboot
elif [[ $ans == "no" ]] || [[ $ans == "NO" ]] || [[ $ans == "n" ]]; then
exit
else
show_msg
fi
;;
$lock)
sh $HOME/.local/bin/lock
;;
$suspend)
ans=$(rdialog &)
if [[ $ans == "yes" ]] || [[ $ans == "YES" ]] || [[ $ans == "y" ]]; then
mpc -q pause
amixer set Master mute
sh $HOME/.local/bin/lock
systemctl suspend
elif [[ $ans == "no" ]] || [[ $ans == "NO" ]] || [[ $ans == "n" ]]; then
exit
else
show_msg
fi
;;
$logout)
ans=$(rdialog &)
if [[ $ans == "yes" ]] || [[ $ans == "YES" ]] || [[ $ans == "y" ]]; then
bspc quit
elif [[ $ans == "no" ]] || [[ $ans == "NO" ]] || [[ $ans == "n" ]]; then
exit
else
show_msg
fi
;;
esac

6
common/.config/rofi/bin/runner Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
rofi \
-show run \
-scroll-method 0 \
-terminal kitty \
-theme "$HOME"/.config/rofi/config/runner.rasi

View File

@@ -0,0 +1,101 @@
#!/usr/bin/env bash
rofi_command="rofi -theme $HOME/.config/rofi/config/screenshot.rasi"
time=`date +%Y-%m-%d-%I-%M-%S`
geometry=`xrandr | head -n1 | cut -d',' -f2 | tr -d '[:blank:],current'`
dir="`xdg-user-dir PICTURES`/Screenshots"
file="Screenshot_${time}_${geometry}.png"
# Icons
icon1="$HOME/.config/dunst/icons/collections.svg"
icon2="$HOME/.config/dunst/icons/timer.svg"
# Buttons
layout=`cat $HOME/.config/rofi/config/screenshot.rasi | grep BUTTON | cut -d'=' -f2 | tr -d '[:blank:],*/'`
if [[ "$layout" == "TRUE" ]]; then
screen=""
area=""
window="缾"
infive="靖"
inten="福"
else
screen=" Capture Desktop"
area=" Capture Area"
window="缾 Capture Window"
infive="靖 Take in 3s"
inten="福 Take in 10s"
fi
# Notify and view screenshot
notify_view () {
dunstify -u low --replace=699 -i $icon1 "Copied to clipboard."
viewnior ${dir}/"$file"
if [[ -e "$dir/$file" ]]; then
dunstify -u low --replace=699 -i $icon1 "Screenshot Saved."
else
dunstify -u low --replace=699 -i $icon1 "Screenshot Deleted."
fi
}
# countdown
countdown () {
for sec in `seq $1 -1 1`; do
dunstify -t 1000 --replace=699 -i $icon2 "Taking shot in : $sec"
sleep 1
done
}
# take shots
shotnow () {
cd ${dir} && sleep 0.5 && maim -u -f png | tee "$file" | xclip -selection clipboard -t image/png
notify_view
}
shot5 () {
countdown '3'
sleep 1 && cd ${dir} && maim -u -f png | tee "$file" | xclip -selection clipboard -t image/png
notify_view
}
shot10 () {
countdown '10'
sleep 1 && cd ${dir} && maim -u -f png | tee "$file" | xclip -selection clipboard -t image/png
notify_view
}
shotwin () {
cd ${dir} && maim -u -f png -i `xdotool getactivewindow` | tee "$file" | xclip -selection clipboard -t image/png
notify_view
}
shotarea () {
cd ${dir} && maim -u -f png -s -b 2 -c 0.35,0.55,0.85,0.25 -l | tee "$file" | xclip -selection clipboard -t image/png
notify_view
}
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
# Variable passed to rofi
options="$screen\n$area\n$window\n$infive\n$inten"
chosen="$(echo -e "$options" | $rofi_command -p 'Take A Shot' -dmenu -selected-row 0)"
case $chosen in
$screen)
shotnow
;;
$area)
shotarea
;;
$window)
shotwin
;;
$infive)
shot5
;;
$inten)
shot10
;;
esac

View File

@@ -0,0 +1,18 @@
configuration{
modi: "run,drun,window";
icon-theme: "Oranchelo";
show-icons: true;
terminal: "alacritty";
drun-display-format: "{icon} {name}";
location: 0;
disable-history: false;
hide-scrollbar: true;
display-drun: "  Apps ";
display-run: "  Run ";
display-window: " 﩯 Window";
display-Network: " 󰤨 Network";
sidebar-mode: true;
}
@theme "catppuccin-mocha"

View File

@@ -0,0 +1,24 @@
@import "colors.rasi"
@import "font.rasi"
* {
background-color: @BG;
text-color: @FG;
}
window {
width: 250px;
padding: 20px;
border: 0px 0px 2px 0px;
border-radius: 8px;
border-color: @BDR;
location: 0;
x-offset: 0;
y-offset: -4%;
}
entry {
expand: true;
width: 150px;
text-color: @BDR;
}

View File

@@ -0,0 +1,151 @@
configuration {
show-icons: false;
display-drun: "";
drun-display-format: "{icon} {name}";
disable-history: false;
click-to-exit: true;
location: 0;
}
@import "font.rasi"
@import "colors.rasi"
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BDR;
border-radius: 10px;
width: 300px;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
margin: 0px 8px 0px 8px;
padding: 8px;
background-color: @IMG;
text-color: @BG;
border: 0px 0px 0px 0px;
border-color: @BDR;
border-radius: 10px;
}
textbox-prompt-colon {
expand: false;
str: "";
border-radius: 100%;
background-color: @SEL;
text-color: @FG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [ textbox-prompt-colon, prompt, entry ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 1;
lines: 7;
spacing: 4px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ inputbar, listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BG;
text-color: @FG;
orientation: horizontal;
border-radius: 4px;
padding: 6px 6px 6px 6px;
}
element-icon {
background-color: inherit;
text-color: inherit;
size: 0px;
border: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 2px 0px 2px 6px;
}
element normal.urgent,
element alternate.urgent {
background-color: @UGT;
text-color: @FG;
border-radius: 9px;
}
element normal.active,
element alternate.active {
background-color: @BGA;
text-color: @FG;
}
element selected {
background-color: @BGA;
text-color: @SEL;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element selected.urgent {
background-color: @UGT;
text-color: @FG;
}
element selected.active {
background-color: @BGA;
color: @FG;
}

View File

@@ -0,0 +1,12 @@
* {
BG: #1E1D2Fff;
BGA: #89DCEBff;
FG: #D9E0EEff;
FGA: #F28FADff;
BDR: #96CDFBff;
SEL: #1E1E2Eff;
UGT: #F28FADff;
IMG: #FAE3B0ff;
OFF: #575268ff;
ON: #ABE9B3ff;
}

View File

@@ -0,0 +1,24 @@
@import "colors.rasi"
@import "font.rasi"
* {
background-color: @BG;
text-color: @FG;
}
window {
width: 200px;
padding: 20px;
border: 0px 0px 2px 0px;
border-radius: 8px;
border-color: @BDR;
location: 0;
x-offset: 0;
y-offset: -4%;
}
entry {
expand: true;
width: 150px;
text-color: @BDR;
}

View File

@@ -0,0 +1,3 @@
* {
font: "Iosevka 24";
}

View File

@@ -0,0 +1,145 @@
configuration {
show-icons: true;
display-drun: "";
drun-display-format: "{icon} {name}";
disable-history: false;
click-to-exit: true;
location: 0;
}
@import "font.rasi"
@import "colors.rasi"
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BDR;
border-radius: 10px;
width: 1000px;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 8px;
background-color: @BG;
text-color: @IMG;
}
textbox-prompt-colon {
expand: false;
str: "";
border-radius: 100%;
background-color: @SEL;
text-color: @FG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [ textbox-prompt-colon, prompt, entry ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 1;
lines: 7;
spacing: 4px;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ inputbar, listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BG;
text-color: @FG;
orientation: horizontal;
border-radius: 4px;
padding: 6px 6px 6px 6px;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 40;
color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 2px 0px 2px 2px;
}
element normal.urgent,
element alternate.urgent {
background-color: @UGT;
text-color: @FG;
border-radius: 9px;
}
element normal.active,
element alternate.active {
background-color: @BGA;
text-color: @FG;
}
element selected {
background-color: @BGA;
text-color: @SEL;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element selected.urgent {
background-color: @UGT;
text-color: @FG;
}
element selected.active {
background-color: @BGA;
color: @FG;
}

View File

@@ -0,0 +1,153 @@
configuration {
show-icons: false;
display-drun: "";
drun-display-format: "{icon} {name}";
disable-history: false;
click-to-exit: true;
location: 0;
}
@import "font.rasi"
@import "colors.rasi"
/* Line Responsible For Button Layouts */
/* BUTTON = FALSE */
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BDR;
border-radius: 10px;
width: 400px;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
margin: 0px 0px 0px 8px;
padding: 8px;
background-color: @BG;
text-color: @FG;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
}
textbox-prompt-colon {
expand: false;
str: "ﱘ";
border-radius: 100%;
background-color: @BG;
text-color: @FG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 3;
lines: 2;
spacing: 15px;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ inputbar, listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BGA;
text-color: @SEL;
orientation: horizontal;
border-radius: 10px;
padding: 8px;
}
element-icon {
background-color: inherit;
text-color: inherit;
size: 0px;
border: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 2px 0px 0px 0px;
}
element selected {
background-color: @IMG;
text-color: @BG;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element.active,
element.selected.urgent {
background-color: @ON;
text-color: @BG;
border-color: @ON;
}
element.selected.urgent {
border-color: @BDR;
}
element.urgent,
element.selected.active {
background-color: @OFF;
text-color: @BG;
border-color: @OFF;
}
element.selected.active {
border-color: @BDR;
}

View File

@@ -0,0 +1,150 @@
configuration {
show-icons: false;
display-drun: "";
drun-display-format: "{icon} {name}";
disable-history: false;
click-to-exit: true;
location: 0;
}
@import "font.rasi"
@import "colors.rasi"
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BDR;
border-radius: 10px;
width: 300px;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
margin: 0px 0px 0px 8px;
padding: 8px;
background-color: @BG;
text-color: @FG;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
}
textbox-prompt-colon {
expand: false;
str: "";
border-radius: 100%;
background-color: @BG;
text-color: @FG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [textbox-prompt-colon, prompt ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 1;
lines: 4;
spacing: 4px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ inputbar, listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BG;
text-color: @FG;
orientation: horizontal;
border-radius: 10px;
padding: 6px 6px 6px 6px;
}
element-icon {
background-color: inherit;
text-color: inherit;
size: 0px;
border: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 2px 0px 2px 6px;
}
element selected {
background-color: @IMG;
text-color: @BG;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element.active,
element.selected.urgent {
background-color: @ON;
text-color: @BG;
border-color: @ON;
}
element.selected.urgent {
border-color: @BDR;
}
element.urgent,
element.selected.active {
background-color: @OFF;
text-color: @BG;
border-color: @OFF;
}
element.selected.active {
border-color: @BDR;
}

View File

@@ -0,0 +1,151 @@
configuration {
show-icons: false;
display-drun: "";
drun-display-format: "{icon} {name}";
disable-history: false;
click-to-exit: true;
location: 0;
}
@import "font.rasi"
@import "colors.rasi"
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BDR;
border-radius: 10px;
width: 400px;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
margin: 0px 8px 0px 8px;
padding: 8px;
background-color: @IMG;
text-color: @BG;
border: 0px 0px 0px 0px;
border-color: @BDR;
border-radius: 10px;
}
textbox-prompt-colon {
expand: false;
str: "直";
border-radius: 100%;
background-color: @SEL;
text-color: @FG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [ textbox-prompt-colon, prompt, entry ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 1;
lines: 7;
spacing: 4px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ inputbar, listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BG;
text-color: @FG;
orientation: horizontal;
border-radius: 4px;
padding: 6px 6px 6px 6px;
}
element-icon {
background-color: inherit;
text-color: inherit;
size: 0px;
border: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 2px 0px 2px 6px;
}
element normal.urgent,
element alternate.urgent {
background-color: @UGT;
text-color: @FG;
border-radius: 9px;
}
element normal.active,
element alternate.active {
background-color: @BGA;
text-color: @FG;
}
element selected {
background-color: @BGA;
text-color: @SEL;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element selected.urgent {
background-color: @UGT;
text-color: @FG;
}
element selected.active {
background-color: @BGA;
color: @FG;
}

View File

@@ -0,0 +1,155 @@
configuration {
show-icons: true;
display-drun: "";
drun-display-format: "{icon} {name}";
disable-history: false;
click-to-exit: true;
location: 4;
}
@import "font.rasi"
@import "colors.rasi"
/* Line Responsible For Button Layouts */
/* BUTTON = TRUE */
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BGA;
border-radius: 10px;
width: 110px;
x-offset: -1%;
y-offset: 0;
}
prompt {
enabled: true;
margin: 0px 0px 0px 8px;
padding: 8px;
background-color: @BG;
text-color: @FG;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
}
textbox-prompt-colon {
expand: false;
str: "";
border-radius: 100%;
background-color: @BG;
text-color: @BG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [ textbox-prompt-colon ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 1;
lines: 5;
spacing: 15px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BG;
text-color: @FG;
orientation: horizontal;
border-radius: 10px;
padding: 20px;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 0px;
border: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
font: "feather 20";
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 0px 0px 0px 0px;
}
element selected {
background-color: @BGA;
text-color: @SEL;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element.active,
element.selected.urgent {
background-color: @ON;
text-color: @BG;
border-color: @ON;
}
element.selected.urgent {
border-color: @BDR;
}
element.urgent,
element.selected.active {
background-color: @OFF;
text-color: @BG;
border-color: @OFF;
}
element.selected.active {
border-color: @BDR;
}

View File

@@ -0,0 +1,147 @@
configuration {
show-icons: false;
display-run: "";
disable-history: false;
click-to-exit: true;
location: 0;
}
@import "font.rasi"
@import "colors.rasi"
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BDR;
border-radius: 10px;
width: 350px;
location: center;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 8px;
background-color: @BG;
text-color: @IMG;
}
textbox-prompt-colon {
expand: false;
str: "ﲵ";
border-radius: 100%;
background-color: @BG;
text-color: @FG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "Run...";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [ textbox-prompt-colon, prompt, entry ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 1;
lines: 5;
spacing: 4px;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ inputbar, listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BG;
text-color: @FG;
orientation: horizontal;
border-radius: 4px;
padding: 6px 6px 6px 6px;
}
element-icon {
background-color: inherit;
text-color: inherit;
size: 0px;
border: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 2px 0px 2px 2px;
}
element normal.urgent,
element alternate.urgent {
background-color: @UGT;
text-color: @FG;
border-radius: 9px;
}
element normal.active,
element alternate.active {
background-color: @BGA;
text-color: @FG;
}
element selected {
background-color: @BGA;
text-color: @SEL;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element selected.urgent {
background-color: @UGT;
text-color: @FG;
}
element selected.active {
background-color: @BGA;
color: @FG;
}

View File

@@ -0,0 +1,153 @@
configuration {
show-icons: false;
display-drun: "";
drun-display-format: "{icon} {name}";
disable-history: false;
click-to-exit: true;
location: 0;
}
@import "font.rasi"
@import "colors.rasi"
/* Line Responsible For Button Layouts */
/* BUTTON = FALSE */
window {
transparency: "real";
background-color: @BG;
text-color: @FG;
border: 2px;
border-color: @BDR;
border-radius: 10px;
width: 300px;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
margin: 0px 0px 0px 8px;
padding: 8px;
background-color: @BG;
text-color: @FG;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
}
textbox-prompt-colon {
expand: false;
str: "";
border-radius: 100%;
background-color: @BG;
text-color: @FG;
padding: 8px 12px 8px 12px;
font: "Iosevka Nerd Font 10";
}
entry {
background-color: @BG;
text-color: @FG;
placeholder-color: @FG;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
blink: true;
border: 0px 0px 2px 0px;
border-color: @BDR;
border-radius: 10px;
padding: 8px;
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @BG;
text-color: @FG;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @BDR;
margin: 0px 0px 0px 0px;
padding: 0px;
position: center;
}
case-indicator {
background-color: @BG;
text-color: @FG;
spacing: 0;
}
listview {
background-color: @BG;
columns: 1;
lines: 5;
spacing: 4px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @BG;
children: [ inputbar, listview ];
spacing: 15px;
padding: 15px;
}
element {
background-color: @BG;
text-color: @FG;
orientation: horizontal;
border-radius: 10px;
padding: 6px 6px 6px 6px;
}
element-icon {
background-color: inherit;
text-color: inherit;
size: 0px;
border: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 2px 0px 2px 6px;
}
element selected {
background-color: @BGA;
text-color: @SEL;
border: 0px 0px 0px 0px;
border-radius: 10px;
border-color: @BDR;
}
element.active,
element.selected.urgent {
background-color: @ON;
text-color: @BG;
border-color: @ON;
}
element.selected.urgent {
border-color: @BDR;
}
element.urgent,
element.selected.active {
background-color: @OFF;
text-color: @BG;
border-color: @OFF;
}
element.selected.active {
border-color: @BDR;
}

439
common/.i3/config Normal file
View File

@@ -0,0 +1,439 @@
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
# Configure border style <normal|1pixel|pixel xx|none|pixel>
default_border none
default_floating_border normal
# Hide borders
hide_edge_borders none
# change borders
#bindsym $mod+u border none
#bindsym $mod+y border pixel 1
#bindsym $mod+n border normal
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font xft:DejaVu Sans Mono 12
# Hide title bar
default_border pixel 1
default_floating_border pixel 1
for_window [class="^.*"] border pixel 1
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec kitty
# kill focused window
bindsym $mod+Shift+q kill
# start program launcher
bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $mod+z exec --no-startup-id morc_menu
################################################################################################
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
################################################################################################
exec --no-startup-id volumeicon
##bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
exec mpris-proxy
exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
bindsym $mod+Ctrl+m exec pavucontrol
################################################################################################
# Screen brightness controls
#bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'"
#bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'"
# Start Applications
bindsym $mod+Ctrl+b exec terminal -e 'bmenu'
bindsym $mod+F2 exec palemoon
bindsym $mod+F3 exec pcmanfm
# bindsym $mod+F3 exec ranger
bindsym $mod+Shift+F3 exec pcmanfm_pkexec
bindsym $mod+F5 exec terminal -e 'mocp'
bindsym $mod+t exec --no-startup-id pkill picom
bindsym $mod+Ctrl+t exec --no-startup-id picom -b
#bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'"
#bindsym Print exec maim -s --format=png /dev/stdout | xclip -selection clipboard -t image/png -i
bindsym Print exec flameshot gui
bindsym $mod+Print --release exec --no-startup-id i3-scrot -w
bindsym $mod+Shift+Print --release exec flameshot --gui
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
exec_always --no-startup-id ~/.i3/i3-chrome-tab-dragging.py
# Audio Controls
bindsym XF86AudioPlay exec "mpris-ctl pp && mpris-ctl --player inactive pp"
bindsym XF86AudioNext exec "mpris-ctl --player active next"
bindsym XF86AudioPrev exec "mpris-ctl --player active prev"
# focus_follows_mouse no
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
# split orientation
bindsym $mod+h split h;exec notify-send 'tile horizontally'
bindsym $mod+v split v;exec notify-send 'tile vertically'
bindsym $mod+q split toggle
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# 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
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# toggle sticky
bindsym $mod+Shift+s sticky toggle
# focus the parent container
bindsym $mod+a focus parent
# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#navigate workspaces next / previous
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
# Workspace names
# to display names or symbols instead of plain workspace numbers you can use
# something like: set $ws1 1:mail
# set $ws2 2:
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
# Open applications on specific workspaces
# assign [class="Thunderbird"] $ws1
# assign [class="Pale moon"] $ws2
# assign [class="Pcmanfm"] $ws3
# assign [class="Skype"] $ws5
# Open specific applications in floating mode
for_window [title="alsamixer"] floating enable border pixel 1
for_window [class="calamares"] floating enable border normal
for_window [class="Clipgrab"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [class="fpakman"] floating enable
for_window [class="Galculator"] floating enable border pixel 1
for_window [class="GParted"] floating enable border normal
for_window [title="i3_help"] floating enable sticky enable border normal
for_window [class="Lightdm-settings"] floating enable
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro-hello"] floating enable
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [title="MuseScore: Play Panel"] floating enable
for_window [class="Nitrogen"] floating enable sticky enable border normal
for_window [class="Oblogout"] fullscreen enable
for_window [class="octopi"] floating enable
for_window [title="About Pale Moon"] floating enable
for_window [class="Pamac-manager"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
for_window [class="(?i)System-config-printer.py"] floating enable border normal
for_window [class="Skype"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="Xfburn"] floating enable
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
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'"
# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 5 px or 5 ppt
bindsym k resize grow height 5 px or 5 ppt
bindsym l resize shrink height 5 px or 5 ppt
bindsym semicolon resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 5 px or 5 ppt
bindsym Down resize grow height 5 px or 5 ppt
bindsym Up resize shrink height 5 px or 5 ppt
bindsym Right resize grow width 5 px or 5 ppt
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Lock screen
bindsym $mod+9 exec --no-startup-id blurlock
# Autostart applications
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore; sleep 1; picom -b
#exec --no-startup-id manjaro-hello
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec --no-startup-id clipit
# exec --no-startup-id blueman-applet
# exec_always --no-startup-id sbxkb
# exec --no-startup-id start_conky_maia
# exec --no-startup-id start_conky_green
exec --no-startup-id xidlehook --not-when-fullscreen --not-when-audio --timer 600 'blurlock' ''
exec_always --no-startup-id ff-theme-util
exec_always --no-startup-id fix_xcursor
# Color palette used for the terminal ( ~/.Xresources file )
# Colors are gathered based on the documentation:
# https://i3wm.org/docs/userguide.html#xresources
# Change the variable name at the place you want to match the color
# of your terminal like this:
# [example]
# If you want your bar to have the same background color as your
# terminal background change the line 362 from:
# background #14191D
# to:
# background $term_background
# Same logic applied to everything else.
set_from_resource $term_background background
set_from_resource $term_foreground foreground
set_from_resource $term_color0 color0
set_from_resource $term_color1 color1
set_from_resource $term_color2 color2
set_from_resource $term_color3 color3
set_from_resource $term_color4 color4
set_from_resource $term_color5 color5
set_from_resource $term_color6 color6
set_from_resource $term_color7 color7
set_from_resource $term_color8 color8
set_from_resource $term_color9 color9
set_from_resource $term_color10 color10
set_from_resource $term_color11 color11
set_from_resource $term_color12 color12
set_from_resource $term_color13 color13
set_from_resource $term_color14 color14
set_from_resource $term_color15 color15
# Start i3bar to display a workspace bar (plus the system information i3status if available)
bar {
i3bar_command i3bar
status_command i3blocks
position bottom
font xft:DejaVu Sans Mono 12.5
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
# tray_output primary
# tray_output eDP1
bindsym button4 nop
bindsym button5 nop
# font xft:URWGothic-Book 11
strip_workspace_numbers yes
colors {
background #282A36
statusline #F8F8F2
separator #44475A
focused_workspace #44475A #44475A #F8F8F2
active_workspace #282A36 #44475A #F8F8F2
inactive_workspace #282A36 #282A36 #BFBFBF
urgent_workspace #FF5555 #FF5555 #F8F8F2
binding_mode #FF5555 #FF5555 #F8F8F2
}
}
# hide/unhide i3status bar
bindsym $mod+m bar mode toggle
# Theme colors
# class border backgr. text indic. child_border
client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
client.background #F8F8F2
#############################
### settings for i3-gaps: ###
#############################
# Set inner/outer gaps
gaps inner 7
gaps outer -1
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
# gaps inner|outer current|all set|plus|minus <px>
# gaps inner all set 10
# gaps outer all plus 5
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Enable and disable gaps
bindsym $mod+Shift+n gaps inner all set 0; gaps outer all set 0
bindsym $mod+n gaps inner all set 7; gaps outer all set -1
# Deva apps i want to always float
for_window [class="Aeon"] floating enable, sticky enable
for_window [class="Inferno v3.0.1_alpha"] floating enable, sticky enable

View File

@@ -0,0 +1,62 @@
#!/usr/bin/env python3
# vi:expandtab tabstop=4
# This is intended to be run when i3 starts it will exit on restart; make sure
# to use "exec_always --no-startup-id" to run this
from argparse import ArgumentParser
from pynput.mouse import Listener, Button
from i3ipc import Connection, Event
# Constants
browser_classes = [
"Google-chrome",
"Chromium",
"Brave-browser",
]
# Global Variables
mouse_pressed = False
current_window = None
# Called by mouse listener when the mouse is clicked
def on_click(x, y, button, pressed):
global mouse_pressed
global current_window
# we want to store the status of the left mouse button
if button == Button.left:
mouse_pressed = pressed
# if the button is released and we were currently dragging a window, unfloat it
if not pressed and current_window:
current_window.command('floating disable')
current_window = None
# Called by i3 when a new window is created
def on_window_new(i3, e):
global current_window
# we only care about chromium windows
if e.container.window_class in browser_classes:
# only switch to floating mode if the user is currently dragging (=mouse button pressed)
if mouse_pressed:
e.container.command('floating enable')
# store the reference to the window, so we can unfloat it later
current_window = e.container
def main(args):
i3 = Connection()
i3.on(Event.WINDOW_NEW, on_window_new)
with Listener(on_click=on_click) as listener:
i3.main()
if __name__ == "__main__":
parser = ArgumentParser()
parser.add_argument("-v", "--verbose", action="count")
args = parser.parse_args()
main(args)

View File

@@ -0,0 +1,111 @@
* {
bg-col: #303446;
bg-col-light: #303446;
border-col: #303446;
selected-col: #303446;
blue: #8caaee;
fg-col: #c6d0f5;
fg-col2: #e78284;
grey: #737994;
width: 600;
font: "JetBrainsMono Nerd Font 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

View File

@@ -0,0 +1,111 @@
* {
bg-col: #eff1f5;
bg-col-light: #eff1f5;
border-col: #eff1f5;
selected-col: #eff1f5;
blue: #1e66f5;
fg-col: #4c4f69;
fg-col2: #d20f39;
grey: #9ca0b0;
width: 600;
font: "JetBrainsMono Nerd Font 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

View File

@@ -0,0 +1,111 @@
* {
bg-col: #24273a;
bg-col-light: #24273a;
border-col: #24273a;
selected-col: #24273a;
blue: #8aadf4;
fg-col: #cad3f5;
fg-col2: #ed8796;
grey: #6e738d;
width: 600;
font: "JetBrainsMono Nerd Font 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

View File

@@ -0,0 +1,111 @@
* {
bg-col: #1e1e2e;
bg-col-light: #1e1e2e;
border-col: #1e1e2e;
selected-col: #1e1e2e;
blue: #89b4fa;
fg-col: #cdd6f4;
fg-col2: #f38ba8;
grey: #6c7086;
width: 600;
font: "JetBrainsMono Nerd Font 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

8
common/.ssh/config Normal file
View File

@@ -0,0 +1,8 @@
host github.com
HostName ssh.github.com
IdentityFile ~/.ssh/github
Host vps
HostName ***
IdentityFile ~/.ssh/vps
User ben

21
common/.tmux.conf Normal file
View File

@@ -0,0 +1,21 @@
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'dracula/tmux'
set -g @dracula-show-powerline true
set -g @dracula-show-fahrenheit false
set -g @dracula-show-flags true
set -g @dracula-show-left-icon session
set -g status-position top
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

130
common/.zshrc Normal file
View File

@@ -0,0 +1,130 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git fancy-ctrl-z fzf)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi
#keybindings
bindkey '^H' backward-kill-word
#export QSYS_ROOTDIR="/home/benk/.cache/yay/quartus-free/pkg/quartus-free-quartus/opt/intelFPGA/21.1/quartus/sopc_builder/bin"
#source "/home/ben/dprog/Resources/zephyr_master/zephyr/zephyr-env.sh"
#source /usr/share/nvm/init-nvm.sh
#[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
#source /usr/share/nvm/nvm.sh
#source /usr/share/nvm/bash_completion
#s:ource /usr/share/nvm/install-nvm-exec
# aliases
alias vim="nvim"
alias vi="nvim"
alias v="nvim"
alias oldvim="vim"
eval $(thefuck --alias)
export VISUAL=nvim;
export EDITOR=nvim;

View File

@@ -0,0 +1,44 @@
#!/bin/sh
# If ACPI was not installed, this probably is a battery-less computer.
ACPI_RES=$(acpi -b)
ACPI_CODE=$?
if [ $ACPI_CODE -eq 0 ]
then
# Get essential information. Due to som bug with some versions of acpi it is
# worth filtering the ACPI result from all lines containing "unavailable".
BAT_LEVEL_ALL=$(echo "$ACPI_RES" | grep -E -o "[0-9][0-9]?[0-9]?%")
BAT_LEVEL=$(echo "$BAT_LEVEL_ALL" | awk -F"%" 'BEGIN{tot=0;i=0} {i++; tot+=$1} END{printf("%d%%\n", tot/i)}')
TIME_LEFT=$(echo "$ACPI_RES" | grep -E -o "[0-9]{2}:[0-9]{2}:[0-9]{2}")
IS_CHARGING=$(echo "$ACPI_RES" | awk '{ printf("%s\n", substr($3, 0, length($3)-1) ) }')
# If there is no 'time left' information (when almost fully charged) we
# provide information ourselvs.
if [ -z "$TIME_LEFT" ]
then
TIME_LEFT="00:00:00"
fi
# Print full text. The charging data.
TIME_LEFT=$(echo $TIME_LEFT | awk '{ printf("%s\n", substr($1, 0, 5)) }')
echo "🔋$BAT_LEVEL$TIME_LEFT "
# Print the short text.
echo "BAT: $BAT_LEVEL"
# Change the font color, depending on the situation.
if [ "$IS_CHARGING" = "Charging" ]
then
# Charging yellow color.
echo "#D0D000"
else
if [ "${BAT_LEVEL%?}" -le 15 ]
then
# Battery very low. Red color.
echo "#FA1E44"
else
# Battery not charging but at decent level. Green color.
echo "#007872"
fi
fi
fi

30
common/i3blocks/config Normal file
View File

@@ -0,0 +1,30 @@
[NOW_PLAYING]
command=mpris-ctl info '🎶 %player_name: %track_name - %artist_name'
interval=1
color=#1DB954
[DISK]
command=df -h / | awk '/\//{ printf(" 💾 %sB \n", $4) }'
interval=10
color=#C9E3DB
[CPU]
full_text= CPU: 0.00% @ +00.0°C
command=~/.config/i3blocks/cpu/cpu_info.sh
interval=2
color=#0071C5
[GPU]
full_text= GPU:
command=~/.config/i3blocks/gpu/gpu_info.sh
interval=2
color=#76B900
[MEM]
command=free -h | awk '/Mem:/ { printf(" %5s/%s \n", $3, $2) }'
interval=5
color=#FEC925
[TIME_DATE]
command=date +" %a, %d %b - %H:%M:%S"
interval=1

View File

@@ -0,0 +1,4 @@
#!/bin/sh
TEMP=$(sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '[0-9]*.[0-9]*°C' -o)
CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%i\n", $(NF-9))}')
echo "$CPU_USAGE $TEMP" | awk '{ printf(" CPU:%3s% @ %s \n"), $1, $2 }'

View File

@@ -0,0 +1,4 @@
#!/bin/sh
GPU_TEMP=$(nvidia-settings -q GPUCoreTemp | grep -m1 GPU | perl -ne 'print $1 if /: (\d+)\./')
GPU_USAGE=$(nvidia-settings -q GPUUtilization -q GPUCoreTemp | grep -oP 'graphics=\K\w+')
echo "$GPU_USAGE $GPU_TEMP.0°C" | awk '{ printf(" GPU:%3s% @ %s \n"), $1, $2 }'

View File

@@ -0,0 +1,6 @@
#!/bin/sh
for i in $(seq 1 5)
do
sleep 0.2
pkill -RTMIN+1 i3blocks
done

View File

@@ -0,0 +1,27 @@
#!/bin/sh
VOLUME_MUTE="🔇"
VOLUME_LOW="🔈"
VOLUME_MID="🔉"
VOLUME_HIGH="🔊"
SOUND_LEVEL=$(amixer -M get Master | awk -F"[][]" '/%/ { print $2 }' | awk -F"%" 'BEGIN{tot=0; i=0} {i++; tot+=$1} END{printf("%s\n", tot/i) }')
MUTED=$(amixer get Master | awk ' /%/{print ($NF=="[off]" ? 1 : 0); exit;}')
ICON=$VOLUME_MUTE
if [ "$MUTED" = "1" ]
then
ICON="$VOLUME_MUTE"
else
if [ "$SOUND_LEVEL" -lt 34 ]
then
ICON="$VOLUME_LOW"
elif [ "$SOUND_LEVEL" -lt 67 ]
then
ICON="$VOLUME_MID"
else
ICON="$VOLUME_HIGH"
fi
fi
echo "$ICON" "$SOUND_LEVEL" | awk '{ printf(" %s:%3s%% \n", $1, $2) }'