3 Commits
Author SHA1 Message Date
eneller 738639bc19 fix: remove shell variables from i3config 2023-07-09 04:33:31 +02:00
eneller c999f058bc fix: add rofi theme 2023-07-09 04:15:29 +02:00
eneller 1b55d91ce1 Initial commit 2023-07-09 04:07:30 +02:00
36 changed files with 1911 additions and 516 deletions

No files matched your search

-139
View File
@@ -1,139 +0,0 @@
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
# foreground colors
for fgc in {30..37}; do
# background colors
for bgc in {40..47}; do
fgc=${fgc#37} # white
bgc=${bgc#40} # black
vals="${fgc:+$fgc;}${bgc}"
vals=${vals%%;}
seq0="${vals:+\e[${vals}m}"
printf " %-9s" "${seq0:-(default)}"
printf " ${seq0}TEXT\e[m"
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
done
echo; echo
done
}
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
esac
use_color=true
# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
# first to take advantage of user additions. Use internal bash
# globbing instead of external grep binary.
safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
match_lhs=""
[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs} ]] \
&& type -P dircolors >/dev/null \
&& match_lhs=$(dircolors --print-database)
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if type -P dircolors >/dev/null ; then
if [[ -f ~/.dir_colors ]] ; then
eval $(dircolors -b ~/.dir_colors)
elif [[ -f /etc/DIR_COLORS ]] ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
fi
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
else
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
PS1='\u@\h \W \$ '
else
PS1='\u@\h \w \$ '
fi
fi
unset use_color safe_term match_lhs sh
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias np='nano -w PKGBUILD'
alias more=less
xhost +local:root > /dev/null 2>&1
complete -cf sudo
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control. #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
shopt -s expand_aliases
# export QT_SELECT=4
# Enable history appending instead of overwriting. #139609
shopt -s histappend
#
# # ex - archive extractor
# # usage: ex <file>
ex ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
+36
View File
@@ -0,0 +1,36 @@
env:
TERM: xterm-256color
window:
padding:
x: 5
y: 7
opacity: 1.0
dynamic_title: true
colors:
# Default colors
primary:
background: '0x272822'
foreground: '0xf8f8f2'
# Normal colors
normal:
black: '0x272822'
red: '0xf92672'
green: '0xa6e22e'
yellow: '0xf4bf75'
blue: '0x66d9ef'
magenta: '0xae81ff'
cyan: '0xa1efe4'
white: '0xf8f8f2'
# Bright colors
bright:
black: '0x75715e'
red: '0xf92672'
green: '0xa6e22e'
yellow: '0xf4bf75'
blue: '0x66d9ef'
magenta: '0xae81ff'
cyan: '0xa1efe4'
white: '0xf9f8f5'
+25
View File
@@ -0,0 +1,25 @@
output DP-1
off
output HDMI-1
off
output DP-2
off
output HDMI-2
off
output DP-2-1
off
output DP-2-2
off
output DP-2-3
off
output eDP-1
crtc 0
mode 1920x1080
pos 0x0
primary
rate 60.02
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
x-prop-scaling_mode Full aspect
+1
View File
@@ -0,0 +1 @@
eDP-1 00ffffffffffff0030e4080600000000001c0104a51f117802e085a3544e9b260e5054000000010101010101010101010101010101012e3680a070381f403020350035ae1000001a542b80a070381f403020350035ae1000001a000000fe004c4720446973706c61790a2020000000fe004c503134305746392d5350463100d5
+40
View File
@@ -0,0 +1,40 @@
output HDMI-1
off
output DP-2
off
output HDMI-2
off
output DP-2-1
off
output DP-2-2
off
output eDP-1
crtc 0
mode 1920x1080
pos 0x0
primary
rate 60.02
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
x-prop-scaling_mode Full aspect
output DP-2-3
crtc 2
mode 1920x1080
pos 1920x0
rate 60.00
x-prop-audio auto
x-prop-broadcast_rgb Automatic
x-prop-max_bpc 12
x-prop-non_desktop 0
output DP-1
crtc 1
mode 1920x1080
pos 3837x0
rate 60.00
x-prop-audio auto
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
+3
View File
@@ -0,0 +1,3 @@
DP-1 00ffffffffffff001ab3bf0814600b000b200104a5351e78220565a756529c270f5054a54a00818f81809500b30081c0a9c001010101023a801871382d40582c45000f282100001e000000fd00304c1e5211000a202020202020000000fc004232342d392054530a20202020000000ff00595644433734353439320a20200006
DP-2-3 00ffffffffffff001ab3c10813fb0a001a1f0104a5351e783a0565a756529c270f5054a54a00818f81809500b30081c0a9c001010101023a801871382d40582c45000f282100001e000000fd00304c1e5211000a202020202020000000fc004232342d392054530a20202020000000ff00595644433731393633350a2020014402031cf14f901f051404031201021113071516062309070783010000023a801871382d40582c45000f282100001e023a80d072382d40102c96800f2821000018011d007251d01e206e2855000f282100001e011d00bc52d01e20b82855400f282100001e8c0ad090204031200c4055000f2821000018000000000000000000e6
eDP-1 00ffffffffffff0030e4080600000000001c0104a51f117802e085a3544e9b260e5054000000010101010101010101010101010101012e3680a070381f403020350035ae1000001a542b80a070381f403020350035ae1000001a000000fe004c4720446973706c61790a2020000000fe004c503134305746392d5350463100d5
+34
View File
@@ -0,0 +1,34 @@
output DP-1
off
output HDMI-1
off
output DP-2
off
output DP-2-1
off
output DP-2-2
off
output DP-2-3
off
output eDP-1
crtc 0
mode 1920x1080
pos 0x0
primary
rate 60.02
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
x-prop-scaling_mode Full aspect
output HDMI-2
crtc 1
mode 2560x1440
pos 1920x0
rate 59.95
x-prop-aspect_ratio Automatic
x-prop-audio auto
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
+2
View File
@@ -0,0 +1,2 @@
HDMI-2 00ffffffffffff0010ac5f4157563541281d0103803c2278eeee95a3544c99260f5054a54b00714f8180a940d1c00101010101010101565e00a0a0a029503020350055502100001a000000ff00335a53465253320a2020202020000000fc0044454c4c205532373139440a20000000fd00384c1e5a19000a20202020202001c7020322f14f90050403020716010611121513141f23097f078301000065030c001000023a801871382d40582c450055502100001e7e3900a080381f4030203a0055502100001a011d007251d01e206e28550055502100001ebf1600a08038134030203a0055502100001a00000000000000000000000000000000000000000088
eDP-1 00ffffffffffff0030e4080600000000001c0104a51f117802e085a3544e9b260e5054000000010101010101010101010101010101012e3680a070381f403020350035ae1000001a542b80a070381f403020350035ae1000001a000000fe004c4720446973706c61790a2020000000fe004c503134305746392d5350463100d5
+28
View File
@@ -0,0 +1,28 @@
output DP-1
off
output HDMI-1
off
output DP-2
off
output eDP-1
crtc 0
mode 1920x1080
pos 0x0
primary
rate 60.02
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
x-prop-scaling_mode Full aspect
output HDMI-2
crtc 1
mode 2560x1440
pos 1920x0
rate 59.95
x-prop-aspect_ratio Automatic
x-prop-audio auto
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
+2
View File
@@ -0,0 +1,2 @@
HDMI-2 00ffffffffffff0010ac56a04c32383013160103803c2278ea8e05ad4f33b0260d5054a54b008100b300714fa9408180010101010101023a801871382d40582c250055502100001e000000ff0047363036543235433038324c0a000000fc0044454c4c2055323731310a2020000000fd00384c1e5111000a202020202020012a020329f15090050403020716010611121513141f20230d7f0767030c001000382d830f0000e3050301023a801871382d40582c250055502100001e011d8018711c1620582c250055502100009e011d007251d01e206e28550055502100001e8c0ad08a20e02d10103e9600555021000018000000000000000000000000000068
eDP-1 00ffffffffffff0030e4080600000000001c0104a51f117802e085a3544e9b260e5054000000010101010101010101010101010101012e3680a070381f403020350035ae1000001a542b80a070381f403020350035ae1000001a000000fe004c4720446973706c61790a2020000000fe004c503134305746392d5350463100d5
+9
View File
@@ -0,0 +1,9 @@
# This is the configuration file for dict.
# Usually all you will ever need here is the server keywords.
# Refer to the dict manpage for other options.
# It will only check the second server if the first fails
# localhost uses the dictd service. Configure it to use your local dictionaries.
# see: freedict, /etc/dict/dict.conf, /usr/share/dictd
server localhost
server dict.org
+302
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
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

+46
View File
@@ -0,0 +1,46 @@
# vim: filetype=i3config
font pango:Sans Regular 12
# THEME, should use same colors as .profile
set $black #272822
set $white #FFFFFF
set $red #F92672
set $blue #66D9EF
set $green #A6E22E
set $orange #FD971F
set $yellow #E6DB74
set $purple #AE81FF
set $allblack #000000
# class border bg. text indicator child_border
client.focused $blue $black $blue $blue $blue
client.focused_inactive $black $black $blue $black $black
client.unfocused $black $black $white $black $black
client.background $black
bar {
i3bar_command i3bar
status_command i3status
#--config $XDG_CONFIG_HOME/i3/i3status.conf
mode dock
position top
#tray_output primary
# font xft:Jetbrains mono 20
strip_workspace_numbers yes
workspace_buttons yes
colors {
background #000000
#statusline #F9FAF9
#separator #454947
# border bg text
focused_workspace $allblack $blue $allblack
#active_workspace #FFFFFF $black #FFFFFF
#inactive_workspace #FFFFFF $black #FFFFFF
#binding_mode #16a085 #2C2C2C #F9FAF9
urgent_workspace $red $black $red
}
}
+158
View File
@@ -0,0 +1,158 @@
# vim: filetype=i3config
include ~/.config/i3/conf.d/*
# this config is based on github.com:LukeSmithxyz/voidrice 884dcbdc4792eed95e558af84491eb3100d314a2
# to immediately apply a new config, run `i3-msg reload; i3-msg restart`
# This config file will use environmental variables such as $BROWSER and $TERMINAL.
# You can set these variables in ~/.profile or ~/.bash_profile if you have it as below:
# No focus on mouse over (allows scrolling without changing focus)
focus_follows_mouse no
# remove title bar
default_border pixel 1
default_floating_border pixel 1
# set modifier key, Mod4 is super (windows), Mod1 = Alt key
set $mod Mod4
bindsym $mod+F12 restart;reload
bindsym $mod+Escape exec i3lock -c 000000 & sleep 2 && systemctl suspend
bindsym $mod+Shift+Escape exec i3lock -c 000000 & sleep 2 && xset dpms force off
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
bindsym $mod+d floating toggle
# DROPDOWN
# Scratchpad binds
exec bitwarden-desktop
for_window [instance="bitwarden"] move scratchpad
for_window [instance="bitwarden"] sticky enable
bindsym $mod+p [instance="bitwarden"] scratchpad show;
exec alacritty --class="dropdown_tmux" -e 'tmux'
for_window [class="dropdown_tmux"] move scratchpad
for_window [class="dropdown_tmux"] sticky enable
bindsym $mod+space [class="dropdown_tmux"] scratchpad show;
# General dropdown window traits. The order can matter.
# sticky allows windows to stay visible even when switching workspaces
#for_window [instance="dropdown_tmux"] resize set 625 450
#for_window [instance="dropdown_tmux"] border pixel 3
# i3 BINDS
bindsym $mod+h focus left
bindsym $mod+Shift+h move left
bindsym $mod+j focus down
bindsym $mod+Shift+j move down
bindsym $mod+k focus up
bindsym $mod+Shift+k move up
bindsym $mod+l focus right
bindsym $mod+Shift+l move right
bindsym $mod+Ctrl+h resize grow width 1 px or 1 ppt
bindsym $mod+Ctrl+j resize shrink height 1 px or 1 ppt
bindsym $mod+Ctrl+k resize grow height 1 px or 1 ppt
bindsym $mod+Ctrl+l resize shrink width 1 px or 1 ppt
bindsym $mod+Shift+r exec --no-startup-id winresize
bindsym $mod+f fullscreen toggle
bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill
bindsym $mod+t layout toggle tabbed splith
bindsym $mod+Shift+v split h;exec notify-send 'tile horizontally |'
bindsym $mod+v split v;exec notify-send 'tile vertically -'
# ARROW KEYS
bindsym $mod+Left move workspace to output left
bindsym $mod+Down move workspace to output down
bindsym $mod+Up move workspace to output up
bindsym $mod+Right move workspace to output right
# WORKSPACES
# prior and next ar PgUp and PgDown
bindsym $mod+Prior container prev
bindsym $mod+Shift+Prior move container to workspace prev
bindsym $mod+Next workspace next
bindsym $mod+Shift+Next move container to workspace next
bindsym $mod+Tab workspace back_and_forth
# name workspaces
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+Shift+0 move container to workspace $ws10
# APPLICATION SHORTCUTS
bindsym $mod+Return exec --no-startup-id "rofi -show"
bindsym $mod+Shift+space exec --no-startup-id alacritty
bindsym $mod+w exec --no-startup-id firefox
bindsym $mod+e exec --no-startup-id thunar
bindsym $mod+m exec --no-startup-id thunderbird
# TODO add import path/to/img.png to make a screenshot
bindsym --release $mod+s exec "import ~/Pictures/screenshots/$(date '+%y_%m_%d-%H_%M_%S').png"
bindsym $mod+Shift+s exec "import -window root ~/Pictures/screenshots/$(date '+%y_%m_%d-%H_%M_%S').png"
# i3lock for locking, i3-msg exit for logout
# Show selection:
#bindsym $mod+Insert exec --no-startup-id showclip
# AUTOSTART
# start polkit for pacman
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# DESKTOP STUFF
# set background picture
exec --no-startup-id nitrogen --set-zoom-fill $HOME/.config/i3/bg.png
# try to start tray tools / applets manually
exec --no-startup-id nm-applet
# --sm-disable
exec --no-startup-id blueman-applet
exec --no-startup-id pamac-tray
exec --no-startup-id xfce4-power-manager
#exec --no-startup-id volumeicon
exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
exec --no-startup-id picom
bindsym $mod+Ctrl+m exec pavucontrol
# detect screen configurations
exec --no-startup-id autorandr -c
# set key repeat delay and rate
exec --no-startup-id xset r rate 200 35
+1
View File
@@ -0,0 +1 @@
# this is a i3bar config file
+14 -1
View File
@@ -1,9 +1,22 @@
require("plugins") require("plugins")
require("keybinds") require("keybinds")
-- GENERAL SETTINGS --- Functional wrapper for mapping custom keybindings
--- GENERAL SETTINGS
function map(mode, lhs, rhs, opts)
local options = { noremap = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
map("i","<C-c>","<Esc>")
vim.o.termguicolors = true vim.o.termguicolors = true
vim.cmd('colorscheme monokai') -- set colorscheme vim.cmd('colorscheme monokai') -- set colorscheme
vim.o.syntax = 'on' vim.o.syntax = 'on'
vim.cmd('set title')
vim.opt.titlestring = [[%{v:progname}: %f %h%m%r%w ]]
-- vim.opt.titlestring = [[%f %h%m%r%w %{v:progname} (%{tabpagenr()} of %{tabpagenr('$')})]]
vim.o.errorbells = false vim.o.errorbells = false
vim.o.smartcase = true vim.o.smartcase = true
vim.o.showmode = true vim.o.showmode = true
+12
View File
@@ -1 +1,13 @@
-- filetype-specific keybinds can be found in the ftplugin folder, requires 'filetype plugin on' -- filetype-specific keybinds can be found in the ftplugin folder, requires 'filetype plugin on'
function map(mode, lhs, rhs, opts)
local options = { noremap = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
map("n", "<Enter>", "i<Enter><Esc>k$")
-- map("n", "<S-Enter>", "d$O<Esc>p^")
map("n", "<Space>", "i<Space><Esc>")
+271
View File
@@ -0,0 +1,271 @@
# Thank you code_nomad: http://9m.no/ꪯ鵞
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
#################################
#
# GLX backend
#
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
glx-copy-from-front = false;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;
# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
#glx-swap-method = "undefined"; #deprecated !
#use-damage = true
#################################
#
# Shadows
#
#################################
# Enabled client-side shadows on windows.
shadow = true;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = 1;
# The top offset for shadows. (default -15)
shadow-offset-y = 1;
# The translucency for shadows. (default .75)
shadow-opacity = 0.3;
# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"name = 'Notification'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'picom'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"class_g ?= 'Dmenu'",
# "class_g ?= 'Dunst'",
# disables shadows on i3 frames
"class_g ?= 'i3-frame'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;
#################################
#
# Opacity
#
#################################
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 1;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
#################################
#
# Other
#
#################################
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Specify refresh rate of the screen.
# If not specified or 0, picom will try detecting this with X RandR extension.
# DEPRECATED
#refresh-rate = 0;
# Vertical synchronization: match the refresh rate of the monitor
vsync = false;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = true;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ "class_g = 'Cairo-clock'" ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
#################################
#
# Window type settings
#
#################################
wintypes :
{
tooltip :
{
fade = true;
shadow = false;
opacity = 0.85;
focus = true;
};
fullscreen :
{
fade = true;
shadow = false;
opacity = 1;
focus = true;
};
dropdown_menu = { shadow = false;};
popup_menu = { shadow = false;};
utility = { shadow = false;};
};
######################
#
# XSync
# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
#
######################
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;
#opacity-rule = [
#"99:name *?= 'Call'",
#"99:class_g = 'Chromium'",
#"99:name *?= 'Conky'",
#"99:class_g = 'Darktable'",
#"50:class_g = 'Dmenu'",
#"99:name *?= 'Event'",
#"99:class_g = 'Firefox'",
#"99:class_g = 'GIMP'",
#"99:name *?= 'Image'",
#"99:class_g = 'Lazpaint'",
#"99:class_g = 'Midori'",
#"99:name *?= 'Minitube'",
#"99:class_g = 'Mousepad'",
#"99:name *?= 'MuseScore'",
#"90:name *?= 'Page Info'",
#"99:name *?= 'Pale Moon'",
#"90:name *?= 'Panel'",
#"99:class_g = 'Pinta'",
#"90:name *?= 'Restart'",
#"99:name *?= 'sudo'",
#"99:name *?= 'Screenshot'",
#"99:class_g = 'Viewnior'",
#"99:class_g = 'VirtualBox'",
#"99:name *?= 'VLC'",
#"99:name *?= 'Write'",
#"93:class_g = 'URxvt' && !_NET_WM_STATE@:32a",
#"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
#"96:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
#];
+173
View File
@@ -0,0 +1,173 @@
// vim: filetype=c
// get dumps via -dump-config and -dump-theme
configuration {
modes: "combi";
font: "mono 12";
/* location: 0;*/
/* yoffset: 0;*/
/* xoffset: 0;*/
/* fixed-num-lines: true;*/
show-icons: true;
terminal: "alacritty";
/* ssh-client: "ssh";*/
/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/
/* run-command: "{cmd}";*/
/* run-list-command: "";*/
/* run-shell-command: "{terminal} -e {cmd}";*/
/* window-command: "wmctrl -i -R {window}";*/
/* window-match-fields: "all";*/
/* icon-theme: ;*/
/* drun-match-fields: "name,generic,exec,categories,keywords";*/
/* drun-categories: ;*/
/* drun-show-actions: false;*/
/* drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";*/
/* drun-url-launcher: "xdg-open";*/
/* disable-history: false;*/
/* ignored-prefixes: "";*/
/* sort: false;*/
/* sorting-method: "normal";*/
/* case-sensitive: false;*/
/* cycle: true;*/
/* sidebar-mode: false;*/
/* hover-select: false;*/
/* eh: 1;*/
/* auto-select: false;*/
/* parse-hosts: false;*/
/* parse-known-hosts: true;*/
combi-modes: "window,drun,ssh";
/* matching: "normal";*/
/* tokenize: true;*/
/* m: "-5";*/
/* filter: ;*/
/* dpi: -1;*/
/* threads: 0;*/
/* scroll-method: 0;*/
/* window-format: "{w} {c} {t}";*/
/* click-to-exit: true;*/
/* max-history-size: 25;*/
combi-hide-mode-prefix: true;
/* combi-display-format: "{mode} {text}";*/
/* matching-negate-char: '-' /* unsupported */;*/
/* cache-dir: ;*/
/* window-thumbnail: false;*/
/* drun-use-desktop-cache: false;*/
/* drun-reload-desktop-cache: false;*/
/* normalize-match: false;*/
/* steal-focus: false;*/
/* application-fallback-icon: ;*/
/* refilter-timeout-limit: 8192;*/
/* xserver-i300-workaround: false;*/
pid: "/run/user/1000/rofi.pid";
/* display-window: ;*/
/* display-windowcd: ;*/
/* display-run: ;*/
/* display-ssh: ;*/
/* display-drun: ;*/
/* display-combi: ;*/
/* display-keys: ;*/
/* display-filebrowser: ;*/
/* kb-primary-paste: "Control+V,Shift+Insert";*/
/* kb-secondary-paste: "Control+v,Insert";*/
/* kb-clear-line: "Control+w";*/
/* kb-move-front: "Control+a";*/
/* kb-move-end: "Control+e";*/
/* kb-move-word-back: "Alt+b,Control+Left";*/
/* kb-move-word-forward: "Alt+f,Control+Right";*/
/* kb-move-char-back: "Left,Control+b";*/
/* kb-move-char-forward: "Right,Control+f";*/
/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/
/* kb-remove-word-forward: "Control+Alt+d";*/
/* kb-remove-char-forward: "Delete,Control+d";*/
/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/
/* kb-remove-to-eol: "Control+k";*/
/* kb-remove-to-sol: "Control+u";*/
/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/
/* kb-accept-custom: "Control+Return";*/
/* kb-accept-custom-alt: "Control+Shift+Return";*/
/* kb-accept-alt: "Shift+Return";*/
/* kb-delete-entry: "Shift+Delete";*/
/* kb-mode-next: "Shift+Right,Control+Tab";*/
/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/
/* kb-mode-complete: "Control+l";*/
/* kb-row-left: "Control+Page_Up";*/
/* kb-row-right: "Control+Page_Down";*/
/* kb-row-up: "Up,Control+p";*/
/* kb-row-down: "Down,Control+n";*/
/* kb-row-tab: "";*/
/* kb-element-next: "Tab";*/
/* kb-element-prev: "ISO_Left_Tab";*/
/* kb-page-prev: "Page_Up";*/
/* kb-page-next: "Page_Down";*/
/* kb-row-first: "Home,KP_Home";*/
/* kb-row-last: "End,KP_End";*/
/* kb-row-select: "Control+space";*/
/* kb-screenshot: "Alt+S";*/
/* kb-ellipsize: "Alt+period";*/
/* kb-toggle-case-sensitivity: "grave,dead_grave";*/
/* kb-toggle-sort: "Alt+grave";*/
/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/
/* kb-custom-1: "Alt+1";*/
/* kb-custom-2: "Alt+2";*/
/* kb-custom-3: "Alt+3";*/
/* kb-custom-4: "Alt+4";*/
/* kb-custom-5: "Alt+5";*/
/* kb-custom-6: "Alt+6";*/
/* kb-custom-7: "Alt+7";*/
/* kb-custom-8: "Alt+8";*/
/* kb-custom-9: "Alt+9";*/
/* kb-custom-10: "Alt+0";*/
/* kb-custom-11: "Alt+exclam";*/
/* kb-custom-12: "Alt+at";*/
/* kb-custom-13: "Alt+numbersign";*/
/* kb-custom-14: "Alt+dollar";*/
/* kb-custom-15: "Alt+percent";*/
/* kb-custom-16: "Alt+dead_circumflex";*/
/* kb-custom-17: "Alt+ampersand";*/
/* kb-custom-18: "Alt+asterisk";*/
/* kb-custom-19: "Alt+parenleft";*/
/* ml-row-left: "ScrollLeft";*/
/* ml-row-right: "ScrollRight";*/
/* ml-row-up: "ScrollUp";*/
/* ml-row-down: "ScrollDown";*/
/* me-select-entry: "MousePrimary";*/
/* me-accept-entry: "MouseDPrimary";*/
/* me-accept-custom: "Control+MouseDPrimary";*/
kb-custom-1: "";
kb-custom-2: "";
kb-custom-3: "";
kb-custom-4: "";
kb-custom-5: "";
kb-custom-6: "";
kb-custom-7: "";
kb-custom-8: "";
kb-custom-9: "";
kb-custom-10: "";
kb-custom-11: "";
kb-custom-12: "";
kb-custom-13: "";
kb-custom-14: "";
kb-custom-15: "";
kb-custom-16: "";
kb-custom-17: "";
kb-custom-18: "";
kb-custom-19: "";
kb-select-1: "Alt+1";
kb-select-2: "Alt+2";
kb-select-3: "Alt+3";
kb-select-4: "Alt+4";
kb-select-5: "Alt+5";
kb-select-6: "Alt+6";
kb-select-7: "Alt+7";
kb-select-8: "Alt+8";
kb-select-9: "Alt+9";
kb-select-10:"Alt+0";
timeout {
action: "kb-cancel";
delay: 0;
}
filebrowser {
directories-first: true;
sorting-method: "name";
}
}
@theme "theme" // read theme in ./theme.rasi
+142
View File
@@ -0,0 +1,142 @@
/**
* rofi -dump-theme output.
* Rofi version: 1.7.5
**/
* {
red: rgba ( 220, 50, 47, 100 % );
selected-active-foreground: rgba ( 166, 226, 42, 100 % );
lightfg: rgba ( 88, 104, 117, 100 % );
separatorcolor: rgba ( 230, 219, 116, 100 % );
urgent-foreground: rgba ( 249, 38, 114, 100 % );
alternate-urgent-background: transparent;
lightbg: rgba ( 238, 232, 213, 100 % );
background-color: transparent;
border-color: var(foreground);
normal-background: transparent;
bordercolor: rgba ( 0, 43, 54, 100 % );
alternate-active-background: transparent;
active-foreground: rgba ( 166, 226, 42, 100 % );
blue: rgba ( 38, 139, 210, 100 % );
alternate-normal-foreground: var(foreground);
urgent-background: transparent;
selected-normal-foreground: rgba ( 248, 248, 242, 100 % );
selected-active-background: rgba ( 20, 20, 17, 100 % );
background: rgba ( 39, 40, 34, 93 % );
selected-urgent-background: rgba ( 249, 38, 114, 100 % );
active-background: transparent;
alternate-active-foreground: var(active-foreground);
alternate-normal-background: transparent;
foreground: rgba ( 248, 248, 242, 100 % );
alternate-urgent-foreground: var(urgent-foreground);
selected-urgent-foreground: rgba ( 248, 248, 242, 100 % );
spacing: 2;
normal-foreground: var(foreground);
selected-normal-background: rgba ( 20, 20, 17, 100 % );
}
window {
padding: 5;
background-color: var(background);
border: 1;
}
mainbox {
padding: 0;
border: 0;
}
message {
padding: 1px ;
border-color: var(separatorcolor);
border: 2px 0px 0px ;
}
textbox {
text-color: var(foreground);
}
listview {
padding: 2px 0px 0px ;
scrollbar: true;
border-color: var(separatorcolor);
spacing: 2px ;
fixed-height: 0;
border: 2px 0px 0px ;
}
element {
padding: 1px ;
border: 0;
}
element normal.normal {
background-color: var(normal-background);
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: var(alternate-normal-background);
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
element-text {
background-color: inherit;
text-color: inherit;
}
scrollbar {
width: 4px ;
padding: 0;
handle-width: 8px ;
border: 0;
}
mode-switcher {
border-color: var(separatorcolor);
border: 2px 0px 0px ;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
inputbar {
padding: 1px ;
spacing: 0;
text-color: var(normal-foreground);
children: [ "prompt","textbox-prompt-colon","entry","case-indicator" ];
}
case-indicator {
spacing: 0;
text-color: var(normal-foreground);
}
entry {
spacing: 0;
text-color: var(normal-foreground);
}
prompt {
spacing: 0;
text-color: var(normal-foreground);
}
textbox-prompt-colon {
margin: 0px 0.3000em 0.0000em 0.0000em ;
expand: false;
str: ":";
text-color: var(normal-foreground);
}
+58
View File
@@ -0,0 +1,58 @@
alias ls='exa' # make output more readable and show directories first
alias ll='ls -l'
alias la='ls --all'
alias less='less --use-color'
alias grep='rg' # colorize grep output, set GREP_COLORS
alias cp="cp -i" # Confirm before overwriting something
alias df='df -h' # Human-readable sizes
alias vi='nvim' # Show sizes in MB
alias r='R'
alias xar="xarchiver"
# Add an "alert" alias for long running commands. Use like so: 'sleep 10; alert'
alias notify='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
#Add a "dotfiles" alias for .dotfile git repo
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
#alias 'dotfiles-update'='dotfiles commit -a && dotfiles push'
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
# foreground colors
for fgc in {30..37}; do
# background colors
for bgc in {40..47}; do
fgc=${fgc#37} # white
bgc=${bgc#40} # black
vals="${fgc:+$fgc;}${bgc}"
vals=${vals%%;}
seq0="${vals:+\e[${vals}m}"
printf " %-9s" "${seq0:-(default)}"
printf " ${seq0}TEXT\e[m"
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
done
echo; echo
done
}
# set title in zsh (for alacritty)
title()
{
echo -e "\e]2;$1\007";
}
pwd()
{
echo "$PWD/$1"
}
+15 -6
View File
@@ -1,20 +1,29 @@
tmux_config_dir="~/.config/tmux"
mod="C-b"
#CONFIGURATION #CONFIGURATION
set-option -g prefix C-a # rebind tmux prefix to CTRL + a because vim uses default CTRL + b #if-shell '[[ -n "$SSH_CLIENT"]]' {
bind-key C-a last-window # double-press of CTRL + a (tmux prefix) switches to previous window # source-file $tmux_config_dir/tmux_remote.conf # use alternative config for tmux inside ssh session
# mod="C-b"
#}
set-option -g prefix $mod # rebind tmux prefix to CTRL + a because vim uses default CTRL + b
set-window-option -g mode-keys vi # vi mode set-window-option -g mode-keys vi # vi mode
set-option -g allow-rename off # dont rename windows on command execution TODO fix set-option -g allow-rename off # dont rename windows on command execution TODO fix
set -s escape-time 0 # dont delay escape key in vim set -s escape-time 0 # dont delay escape key in vim
set -g base-index 1 # start windows numbering at 1 set -g base-index 0 # start windows numbering at 0
set-option -g set-titles on
set -g mouse on
#COLORS #COLORS
set -g default-terminal "screen-256color" # use default terminal colors set -g default-terminal "screen-256color" # use default terminal colors
set-option -g pane-border-style fg=white set-option -g pane-border-style fg=white
set-option -g pane-active-border-style fg=green set-option -g pane-active-border-style fg=blue
set-option -g message-style bg=green,fg=black set-option -g message-style bg=green,fg=black
#STATUSBAR #STATUSBAR
set -g status-position bottom set -g status-position bottom
set -g status-left "" set -g status-left ""
set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}#{=21:pane_title}" set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}#{=21:pane_title}"
set -g status-style fg=black,bg=red # color for the statusbar set -g status-style fg=white,bg=black # color for the statusbar
set-window-option -g window-status-current-style fg=green,bg=black # color for the current window (tab) set-window-option -g window-status-current-style fg=black,bg=blue # color for the current window (tab)
View File
Whitespace-only changes.
+31 -24
View File
@@ -1,5 +1,3 @@
#OPTIONS SECTION #OPTIONS SECTION
#unsetopt beep # try disabling annoying beep sounds #unsetopt beep # try disabling annoying beep sounds
@@ -57,22 +55,7 @@ WORDCHARS=${WORDCHARS//\/[&.;]} # Don't con
#ALIAS SECTION source $XDG_CONFIG_HOME/shell/alias.sh
alias ls='ls -hN --group-directories-first --color=auto' # make output more readable and show directories first
alias grep='grep --color=auto' # colorize grep output, set GREP_COLORS
alias cp="cp -i" # Confirm before overwriting something
alias df='df -h' # Human-readable sizes
alias free='free -m'
alias vi='nvim' # Show sizes in MB
alias ll='ls -l'
alias la='ls --almost-all'
alias r='R'
# Add an "alert" alias for long running commands. Use like so: 'sleep 10; alert'
alias notify='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
#Add a "dotfiles" alias for .dotfile git repo
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
#alias 'dotfiles-update'='dotfiles commit -a && dotfiles push'
#KEYBINDINGS SECTION (use 'cat -v' or 'od -c' to see raw keyboard output) #KEYBINDINGS SECTION (use 'cat -v' or 'od -c' to see raw keyboard output)
@@ -107,7 +90,7 @@ source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zs
#ZSH_HIGHLIGHT_STYLES[builtin]=fg=white,bold #ZSH_HIGHLIGHT_STYLES[builtin]=fg=white,bold
#ZSH_HIGHLIGHT_STYLES[function]=fg=white,bold #ZSH_HIGHLIGHT_STYLES[function]=fg=white,bold
#ZSH_HIGHLIGHT_STYLES[command]=fg=white,bold #ZSH_HIGHLIGHT_STYLES[command]=fg=white,bold
ZSH_HIGHLIGHT_STYLES[precommand]=fg=#eaff00,bold #ZSH_HIGHLIGHT_STYLES[precommand]=fg=#eaff00,bold
#ZSH_HIGHLIGHT_STYLES[commandseparator]=none #ZSH_HIGHLIGHT_STYLES[commandseparator]=none
#ZSH_HIGHLIGHT_STYLES[hashed-command]=fg=009 #ZSH_HIGHLIGHT_STYLES[hashed-command]=fg=009
#ZSH_HIGHLIGHT_STYLES[path]=fg=214,underline #ZSH_HIGHLIGHT_STYLES[path]=fg=214,underline
@@ -122,7 +105,8 @@ source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zs
#ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=009 #ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=009
#ZSH_HIGHLIGHT_STYLES[assign]=none #ZSH_HIGHLIGHT_STYLES[assign]=none
[[ ! -f "$ZDOTDIR/p10k.zsh" ]] || source "$ZDOTDIR/p10k.zsh" # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f "$ZDOTDIR/p10k.zsh" ]] || source "$ZDOTDIR/p10k.zsh" # To customize prompt, run `p10k configure` or edit ~/.config/zsh/p10k.zsh
#eval "$(starship init zsh)" # starship.rs prompt to replace p10k
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # load fish-completion, needs to be sourced after syntax highlighting source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # load fish-completion, needs to be sourced after syntax highlighting
@@ -149,7 +133,30 @@ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # l
#elif [[ -f /etc/DIR_COLORS ]] ; then #elif [[ -f /etc/DIR_COLORS ]] ; then
# eval $(dircolors -b /etc/DIR_COLORS) # eval $(dircolors -b /etc/DIR_COLORS)
#fi #fi
#
function command_not_found_handler {
local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m'
printf 'zsh: command not found: %s\n' "$1"
local entries=(
${(f)"$(/usr/bin/pacman -F --machinereadable -- "/usr/bin/$1")"}
)
if (( ${#entries[@]} ))
then
printf "${bright}$1${reset} may be found in the following packages:\n"
local pkg
for entry in "${entries[@]}"
do
# (repo package version file)
local fields=(
${(0)entry}
)
if [[ "$pkg" != "${fields[2]}" ]]
then
printf "${purple}%s/${bright}%s ${green}%s${reset}\n" "${fields[1]}" "${fields[2]}" "${fields[3]}"
fi
printf ' /%s\n' "${fields[4]}"
pkg="${fields[2]}"
done
fi
return 127
}
+151 -80
View File
@@ -1,8 +1,8 @@
# Generated by Powerlevel10k configuration wizard on 2020-10-15 at 20:07 CEST. # Generated by Powerlevel10k configuration wizard on 2022-09-17 at 04:19 CEST.
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 18245. # Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 52170.
# Wizard options: awesome-fontconfig + powerline + python, large icons, classic, # Wizard options: nerdfont-complete + powerline, small icons, classic, unicode, light,
# unicode, dark, angled separators, sharp heads, flat tails, 2 lines, disconnected, # angled separators, sharp heads, flat tails, 2 lines, disconnected, left frame, sparse,
# left frame, sparse, few icons, concise, transient_prompt, instant_prompt=off. # few icons, concise, transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config. # Type `p10k configure` to generate another config.
# #
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate # Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate
@@ -60,12 +60,12 @@
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
# node_version # node.js version # node_version # node.js version
# go_version # go version (https://golang.org) go_version # go version (https://golang.org)
# rust_version # rustc version (https://www.rust-lang.org) rust_version # rustc version (https://www.rust-lang.org)
# dotnet_version # .NET version (https://dotnet.microsoft.com) # dotnet_version # .NET version (https://dotnet.microsoft.com)
# php_version # php version (https://www.php.net/) # php_version # php version (https://www.php.net/)
# laravel_version # laravel php framework version (https://laravel.com/) # laravel_version # laravel php framework version (https://laravel.com/)
# java_version # java version (https://www.java.com/) java_version # java version (https://www.java.com/)
# package # name@version from package.json (https://docs.npmjs.com/files/package.json) # package # name@version from package.json (https://docs.npmjs.com/files/package.json)
rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
rvm # ruby version from rvm (https://rvm.io) rvm # ruby version from rvm (https://rvm.io)
@@ -74,18 +74,22 @@
jenv # java version from jenv (https://github.com/jenv/jenv) jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv) plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv) phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/) haskell_stack # haskell version from stack (https://haskellstack.org/)
kubecontext # current kubernetes context (https://kubernetes.io/) kubecontext # current kubernetes context (https://kubernetes.io/)
terraform # terraform workspace (https://www.terraform.io) terraform # terraform workspace (https://www.terraform.io)
# terraform_version # terraform version (https://www.terraform.io)
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
gcloud # google cloud cli account and project (https://cloud.google.com/) gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
toolbox # toolbox name (https://github.com/containers/toolbox)
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/) midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
@@ -110,10 +114,10 @@
) )
# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
typeset -g POWERLEVEL9K_MODE=awesome-fontconfig typeset -g POWERLEVEL9K_MODE=nerdfont-complete
# When set to `moderate`, some icons will have an extra space after them. This is meant to avoid # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid
# icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.
typeset -g POWERLEVEL9K_ICON_PADDING=moderate typeset -g POWERLEVEL9K_ICON_PADDING=none
# When set to true, icons appear before content on both sides of the prompt. When set # When set to true, icons appear before content on both sides of the prompt. When set
# to false, icons go after content. If empty or not set, icons go before content in the left # to false, icons go after content. If empty or not set, icons go before content in the left
@@ -133,9 +137,9 @@
# Connect left prompt lines with these symbols. You'll probably want to use the same color # Connect left prompt lines with these symbols. You'll probably want to use the same color
# as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below.
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%240F╭─' typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─'
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%240F├─' typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─'
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%240F╰─' typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─'
# Connect right prompt lines with these symbols. # Connect right prompt lines with these symbols.
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=
@@ -144,14 +148,14 @@
# Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or
# '─'. The last two make it easier to see the alignment between left and right prompt and to # '─'. The last two make it easier to see the alignment between left and right prompt and to
# separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
# for more compact prompt if using using this option. # for more compact prompt if using this option.
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=
if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
# The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE
# ornaments defined above. # ornaments defined above.
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=240 typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242
# Start filler from the edge of the screen if there are no left segments on the first line. # Start filler from the edge of the screen if there are no left segments on the first line.
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
# End filler on the edge of the screen if there are no right segments on the first line. # End filler on the edge of the screen if there are no right segments on the first line.
@@ -159,12 +163,12 @@
fi fi
# Default background color. # Default background color.
typeset -g POWERLEVEL9K_BACKGROUND=236 typeset -g POWERLEVEL9K_BACKGROUND=238
# Separator between same-color segments on the left. # Separator between same-color segments on the left.
typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%244F\uE0B1' typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%246F\uE0B1'
# Separator between same-color segments on the right. # Separator between same-color segments on the right.
typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%244F\uE0B3' typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%246F\uE0B3'
# Separator between different-color segments on the left. # Separator between different-color segments on the left.
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
# Separator between different-color segments on the right. # Separator between different-color segments on the right.
@@ -255,6 +259,11 @@
# /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)
# or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers
# and other directories don't. # and other directories don't.
#
# Optionally, "first" and "last" can be followed by ":<offset>" where <offset> is an integer.
# This moves the truncation point to the right (positive offset) or to the left (negative offset)
# relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0"
# respectively.
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
# Don't shorten this many last directory segments. They are anchors. # Don't shorten this many last directory segments. They are anchors.
typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
@@ -276,12 +285,12 @@
# the full directory that was used in previous commands. # the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
# Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
# POWERLEVEL9K_DIR_CLASSES below. # and POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2 typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
# The default icon shown next to non-writable directories when POWERLEVEL9K_DIR_SHOW_WRITABLE is # The default icon shown next to non-writable and non-existent directories when
# set to v2. # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.
# typeset -g POWERLEVEL9K_LOCK_ICON='⭐' # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
# POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different
@@ -294,8 +303,8 @@
# #
# Triplets are tried in order. The first triplet whose pattern matches $PWD wins. # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.
# #
# If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v2 and the current directory is not writable, # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories
# its class gets suffix _NOT_WRITABLE. # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.
# #
# For example, given these settings: # For example, given these settings:
# #
@@ -304,10 +313,11 @@
# '~(|/*)' HOME '' # '~(|/*)' HOME ''
# '*' DEFAULT '') # '*' DEFAULT '')
# #
# Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with class # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one
# WORK or WORK_NOT_WRITABLE. # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or
# WORK_NON_EXISTENT.
# #
# Simply assigning classes to directories don't have any visible effects. It merely gives you an # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an
# option to define custom colors and icons for different directory classes. # option to define custom colors and icons for different directory classes.
# #
# # Styling for WORK. # # Styling for WORK.
@@ -322,6 +332,12 @@
# typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103
# typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39
# #
# # Styling for WORK_NON_EXISTENT.
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103
# typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39
#
# If a styling parameter isn't explicitly defined for some class, it falls back to the classless # If a styling parameter isn't explicitly defined for some class, it falls back to the classless
# parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls
# back to POWERLEVEL9K_DIR_FOREGROUND. # back to POWERLEVEL9K_DIR_FOREGROUND.
@@ -329,7 +345,7 @@
typeset -g POWERLEVEL9K_DIR_CLASSES=() typeset -g POWERLEVEL9K_DIR_CLASSES=()
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_DIR_PREFIX='%246Fin ' # typeset -g POWERLEVEL9K_DIR_PREFIX='%248Fin '
#####################################[ vcs: git status ]###################################### #####################################[ vcs: git status ]######################################
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
@@ -341,7 +357,7 @@
# Formatter for Git status. # Formatter for Git status.
# #
# Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
# #
# You can edit the function to customize how Git status looks. # You can edit the function to customize how Git status looks.
# #
@@ -359,7 +375,7 @@
if (( $1 )); then if (( $1 )); then
# Styling for up-to-date Git status. # Styling for up-to-date Git status.
local meta='%246F' # grey foreground local meta='%248F' # grey foreground
local clean='%76F' # green foreground local clean='%76F' # green foreground
local modified='%178F' # yellow foreground local modified='%178F' # yellow foreground
local untracked='%39F' # blue foreground local untracked='%39F' # blue foreground
@@ -374,28 +390,42 @@
fi fi
local res local res
local where # branch or tag
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}"
where=${(V)VCS_STATUS_LOCAL_BRANCH}
elif [[ -n $VCS_STATUS_TAG ]]; then
res+="${meta}#"
where=${(V)VCS_STATUS_TAG}
fi
# If local branch name or tag is at most 32 characters long, show it in full. if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
# If local branch name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12. # Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line. # Tip: To always show local branch name in full without truncation, delete the next line.
(( $#where > 32 )) && where[13,-13]="…" (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
res+="${clean}${where//\%/%%}" # escape % res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
fi
# Display the current Git commit if there is no branch or tag. if [[ -n $VCS_STATUS_TAG
# Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line. # Show tag only if not on a branch.
[[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" # Tip: To always show tag, delete the next line.
&& -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
]]; then
local tag=${(V)VCS_STATUS_TAG}
# If tag name is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show tag name in full without truncation, delete the next line.
(( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
res+="${meta}#${clean}${tag//\%/%%}"
fi
# Display the current Git commit if there is no branch and no tag.
# Tip: To always display the current Git commit, delete the next line.
[[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
# Show tracking branch name if it differs from local branch. # Show tracking branch name if it differs from local branch.
if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
fi
# Display "wip" if the latest commit's summary contains "wip" or "WIP".
if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
res+=" ${modified}wip"
fi fi
# ⇣42 if behind the remote. # ⇣42 if behind the remote.
@@ -461,7 +491,7 @@
# Custom icon. # Custom icon.
typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION=
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_VCS_PREFIX='%246Fon ' # typeset -g POWERLEVEL9K_VCS_PREFIX='%248Fon '
# Show status of repositories of these types. You can add svn and/or hg if you are # Show status of repositories of these types. You can add svn and/or hg if you are
# using them. If you do, your prompt may become slow even when your current directory # using them. If you do, your prompt may become slow even when your current directory
@@ -511,7 +541,7 @@
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
###################[ command_execution_time: duration of the last command ]################### ###################[ command_execution_time: duration of the last command ]###################
# Show duration of the last command if takes longer than this many seconds. # Show duration of the last command if takes at least this many seconds.
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
# Show this many fractional digits. Zero means round to seconds. # Show this many fractional digits. Zero means round to seconds.
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
@@ -522,7 +552,7 @@
# Custom icon. # Custom icon.
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION=
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%246Ftook ' # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%248Ftook '
#######################[ background_jobs: presence of background jobs ]####################### #######################[ background_jobs: presence of background jobs ]#######################
# Don't show the number of background jobs. # Don't show the number of background jobs.
@@ -586,7 +616,7 @@
typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true
# If set to non-empty value, hide tools unless there is a file matching the specified file pattern # If set to non-empty value, hide tools unless there is a file matching the specified file pattern
# in the current directory, or its parent diretory, or its grandparent directory, and so on. # in the current directory, or its parent directory, or its grandparent directory, and so on.
# #
# Note: If this parameter is set to empty value, it won't hide tools. # Note: If this parameter is set to empty value, it won't hide tools.
# Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.
@@ -699,6 +729,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
# Custom icon.
# typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]########################### ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color. # Vim shell indicator color.
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
@@ -853,19 +889,21 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%246Fwith ' # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%248Fwith '
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
# Python virtual environment color. # Python virtual environment color.
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
# Don't show Python version next to the virtual environment name. # Don't show Python version next to the virtual environment name.
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
# Don't show virtualenv if pyenv is already shown. # If set to "false", won't show virtualenv if pyenv is already shown.
# If set to "if-different", won't show virtualenv if it's the same as pyenv.
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
# Separate environment name from Python version only with a space. # Separate environment name from Python version only with a space.
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
typeset -g POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES=(virtualenv venv .venv env .env)
#####################[ anaconda: conda environment (https://conda.io/) ]###################### #####################[ anaconda: conda environment (https://conda.io/) ]######################
# Anaconda environment color. # Anaconda environment color.
@@ -918,10 +956,10 @@
# #
# The default format has the following logic: # The default format has the following logic:
# #
# 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# empty and unequal to $P9K_CONTENT. # starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display just "$P9K_CONTENT". # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
@@ -1117,6 +1155,19 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
#######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######
# Scala color.
typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160
# Hide scala version if it doesn't come from one of these sources.
typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)
# If set to false, hide scala version if it's the same as global:
# $(scalaenv version-name) == $(scalaenv global).
typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false
# If set to false, hide scala version if it's equal to "system".
typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true
# Custom icon.
# typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
# Haskell color. # Haskell color.
typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172
@@ -1164,10 +1215,16 @@
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ terraform_version: terraform version (https://www.terraform.io) ]##############
# Terraform version color.
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
# Custom icon.
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the the command you are typing invokes one of these tools. # Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext. # Tip: Remove the next line to always show kubecontext.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito' typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with # Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts. # different contexts.
@@ -1249,12 +1306,12 @@
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%246Fat ' # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%248Fat '
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the the command you are typing invokes one of these tools. # Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws. # Tip: Remove the next line to always show aws.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi' typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
# in each pair defines a pattern against which the current AWS profile gets matched. # in each pair defines a pattern against which the current AWS profile gets matched.
@@ -1286,6 +1343,12 @@
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
# typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# AWS segment format. The following parameters are available within the expansion.
#
# - P9K_AWS_PROFILE The name of the current AWS profile.
# - P9K_AWS_REGION The region associated with the current AWS profile.
typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
#[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
# AWS Elastic Beanstalk environment color. # AWS Elastic Beanstalk environment color.
typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
@@ -1293,18 +1356,18 @@
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
# Show azure only when the the command you are typing invokes one of these tools. # Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure. # Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi' typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
# Azure account name color. # Azure account name color.
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the the command you are typing invokes one of these tools. # Show gcloud only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show gcloud. # Tip: Remove the next line to always show gcloud.
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
# Google cloud color. # Google cloud color.
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
@@ -1320,7 +1383,7 @@
# P9K_GCLOUD_PROJECT_ID | gcloud config get-value project # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project
# P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'
# #
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced with '%%'. # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.
# #
# Obtaining project name requires sending a request to Google servers. This can take a long time # Obtaining project name requires sending a request to Google servers. This can take a long time
# and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud
@@ -1343,9 +1406,9 @@
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
# Show google_app_cred only when the the command you are typing invokes one of these tools. # Show google_app_cred only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show google_app_cred. # Tip: Remove the next line to always show google_app_cred.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi' typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
# Google application credentials classes for the purpose of using different colors, icons and # Google application credentials classes for the purpose of using different colors, icons and
# expansions with different credentials. # expansions with different credentials.
@@ -1393,9 +1456,19 @@
# P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id
# P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email
# #
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced by '%%'. # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
# Toolbox color.
typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
# Don't display the name of the toolbox if it matches fedora-toolbox-*.
typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
# Custom icon.
# typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.
# typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%248Fin '
###############################[ public_ip: public IP address ]############################### ###############################[ public_ip: public IP address ]###############################
# Public IP color. # Public IP color.
typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
@@ -1410,7 +1483,7 @@
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
# Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
# to see the name of the interface. # to see the name of the interface.
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*' typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*'
# If set to true, show one segment per matching network interface. If set to false, show only # If set to true, show one segment per matching network interface. If set to false, show only
# one segment corresponding to the first matching network interface. # one segment corresponding to the first matching network interface.
# Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
@@ -1424,17 +1497,19 @@
# The following parameters are accessible within the expansion: # The following parameters are accessible within the expansion:
# #
# Parameter | Meaning # Parameter | Meaning
# ----------------------+--------------- # ----------------------+-------------------------------------------
# P9K_IP_IP | IP address # P9K_IP_IP | IP address
# P9K_IP_INTERFACE | network interface # P9K_IP_INTERFACE | network interface
# P9K_IP_RX_BYTES | total number of bytes received # P9K_IP_RX_BYTES | total number of bytes received
# P9K_IP_TX_BYTES | total number of bytes sent # P9K_IP_TX_BYTES | total number of bytes sent
# P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
# P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
# P9K_IP_RX_RATE | receive rate (since last prompt) # P9K_IP_RX_RATE | receive rate (since last prompt)
# P9K_IP_TX_RATE | send rate (since last prompt) # P9K_IP_TX_RATE | send rate (since last prompt)
typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP' typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP'
# Show information for the first network interface whose name matches this regular expression. # Show information for the first network interface whose name matches this regular expression.
# Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
@@ -1453,7 +1528,7 @@
# Show battery in yellow when it's discharging. # Show battery in yellow when it's discharging.
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
# Battery pictograms going from low to high level of charge. # Battery pictograms going from low to high level of charge.
typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█') typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
# Don't show the remaining time to charge/discharge. # Don't show the remaining time to charge/discharge.
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
@@ -1477,15 +1552,11 @@
# Parameter | Meaning # Parameter | Meaning
# ----------------------+--------------- # ----------------------+---------------
# P9K_WIFI_SSID | service set identifier, a.k.a. network name # P9K_WIFI_SSID | service set identifier, a.k.a. network name
# P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none" # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown
# P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second
# P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0
# P9K_WIFI_NOISE | noise in dBm, from -120 to 0 # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
# P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
#
# All parameters except P9K_WIFI_BARS are extracted from the output of the following command:
#
# /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I
####################################[ time: current time ]#################################### ####################################[ time: current time ]####################################
# Current time color. # Current time color.
@@ -1499,7 +1570,7 @@
# Custom icon. # Custom icon.
typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION=
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_TIME_PREFIX='%246Fat ' # typeset -g POWERLEVEL9K_TIME_PREFIX='%248Fat '
# Example of a user-defined prompt segment. Function prompt_example will be called on every # Example of a user-defined prompt segment. Function prompt_example will be called on every
# prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
@@ -1552,7 +1623,7 @@
# - verbose: Enable instant prompt and print a warning when detecting console output during # - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't # zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means. # seen the warning, or if you are unsure what this all means.
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
-243
View File
@@ -1,243 +0,0 @@
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# Below, there should be one TERM entry for each termtype that is colorizable
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM eterm-color
TERM gnome
TERM gnome-256color
TERM hurd
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mach-gnu-color
TERM mlterm
TERM putty
TERM putty-256color
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM rxvt-unicode256
TERM screen
TERM screen-256color
TERM screen-256color-bce
TERM screen-bce
TERM screen-w
TERM screen.Eterm
TERM screen.rxvt
TERM screen.linux
TERM st
TERM st-256color
TERM terminator
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
# Or if you want to colorize scripts even if they do not have the
# executable bit actually set.
#.sh 01;32
#.csh 01;32
# archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.arc 01;31
.arj 01;31
.taz 01;31
.lha 01;31
.lz4 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31
.tzo 01;31
.t7z 01;31
.zip 01;31
.z 01;31
.Z 01;31
.dz 01;31
.gz 01;31
.lrz 01;31
.lz 01;31
.lzo 01;31
.xz 01;31
.bz2 01;31
.bz 01;31
.tbz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.war 01;31
.ear 01;31
.sar 01;31
.rar 01;31
.alz 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.7z 01;31
.rz 01;31
.cab 01;31
# image formats
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.svg 01;35
.svgz 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
.webm 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.mp4v 01;35
.vob 01;35
.qt 01;35
.nuv 01;35
.wmv 01;35
.asf 01;35
.rm 01;35
.rmvb 01;35
.flc 01;35
.avi 01;35
.fli 01;35
.flv 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.cgm 01;35
.emf 01;35
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axv 01;35
.anx 01;35
.ogv 01;35
.ogx 01;35
# Document files
.pdf 00;32
.ps 00;32
.txt 00;32
.patch 00;32
.diff 00;32
.log 00;32
.tex 00;32
.doc 00;32
# audio formats
.aac 00;36
.au 00;36
.flac 00;36
.m4a 00;36
.mid 00;36
.midi 00;36
.mka 00;36
.mp3 00;36
.mpc 00;36
.ogg 00;36
.ra 00;36
.wav 00;36
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axa 00;36
.oga 00;36
.spx 00;36
.xspf 00;36
+85
View File
@@ -0,0 +1,85 @@
#!/bin/sh
# taken from https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/displayselect
# A UI for detecting and selecting all displays. Probes xrandr for connected
# displays and lets user select one to use. User may also select "manual
# selection" which opens arandr.
twoscreen() { # If multi-monitor is selected and there are two screens.
mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
# Mirror displays using native resolution of external display and a scaled
# version for the internal display
if [ "$mirror" = "yes" ]; then
external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:")
internal=$(echo "$screens" | grep -v "$external")
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
tail -n 1 | awk '{print $1}')
res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \
tail -n 1 | awk '{print $1}')
res_ext_x=$(echo "$res_external" | sed 's/x.*//')
res_ext_y=$(echo "$res_external" | sed 's/.*x//')
res_int_x=$(echo "$res_internal" | sed 's/x.*//')
res_int_y=$(echo "$res_internal" | sed 's/.*x//')
scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
xrandr --output "$external" --auto --scale 1.0x1.0 \
--output "$internal" --auto --same-as "$external" \
--scale "$scale_x"x"$scale_y"
else
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
fi
}
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
}
multimon() { # Multi-monitor handler.
case "$(echo "$screens" | wc -l)" in
2) twoscreen ;;
*) morescreen ;;
esac ;}
onescreen() { # If only one output available or chosen.
xrandr --output "$1" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "\b$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ' -)
}
postrun() { # Stuff to run to clean up.
setbg # Fix background if screen size/arangement has changed.
remaps # Re-remap keys if keyboard added (for laptop bases)
{ killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen
}
# Get all possible displays
allposs=$(xrandr -q | grep "connected")
# Get all connected screens.
screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
# If there's only one screen
[ "$(echo "$screens" | wc -l)" -lt 2 ] &&
{ onescreen "$screens"; postrun; notify-send "💻 Only one screen detected." "Using it in its optimal settings..."; exit ;}
# Get user choice including multi-monitor and manual selection:
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
case "$chosen" in
"manual selection") arandr ; exit ;;
"multi-monitor") multimon ;;
*) onescreen "$chosen" ;;
esac
postrun
+69
View File
@@ -0,0 +1,69 @@
#!/bin/sh
# from https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/dmenumount
# Gives a dmenu prompt to mount unmounted drives and Android phones. If
# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll
# be prompted to give a mountpoint from already existsing directories. If you
# input a novel directory, it will prompt you to create that directory.
getmount() { \
[ -z "$chosen" ] && exit 1
# shellcheck disable=SC2086
mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1
test -z "$mp" && exit 1
if [ ! -d "$mp" ]; then
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
fi
}
mountusb() { \
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1
chosen="$(echo "$chosen" | awk '{print $1}')"
sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
partitiontype="$(lsblk -no "fstype" "$chosen")"
case "$partitiontype" in
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
"exfat") sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)";;
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
esac
notify-send "💻 USB mounting" "$chosen mounted to $mp."
}
mountandroid() { \
chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1
chosen="$(echo "$chosen" | cut -d : -f 1)"
getmount "$HOME -maxdepth 3 -type d"
simple-mtpfs --device "$chosen" "$mp"
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
simple-mtpfs --device "$chosen" "$mp"
notify-send "🤖 Android Mounting" "Android device mounted to $mp."
}
asktype() { \
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1
case $choice in
USB) mountusb ;;
Android) mountandroid ;;
esac
}
anddrives=$(simple-mtpfs -l 2>/dev/null)
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | grep 'part\|rom' | awk '$4==""{printf "%s (%s)\n",$1,$3}')"
if [ -z "$usbdrives" ]; then
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
echo "Android device(s) detected."
mountandroid
else
if [ -z "$anddrives" ]; then
echo "USB drive(s) detected."
mountusb
else
echo "Mountable USB drive(s) and Android device(s) detected."
asktype
fi
fi
+125
View File
@@ -0,0 +1,125 @@
#!/bin/sh
# taken from https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/dmenurecord
# Usage:
# `$0`: Ask for recording type via dmenu
# `$0 screencast`: Record both audio and screen
# `$0 video`: Record only screen
# `$0 audio`: Record only audio
# `$0 kill`: Kill existing recording
#
# If there is already a running instance, user will be prompted to end it.
updateicon() { \
echo "$1" > /tmp/recordingicon
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
}
killrecording() {
recpid="$(cat /tmp/recordingpid)"
# kill with SIGTERM, allowing finishing touches.
kill -15 "$recpid"
rm -f /tmp/recordingpid
updateicon ""
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
sleep 3
kill -9 "$recpid"
exit
}
screencast() { \
ffmpeg -y \
-f x11grab \
-framerate 60 \
-s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
-i "$DISPLAY" \
-f alsa -i default \
-r 30 \
-c:v h264 -crf 0 -preset ultrafast -c:a aac \
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" &
echo $! > /tmp/recordingpid
updateicon "⏺️🎙️"
}
video() { ffmpeg \
-f x11grab \
-s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
-i "$DISPLAY" \
-c:v libx264 -qp 0 -r 30 \
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid
updateicon "⏺️"
}
webcamhidef() { ffmpeg \
-f v4l2 \
-i /dev/video0 \
-video_size 1920x1080 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid
updateicon "🎥"
}
webcam() { ffmpeg \
-f v4l2 \
-i /dev/video0 \
-video_size 640x480 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid
updateicon "🎥"
}
audio() { \
ffmpeg \
-f alsa -i default \
-c:a flac \
"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" &
echo $! > /tmp/recordingpid
updateicon "🎙️"
}
askrecording() { \
choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:")
case "$choice" in
screencast) screencast;;
audio) audio;;
video) video;;
*selected) videoselected;;
webcam) webcam;;
"webcam (hi-def)") webcamhidef;;
esac
}
asktoend() { \
response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") &&
[ "$response" = "Yes" ] && killrecording
}
videoselected()
{
slop -f "%x %y %w %h" > /tmp/slop
read -r X Y W H < /tmp/slop
rm /tmp/slop
ffmpeg \
-f x11grab \
-framerate 60 \
-video_size "$W"x"$H" \
-i :0.0+"$X,$Y" \
-c:v libx264 -qp 0 -r 30 \
"$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid
updateicon "⏺️"
}
case "$1" in
screencast) screencast;;
audio) audio;;
video) video;;
*selected) videoselected;;
kill) killrecording;;
*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
esac
+46
View File
@@ -0,0 +1,46 @@
#!/bin/sh
# taken from https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/dmenuumount
# A dmenu prompt to unmount drives.
# Provides you with mounted partitions, select one to unmount.
# Drives mounted at /, /boot and /home will not be options to unmount.
unmountusb() {
[ -z "$drives" ] && exit
chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1
chosen="$(echo "$chosen" | awk '{print $1}')"
[ -z "$chosen" ] && exit
sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted."
}
unmountandroid() { \
chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1
[ -z "$chosen" ] && exit
sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted."
}
asktype() { \
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1
case "$choice" in
USB) unmountusb ;;
Android) unmountandroid ;;
esac
}
drives=$(lsblk -nrpo "name,type,size,mountpoint,label" | awk -F':' '{gsub(/ /,":")}$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s) %s\n",$4,$3,$5}')
if ! grep simple-mtpfs /etc/mtab; then
[ -z "$drives" ] && echo "No drives to unmount." && exit
echo "Unmountable USB drive detected."
unmountusb
else
if [ -z "$drives" ]
then
echo "Unmountable Android device detected."
unmountandroid
else
echo "Unmountable USB drive(s) and Android device(s) detected."
asktype
fi
fi
@@ -0,0 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=False
Exec=/usr/lib/firefox/firefox -P
Name=Firefox Profiles
Comment=Custom profile for Firefox
@@ -0,0 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=False
Exec=/usr/lib/thunderbird/thunderbird -P
Name=Thunderbird Profiles
Comment=Custom profile for Thunderbird
@@ -0,0 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/usr/bin/telegram-desktop -- %u
Name=Telegram Desktop
Comment=Custom definition for Telegram Desktop
@@ -0,0 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/usr/lib/thunderbird/thunderbird %u
Name=Thunderbird
Comment=Custom definition for Thunderbird
-23
View File
@@ -1,23 +0,0 @@
# Clean Up Home Directory
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export TS3_CONFIG_DIR="$XDG_CONFIG_HOME/ts3client"
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter"
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export WGETRC="$XDG_CONFIG_HOME/wgetrc"
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME/yarn/config"'
alias code='code --extensions-dir "$XDG_DATA_HOME/vscode"'
alias vscodium='vscodium --extensions-dir "$XDG_DATA_HOME/vscode"'
export EDITOR=/usr/bin/nvim
export BROWSER=/usr/bin/firefox
export QT_QPA_PLATFORMTHEME="qt5ct"
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"