Initial Commit

This commit is contained in:
Salim Zaidi 2023-06-20 17:45:22 +01:00
parent f18da1cc25
commit a5bc6b13c5
96 changed files with 6936 additions and 0 deletions

BIN
Hack-NerdFont.tar.gz Normal file

Binary file not shown.

2
config/.fehbg Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
feh --no-fehbg --bg-fill '$HOME/.config/wallpapers/main.jpg'

18
config/.gtkrc-2.0 Normal file
View file

@ -0,0 +1,18 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/zed/.gtkrc-2.0.mine"
gtk-theme-name="Dracula"
gtk-icon-theme-name="Dracula-icons"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Sunity-cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"

View file

@ -0,0 +1,33 @@
window:
#padding:
#x: 10
#y: 10
class:
instance: Alacritty
general: Alacritty
opacity: 0.92
scrolling:
history: 10000
multiplier: 3
font:
normal:
family: Hack Nerd Font
style: Regular
bold:
family: Hack Nerd Font
style: Bold
italic:
family: Hack Nerd Font
style: Italic
bold_italic:
family: Hack Nerd Font
style: Bold Italic
size: 12
draw_bold_text_with_bright_colors: true
selection:
save_to_clipboard: true
import:
- ~/.config/alacritty/dracula.yml

27
config/alacritty/blue.yml Normal file
View file

@ -0,0 +1,27 @@
colors:
# Default colors
primary:
background: '#2B303B'
foreground: '#ffffff'
# Normal colors
normal:
black: '#2B303B'
red: '#BF616A'
green: '#A3BE8C'
yellow: '#EBCB8B'
blue: '#8FA1B3'
magenta: '#B48EAD'
cyan: '#96B5B4'
white: '#C0C5CE'
# Bright colors
bright:
black: '#8FA1B3'
red: '#BF616A'
green: '#A3BE8C'
yellow: '#EBCB8B'
blue: '#65737E'
magenta: '#B48EAD'
cyan: '#96B5B4'
white: '#EFF1F5'

View file

@ -0,0 +1,27 @@
colors:
# Default colors
primary:
background: '#282a36'
foreground: '#f8f8f2'
# Normal colors
normal:
black: '#000000'
red: '#ff5555'
green: '#50fa7b'
yellow: '#f1fa8c'
blue: '#bd93f9'
magenta: '#ff79c6'
cyan: '#8be9fd'
white: '#bbbbbb'
# Bright colors
bright:
black: '#6272a4'
red: '#ff5555'
green: '#50fa7b'
yellow: '#f1fa8c'
blue: '#caa9fa'
magenta: '#ff79c6'
cyan: '#8be9fd'
white: '#ffffff'

27
config/alacritty/nord.yml Normal file
View file

@ -0,0 +1,27 @@
colors:
# Default colors
primary:
background: '#2E3440'
foreground: '#D8DEE9'
# Normal colors
normal:
black: '#3B4252'
red: '#BF616A'
green: '#A3BE8C'
yellow: '#EBCB8B'
blue: '#81A1C1'
magenta: '#B48EAD'
cyan: '#88C0D0'
white: '#E5E9F0'
# Bright colors
bright:
black: '#4C566A'
red: '#BF616A'
green: '#A3BE8C'
yellow: '#EBCB8B'
blue: '#81A1C1'
magenta: '#B48EAD'
cyan: '#8FBCBB'
white: '#ECEFF4'

3
config/bookmarks.txt Normal file
View file

@ -0,0 +1,3 @@
https://github.com/zedsalim
https://zedcyber.tk/
https://mad-logic.netlify.app/

192
config/dunst/dunstrc Normal file
View file

@ -0,0 +1,192 @@
[global]
font = Ubuntu Mono 11
allow_markup = yes
format = "<b>%s</b>\n%b"
sort = yes
indicate_hidden = yes
alignment = left
bounce_freq = 0
show_age_threshold = 60
word_wrap = yes
ignore_newline = no
geometry = "300x5-30+20"
shrink = no
transparency = 0
idle_threshold = 120
monitor = 0
sticky_history = yes
history_length = 20
show_indicators = yes
line_height = 0
separator_height = 2
padding = 8
horizontal_padding = 16
separator_color = frame
startup_notification = false
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/firefox -new-tab
icon_position = off
icon_folders = /usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/
[frame]
width = 3
color = "#bd93f9"
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#282a36"
foreground = "#bd93f9"
frame_color = "#bd93f9"
timeout = 4
[urgency_normal]
background = "#282a36"
foreground = "#bd93f9"
frame_color = "#bd93f9"
timeout = 4
[urgency_critical]
background = "#ff5555"
foreground = "#f8f8f2"
frame_color = "#f8f8f2"
timeout = 0
# Icon for notifications with low urgency, uncomment to enable
#new_icon = /path/to/icon
# Icon for notifications with normal urgency, uncomment to enable
#new_icon = /path/to/icon
# Icon for notifications with critical urgency, uncomment to enable
#new_icon = /path/to/icon
# 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 (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# 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: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[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
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

BIN
config/guide.pdf Executable file

Binary file not shown.

24
config/i3/autostart.sh Executable file
View file

@ -0,0 +1,24 @@
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
picom -b &
dunst &
killall nm-applet
nm-applet &
#killall blueman-applet
#blueman-applet &
killall volumeicon
volumeicon &
numlockx on &
killall xfce4-power-manager
xfce4-power-manager &
killall sxhkd
sxhkd -c ~/.config/sxhkd/sxhkdrc &
ibus-daemon -drx &

10
config/i3/colors.conf Executable file
View file

@ -0,0 +1,10 @@
######################################
# Colors
# class border bground text indicator child_border
client.focused #d6acff #d6acff #F8F8F2 #d6acff #d6acff
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
client.background #F8F8F2

59
config/i3/config Executable file
View file

@ -0,0 +1,59 @@
######################################
# External
include $HOME/.config/i3/workspaces.conf
include $HOME/.config/i3/colors.conf
exec --no-startup-id ibus-daemon -drx
exec_always feh --bg-fill ~/.config/wallpapers/wall.png
#exec_always --no-startup-id ~/.fehbg
exec_always --no-startup-id ~/.config/i3/autostart.sh
exec --no-startup-id ~/.config/scripts/help_notification.sh
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
#exec --no-startup-id ~/.config/scripts/resolution.sh
#exec --no-startup-id ~/.config/scripts/resolution-double.sh
######################################
# Vars
set $mod Mod4
set $g_inner 9
set $g_outer 6
######################################
# Theme
font pango:monospace 8
new_window 1pixel
gaps inner $g_inner
gaps outer $g_outer
default_border pixel 2
default_floating_border pixel 2
floating_modifier $mod
bindsym $mod+q kill
######################################
# Gaps
bindsym $mod+Shift+n gaps inner current set $g_inner; gaps outer current set $g_outer
bindsym $mod+x gaps outer current plus 5
bindsym $mod+Shift+x gaps outer current minus 5
bindsym $mod+z gaps inner current plus 5
bindsym $mod+Shift+z gaps inner current minus 5
######################################
# System keybindings
# Reboot
bindsym $mod+Shift+b exec "sudo reboot"
# Power off
bindsym $mod+Shift+s exec "sudo shutdown now"
# Browser
bindsym $mod+w exec brave-browser
# Open Alacritty in floating mode
bindsym $mod+Shift+Return exec alacritty --class AlacrittyFloating
# Set AlacrittyFloating window to floating mode
for_window [class="AlacrittyFloating"] floating enable, move position center
# Open sxiv in fullscreen mode
for_window [class="Sxiv"] fullscreen

83
config/i3/workspaces.conf Executable file
View file

@ -0,0 +1,83 @@
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"
set $ws11 "11"
######################################
# Mouvements
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+F12 workspace 11
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
bindsym $mod+Shift+F12 move container to workspace 11
# switch to workspace with numlock keys
bindcode $mod+Mod2+87 workspace 1
bindcode $mod+Mod2+88 workspace 2
bindcode $mod+Mod2+89 workspace 3
bindcode $mod+Mod2+83 workspace 4
bindcode $mod+Mod2+84 workspace 5
bindcode $mod+Mod2+85 workspace 6
bindcode $mod+Mod2+79 workspace 7
bindcode $mod+Mod2+80 workspace 8
bindcode $mod+Mod2+81 workspace 9
bindcode $mod+Mod2+90 workspace 10
# move focused container to workspace with numlock keys
bindcode $mod+Shift+Mod2+87 move container to workspace 1
bindcode $mod+Shift+Mod2+88 move container to workspace 2
bindcode $mod+Shift+Mod2+89 move container to workspace 3
bindcode $mod+Shift+Mod2+83 move container to workspace 4
bindcode $mod+Shift+Mod2+84 move container to workspace 5
bindcode $mod+Shift+Mod2+85 move container to workspace 6
bindcode $mod+Shift+Mod2+79 move container to workspace 7
bindcode $mod+Shift+Mod2+80 move container to workspace 8
bindcode $mod+Shift+Mod2+81 move container to workspace 9
bindcode $mod+Shift+Mod2+90 move container to workspace 10
######################################
# Assignments
# bind program to workspace and focus to them on startup:
assign [class="Brave-browser"] 1
assign [class="Thunar"] 2
assign [class="Codium"] 3
assign [class="TelegramDesktop"] 4
assign [class="discord"] 5
assign [class="GitHub Desktop"] 10
# automatic set focus new window if it opens on another workspace then the current:
for_window [class=Brave-browser] focus
for_window [class=Thunar] focus
for_window [class=Codium] focus
for_window [class=TelegramDesktop] focus
for_window [class=discord] focus
for_window [class="GitHub Desktop" ] focus
workspace 11 output HDMI-0

829
config/neofetch/config.conf Executable file
View file

@ -0,0 +1,829 @@
print_info() {
prin " "
info "$(color 1) OS " distro
info "$(color 2) VER" kernel
info "$(color 3) UP " uptime
info "$(color 4) PKG" packages
info "$(color 5) WM " wm
info "$(color 6) CPU" cpu
info "$(color 7) GPU" gpu
info "$(color 8) MEM" memory
prin "$(color 1) $(color 2) $(color 3) $(color 4) $(color 5) $(color 6) $(color 7) $(color 8)"
}
# Title
# Hide/Show Fully qualified domain name.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --title_fqdn
title_fqdn="off"
# Kernel
# Shorten the output of the kernel function.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --kernel_shorthand
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
#
# Example:
# on: '4.8.9-1-ARCH'
# off: 'Linux 4.8.9-1-ARCH'
kernel_shorthand="on"
# Distro
# Shorten the output of the distro function
#
# Default: 'off'
# Values: 'on', 'tiny', 'off'
# Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku
distro_shorthand="off"
# Show/Hide OS Architecture.
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --os_arch
#
# Example:
# on: 'Arch Linux x86_64'
# off: 'Arch Linux'
os_arch="on"
# Uptime
# Shorten the output of the uptime function
#
# Default: 'on'
# Values: 'on', 'tiny', 'off'
# Flag: --uptime_shorthand
#
# Example:
# on: '2 days, 10 hours, 3 mins'
# tiny: '2d 10h 3m'
# off: '2 days, 10 hours, 3 minutes'
uptime_shorthand="on"
# Memory
# Show memory pecentage in output.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --memory_percent
#
# Example:
# on: '1801MiB / 7881MiB (22%)'
# off: '1801MiB / 7881MiB'
memory_percent="off"
# Change memory output unit.
#
# Default: 'mib'
# Values: 'kib', 'mib', 'gib'
# Flag: --memory_unit
#
# Example:
# kib '1020928KiB / 7117824KiB'
# mib '1042MiB / 6951MiB'
# gib: ' 0.98GiB / 6.79GiB'
memory_unit="mib"
# Packages
# Show/Hide Package Manager names.
#
# Default: 'tiny'
# Values: 'on', 'tiny' 'off'
# Flag: --package_managers
#
# Example:
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="on"
# Shell
# Show the path to $SHELL
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --shell_path
#
# Example:
# on: '/bin/bash'
# off: 'bash'
shell_path="off"
# Show $SHELL version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --shell_version
#
# Example:
# on: 'bash 4.4.5'
# off: 'bash'
shell_version="on"
# CPU
# CPU speed type
#
# Default: 'bios_limit'
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
# CPU speed shorthand
#
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="off"
# Enable/Disable CPU brand in output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_brand
#
# Example:
# on: 'Intel i7-6500U'
# off: 'i7-6500U (4)'
cpu_brand="on"
# CPU Speed
# Hide/Show CPU speed.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_speed
#
# Example:
# on: 'Intel i7-6500U (4) @ 3.1GHz'
# off: 'Intel i7-6500U (4)'
cpu_speed="on"
# CPU Cores
# Display CPU cores in output
#
# Default: 'logical'
# Values: 'logical', 'physical', 'off'
# Flag: --cpu_cores
# Support: 'physical' doesn't work on BSD.
#
# Example:
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
# off: 'Intel i7-6500U @ 3.1GHz'
cpu_cores="logical"
# CPU Temperature
# Hide/Show CPU temperature.
# Note the temperature is added to the regular CPU function.
#
# Default: 'off'
# Values: 'C', 'F', 'off'
# Flag: --cpu_temp
# Supports: Linux, BSD
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
# coretemp kernel module. This only supports newer Intel processors.
#
# Example:
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
# off: 'Intel i7-6500U (4) @ 3.1GHz'
cpu_temp="off"
# GPU
# Enable/Disable GPU Brand
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gpu_brand
#
# Example:
# on: 'AMD HD 7950'
# off: 'HD 7950'
gpu_brand="on"
# Which GPU to display
#
# Default: 'all'
# Values: 'all', 'dedicated', 'integrated'
# Flag: --gpu_type
# Supports: Linux
#
# Example:
# all:
# GPU1: AMD HD 7950
# GPU2: Intel Integrated Graphics
#
# dedicated:
# GPU1: AMD HD 7950
#
# integrated:
# GPU1: Intel Integrated Graphics
gpu_type="all"
# Resolution
# Display refresh rate next to each monitor
# Default: 'off'
# Values: 'on', 'off'
# Flag: --refresh_rate
# Supports: Doesn't work on Windows.
#
# Example:
# on: '1920x1080 @ 60Hz'
# off: '1920x1080'
refresh_rate="off"
# Gtk Theme / Icons / Font
# Shorten output of GTK Theme / Icons / Font
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --gtk_shorthand
#
# Example:
# on: 'Numix, Adwaita'
# off: 'Numix [GTK2], Adwaita [GTK3]'
gtk_shorthand="off"
# Enable/Disable gtk2 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk2
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Adwaita [GTK3]'
gtk2="on"
# Enable/Disable gtk3 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk3
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Numix [GTK2]'
gtk3="on"
# IP Address
# Website to ping for the public IP
#
# Default: 'http://ident.me'
# Values: 'url'
# Flag: --ip_host
public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Desktop Environment
# Show Desktop Environment version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --de_version
de_version="on"
# Disk
# Which disks to display.
# The values can be any /dev/sdXX, mount point or directory.
# NOTE: By default we only show the disk info for '/'.
#
# Default: '/'
# Values: '/', '/dev/sdXX', '/path/to/drive'.
# Flag: --disk_show
#
# Example:
# disk_show=('/' '/dev/sdb1'):
# 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
#
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
disk_show=('/')
# Disk subtitle.
# What to append to the Disk subtitle.
#
# Default: 'mount'
# Values: 'mount', 'name', 'dir', 'none'
# Flag: --disk_subtitle
#
# Example:
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
#
# mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
#
# none: 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
disk_subtitle="mount"
# Disk percent.
# Show/Hide disk percent.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --disk_percent
#
# Example:
# on: 'Disk (/): 74G / 118G (66%)'
# off: 'Disk (/): 74G / 118G'
disk_percent="on"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
# gmusicbrowser
# gogglesmm
# guayadeque
# io.elementary.music
# iTunes
# juk
# lollypop
# mocp
# mopidy
# mpd
# muine
# netease-cloud-music
# olivia
# playerctl
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# strawberry
# tauonmb
# tomahawk
# vlc
# xmms2d
# xnoise
# yarock
music_player="mpd"
# Format to display song information.
#
# Default: '%artist% - %album% - %title%'
# Values: '%artist%', '%album%', '%title%'
# Flag: --song_format
#
# Example:
# default: 'Song: Jet - Get Born - Sgt Major'
song_format="%artist% - %album% - %title%"
# Print the Artist, Album and Title on separate lines
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --song_shorthand
#
# Example:
# on: 'Artist: The Fratellis'
# 'Album: Costello Music'
# 'Song: Chelsea Dagger'
#
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
# Text Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --colors
#
# Each number represents a different part of the text in
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
#
# Example:
# colors=(distro) - Text is colored based on Distro colors.
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
colors=(distro)
# Text Options
# Toggle bold text
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bold
bold="on"
# Enable/Disable Underline
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --underline
underline_enabled="on"
# Underline character
#
# Default: '-'
# Values: 'string'
# Flag: --underline_char
underline_char="-"
# Info Separator
# Replace the default separator with the specified string.
#
# Default: ':'
# Flag: --separator
#
# Example:
# separator="->": 'Shell-> bash'
# separator=" =": 'WM = dwm'
separator=":"
# Color Blocks
# Color block range
# The range of colors to print.
#
# Default: '0', '15'
# Values: 'num'
# Flag: --block_range
#
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
block_range=(0 15)
# Toggle color blocks
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --color_blocks
color_blocks="on"
# Color block width in spaces
#
# Default: '3'
# Values: 'num'
# Flag: --block_width
block_width=3
# Color block height in lines
#
# Default: '1'
# Values: 'num'
# Flag: --block_height
block_height=1
# Color Alignment
#
# Default: 'auto'
# Values: 'auto', 'num'
# Flag: --col_offset
#
# Number specifies how far from the left side of the terminal (in spaces) to
# begin printing the columns, in case you want to e.g. center them under your
# text.
# Example:
# col_offset="auto" - Default behavior of neofetch
# col_offset=7 - Leave 7 spaces then print the colors
col_offset="auto"
# Progress Bars
# Bar characters
#
# Default: '-', '='
# Values: 'string', 'string'
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
# Toggle Bar border
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bar_border
bar_border="on"
# Progress bar length in spaces
# Number of chars long to make the progress bars.
#
# Default: '15'
# Values: 'num'
# Flag: --bar_length
bar_length=15
# Progress bar colors
# When set to distro, uses your distro's logo colors.
#
# Default: 'distro', 'distro'
# Values: 'distro', 'num'
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
# Info display
# Display a bar with the info.
#
# Default: 'off'
# Values: 'bar', 'infobar', 'barinfo', 'off'
# Flags: --cpu_display
# --memory_display
# --battery_display
# --disk_display
#
# Example:
# bar: '[---=======]'
# infobar: 'info [---=======]'
# barinfo: '[---=======] info'
# off: 'info'
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
# Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="ascii"
# Image Source
#
# Which image or ascii file to display.
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
# In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
# Ascii Options
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
# and IRIX have ascii logos
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
# Use '{distro name}_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
# postmarketOS, and Void have a smaller logo variant.
# Use '{distro name}_small' to use the small variants.
ascii_distro="debian_small"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Image Options
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory
#
# Default: '~/.cache/thumbnails/neofetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# Crop mode
#
# Default: 'normal'
# Values: 'normal', 'fit', 'fill'
# Flag: --crop_mode
#
# See this wiki page to learn about the fit and fill options.
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
crop_mode="normal"
# Crop offset
# Note: Only affects 'normal' crop mode.
#
# Default: 'center'
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
# 'east', 'southwest', 'south', 'southeast'
# Flag: --crop_offset
crop_offset="center"
# Image size
# The image is half the terminal width by default.
#
# Default: 'auto'
# Values: 'auto', '00px', '00%', 'none'
# Flags: --image_size
# --size
image_size="auto"
# Gap between image and text
#
# Default: '3'
# Values: 'num', '-num'
# Flag: --gap
gap=3
# Image offsets
# Only works with the w3m backend.
#
# Default: '0'
# Values: 'px'
# Flags: --xoffset
# --yoffset
yoffset=0
xoffset=0
# Image background color
# Only works with the w3m backend.
#
# Default: ''
# Values: 'color', 'blue'
# Flag: --bg_color

183
config/polybar/config Normal file
View file

@ -0,0 +1,183 @@
[colors]
background = ##282a36
background-alt = #44475a
foreground = #f8f8f2
primary = #bd93f9
secondary = #d6acff
alert = #ff6e6e
disabled = #00000
[bar/mybar]
width = 100%
height = 21pt
radius = 0.0
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 1pt
border-color = #d6acff
padding-left = 0
padding-right = 1
module-margin = 1
;separator = |
fixed-center = true
separator-foreground = ${colors.disabled}
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = menu date xwindow
modules-center = i3
modules-right = pulseaudio xkeyboard memory cpu wlan battery
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
tray-position = right
wm-restack = i3
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-unfocused = %index%
label-unfocused-padding = 2
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /home
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <ramp-volume> <label-volume>
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.foreground}
label-volume = %percentage%%
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊
label-muted = 🔇 muted
label-muted-foreground = ${colors.disabled}
format-muted = <label-muted>
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.foreground}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.foreground}
[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 99
; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 5
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
[module/menu]
type = custom/menu
menu-0-1 = Files
menu-0-1-exec = thunar &
menu-0-2 = Terminal
menu-0-2-exec = kitty &
menu-0-3 = Browser
menu-0-3-exec = brave-browser &
format = <label-toggle> <menu>
format-foreground = ${color.primary}
label-open = 
label-close = 

13
config/polybar/launch.sh Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Terminate already running bar instances
# If all your bars have ipc enabled, you can use
# polybar-msg cmd quit
# Otherwise you can use the nuclear option:
killall -q polybar
# Launch bar1 and bar2
echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log
polybar mybar 2>&1 | tee -a /tmp/polybar1.log & disown
echo "Bars launched..."

3
config/ranger/rc.conf Executable file
View file

@ -0,0 +1,3 @@
set preview_images true
set preview_images_method ueberzug
set colorscheme default

View file

@ -0,0 +1,127 @@
/**
* Nordic rofi theme
* Adapted by undiabler <undiabler@gmail.com>
*
* Nord Color palette imported from https://www.nordtheme.com/
*
*/
* {
nord0: #2e3440;
nord1: #3b4252;
nord2: #434c5e;
nord3: #4c566a;
nord4: #d8dee9;
nord5: #e5e9f0;
nord6: #eceff4;
nord7: #8fbcbb;
nord8: #88c0d0;
nord9: #81a1c1;
nord10: #5e81ac;
nord11: #bf616a;
nord12: #d08770;
nord13: #ebcb8b;
nord14: #a3be8c;
nord15: #b48ead;
foreground: @nord9;
backlight: #ccffeedd;
background-color: transparent;
highlight: underline bold #eceff4;
transparent: rgba(46,52,64,0);
}
window {
location: center;
anchor: center;
transparency: "screenshot";
padding: 10px;
border: 0px;
border-radius: 6px;
background-color: @transparent;
spacing: 0;
children: [mainbox];
orientation: horizontal;
}
mainbox {
spacing: 0;
children: [ inputbar, message, listview ];
}
message {
color: @nord0;
padding: 5;
border-color: @foreground;
border: 0px 2px 2px 2px;
background-color: @nord7;
}
inputbar {
color: @nord6;
padding: 11px;
background-color: #3b4252;
border: 1px;
border-radius: 6px 6px 0px 0px;
border-color: @nord10;
}
entry, prompt, case-indicator {
text-font: inherit;
text-color:inherit;
}
prompt {
margin: 0px 1em 0em 0em ;
}
listview {
padding: 8px;
border-radius: 0px 0px 6px 6px;
border-color: @nord10;
border: 0px 1px 1px 1px;
background-color: rgba(46,52,64,0.9);
dynamic: false;
}
element {
padding: 3px;
vertical-align: 0.5;
border-radius: 4px;
background-color: transparent;
color: @foreground;
text-color: rgb(216, 222, 233);
}
element selected.normal {
background-color: @nord7;
text-color: #2e3440;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
button {
padding: 6px;
color: @foreground;
horizontal-align: 0.5;
border: 2px 0px 2px 2px;
border-radius: 4px 0px 0px 4px;
border-color: @foreground;
}
button selected normal {
border: 2px 0px 2px 2px;
border-color: @foreground;
}

131
config/rofi/config.rasi Executable file
View file

@ -0,0 +1,131 @@
* {
font: "Jetbrains Mono 12";
foreground: #f8f8f2;
background-color: #282a36;
active-background: #d6acff;
urgent-background: #ff5555;
urgent-foreground: #282a36;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
configuration {
show-icons: true;
display-drun: "";
disable-history: false;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 15;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 0px;
border-color: @separatorcolor;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 0px;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 3px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}

7
config/scripts/bookmarks.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
choice=$(cat ~/.config/bookmarks.txt | rofi -dmenu -p "Choose Website: ")
[ -z "$choice" ] && exit 0 || echo "$choice" | xargs "$BROWSER" || echo "$choice" | xargs brave-browser
sleep 1 && exit

View file

@ -0,0 +1,24 @@
#!/bin/bash
# This script handles brightness control using the brightnessctl utility.
# Configuration:
# - Use the 'brightnessctl -l' command to identify the backlight control directory specific to your system.
# - Update the 'intel_backlight' part in the decrease_brightness() and increase_brightness() functions with your specific backlight control directory.
function decrease_brightness() {
brightnessctl -d intel_backlight set 10%-
}
function increase_brightness() {
brightnessctl -d intel_backlight set 10%+
}
case "$1" in
XF86MonBrightnessDown)
decrease_brightness
;;
XF86MonBrightnessUp)
increase_brightness
;;
esac

36
config/scripts/c/compile.sh Executable file
View file

@ -0,0 +1,36 @@
#!/bin/bash
cd /home/zed/Documents/c_projects
# List all directories in the current directory
dirs=(*/)
echo "Choose your project:"
# Loop through the directories and print a numbered list
for i in "${!dirs[@]}"; do
printf "%s\t%s\n" "$i" "${dirs[$i]}"
done
# Prompt the user to enter a number
read num
# Check that the input is a valid number
re='^[0-9]+$'
if ! [[ $num =~ $re ]] ; then
echo "Error: Not a valid number" >&2; exit 1
fi
# Get the name of the selected directory
name=${dirs[$num]}
name=${name::-1}
cd "$name"
# Remove a.out if it exists
if [ -f a.out ]; then
rm a.out
fi
clear
# Compile and run main.c
gcc -Wall -Wextra main.c
./a.out

25
config/scripts/c/new_project.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
cd /home/zed/Documents/c_projects
ls
echo "Enter the file's name: "
read name
mkdir $name
cd $name
touch main.c
echo "#include <stdio.h>
int main()
{
return 0;
}" > main.c
vim main.c

30
config/scripts/c/old_project.sh Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
cd /home/zed/Documents/c_projects
# List all directories in the current directory
dirs=(*/)
echo "Please choose a project by entering the corresponding number:"
# Loop through the directories and print a numbered list
for i in "${!dirs[@]}"; do
printf "%s\t%s\n" "$i" "${dirs[$i]}"
done
# Prompt the user to enter a number
read num
# Check that the input is a valid number
re='^[0-9]+$'
if ! [[ $num =~ $re ]] ; then
echo "Error: Not a valid number" >&2; exit 1
fi
# Get the name of the selected directory
name=${dirs[$num]}
name=${name::-1}
cd "$name"
# Open main.c in nano
vim main.c

57
config/scripts/conf.sh Executable file
View file

@ -0,0 +1,57 @@
#!/bin/bash
# Define the choices
choices=("i3-config" "i3-workspaces" "i3-colors" "sxhkd" "polybar" "alacritty" "kitty" "ranger" "GitHub" "scripts" "themes")
# Prompt the user to select a choice using rofi
selected_choice=$(printf '%s\n' "${choices[@]}" | rofi -dmenu -p "Select a config file:")
# Define the corresponding config file paths
case $selected_choice in
"i3-config")
config_file="$HOME/.config/i3/config"
;;
"i3-workspaces")
config_file="$HOME/.config/i3/workspaces.conf"
;;
"i3-colors")
config_file="$HOME/.config/i3/colors.conf"
;;
"sxhkd")
config_file="$HOME/.config/sxhkd/sxhkdrc"
;;
"polybar")
config_file="$HOME/.config/polybar/config"
;;
"alacritty")
config_file="$HOME/.config/alacritty/alacritty.yml"
;;
"kitty")
config_file="$HOME/.config/kitty/kitty.conf"
;;
"ranger")
config_file="$HOME/.config/ranger/rc.conf"
;;
"GitHub")
config_file="ranger $HOME/Documents/GitHub/"
;;
"scripts")
config_file="ranger $HOME/.config/scripts"
;;
"themes")
config_file="ranger $HOME/.config/scripts/themes"
;;
*)
echo "Invalid choice"
exit 1
;;
esac
# Check if the config file exists
if [[ $config_file == ranger* ]]; then
# Open the selected directory with Ranger
$config_file
else
# Open the selected config file with Vim
vim "$config_file"
fi

View file

@ -0,0 +1,12 @@
#!/bin/bash
# Display the startup notification
notify-send --expire-time=10000000 --urgency=critical "IMPORTANT !" "
Press Super + Shift + h to view the Guide
NOTE: The 'Super' Key is the 'Windows' Key
(Click me and I disappear)"

View file

@ -0,0 +1,9 @@
#!/bin/bash
# This script is optional, it switches the input method engine for the IBus (Intelligent Input Bus) framework between two options AR and FR.
current=$(ibus engine)
if [ "$current" = "xkb:dz:ar:ara" ]; then
ibus engine xkb:fr:latin9:fra
elif [ "$current" = "xkb:fr:latin9:fra" ]; then
ibus engine xkb:dz:ar:ara
fi

View file

@ -0,0 +1,2 @@
#!/bin/bash
feh --bg-fill /home/zed/.config/wallpapers/71k61pmm5kd81.jpg

View file

@ -0,0 +1,2 @@
#!/bin/bash
feh --bg-fill /home/zed/.config/wallpapers/ign_cityRain.png --bg-fill /home/zed/.config/wallpapers/ign-0011.png

View file

@ -0,0 +1,72 @@
#!/bin/bash
# Set the directory containing the wallpapers
wallpaper_dir="/home/zed/.config/wallpapers/"
# Launch ranger to navigate to the wallpaper directory
kitty ranger "$wallpaper_dir"
# Get a list of image names in the wallpaper directory
image_list=("$wallpaper_dir"/*)
# Check if any images exist
if [ "${#image_list[@]}" -eq 0 ]; then
echo "No images found in the directory."
exit 1
fi
echo "Select an image for DVI (Enter the index):"
# Prompt user to enter the index of the selected image for DVI
read -p "Enter the index of the selected image for DVI: " dvi_index
echo "Select an image for HDMI (Enter the index):"
# Prompt user to enter the index of the selected image for HDMI
read -p "Enter the index of the selected image for HDMI: " hdmi_index
# Validate the selected indices
if [[ "$dvi_index" =~ ^[0-9]+$ ]] && [ "$dvi_index" -ge 1 ] && [ "$dvi_index" -le "${#image_list[@]}" ] &&
[[ "$hdmi_index" =~ ^[0-9]+$ ]] && [ "$hdmi_index" -ge 1 ] && [ "$hdmi_index" -le "${#image_list[@]}" ]; then
# Get the corresponding image names
selected_image_dvi="${image_list[$((dvi_index-1))]}"
selected_image_hdmi="${image_list[$((hdmi_index-1))]}"
# Trim leading/trailing whitespaces from the selected images
selected_image_dvi=$(echo "$selected_image_dvi" | awk '{$1=$1};1')
selected_image_hdmi=$(echo "$selected_image_hdmi" | awk '{$1=$1};1')
# Extract the filenames
dvi_filename=$(basename "$selected_image_dvi")
hdmi_filename=$(basename "$selected_image_hdmi")
# Display the selected images
echo "Selected image for DVI: $selected_image_dvi"
echo "Selected image for HDMI: $selected_image_hdmi"
# Export the filenames as environment variables
export DVI_FILENAME="$dvi_filename"
export HDMI_FILENAME="$hdmi_filename"
echo "#!/bin/bash" > ~/.config/scripts/double-display.sh
echo "" >> ~/.config/scripts/double-display.sh
echo "xrandr --output DVI-D-0 --mode 1920x1080 --pos 900x0 --output HDMI-0 --mode 1600x900 --pos 0x0 --rotate right" >> ~/.config/scripts/double-display.sh
echo "" >> ~/.config/scripts/double-display.sh
echo "feh --bg-fill ~/.config/wallpapers/$DVI_FILENAME --bg-fill ~/.config/wallpapers/$HDMI_FILENAME" >> ~/.config/scripts/double-display.sh
echo "" >> ~/.config/scripts/double-display.sh
echo "xrandr --output DVI-D-0 --mode 1920x1080 --pos 900x0 --output HDMI-0 --mode 1600x900 --pos 0x0 --rotate right" >> ~/.config/scripts/double-display.sh
echo "clear" >> ~/.config/scripts/double-display.sh
##################
echo "#!/bin/bash" > ~/.config/scripts/single-display.sh
echo "xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --output HDMI-0 --off" >> ~/.config/scripts/single-display.sh
echo "feh --bg-fill ~/.config/wallpapers/$DVI_FILENAME" >> ~/.config/scripts/single-display.sh
echo "" >> ~/.config/scripts/single-display.sh
#################
source ~/.config/scripts/double-display.sh
echo "Wallpapers set successfully."
else
echo "Invalid index(es). No wallpapers selected."
fi

View file

@ -0,0 +1,47 @@
#!/bin/bash
# Set the directory containing the wallpapers
wallpaper_dir="/home/zed/.config/wallpapers/"
# Launch ranger to navigate to the wallpaper directory
kitty ranger "$wallpaper_dir"
# Get a list of image names in the wallpaper directory
image_list=("$wallpaper_dir"/*)
# Check if any images exist
if [ "${#image_list[@]}" -eq 0 ]; then
echo "No images found in the directory."
exit 1
fi
echo "Select an image for DVI (Enter the index):"
echo
# Prompt user to enter the index of the selected image for DVI
read -p "Enter the index of the selected image for DVI: " dvi_index
# Validate the selected index
if [[ "$dvi_index" =~ ^[0-9]+$ ]] && [ "$dvi_index" -ge 1 ] && [ "$dvi_index" -le "${#image_list[@]}" ]; then
# Get the corresponding image name
selected_image_dvi="${image_list[$((dvi_index-1))]}"
# Trim leading/trailing whitespaces from the selected image
selected_image_dvi=$(echo "$selected_image_dvi" | awk '{$1=$1};1')
# Extract the filename
dvi_filename=$(basename "$selected_image_dvi")
# Display the selected image
echo "Selected image for DVI: $selected_image_dvi"
echo "#!/bin/bash" > ~/.config/scripts/single-display.sh
echo "xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --output HDMI-0 --off" >> ~/.config/scripts/single-display.sh
echo "feh --bg-fill ~/.config/wallpapers/$dvi_filename" >> ~/.config/scripts/single-display.sh
echo "" >> ~/.config/scripts/single-display.sh
source ~/.config/scripts/single-display.sh
else
echo "Invalid index. No wallpaper selected."
fi

View file

@ -0,0 +1,31 @@
#!/bin/bash
cd /home/zed/Documents/python_projects
# List all directories in the current directory
dirs=(*/)
echo "Choose your project:"
# Loop through the directories and print a numbered list
for i in "${!dirs[@]}"; do
printf "%s\t%s\n" "$i" "${dirs[$i]}"
done
# Prompt the user to enter a number
read num
# Check that the input is a valid number
re='^[0-9]+$'
if ! [[ $num =~ $re ]] ; then
echo "Error: Not a valid number" >&2; exit 1
fi
# Get the name of the selected directory
name=${dirs[$num]}
name=${name::-1}
cd "$name"
clear
# Compile and run main.c
python3 main.py

View file

@ -0,0 +1,17 @@
#!/bin/bash
cd /home/zed/Documents/python_projects
ls
echo "Enter the file's name: "
read name
mkdir $name
cd $name
touch main.py
code main.py

View file

@ -0,0 +1,30 @@
#!/bin/bash
cd /home/zed/Documents/python_projects
# List all directories in the current directory
dirs=(*/)
echo "Please choose a project by entering the corresponding number:"
# Loop through the directories and print a numbered list
for i in "${!dirs[@]}"; do
printf "%s\t%s\n" "$i" "${dirs[$i]}"
done
# Prompt the user to enter a number
read num
# Check that the input is a valid number
re='^[0-9]+$'
if ! [[ $num =~ $re ]] ; then
echo "Error: Not a valid number" >&2; exit 1
fi
# Get the name of the selected directory
name=${dirs[$num]}
name=${name::-1}
cd "$name"
# Open main.c in nano
code main.py

View file

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DVI-D-0 --primary --mode 1920x1080 --pos 900x0 --rotate normal --output HDMI-0 --mode 1600x900 --pos 0x0 --rotate right --output DP-0 --off --output DP-1 --off

2
config/scripts/resolution.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DVI-D-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-0 --off --output DP-0 --off --output DP-1 --off

View file

@ -0,0 +1,6 @@
#!/bin/bash
xrandr --output DVI-D-0 --mode 1920x1080 --pos 900x0 --output HDMI-0 --mode 1600x900 --pos 0x0 --rotate right
source ~/.config/scripts/last-two-wallpapers.sh
clear

View file

@ -0,0 +1,4 @@
#!/bin/bash
xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --output HDMI-0 --off
source ~/.config/scripts/last-single-wallpapers.sh

35
config/scripts/themes.sh Executable file
View file

@ -0,0 +1,35 @@
#!/bin/bash
cd ~/.config/scripts/themes
# List all the themes
themes=(*.sh)
theme_names=()
# Loop through the themes and collect their names
for theme in "${themes[@]}"; do
theme_names+=("${theme%.sh}")
done
# Prompt the user to select a theme using dmenu
selected_theme=$(printf '%s\n' "${theme_names[@]}" | rofi -dmenu -p "Select a theme:")
# Find the selected theme
selected_index=-1
for index in "${!theme_names[@]}"; do
if [[ "${theme_names[$index]}" == "$selected_theme" ]]; then
selected_index=$index
break
fi
done
# Check if a valid theme was selected
if [ "$selected_index" -eq -1 ]; then
echo "Invalid theme"
exit 1
fi
# Get the name of the selected theme
selected_theme_file="${themes[$selected_index]}"
source "$selected_theme_file"

View file

@ -0,0 +1,15 @@
#!/bin/bash
cp ~/.config/scripts/themes/BlueNova/dunstrc ~/.config/dunst/
cp ~/.config/scripts/themes/BlueNova/config.rasi ~/.config/rofi/
cp ~/.config/scripts/themes/BlueNova/colors.conf ~/.config/i3/
cp ~/.config/scripts/themes/BlueNova/alacritty.yml ~/.config/alacritty/
cp ~/.config/scripts/themes/BlueNova/config ~/.config/polybar/
cp ~/.config/scripts/themes/BlueNova/settings.ini ~/.config/gtk-3.0/
cp ~/.config/scripts/themes/BlueNova/.gtkrc-2.0 ~/

View file

@ -0,0 +1,18 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/zed/.gtkrc-2.0.mine"
gtk-theme-name="BlueSky-Clean-Dark"
gtk-icon-theme-name="Papirus"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Sunity-cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"

View file

@ -0,0 +1,33 @@
window:
#padding:
#x: 10
#y: 10
class:
instance: Alacritty
general: Alacritty
opacity: 0.92
scrolling:
history: 10000
multiplier: 3
font:
normal:
family: Hack Nerd Font
style: Regular
bold:
family: Hack Nerd Font
style: Bold
italic:
family: Hack Nerd Font
style: Italic
bold_italic:
family: Hack Nerd Font
style: Bold Italic
size: 12
draw_bold_text_with_bright_colors: true
selection:
save_to_clipboard: true
import:
- ~/.config/alacritty/blue.yml

View file

@ -0,0 +1,9 @@
######################################
# Colors
# class border backgr. text indicator child_border
client.focused #727F8D #727F8D #EFF1F5 #65737E #65737E.
client.focused_inactive #2B303B #65737E #D9DEE8 #000000 #000000
client.unfocused #2B303B #2B303B #65737E #292d2e #222222
client.urgent #BF616A #BF616A #D9DEE8 #BF616A #BF616A
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff

View file

@ -0,0 +1,396 @@
[colors]
;background = ${xrdb:color0:#222}
background = #2B303B
background-alt = #65737E
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #C0C5CE
secondary = #353C4A
alert = #BF616A
[bar/mybar]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 22
;offset-x = 5%
;offset-y = 1%
radius = 8.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #BF616A
border-size = 8
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = date xwindow
modules-center = bspwm i3
modules-right = powermenu pulseaudio xkeyboard memory cpu battery
tray-position = none
tray-padding = 2
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
label-layout = %layout%
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = wlp59s0
interval = 3.0
format-connected = <ramp-signal> <label-connected>
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = enp0s31f6
interval = 3.0
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date =
date-alt = " %Y-%m-%d"
time = %H:%M
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
format-charging = <animation-charging> <label-charging>
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View file

@ -0,0 +1,131 @@
* {
font: "Jetbrains Mono 12";
foreground: #ffffff;
background-color: #2B303B;
active-background: #65737E;
urgent-background: #BF616A;
urgent-foreground: #2B303B;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
configuration {
show-icons: true;
display-drun: "";
disable-history: false;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 15;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 0px;
border-color: @separatorcolor;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 0px;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 3px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}

View file

@ -0,0 +1,57 @@
[global]
font = Ubuntu Mono 11
allow_markup = yes
format = "<b>%s</b>\n%b"
sort = yes
indicate_hidden = yes
alignment = left
bounce_freq = 0
show_age_threshold = 60
word_wrap = yes
ignore_newline = no
geometry = "300x5-30+20"
shrink = no
transparency = 0
idle_threshold = 120
monitor = 0
sticky_history = yes
history_length = 20
show_indicators = yes
line_height = 0
separator_height = 2
padding = 8
horizontal_padding = 16
separator_color = frame
startup_notification = false
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/firefox -new-tab
icon_position = off
icon_folders = /usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/
[frame]
width = 3
color = "#C0C5CE"
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#2B303B"
foreground = "#C0C5CE"
frame_color = "#C0C5CE"
timeout = 4
[urgency_normal]
background = "#2B303B"
foreground = "#C0C5CE"
frame_color = "#C0C5CE"
timeout = 4
[urgency_critical]
background = "#BF616A"
foreground = "#EFF1F5"
frame_color = "#EFF1F5"
timeout = 0

View file

@ -0,0 +1,15 @@
[Settings]
gtk-theme-name=BlueSky-Clean-Dark
gtk-icon-theme-name=Papirus
gtk-font-name=Sans 10
gtk-cursor-theme-name=Sunity-cursors
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull

View file

@ -0,0 +1,167 @@
super + shift + h
mupdf "$HOME/.config/guide.pdf"
super + F1
feh -F "$HOME/Pictures/work.png"
super + Escape
pkill -USR1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'
# BG Ramdom
super + b
feh --randomize --bg-fill ~/.config/wallpapers/
super + shift + f
feh --randomize --bg-fill ~/.config/wallpapers/ --randomize --bg-fill ~/.config/wallpapers/
# Apps Keybindings
super + Return
kitty
super + p
rofi -show drun -line padding 4 -hide-scrollbar -show-icons
super + d
discord
super + shift + q
i3-msg exit
super + r
kitty -e "ranger"
super + n
thunar
super + g
github-desktop
alt + p
rofi -show
super + w
brave-browser
super + c
codium
super + t
telegram-desktop
super + s
flameshot gui
super + m
pavucontrol
# Audio Keybindings
XF86AudioMute
amixer set Master toggle
XF86AudioLowerVolume
amixer set Master 2%-
XF86AudioRaiseVolume
amixer set Master 2%+
alt + d
amixer -c 1 -- sset Master 2db+
alt + a
amixer -c 1 -- sset Master 2db-
XF86AudioPlay
playerctl play-pause
ctrl + alt + p
playerctl play-pause
XF86AudioNext
playerctl next
XF86AudioPrev
playerctl previous
ctrl + shift + period
playerctl next
ctrl + shift + comma
playerctl previous
XF86AudioStop
playerctl stop
alt + {h,j,k,l}
mpc {prev,next,play,pause}
# Brightness bindings
XF86MonBrightnessDown
~/.config/i3/scripts/brightness-control.sh XF86MonBrightnessDown
XF86MonBrightnessUp
~/.config/i3/scripts/brightness-control.sh XF86MonBrightnessUp
# Switch between keyboard languages
alt + space
source ~/.config/i3/scripts/keyboard_layout.sh
#i3 Specific Keybindings
super + {v,h}
i3-msg split {v,h}
super + f
i3-msg fullscreen toggle
super + shift + space
i3-msg floating toggle
super + control + space
i3-msg focus mode_toggle
super + alt + a
i3-msg focus parent
# Workspaces
super + {1-9,0}
i3-msg workspace {1-9,10}
super + shift+{1-9,0}
i3-msg move container to workspace number {1-9,10}
# Movement
super+{h,j,k,l}
i3-msg focus {left,down,up,right}
super+shift+{h,j,k,l}
i3-msg move {left,down,up,right}
super+{Left,Down,Up,Right}
i3-msg focus {left,down,up,right}
super+shift+{Left,Down,Up,Right}
i3-msg move {left,down,up,right}
# Other bindings
super + q
i3-msg kill
super + shift + c
i3-msg reload
super + shift + r
i3-msg restart; notify-send 'i3-gaps' 'Restarted'
super + ctrl + {Left,Down,Up,Right}
i3-msg resize {grow width 1 px or 1 ppt, shrink height 1 px or 1 ppt, grow height 1 px or 1 ppt, shrink width 1 px or 1 ppt}

View file

@ -0,0 +1,14 @@
#!/bin/bash
cp ~/.config/scripts/themes/Dracula/dunstrc ~/.config/dunst/
cp ~/.config/scripts/themes/Dracula/config.rasi ~/.config/rofi/
cp ~/.config/scripts/themes/Dracula/colors.conf ~/.config/i3/
cp ~/.config/scripts/themes/Dracula/alacritty.yml ~/.config/alacritty/
cp ~/.config/scripts/themes/Dracula/config ~/.config/polybar/
cp ~/.config/scripts/themes/Dracula/settings.ini ~/.config/gtk-3.0/
cp ~/.config/scripts/themes/Dracula/.gtkrc-2.0 ~/

View file

@ -0,0 +1,18 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/zed/.gtkrc-2.0.mine"
gtk-theme-name="Dracula"
gtk-icon-theme-name="Dracula-icons"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Sunity-cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"

View file

@ -0,0 +1,33 @@
window:
#padding:
#x: 10
#y: 10
class:
instance: Alacritty
general: Alacritty
opacity: 0.92
scrolling:
history: 10000
multiplier: 3
font:
normal:
family: Hack Nerd Font
style: Regular
bold:
family: Hack Nerd Font
style: Bold
italic:
family: Hack Nerd Font
style: Italic
bold_italic:
family: Hack Nerd Font
style: Bold Italic
size: 12
draw_bold_text_with_bright_colors: true
selection:
save_to_clipboard: true
import:
- ~/.config/alacritty/dracula.yml

View file

@ -0,0 +1,10 @@
######################################
# Colors
# class border bground text indicator child_border
client.focused #d6acff #d6acff #F8F8F2 #d6acff #d6acff
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
client.background #F8F8F2

View file

@ -0,0 +1,183 @@
[colors]
background = ##282a36
background-alt = #44475a
foreground = #f8f8f2
primary = #bd93f9
secondary = #d6acff
alert = #ff6e6e
disabled = #00000
[bar/mybar]
width = 100%
height = 21pt
radius = 0.0
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 1pt
border-color = #d6acff
padding-left = 0
padding-right = 1
module-margin = 1
;separator = |
fixed-center = true
separator-foreground = ${colors.disabled}
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = menu date xwindow
modules-center = i3
modules-right = pulseaudio xkeyboard memory cpu wlan battery
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
tray-position = right
wm-restack = i3
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-unfocused = %index%
label-unfocused-padding = 2
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /home
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <ramp-volume> <label-volume>
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.foreground}
label-volume = %percentage%%
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊
label-muted = 🔇 muted
label-muted-foreground = ${colors.disabled}
format-muted = <label-muted>
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.foreground}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.foreground}
[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 99
; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 5
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
[module/menu]
type = custom/menu
menu-0-1 = Files
menu-0-1-exec = thunar &
menu-0-2 = Terminal
menu-0-2-exec = kitty &
menu-0-3 = Browser
menu-0-3-exec = brave-browser &
format = <label-toggle> <menu>
format-foreground = ${color.primary}
label-open = 
label-close = 

View file

@ -0,0 +1,131 @@
* {
font: "Jetbrains Mono 12";
foreground: #f8f8f2;
background-color: #282a36;
active-background: #d6acff;
urgent-background: #ff5555;
urgent-foreground: #282a36;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
configuration {
show-icons: true;
display-drun: "";
disable-history: false;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 15;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 0px;
border-color: @separatorcolor;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 0px;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 3px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}

View file

@ -0,0 +1,192 @@
[global]
font = Ubuntu Mono 11
allow_markup = yes
format = "<b>%s</b>\n%b"
sort = yes
indicate_hidden = yes
alignment = left
bounce_freq = 0
show_age_threshold = 60
word_wrap = yes
ignore_newline = no
geometry = "300x5-30+20"
shrink = no
transparency = 0
idle_threshold = 120
monitor = 0
sticky_history = yes
history_length = 20
show_indicators = yes
line_height = 0
separator_height = 2
padding = 8
horizontal_padding = 16
separator_color = frame
startup_notification = false
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/firefox -new-tab
icon_position = off
icon_folders = /usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/
[frame]
width = 3
color = "#bd93f9"
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#282a36"
foreground = "#bd93f9"
frame_color = "#bd93f9"
timeout = 4
[urgency_normal]
background = "#282a36"
foreground = "#bd93f9"
frame_color = "#bd93f9"
timeout = 4
[urgency_critical]
background = "#ff5555"
foreground = "#f8f8f2"
frame_color = "#f8f8f2"
timeout = 0
# Icon for notifications with low urgency, uncomment to enable
#new_icon = /path/to/icon
# Icon for notifications with normal urgency, uncomment to enable
#new_icon = /path/to/icon
# Icon for notifications with critical urgency, uncomment to enable
#new_icon = /path/to/icon
# 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 (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# 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: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[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
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

View file

@ -0,0 +1,15 @@
[Settings]
gtk-theme-name=Dracula
gtk-icon-theme-name=Dracula-icons
gtk-font-name=Sans 10
gtk-cursor-theme-name=Sunity-cursors
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull

14
config/scripts/themes/Nord.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
cp ~/.config/scripts/themes/Nord/dunstrc ~/.config/dunst/
cp ~/.config/scripts/themes/Nord/config.rasi ~/.config/rofi/
cp ~/.config/scripts/themes/Nord/colors.conf ~/.config/i3/
cp ~/.config/scripts/themes/Nord/alacritty.yml ~/.config/alacritty/
cp ~/.config/scripts/themes/Nord/config ~/.config/polybar/
cp ~/.config/scripts/themes/Nord/settings.ini ~/.config/gtk-3.0/
cp ~/.config/scripts/themes/Nord/.gtkrc-2.0 ~/

View file

@ -0,0 +1,18 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/zed/.gtkrc-2.0.mine"
gtk-theme-name="Nordic"
gtk-icon-theme-name="Papirus"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Sunity-cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"

View file

@ -0,0 +1,33 @@
window:
#padding:
#x: 10
#y: 10
class:
instance: Alacritty
general: Alacritty
opacity: 0.92
scrolling:
history: 10000
multiplier: 3
font:
normal:
family: Hack Nerd Font
style: Regular
bold:
family: Hack Nerd Font
style: Bold
italic:
family: Hack Nerd Font
style: Italic
bold_italic:
family: Hack Nerd Font
style: Bold Italic
size: 12
draw_bold_text_with_bright_colors: true
selection:
save_to_clipboard: true
import:
- ~/.config/alacritty/nord.yml

View file

@ -0,0 +1,9 @@
######################################
# Colors
# class border backgr. text indicator child_border
client.focused #2E3440 #2E3440 #ECEFF4 #ECEFF4 #ECEFF4.
client.focused_inactive #2B303B #2E3440 #D9DEE8 #000000 #000000
client.unfocused #2B303B #2B303B #65737E #292d2e #222222
client.urgent #BF616A #BF616A #D9DEE8 #BF616A #BF616A
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff

183
config/scripts/themes/Nord/config Executable file
View file

@ -0,0 +1,183 @@
[colors]
background = #2E3440
background-alt = #373B41
foreground = #ECEFF4
primary = #D8DEE9
secondary = #81A1C1
alert = #BF616A
disabled = #00000
[bar/mybar]
width = 100%
height = 21pt
radius = 0.0
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 1pt
border-color = #ECEFF4
padding-left = 0
padding-right = 1
module-margin = 1
;separator = |
fixed-center = true
separator-foreground = ${colors.disabled}
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = menu date xwindow
modules-center = i3
modules-right = pulseaudio xkeyboard memory cpu wlan battery
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
tray-position = right
wm-restack = i3
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-unfocused = %index%
label-unfocused-padding = 2
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /home
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <ramp-volume> <label-volume>
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.primary}
label-volume = %percentage%%
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊
label-muted = 🔇 muted
label-muted-foreground = ${colors.disabled}
format-muted = <label-muted>
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 99
; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 5
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
[module/menu]
type = custom/menu
menu-0-1 = Files
menu-0-1-exec = thunar &
menu-0-2 = Terminal
menu-0-2-exec = kitty &
menu-0-3 = Browser
menu-0-3-exec = brave-browser &
format = <label-toggle> <menu>
format-foreground = ${color.primary}
label-open = 
label-close = 

View file

@ -0,0 +1,131 @@
* {
font: "Jetbrains Mono 12";
foreground: #D8DEE9;
background-color: #2E3440;
active-background: #ECEFF4;
urgent-background: #BF616A;
urgent-foreground: #2E3440;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
configuration {
show-icons: true;
display-drun: "";
disable-history: false;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 15;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 0px;
border-color: @separatorcolor;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 0px;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 3px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}

View file

@ -0,0 +1,57 @@
[global]
font = Ubuntu Mono 11
allow_markup = yes
format = "<b>%s</b>\n%b"
sort = yes
indicate_hidden = yes
alignment = left
bounce_freq = 0
show_age_threshold = 60
word_wrap = yes
ignore_newline = no
geometry = "300x5-30+20"
shrink = no
transparency = 0
idle_threshold = 120
monitor = 0
sticky_history = yes
history_length = 20
show_indicators = yes
line_height = 0
separator_height = 2
padding = 8
horizontal_padding = 16
separator_color = frame
startup_notification = false
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/firefox -new-tab
icon_position = off
icon_folders = /usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/
[frame]
width = 3
color = "#D8DEE9"
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#2E3440"
foreground = "#D8DEE9"
frame_color = "#D8DEE9"
timeout = 4
[urgency_normal]
background = "#2E3440"
foreground = "#D8DEE9"
frame_color = "#D8DEE9"
timeout = 4
[urgency_critical]
background = "#ff5555"
foreground = "#f8f8f2"
frame_color = "#f8f8f2"
timeout = 0

View file

@ -0,0 +1,15 @@
[Settings]
gtk-theme-name=Nordic
gtk-icon-theme-name=Papirus
gtk-font-name=Sans 10
gtk-cursor-theme-name=Sunity-cursors
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull

View file

@ -0,0 +1,48 @@
#!/bin/bash
# background directory
bgdir="$HOME/.config/wallpapers"
# current wallpaper for the first monitor
cbg1="$HOME/.config/wallpapers/monitor1_wallpaper.png"
# current wallpaper for the second monitor
cbg2="$HOME/.config/wallpapers/monitor2_wallpaper.png"
# reads stdout of sxiv mark after quitting (Mark with m and q to quit)
# (currently reads last wallpaper selected no matter how many you select)
choice="$(sxiv -t -o -r "$bgdir")"
choicenum="$(echo "$choice" | wc -l)"
# If no choice for wallpaper was made, exit the script
[ -z "$choice" ] && exit 0
# Check the number of selected wallpapers
if [ "$choicenum" -lt 2 ]; then
echo "Please select at least two wallpapers."
exit 1
fi
# Extract the first two wallpapers from the selected choices
wallpapers=($(echo "$choice" | head -n2))
# Check if feh is installed
if [ -x "$(command -v feh)" ]; then
feh --bg-fill "${wallpapers[0]}" --bg-fill "${wallpapers[1]}"
else
echo "feh is not installed. Please install feh to set wallpapers."
exit 1
fi
# Copy the first wallpaper to the first monitor's current wallpaper path
cp "${wallpapers[0]}" "$cbg2"
# Copy the second wallpaper to the second monitor's current wallpaper path
cp "${wallpapers[1]}" "$cbg1"
#sed -i '5s/.*/feh --bg-fill "${wallpapers[1]}" --bg-fill "${wallpapers[0]}"/' ~/.config/scripts/double-display.sh
echo "#!/bin/bash" > ~/.config/scripts/last-two-wallpapers.sh
echo feh --bg-fill "${wallpapers[1]}" --bg-fill "${wallpapers[0]}" >> ~/.config/scripts/last-two-wallpapers.sh

View file

@ -0,0 +1,34 @@
#!/bin/bash
# script requires sxiv and feh
# background directory
bgdir="$HOME/.config/wallpapers"
# current wallpaper so the lockscreen script will match
cbg="$HOME/.config/wallpapers/ign_astronaut.png"
# reads stdout of sxiv mark after quitting (Mark with m and q to quit)
# (currently reads last wallpaper selected no matter how many you select)
choice="$(sxiv -t -o -r "$bgdir")"
choicenum="$(echo "$choice" | wc -l)"
# If no choice for wallpaper was made, exit the script
[ -z "$choice" ] && exit 0
[ "$choicenum" == 1 ] && lastwp="$(echo "$choice")"
[ "$choicenum" -gt 1 ] && lastwp="$(echo "$choice" | tail -n1)"
# Check if feh is installed and set the command accordingly
if [ -x "$(command -v feh)" ]; then
set="feh --bg-fill"
else
echo "feh is not installed. Please install feh to set wallpapers."
exit 1
fi
$set "$lastwp" && cp "$lastwp" "$cbg"
echo "#!/bin/bash" > ~/.config/scripts/last-single-wallpapers.sh
echo feh --bg-fill "$lastwp" >> ~/.config/scripts/last-single-wallpapers.sh

View file

@ -0,0 +1,7 @@
#!/bin/bash
echo "Enter your URL: "
read url
mpv --ytdl-raw-options=format="best[height<=720]" $url

15
config/settings.ini Normal file
View file

@ -0,0 +1,15 @@
[Settings]
gtk-theme-name=Dracula
gtk-icon-theme-name=Dracula-icons
gtk-font-name=Sans 10
gtk-cursor-theme-name=Sunity-cursors
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull

142
config/sxhkd/sxhkdrc Executable file
View file

@ -0,0 +1,142 @@
super + shift + h
mupdf "$HOME/.config/guide.pdf"
alt + v
alacritty -e "ranger" ~/Downloads/Watch
alt + c
alacritty -e ~/.config/scripts/conf.sh
alt + t
source ~/.config/scripts/themes.sh
alt + s
feh -F "$HOME/Pictures/schedule.png"
alt + b
source ~/.config/scripts/bookmarks.sh
# BG Selector
super + F1
source ~/.config/scripts/wallpaper-single-display.sh
super + F2
source ~/.config/scripts/wallpaper-double-display.sh
# Programs
super + Return
alacritty
super + p
rofi -show drun -line padding 4 -hide-scrollbar -show-icons
super + d
discord
super + r
alacritty -e "ranger"
super + n
pcmanfm
super + g
github-desktop
super + w
brave-browser
super + c
codium
super + t
telegram-desktop
super + s
flameshot gui
alt + w
rofi -show
# Audio Keybindings
XF86AudioMute
amixer set Master toggle
XF86AudioLowerVolume
amixer set Master 2%-
XF86AudioRaiseVolume
amixer set Master 2%+
# Brightness bindings
XF86MonBrightnessDown
~/.config/scripts/brightness-control.sh XF86MonBrightnessDown
XF86MonBrightnessUp
~/.config/scripts/brightness-control.sh XF86MonBrightnessUp
# Switch between keyboard languages
alt + space
source ~/.config/scripts/keyboard_layout.sh
#i3 Specific Keybindings
super + q
i3-msg kill
super + shift + q
i3-msg exit
super + shift + c
i3-msg reload; notify-send 'i3-gaps' 'Reloaded'
super + shift + r
i3-msg restart; notify-send 'i3-gaps' 'Restarted'
super + Escape
pkill -USR1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'
super + {v,h}
i3-msg split {v,h}
super + f
i3-msg fullscreen toggle
super + shift + f
i3-msg floating toggle
super + control + space
i3-msg focus mode_toggle
super + alt + a
i3-msg focus parent
# Workspaces
super + {1-9,0}
i3-msg workspace {1-9,10}
super + shift+{1-9,0}
i3-msg move container to workspace number {1-9,10}
# Movement
super+{h,j,k,l}
i3-msg focus {left,down,up,right}
super+shift+{h,j,k,l}
i3-msg move {left,down,up,right}
super+{Left,Down,Up,Right}
i3-msg focus {left,down,up,right}
super+shift+{Left,Down,Up,Right}
i3-msg move {left,down,up,right}
super + ctrl + {Left,Down,Up,Right}
i3-msg resize {grow width 1 px or 1 ppt, shrink height 1 px or 1 ppt, grow height 1 px or 1 ppt, shrink width 1 px or 1 ppt}

BIN
config/wallpapers/wall.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 MiB

149
optional/.bashrc Normal file
View file

@ -0,0 +1,149 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='exa -a --icons --group-directories-first'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
alias al='vim ~/.bashrc'
alias alu='source ~/.bashrc'
alias ss='sudo shutdown now'
alias rb='sudo reboot'
alias ll='ls -l'
alias la='ls -a'
alias mkdir='mkdir -p'
alias df='df -h'
alias cl='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias v='vim'
alias h='htop'
alias wd='source ~/.config/scripts/wallpaper-double-display.sh'
alias ws='source ~/.config/scripts/wallpaper-single-display.sh'
alias d='bash ~/.config/scripts/set-double-display.sh'
alias s='bash ~/.config/scripts/set-single-display.sh'
alias n='bash ~/.config/scripts/c/new_project.sh'
alias o='bash ~/.config/scripts/c/old_project.sh'
alias c='bash ~/.config/scripts/c/compile.sh'
alias pn='bash ~/.config/scripts/python/new_project.sh'
alias po='bash ~/.config/scripts/python/old_project.sh'
alias pc='bash ~/.config/scripts/python/compile.sh'
alias t='bash ~/.config/scripts/themes.sh'
alias y='bash ~/.config/scripts/youtube-watcher.sh'
alias sts='git status'
alias add='git add .'
alias cmt='git commit -m'
alias push='git push'
neofetch
##-----------------------------------------------------
## synth-shell-prompt.sh
if [ -f ~/.config/synth-shell/synth-shell-prompt.sh ] && [ -n "$( echo $- | grep i )" ]; then
source ~/.config/synth-shell/synth-shell-prompt.sh
fi

10
optional/.inputrc Normal file
View file

@ -0,0 +1,10 @@
set colored-stats On
set colored-completion-prefix On
set show-all-if-ambiguous on
set completion-ignore-case on
"\e[A": history-search-backward
"\e[B": history-search-forward
"\C-b":"cd ..\n"
"\C-h":"cd ~\n"
"\C-f":"cd ~/.config/\n"
"\C-g":"cd ~/Documents/GitHub/\n"

24
optional/autologin.txt Normal file
View file

@ -0,0 +1,24 @@
sudo vim /etc/systemd/logind.conf
uncomment #NAutoVTs=6
make it NAutoVTs=1
sudo mkdir -p /etc/systemd/system/getty@tty1.service.d
cd /etc/systemd/system/getty@tty1.service.d
sudo vim override.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin zed --noclear %I $TERM
sudo systemctl daemon-reload
cd ~
echo "exec startx" > .bash_profile
echo "exec i3" > .xinitrc

8
optional/keyboard_layout.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
sudo apt install -y ibus ibus-m17n m17n-db xfonts-intl-arabic
im-config -n ibus
printf "\e[1;32mlog out and log back in to apply the changes and then run (ibus-setup)\e[0m\n"

4
optional/nvidia.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
# If you have Nvidia install:
sudo apt install nvidia-driver nvidia-settings

1
optional/sudoers.txt Normal file
View file

@ -0,0 +1 @@
zed ALL=(ALL) NOPASSWD: /usr/sbin/reboot,/usr/sbin/shutdown,/usr/bin/mount,/usr/bin/umount

503
optional/synth-shell/better-ls.sh Executable file
View file

@ -0,0 +1,503 @@
##!/bin/bash
## +-----------------------------------+-----------------------------------+
## | |
## | Copyright (c) 2014-2021, https://github.com/andresgongora/synth-shell |
## | Visit the above URL for details of license and authorship. |
## | |
## | This program is free software: you can redistribute it and/or modify |
## | it under the terms of the GNU General Public License as published by |
## | the Free Software Foundation, either version 3 of the License, or |
## | (at your option) any later version. |
## | |
## | This program is distributed in the hope that it will be useful, |
## | but WITHOUT ANY WARRANTY; without even the implied warranty of |
## | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
## | GNU General Public License for more details. |
## | |
## | You should have received a copy of the GNU General Public License |
## | along with this program. If not, see <http://www.gnu.org/licenses/>. |
## | |
## +-----------------------------------------------------------------------+
##
##
## =======================
## WARNING!!
## DO NOT EDIT THIS FILE!!
## =======================
##
## This file was generated by an installation script.
## If you edit this file, it might be overwritten without warning
## and you will lose all your changes.
##
## Visit for instructions and more information:
## https://github.com/andresgongora/synth-shell/
##
loadConfigFile() {
local config_file=$1
if [ ! -f $config_file ]; then
exit
fi
while IFS="" read -r p || [ -n "$p" ]
do
local line=$(echo "$p" |\
sed -e '/^$/d;
/^[ \t]*\#/d;
s/[ \t][ \t]*\#.*//g;
s/^[ \t]*//g;
s/[ \t]*$//g')
local line_end_trimmed=$(echo "$line" | sed -n 's/[ \t]*\\$//p')
if [ -z "$line_end_trimmed" ]; then
local is_multiline_next=false
else
local is_multiline_next=true
local line=$line_end_trimmed
fi
set -- $( echo "$line" | sed -e 's/\\//g;s/".*"/X/g' )
if [ ! -z "$line" ] && [ "$#" -gt 1 ]; then
local config_key_name=$1
local config_param=$(echo "$line" |\
sed -e "s/$config_key_name\s*//g" |\
sed -e "s/^\"//g;s/\"$//g")
eval config_key_current_value=\$$config_key_name
if [ ! -z "$config_key_current_value" ]; then
export "${config_key_name}"="$config_param"
fi
elif [ "$#" -eq 1 ] && $is_multiline ; then
local line_end_trimmed=$(echo $line |\
sed -n 's/[ \t]*\\$//p')
if [ -z "$line_end_trimmed" ]; then
local multi_line=false
else
echo ":) $line_end_trimmed"
local multi_line=true
local line=$line_end_trimmed
fi
local config_param_old=$config_param
local config_param=$(echo "$line" |\
sed "s/^\"//g;s/\"$//g")
eval config_key_current_value=\$$config_key_name
if [ ! -z "$config_key_current_value" ]; then
export "${config_key_name}"="$config_key_current_value$config_param"
fi
fi
local is_multiline=$is_multiline_next
done < $config_file
}
get8bitCode()
{
CODE=$1
case $CODE in
default)
echo 9
;;
none)
echo 9
;;
black)
echo 0
;;
red)
echo 1
;;
green)
echo 2
;;
yellow)
echo 3
;;
blue)
echo 4
;;
magenta|purple|pink)
echo 5
;;
cyan)
echo 6
;;
light-gray)
echo 7
;;
dark-gray)
echo 60
;;
light-red)
echo 61
;;
light-green)
echo 62
;;
light-yellow)
echo 63
;;
light-blue)
echo 64
;;
light-magenta|light-purple)
echo 65
;;
light-cyan)
echo 66
;;
white)
echo 67
;;
*)
echo 0
esac
}
getColorCode()
{
COLOR=$1
if [ $COLOR -eq $COLOR ] 2> /dev/null; then
if [ $COLOR -gt 0 -a $COLOR -lt 256 ]; then
echo "38;5;$COLOR"
else
echo 0
fi
else
BITCODE=$(get8bitCode $COLOR)
COLORCODE=$(($BITCODE + 30))
echo $COLORCODE
fi
}
getBackgroundCode()
{
COLOR=$1
if [ $COLOR -eq $COLOR ] 2> /dev/null; then
if [ $COLOR -gt 0 -a $COLOR -lt 256 ]; then
echo "48;5;$COLOR"
else
echo 0
fi
else
BITCODE=$(get8bitCode $COLOR)
COLORCODE=$(($BITCODE + 40))
echo $COLORCODE
fi
}
getEffectCode()
{
EFFECT=$1
NONE=0
case $EFFECT in
none)
echo $NONE
;;
default)
echo $NONE
;;
bold)
echo 1
;;
bright)
echo 1
;;
dim)
echo 2
;;
underline)
echo 4
;;
blink)
echo 5
;;
reverse)
echo 7
;;
hidden)
echo 8
;;
strikeout)
echo 9
;;
*)
echo $NONE
esac
}
getFormattingSequence()
{
START='\e[0;'
MIDLE=$1
END='m'
echo -n "$START$MIDLE$END"
}
applyCodeToText()
{
local RESET=$(getFormattingSequence $(getEffectCode none))
TEXT=$1
CODE=$2
echo -n "$CODE$TEXT$RESET"
}
getFormatCode()
{
local RESET=$(getFormattingSequence $(getEffectCode none))
if [ "$#" -eq 0 ]; then
echo -n "$RESET"
elif [ "$#" -eq 1 ]; then
TEXT_COLOR=$(getFormattingSequence $(getColorCode $1))
echo -n "$TEXT_COLOR"
else
FORMAT=""
while [ "$1" != "" ]; do
TYPE=$1
ARGUMENT=$2
case $TYPE in
-c)
CODE=$(getColorCode $ARGUMENT)
;;
-b)
CODE=$(getBackgroundCode $ARGUMENT)
;;
-e)
CODE=$(getEffectCode $ARGUMENT)
;;
*)
CODE=""
esac
if [ "$FORMAT" != "" ]; then
FORMAT="$FORMAT;"
fi
FORMAT="$FORMAT$CODE"
shift
shift
done
FORMAT_CODE=$(getFormattingSequence $FORMAT)
echo -n "${FORMAT_CODE}"
fi
}
formatText()
{
local RESET=$(getFormattingSequence $(getEffectCode none))
if [ "$#" -eq 0 ]; then
echo -n "${RESET}"
elif [ "$#" -eq 1 ]; then
TEXT=$1
echo -n "${TEXT}${RESET}"
else
TEXT=$1
FORMAT_CODE=$(getFormatCode "${@:2}")
applyCodeToText "$TEXT" "$FORMAT_CODE"
fi
}
removeColorCodes()
{
printf "$1" | sed 's/\x1b\[[0-9;]*m//g'
}
shortenPath()
{
local path=$1
local max_length=$2
local default_max_length=25
local trunc_symbol=".."
if [ -z "$path" ]; then
echo ""
exit
elif [ -z "$max_length" ]; then
local max_length=$default_max_length
fi
local path=${path/#$HOME/\~}
local dir=${path##*/}
local dir_length=${#dir}
local path_length=${#path}
local print_length=$(( ( max_length < dir_length ) ? dir_length : max_length ))
if [ $path_length -gt $print_length ]; then
local offset=$(( $path_length - $print_length ))
local truncated_path=${path:$offset}
local clean_path="/${truncated_path#*/}"
local removed_path=${path%%"$clean_path"}
if [ "$removed_path" == "~" ]; then
local short_path="~${clean_path}"
else
local short_path=${trunc_symbol}${clean_path}
fi
else
local short_path=$path
fi
echo $short_path
}
enableTerminalLineWrap()
{
printf '\e[?7h'
}
disableTerminalLineWrap()
{
printf '\e[?7l'
}
saveCursorPosition()
{
printf "\e[s"
}
moveCursorToSavedPosition()
{
printf "\e[u"
}
moveCursorToRowCol()
{
local row=$1
local col=$2
printf "\e[${row};${col}H"
}
moveCursorHome()
{
printf "\e[;H"
}
moveCursorUp()
{
local inc=$1
if [ -z "$inc" ]; then
printf "\e[1A"
elif [ $inc -gt 0 ]; then
printf "\e[${inc}A"
fi
}
moveCursorDown()
{
local inc=$1
if [ -z "$inc" ]; then
printf "\e[1B"
elif [ $inc -gt 0 ]; then
printf "\e[${inc}B"
fi
}
moveCursorRight()
{
local inc=$1
if [ -z "$inc" ]; then
printf "\e[1C"
elif [ $inc -gt 0 ]; then
printf "\e[${inc}D"
fi
}
moveCursorLeft()
{
local inc=$1
if [ -z "$inc" ]; then
printf "\e[1D"
elif [ $inc -gt 0 ]; then
printf "\e[${inc}C"
fi
}
getTerminalNumRows()
{
tput lines
}
getTerminalNumCols()
{
tput cols
}
getTextNumRows()
{
local rows=$(echo -e "$1" | wc -l )
echo "$rows"
}
getTextNumCols()
{
local columns=$(echo -e "$1" | sed 's/\x1b\[[0-9;]*m//g' | wc -L )
echo "$columns"
}
getTextShape()
{
echo "$(getTextNumRows) $(getTextNumCols)"
}
printWithOffset()
{
local row=$1
local col=$2
local text=${@:3}
moveCursorDown "$row"
if [ $col -gt 0 ]; then
col_spacer="\\\\e[${col}C"
local text=$(echo "$text" |\
sed "s/^/$col_spacer/g;s/\\\\n/\\\\n$col_spacer/g")
fi
disableTerminalLineWrap
echo -e "${text}"
enableTerminalLineWrap
}
printTwoElementsSideBySide()
{
local element_1=$1
local element_2=$2
local print_cols_max=$3
local term_cols=$(getTerminalNumCols)
if [ ! -z "$print_cols_max" ]; then
local term_cols=$(( ( $term_cols > $print_cols_max ) ?\
$print_cols_max : $term_cols ))
fi
local e_1_cols=$(getTextNumCols "$element_1")
local e_1_rows=$(getTextNumRows "$element_1")
local e_2_cols=$(getTextNumCols "$element_2")
local e_2_rows=$(getTextNumRows "$element_2")
local free_cols=$(( $term_cols - $e_1_cols - $e_2_cols ))
if [ $free_cols -lt 1 ]; then
local free_cols=0
fi
if [ $e_1_cols -gt 0 ] && [ $e_2_cols -gt 0 ]; then
local h_pad=$(( $free_cols/3 ))
local e_1_h_pad=$h_pad
local e_2_h_pad=$(( $e_1_cols + 2*$h_pad ))
elif [ $e_1_cols -gt 0 ]; then
local h_pad=$(( $free_cols/2 ))
local e_1_h_pad=$h_pad
local e_2_h_pad=0
elif [ $e_2_cols -gt 0 ]; then
local h_pad=$(( $free_cols/2 ))
local e_1_h_pad=0
local e_2_h_pad=$h_pad
else
local e_1_h_pad=0
local e_2_h_pad=0
fi
local e_1_v_pad=$(( ( $e_1_rows > $e_2_rows ) ?\
0 : (( ($e_2_rows - $e_1_rows)/2 )) ))
local e_2_v_pad=$(( ( $e_2_rows > $e_1_rows ) ?\
0 : (( ($e_1_rows - $e_2_rows)/2 )) ))
local max_rows=$(( ( $e_1_rows > $e_2_rows ) ? $e_1_rows : $e_2_rows ))
for i in `seq $max_rows`; do printf "\n"; done
moveCursorUp $max_rows
saveCursorPosition
printWithOffset $e_1_v_pad $e_1_h_pad "$element_1"
moveCursorToSavedPosition
printWithOffset $e_2_v_pad $e_2_h_pad "$element_2"
moveCursorToSavedPosition
moveCursorDown $(( $max_rows ))
}
function better_ls()
{
shopt -s extglob
local LS="$(type -P ls)"
if [ $# -eq 0 ]; then
files=$($LS -U . 2> /dev/null | wc -l)
if [ "$files" != "0" ]
then
$LS -d {.,..,*} -lA --color=auto --human-readable \
--time-style=long-iso --group-directories-first;
hidden_files=$($LS -U -d .[^.]* 2> /dev/null | wc -l)
if [ "$hidden_files" != "0" ]
then
echo ""
$LS -d .[^.]* -l --color=auto --hide='..' \
--human-readable --time-style=long-iso \
--group-directories-first;
fi
else
$LS -d {.,..,} -lA --color=auto --human-readable \
--time-style=long-iso --group-directories-first;
fi
elif [ $# -eq 1 -a -d "$1" ]; then
local current_pwd="$PWD"
'cd' "$1/"
better_ls
'cd' "$current_pwd"
elif [ $# -eq 1 -a -f "$1" ]; then
$LS -l --color=auto --human-readable --time-style=long-iso "$1"
else
$LS --color=auto --human-readable --time-style=long-iso \
--group-directories-first "$@";
fi
}
alias ls='better_ls'

View file

@ -0,0 +1,64 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
font_color_user="white"
background_user="blue"
texteffect_user="bold"
font_color_host="white"
background_host="light-blue"
texteffect_host="bold"
font_color_pwd="dark-gray"
background_pwd="white"
texteffect_pwd="bold"
font_color_git="light-gray"
background_git="dark-gray"
texteffect_git="bold"
font_color_input="cyan"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
enable_vertical_padding=true # Add extra new line over prompt
##==============================================================================
## GIT
##==============================================================================
show_git=true # Enable/Disable git info if inside a repo
git_symbol_synced=''
git_symbol_unpushed='△'
git_symbol_unpulled='▽'
git_symbol_unpushedunpulled='○'
git_symbol_dirty='!'
git_symbol_dirty_unpushed='▲'
git_symbol_dirty_unpulled='▼'
git_symbol_dirty_unpushedunpulled='●'

View file

@ -0,0 +1,64 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
font_color_user="white"
background_user="black"
texteffect_user="bold"
font_color_host="white"
background_host="dark-gray"
texteffect_host="bold"
font_color_pwd="black"
background_pwd="light-gray"
texteffect_pwd="bold"
font_color_git="black"
background_git="white"
texteffect_git="bold"
font_color_input="none"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
enable_vertical_padding=true # Add extra new line over prompt
##==============================================================================
## GIT
##==============================================================================
show_git=true # Enable/Disable git info if inside a repo
git_symbol_synced=''
git_symbol_unpushed='△'
git_symbol_unpulled='▽'
git_symbol_unpushedunpulled='○'
git_symbol_dirty='!'
git_symbol_dirty_unpushed='▲'
git_symbol_dirty_unpulled='▼'
git_symbol_dirty_unpushedunpulled='●'

View file

@ -0,0 +1,65 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
font_color_user="light-gray"
background_user="green"
texteffect_user="bold"
font_color_host="black"
background_host="light-green"
texteffect_host="bold"
font_color_pwd="dark-gray"
background_pwd="light-gray"
texteffect_pwd="bold"
font_color_git="light-gray"
background_git="dark-gray"
texteffect_git="bold"
font_color_input="green"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
enable_vertical_padding=true # Add extra new line over prompt
##==============================================================================
## GIT
##==============================================================================
show_git=true # Enable/Disable git info if inside a repo
git_symbol_synced=''
git_symbol_unpushed='△'
git_symbol_unpulled='▽'
git_symbol_unpushedunpulled='○'
git_symbol_dirty='!'
git_symbol_dirty_unpushed='▲'
git_symbol_dirty_unpulled='▼'
git_symbol_dirty_unpushedunpulled='●'

View file

@ -0,0 +1,24 @@
##==============================================================================
## COLORS
##==============================================================================
font_color_user="white"
background_user="magenta"
texteffect_user="bold"
font_color_host="white"
background_host="light-magenta"
texteffect_host="bold"
font_color_pwd="dark-gray"
background_pwd="white"
texteffect_pwd="bold"
font_color_git="light-gray"
background_git="dark-gray"
texteffect_git="bold"
font_color_input="light-magenta"
background_input="none"
texteffect_input="bold"

View file

@ -0,0 +1,65 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
font_color_user="black"
background_user="208"
texteffect_user="bold"
font_color_host="black"
background_host="180"
texteffect_host="bold"
font_color_pwd="black"
background_pwd="white"
texteffect_pwd="bold"
font_color_git="208"
background_git="dark-gray"
texteffect_git="bold"
font_color_input="208"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
enable_vertical_padding=true # Add extra new line over prompt
##==============================================================================
## GIT
##==============================================================================
show_git=true # Enable/Disable git info if inside a repo
git_symbol_synced=''
git_symbol_unpushed='△'
git_symbol_unpulled='▽'
git_symbol_unpushedunpulled='○'
git_symbol_dirty='!'
git_symbol_dirty_unpushed='▲'
git_symbol_dirty_unpulled='▼'
git_symbol_dirty_unpushedunpulled='●'

View file

@ -0,0 +1,65 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
font_color_user="light-gray"
background_user="red"
texteffect_user="bold"
font_color_host="light-gray"
background_host="dark-gray"
texteffect_host="bold"
font_color_pwd="dark-gray"
background_pwd="light-gray"
texteffect_pwd="bold"
font_color_git="black"
background_git="white"
texteffect_git="bold"
font_color_input="red"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
enable_vertical_padding=true # Add extra new line over prompt
##==============================================================================
## GIT
##==============================================================================
show_git=true # Enable/Disable git info if inside a repo
git_symbol_synced=''
git_symbol_unpushed='△'
git_symbol_unpulled='▽'
git_symbol_unpushedunpulled='○'
git_symbol_dirty='!'
git_symbol_dirty_unpushed='▲'
git_symbol_dirty_unpulled='▼'
git_symbol_dirty_unpushedunpulled='●'

View file

@ -0,0 +1,65 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
font_color_user="yellow"
background_user="dark-gray"
texteffect_user="bold"
font_color_host="black"
background_host="yellow"
texteffect_host="bold"
font_color_pwd="black"
background_pwd="light-yellow"
texteffect_pwd="bold"
font_color_git="black"
background_git="white"
texteffect_git="bold"
font_color_input="light-yellow"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
enable_vertical_padding=true # Add extra new line over prompt
##==============================================================================
## GIT
##==============================================================================
show_git=true # Enable/Disable git info if inside a repo
git_symbol_synced=''
git_symbol_unpushed='△'
git_symbol_unpulled='▽'
git_symbol_unpushedunpulled='○'
git_symbol_dirty='!'
git_symbol_dirty_unpushed='▲'
git_symbol_dirty_unpulled='▼'
git_symbol_dirty_unpushedunpulled='●'

View file

@ -0,0 +1,92 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - PYENV: if inside a Python Virtual environment.
## - TF: if inside a Terraform Workspace.
## - CLOCK: shows current time in H:M format.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
format="USER HOST PWD GIT PYENV TF KUBE"
font_color_user="white"
background_user="blue"
texteffect_user="bold"
font_color_host="white"
background_host="light-blue"
texteffect_host="bold"
font_color_pwd="dark-gray"
background_pwd="white"
texteffect_pwd="bold"
font_color_git="light-gray"
background_git="dark-gray"
texteffect_git="bold"
font_color_pyenv="white"
background_pyenv="blue"
texteffect_pyenv="bold"
font_color_kube="white"
background_kube="purple"
texteffect_kube="bold"
font_color_tf="purple"
background_tf="light-purple"
texteffect_tf="bold"
font_color_clock="white"
background_clock="light-blue"
texteffect_clock="bold"
font_color_input="white"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
separator_padding_left='' #
separator_padding_right='' #
prompt_horizontal_padding='' #
prompt_final_padding='' #
segment_padding=' ' #
enable_vertical_padding=true # Add extra new line over prompt
max_pwd_char="20"
##==============================================================================
## GIT
##==============================================================================
git_symbol_synced=''
git_symbol_unpushed=' ▲'
git_symbol_unpulled=' ▼'
git_symbol_unpushedunpulled=' ◆'
git_symbol_dirty=' ◔'
git_symbol_dirty_unpushed=' ◔ △'
git_symbol_dirty_unpulled=' ◔ ▽'
git_symbol_dirty_unpushedunpulled=' ◔ ◇'
git_update_period_minutes=15 # Use -1 to disable automatic updates

View file

@ -0,0 +1,92 @@
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - PYENV: if inside a Python Virtual environment.
## - TF: if inside a Terraform Workspace.
## - CLOCK: shows current time in H:M format.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
format="USER HOST PWD GIT PYENV TF KUBE"
font_color_user="white"
background_user="blue"
texteffect_user="bold"
font_color_host="white"
background_host="light-blue"
texteffect_host="bold"
font_color_pwd="dark-gray"
background_pwd="white"
texteffect_pwd="bold"
font_color_git="light-gray"
background_git="dark-gray"
texteffect_git="bold"
font_color_pyenv="white"
background_pyenv="blue"
texteffect_pyenv="bold"
font_color_kube="white"
background_kube="purple"
texteffect_kube="bold"
font_color_tf="purple"
background_tf="light-purple"
texteffect_tf="bold"
font_color_clock="white"
background_clock="light-blue"
texteffect_clock="bold"
font_color_input="45"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
separator_padding_left='' #
separator_padding_right='' #
prompt_horizontal_padding='' #
prompt_final_padding='' #
segment_padding=' ' #
enable_vertical_padding=true # Add extra new line over prompt
max_pwd_char="20"
##==============================================================================
## GIT
##==============================================================================
git_symbol_synced=''
git_symbol_unpushed=' ▲'
git_symbol_unpulled=' ▼'
git_symbol_unpushedunpulled=' ◆'
git_symbol_dirty=' ◔'
git_symbol_dirty_unpushed=' ◔ △'
git_symbol_dirty_unpulled=' ◔ ▽'
git_symbol_dirty_unpushedunpulled=' ◔ ◇'
git_update_period_minutes=15 # Use -1 to disable automatic updates

View file

@ -0,0 +1,24 @@
##==============================================================================
## COLORS
##==============================================================================
font_color_user="black"
background_user="red"
texteffect_user="bold"
font_color_host="red"
background_host="black"
texteffect_host="bold"
font_color_pwd="black"
background_pwd="red"
texteffect_pwd="bold"
font_color_git="white"
background_git="black"
texteffect_git="bold"
font_color_input="red"
background_input="none"
texteffect_input="bold"

View file

@ -0,0 +1,940 @@
#!/bin/bash
##
##
## =======================
## WARNING!!
## DO NOT EDIT THIS FILE!!
## =======================
##
## This file was generated by an installation script.
## It might be overwritten without warning at any time
## and you will lose all your changes.
##
## Visit for instructions and more information:
## https://github.com/andresgongora/synth-shell/
##
##
#!/bin/bash
## +-----------------------------------+-----------------------------------+
## | |
## | Copyright (c) 2019-2020, Andres Gongora <mail@andresgongora.com>. |
## | |
## | This program is free software: you can redistribute it and/or modify |
## | it under the terms of the GNU General Public License as published by |
## | the Free Software Foundation, either version 3 of the License, or |
## | (at your option) any later version. |
## | |
## | This program is distributed in the hope that it will be useful, |
## | but WITHOUT ANY WARRANTY; without even the implied warranty of |
## | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
## | GNU General Public License for more details. |
## | |
## | You should have received a copy of the GNU General Public License |
## | along with this program. If not, see <http://www.gnu.org/licenses/>. |
## | |
## +-----------------------------------------------------------------------+
##
## DESCRIPTION
## ===========
##
## Script to colorize terminal text.
## It works in either of two ways, either by providing the formatting
## sequences that should be added to the text, or by directly wrapping
## the text with the desired control sequences
##
##
##
##
##
## USAGE
## =====
##
## Formating a text directly:
## FORMATTED_TEXT=$(formatText "Hi!" -c red -b 13 -e bold)
## echo -e "$FORMATTED_TEXT"
##
## Getting the control sequences:
## FORMAT=$(getFormatCode -c blue -b yellow -e bold -e blink)
## NONE=$(getFormatCode -e none)
## echo -e $FORMAT"Hello"$NONE
##
## Options (More than one code may be specified)
## -c color name or 256bit code for font face
## -b background color name or 256bit code
## -e effect name (e.g. bold, blink, etc.)
##
##
##
##
##
## BASH TEXT FORMATING
## ===================
##
## Colors and text formatting can be achieved by preceding the text
## with an escape sequence. An escape sequence starts with an <ESC>
## character (commonly \e[), followed by one or more formatting codes
## (its possible) to apply more that one color/effect at a time),
## and finished by a lower case m. For example, the formatting code 1
## tells the terminal to print the text bold face. This is acchieved as:
## \e[1m Hello World!
##
## But if nothing else is specified, then eveything that may be printed
## after 'Hello world!' will be bold face as well. The code 0 is thus
## meant to remove all formating from the text and return to normal:
## \e[1m Hello World! \e[0m
##
## It's also possible to paint the text in color (codes 30 to 37 and
## codes 90 to 97), or its background (codes 40 to 47 and 100 to 107).
## Red has code 31:
## \e[31m Hello World! \e[0m
##
## More than one code can be applied at a time. Codes are separated by
## semicolons. For example, code 31 paints the text in red. Thus,
## the following would print in red bold face:
## \e[1;31m Hello World! \e[0m
##
## Some formatting sequences are, in fact, comprised of two codes
## that must go together. For example, the code 38;5; tells the terminal
## that the next code (after the semicolon) should be interpreted as
## a 256 bit formatting color. So, for example, the code 82 is a light
## green. We can paint the text using this code as follows, plus bold
## face as follows - but notice that not all terminal support 256 colors:##
## \e[1;38;5;82m Hello World! \e[0m
##
## For a detailed list of all codes, this site has an excellent guide:
## https://misc.flogisoft.com/bash/tip_colors_and_formatting
##
##
##
##
##
## TODO: When requesting an 8 bit colorcode, detect if terminal supports
## 256 bits, and return appropriate code instead
##
## TODO: Improve this description/manual text
##
## TODO: Currently, if only one parameter is passed, its treated as a
## color. Addsupport to also detect whether its an effect code.
## Now: getFormatCode blue == getFormatCode -c blue
## Add: getFormatCode bold == getFormatCode -e bold
##
## TODO: Clean up this script. Prevent functions like "get8bitCode()"
## to be accessible from outside. These are only a "helper" function
## that should only be available to this script
##
##==============================================================================
## CODE PARSERS
##==============================================================================
##------------------------------------------------------------------------------
##
get8bitCode()
{
CODE=$1
case $CODE in
default)
echo 9
;;
none)
echo 9
;;
black)
echo 0
;;
red)
echo 1
;;
green)
echo 2
;;
yellow)
echo 3
;;
blue)
echo 4
;;
magenta|purple|pink)
echo 5
;;
cyan)
echo 6
;;
light-gray)
echo 7
;;
dark-gray)
echo 60
;;
light-red)
echo 61
;;
light-green)
echo 62
;;
light-yellow)
echo 63
;;
light-blue)
echo 64
;;
light-magenta|light-purple)
echo 65
;;
light-cyan)
echo 66
;;
white)
echo 67
;;
*)
echo 0
esac
}
##------------------------------------------------------------------------------
##
getColorCode()
{
COLOR=$1
## Check if color is a 256-color code
if [ $COLOR -eq $COLOR ] 2> /dev/null; then
if [ $COLOR -gt 0 -a $COLOR -lt 256 ]; then
echo "38;5;$COLOR"
else
echo 0
fi
## Or if color key-workd
else
BITCODE=$(get8bitCode $COLOR)
COLORCODE=$(($BITCODE + 30))
echo $COLORCODE
fi
}
##------------------------------------------------------------------------------
##
getBackgroundCode()
{
COLOR=$1
## Check if color is a 256-color code
if [ $COLOR -eq $COLOR ] 2> /dev/null; then
if [ $COLOR -gt 0 -a $COLOR -lt 256 ]; then
echo "48;5;$COLOR"
else
echo 0
fi
## Or if color key-workd
else
BITCODE=$(get8bitCode $COLOR)
COLORCODE=$(($BITCODE + 40))
echo $COLORCODE
fi
}
##------------------------------------------------------------------------------
##
getEffectCode()
{
EFFECT=$1
NONE=0
case $EFFECT in
none)
echo $NONE
;;
default)
echo $NONE
;;
bold)
echo 1
;;
bright)
echo 1
;;
dim)
echo 2
;;
underline)
echo 4
;;
blink)
echo 5
;;
reverse)
echo 7
;;
hidden)
echo 8
;;
strikeout)
echo 9
;;
*)
echo $NONE
esac
}
##------------------------------------------------------------------------------
##
getFormattingSequence()
{
START='\e[0;'
MIDLE=$1
END='m'
echo -n "$START$MIDLE$END"
}
##==============================================================================
## AUX
##==============================================================================
applyCodeToText()
{
local RESET=$(getFormattingSequence $(getEffectCode none))
TEXT=$1
CODE=$2
echo -n "$CODE$TEXT$RESET"
}
##==============================================================================
## MAIN FUNCTIONS
##==============================================================================
##------------------------------------------------------------------------------
##
getFormatCode()
{
local RESET=$(getFormattingSequence $(getEffectCode none))
## NO ARGUMENT PROVIDED
if [ "$#" -eq 0 ]; then
echo -n "$RESET"
## 1 ARGUMENT -> ASSUME TEXT COLOR
elif [ "$#" -eq 1 ]; then
TEXT_COLOR=$(getFormattingSequence $(getColorCode $1))
echo -n "$TEXT_COLOR"
## ARGUMENTS PROVIDED
else
FORMAT=""
while [ "$1" != "" ]; do
## PROCESS ARGUMENTS
TYPE=$1
ARGUMENT=$2
case $TYPE in
-c)
CODE=$(getColorCode $ARGUMENT)
;;
-b)
CODE=$(getBackgroundCode $ARGUMENT)
;;
-e)
CODE=$(getEffectCode $ARGUMENT)
;;
*)
CODE=""
esac
## ADD CODE SEPARATOR IF NEEDED
if [ "$FORMAT" != "" ]; then
FORMAT="$FORMAT;"
fi
## APPEND CODE
FORMAT="$FORMAT$CODE"
# Remove arguments from stack
shift
shift
done
## APPLY FORMAT TO TEXT
FORMAT_CODE=$(getFormattingSequence $FORMAT)
echo -n "${FORMAT_CODE}"
fi
}
##------------------------------------------------------------------------------
##
formatText()
{
local RESET=$(getFormattingSequence $(getEffectCode none))
## NO ARGUMENT PROVIDED
if [ "$#" -eq 0 ]; then
echo -n "${RESET}"
## ONLY A STRING PROVIDED -> Append reset sequence
elif [ "$#" -eq 1 ]; then
TEXT=$1
echo -n "${TEXT}${RESET}"
## ARGUMENTS PROVIDED
else
TEXT=$1
FORMAT_CODE=$(getFormatCode "${@:2}")
applyCodeToText "$TEXT" "$FORMAT_CODE"
fi
}
##------------------------------------------------------------------------------
##
removeColorCodes()
{
printf "$1" | sed 's/\x1b\[[0-9;]*m//g'
}
##==============================================================================
## DEBUG
##==============================================================================
#formatText "$@"
#FORMATTED_TEXT=$(formatText "HELLO WORLD!!" -c red -b 13 -e bold -e blink -e strikeout)
#echo -e "$FORMATTED_TEXT"
#FORMAT=$(getFormatCode -c blue -b yellow)
#NONE=$(getFormatCode -e none)
#echo -e $FORMAT"Hello"$NONE
#!/bin/bash
## +-----------------------------------+-----------------------------------+
## | |
## | Copyright (c) 2019-2023, Andres Gongora <mail@andresgongora.com>. |
## | |
## | This program is free software: you can redistribute it and/or modify |
## | it under the terms of the GNU General Public License as published by |
## | the Free Software Foundation, either version 3 of the License, or |
## | (at your option) any later version. |
## | |
## | This program is distributed in the hope that it will be useful, |
## | but WITHOUT ANY WARRANTY; without even the implied warranty of |
## | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
## | GNU General Public License for more details. |
## | |
## | You should have received a copy of the GNU General Public License |
## | along with this program. If not, see <http://www.gnu.org/licenses/>. |
## | |
## +-----------------------------------------------------------------------+
##
## DESCRIPTION
##
## This script takes a path name and shortens it.
## - home is replaced by ~
## - last folder in apth is never truncated
##
##
## REFERENCES
##
## Original source: WOLFMAN'S color bash promt
## https://wiki.chakralinux.org/index.php?title=Color_Bash_Prompt#Wolfman.27s
##
##==============================================================================
## FUNCTIONS
##==============================================================================
##------------------------------------------------------------------------------
##
shortenPath()
{
## GET PARAMETERS
local path=$1
local max_length=$2
local default_max_length=25
local trunc_symbol=".."
## CHECK PARAMETERS AND INIT
if [ -z "$path" ]; then
echo ""
exit
elif [ -z "$max_length" ]; then
local max_length=$default_max_length
fi
## CLEANUP PATH
## Replace HOME with ~ for the current user, similar to sed.
local path=${path/#$HOME/\~}
## GET PRINT LENGHT
## - Get curred directory (last folder in path) to get its length (num characters).
## - Determine the actual max length we will use to truncate, choosing between either
## $max_length, set by the usert, or the length of the current dir,
## depending on which is greater. This ensures that even if we set a
## relatively low $max_length value, the name of the current dir will not
## be truncated. Store in $print_length
local dir=${path##*/}
local dir_length=${#dir}
local path_length=${#path}
local print_length=$(( ( max_length < dir_length ) ? dir_length : max_length )) #
## TRUNCATE PATH TO
## - If $path_length > $print_lenght
## - Truncate the path to max_length
## - Clean off path fragments before first '/' (included)
## - Check if the bit we have removed would have landed at home
## - If at home, prepend '~' to the clean path
## - Else, prepend the "trunc_symbol" to the clean path
if [ $path_length -gt $print_length ]; then
local offset=$(( $path_length - $print_length ))
local truncated_path=${path:$offset}
local clean_path="/${truncated_path#*/}"
local removed_path=${path%%"$clean_path"}
if [ "$removed_path" == "~" ]; then
local short_path="~${clean_path}"
else
local short_path=${trunc_symbol}${clean_path}
fi
else
local short_path=$path
fi
## RETURN FINAL PATH
echo $short_path
}
##==============================================================================
## DEBUG
##==============================================================================
#PATH1="/home/andy/my/imaginary/file/path"
#echo "$PATH1"
#echo "50: $(shortenPath "$PATH1" 50)"
#echo "25: $(shortenPath "$PATH1" 25)"
#echo "24: $(shortenPath "$PATH1" 24)"
#echo "23: $(shortenPath "$PATH1" 23)"
#echo "22: $(shortenPath "$PATH1" 22)"
#echo "10: $(shortenPath "$PATH1" 10)"
##==============================================================================
## COLORS
##
## Control the color and format scheme of the bash prompt.
## The prompt is divided into segments, listed below starting from the left:
## - USER: shows the user's name.
## - HOST: shows the host's name.
## - PWD: shows the current directory.
## - GIT: if inside a git repository, shows the name of current branch.
## - PYENV: if inside a Python Virtual environment.
## - TF: if inside a Terraform Workspace.
## - CLOCK: shows current time in H:M format.
## - INPUT: actual bash input.
##
## Valid color options:
## - white black light-gray dark-gray
## red green yellow blue cyan purple
## light-red light-green light-yellow light-blue light-cyan light-purple
## - Values in the range [0-255] for 256 bit colors. To check all number-color
## pairs for your terminal, you may run the following snippet by HaleTom:
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
## or search something like "bash 256 color codes" on the internet.
##
##==============================================================================
format="USER HOST PWD GIT PYENV TF KUBE"
font_color_user="white"
background_user="blue"
texteffect_user="bold"
font_color_host="white"
background_host="light-blue"
texteffect_host="bold"
font_color_pwd="dark-gray"
background_pwd="white"
texteffect_pwd="bold"
font_color_git="light-gray"
background_git="dark-gray"
texteffect_git="bold"
font_color_pyenv="white"
background_pyenv="blue"
texteffect_pyenv="bold"
font_color_kube="white"
background_kube="purple"
texteffect_kube="bold"
font_color_tf="purple"
background_tf="light-purple"
texteffect_tf="bold"
font_color_clock="white"
background_clock="light-blue"
texteffect_clock="bold"
font_color_input="45"
background_input="none"
texteffect_input="bold"
##==============================================================================
## BEHAVIOR
##==============================================================================
separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle
separator_padding_left='' #
separator_padding_right='' #
prompt_horizontal_padding='' #
prompt_final_padding='' #
segment_padding=' ' #
enable_vertical_padding=true # Add extra new line over prompt
max_pwd_char="20"
##==============================================================================
## GIT
##==============================================================================
git_symbol_synced=''
git_symbol_unpushed=' ▲'
git_symbol_unpulled=' ▼'
git_symbol_unpushedunpulled=' ◆'
git_symbol_dirty=' ◔'
git_symbol_dirty_unpushed=' ◔ △'
git_symbol_dirty_unpulled=' ◔ ▽'
git_symbol_dirty_unpushedunpulled=' ◔ ◇'
git_update_period_minutes=15 # Use -1 to disable automatic updates
#!/bin/bash
## +-----------------------------------+-----------------------------------+
## | |
## | Copyright (c) 2018-2023, Andres Gongora <mail@andresgongora.com>. |
## | |
## | This program is free software: you can redistribute it and/or modify |
## | it under the terms of the GNU General Public License as published by |
## | the Free Software Foundation, either version 3 of the License, or |
## | (at your option) any later version. |
## | |
## | This program is distributed in the hope that it will be useful, |
## | but WITHOUT ANY WARRANTY; without even the implied warranty of |
## | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
## | GNU General Public License for more details. |
## | |
## | You should have received a copy of the GNU General Public License |
## | along with this program. If not, see <http://www.gnu.org/licenses/>. |
## | |
## +-----------------------------------------------------------------------+
##
## DESCRIPTION
##
## This script updates your "PS1" environment variable to display colors.
## Additionally, it also shortens the name of your current path to a
## maximum 25 characters, which is quite useful when working in deeply
## nested folders.
##
##
##
## REFFERENCES
##
## * http://tldp.org/HOWTO/Bash-Prompt-HOWTO/index.html
##
##
##==============================================================================
## EXTERNAL DEPENDENCIES
##==============================================================================
[ "$(type -t include)" != 'function' ]&&{ include(){ { [ -z "$_IR" ]&&_IR="$PWD"&&cd "$(dirname "${BASH_SOURCE[0]}")"&&include "$1"&&cd "$_IR"&&unset _IR;}||{ local d="$PWD"&&cd "$(dirname "$PWD/$1")"&&. "$(basename "$1")"&&cd "$d";}||{ echo "Include failed $PWD->$1"&&exit 1;};};}
synth_shell_prompt()
{
##==============================================================================
## FUNCTIONS
##==============================================================================
##------------------------------------------------------------------------------
##
## Returns current git branch for current directory, if (and only if)
## the current directory is part of a git repository, and git is installed.
##
## In addition, it adds a symbol to indicate the state of the repository.
## By default, these symbols and their meaning are (set globally):
##
## UPSTREAM NO CHANGE DIRTY
## up to date SSP_GIT_SYNCED SSP_GIT_DIRTY
## ahead SSP_GIT_AHEAD SSP_GIT_DIRTY_AHEAD
## behind SSP_GIT_BEHIND SSP_GIT_DIRTY_BEHIND
## diverged SSP_GIT_DIVERGED SSP_GIT_DIRTY_DIVERGED
##
## Returns an empty string otherwise.
##
## Inspired by twolfson's sexy-bash-prompt:
## https://github.com/twolfson/sexy-bash-prompt
##
getGitBranch()
{
if ( which git > /dev/null 2>&1 ); then
## CHECK IF IN A GIT REPOSITORY, OTHERWISE SKIP
local branch=$(git branch 2> /dev/null |\
sed -n '/^[^*]/d;s/*\s*\(.*\)/\1/p')
if [[ -n "$branch" ]]; then
## UPDATE LOCAL GIT BRANCH (i.e., fetch)
## This will talk to the remote repository to get the latest
## updates. Because doing so for every terminal prompt can
## (and will) be slow, the script will do so only if its globaly
## enabled and only periodically in the background.
if [ "$SSP_GIT_UPDATE_PERIOD_MINUTES" -ge 0 ]; then
## Find .git
local d="$PWD"
local max_lvls=25
while [ ! -e "./.git" -a $max_lvls -gt 0 ]; do
cd .. # Go up 1 level
max_lvls=$((max_lvls - 1))
done
local dot_git="${PWD}/.git"
cd "$d"
## Check if submodule
if [ -f "$dot_git" ]; then
local dot_git=$(cat $dot_git | grep 'gitdir' | sed 's/gitdir:\ //g')
fi
## Get timestamp
if [ -d "$dot_git" -a -e "${dot_git}/FETCH_HEAD" ]; then
local git_last_update=$(stat -c "%Y" "${dot_git}/FETCH_HEAD")
fi
## Update if it's time to do so
if [ ! -z $git_last_update ]; then
local current_timestamp=$(date +%s)
local elapsed_minutes=$(((current_timestamp-git_last_update)/60))
if [ "$elapsed_minutes" -ge "$SSP_GIT_UPDATE_PERIOD_MINUTES" ]; then
git fetch --recurse-submodules > /dev/null 2>&1 &
fi
fi
fi
## GET GIT STATUS
## This information contains whether the current branch is
## ahead, behind or diverged (ahead & behind), as well as
## whether any file has been modified locally (is dirty).
## --porcelain: script friendly output.
## -b: show branch tracking info.
## -u no: do not list untracked/dirty files
## From the first line we get whether we are synced, and if
## there are more lines, then we know it is dirty.
## NOTE: this requires that you fetch your repository,
## otherwise your information is outdated.
local is_dirty=false &&\
[[ -n "$(git status --porcelain)" ]] &&\
is_dirty=true
local is_ahead=false &&\
[[ "$(git status --porcelain -u no -b)" == *"ahead"* ]] &&\
is_ahead=true
local is_behind=false &&\
[[ "$(git status --porcelain -u no -b)" == *"behind"* ]] &&\
is_behind=true
## SELECT SYMBOL
if $is_dirty && $is_ahead && $is_behind; then
local symbol=$SSP_GIT_DIRTY_DIVERGED
elif $is_dirty && $is_ahead; then
local symbol=$SSP_GIT_DIRTY_AHEAD
elif $is_dirty && $is_behind; then
local symbol=$SSP_GIT_DIRTY_BEHIND
elif $is_dirty; then
local symbol=$SSP_GIT_DIRTY
elif $is_ahead && $is_behind; then
local symbol=$SSP_GIT_DIVERGED
elif $is_ahead; then
local symbol=$SSP_GIT_AHEAD
elif $is_behind; then
local symbol=$SSP_GIT_BEHIND
else
local symbol=$SSP_GIT_SYNCED
fi
## RETURN STRING
echo "$branch$symbol"
fi
fi
## DEFAULT
echo ""
}
##------------------------------------------------------------------------------
##
##
getTerraform()
{
## Check if we are in a terraform directory
if [ -d .terraform ]; then
## Check if the terraform binary is in the path
if ( which terraform > /dev/null 2>&1 ); then
## Get the terraform workspace
local tf="$(terraform workspace show 2> /dev/null | tr -d '\n')"
echo "$tf"
fi
fi
}
##------------------------------------------------------------------------------
##
##
getPyenv()
{
## Conda environment
if [ -n "$CONDA_DEFAULT_ENV" ]; then
echo "$CONDA_DEFAULT_ENV"
## Python virtual environment
elif [ -n "${VIRTUAL_ENV:-}" ]; then
local regex='PS1=\"\((.*?)\)\s\$\{PS1'
local pyenv=$(cat $VIRTUAL_ENV/bin/activate | perl -n -e"/$regex/ && print \$1" 2> /dev/null)
if [ -z "${pyenv}" ]; then
local pyenv=$(basename ${VIRTUAL_ENV})
fi
echo "$pyenv"
fi
}
##------------------------------------------------------------------------------
##
##
getKube()
{
type kubectl &>/dev/null && \
type yq &>/dev/null && \
echo -n "$(kubectl config view | yq '.contexts[].context.cluster |select(.contexts[].name == .current-context)' | head -n 1)"
}
##------------------------------------------------------------------------------
##
## Print each word of the propmpt, i.e., a small text acompanied by the
## separator character and formated with colors and background.
##
printSegment()
{
## GET PARAMETERS
local text=$1
local font_color=$2
local background_color=$3
local next_background_color=$4 # needed for the separator, it participates in this and the next text segment
local font_effect=$5
## COMPUTE COLOR FORMAT CODES
local no_color="\[$(getFormatCode -e reset)\]"
local text_format="\[$(getFormatCode -c $font_color -b $background_color -e $font_effect)\]"
local separator_format="\[$(getFormatCode -c $background_color -b $next_background_color)\]"
## GENERATE TEXT
printf "${text_format}${segment_padding}${text}${segment_padding}${separator_padding_left}${separator_format}${separator_char}${separator_padding_right}${no_color}"
}
##------------------------------------------------------------------------------
##
##
get_colors_for_element()
{
case $1 in
"USER") echo "${SSP_COLORS_USER[@]}" ;;
"HOST") echo "${SSP_COLORS_HOST[@]}" ;;
"PWD") echo "${SSP_COLORS_PWD[@]}" ;;
"GIT") echo "${SSP_COLORS_GIT[@]}" ;;
"PYENV") echo "${SSP_COLORS_PYENV[@]}";;
"KUBE") echo "${SSP_COLORS_KUBE[@]}";;
"TF") echo "${SSP_COLORS_TF[@]}" ;;
"CLOCK") echo "${SSP_COLORS_CLOCK[@]}";;
"INPUT") echo "${SSP_COLORS_INPUT[@]}";;
*)
esac
}
##------------------------------------------------------------------------------
##
##
combine_elements()
{
local first=$1
local second=$2
local colors_first=($(get_colors_for_element $first))
local colors_second=($(get_colors_for_element $second))
case $first in
"USER") local text="$user" ;;
"HOST") local text="$host" ;;
"PWD") local text="$path" ;;
"GIT") local text="$git_branch" ;;
"PYENV") local text="$pyenv" ;;
"KUBE") local text="$kube" ;;
"TF") local text="$tf" ;;
"CLOCK") local text="$clock" ;;
"INPUT") local text="" ;;
*) local text="" ;;
esac
local text_color=${colors_first[0]}
local bg_color=${colors_first[1]}
local next_bg_color=${colors_second[1]}
local text_effect=${colors_first[2]}
printSegment "$text" "$text_color" "$bg_color" "$next_bg_color" "$text_effect"
}
##==============================================================================
## HOOK
##==============================================================================
prompt_command_hook()
{
## GET PARAMETERS
## This might be a bit redundant, but it makes it easier to maintain
local elements=(${SSP_ELEMENTS[@]})
local user=$USER
local host=$HOSTNAME
local path="$(shortenPath "$PWD" $SSP_MAX_PWD_CHAR)" # bash-tools::shortenPath
local git_branch="$(getGitBranch)"
local pyenv="$(getPyenv)"
local kube="$(getKube)"
local tf="$(getTerraform)"
local clock="$(date +"%H:%M")"
## ADAPT DYNAMICALLY ELEMENTS TO BE SHOWN
## Check if elements such as GIT and the Python environment should be
## shown and adapt the variables as needed. This usually implies removing
## the appropriate field from the "elements" array if the user set them
if [ -z "$git_branch" ]; then
elements=( ${elements[@]/"GIT"} ) # Remove GIT from elements to be shown
fi
if [ -z "$pyenv" ]; then
elements=( ${elements[@]/"PYENV"} ) # Remove PYENV from elements to be shown
fi
if [ -z "$tf" ]; then
elements=( ${elements[@]/"TF"} ) # Remove TF from elements to be shown
fi
if [ -z "$kube" ]; then
elements=( ${elements[@]/"KUBE"} ) # Remove KUBE from elements to be shown
fi
## WINDOW TITLE
## Prevent messed up terminal-window titles, must be set in the PS1 variable
case $TERM in
xterm*|rxvt*)
SSP_PWD="$path"
local titlebar="\[\033]0;\${USER}@\${HOSTNAME}: \${SSP_PWD}\007\]"
;;
*)
local titlebar=""
;;
esac
## CONSTRUCT PROMPT ITERATIVELY
## Iterate through all elements to be shown and combine them. Stop once only
## 1 element is left, which should be the "INPUT" element; then apply the
## INPUT formatting.
## Notice that this reuses the PS1 variables over and over again, and appends
## all extra formatting elements to the end of it.
PS1="${titlebar}${SSP_VERTICAL_PADDING}"
while [ "${#elements[@]}" -gt 1 ]; do
local current=${elements[0]}
local next=${elements[1]}
local elements=("${elements[@]:1}") #remove the 1st element
PS1="$PS1$(combine_elements $current $next)"
done
local input_colors=($(get_colors_for_element ${elements[0]}))
local input_color=${input_colors[0]}
local input_bg=${input_colors[1]}
local input_effect=${input_colors[2]}
local input_format="\[$(getFormatCode -c $input_color -b $input_bg -e $input_effect)\]"
PS1="$PS1 $input_format"
## Once this point is reached, PS1 is formatted and set. The terminal session
## will then use that variable to prompt the user :)
}
##==============================================================================
## MAIN
##==============================================================================
## LOAD USER CONFIGURATION
local user_config_file="$HOME/.config/synth-shell/synth-shell-prompt.config"
local root_config_file="/etc/synth-shell/synth-shell-prompt.root.config"
local sys_config_file="/etc/synth-shell/synth-shell-prompt.config"
if [ -f $user_config_file ]; then
source $user_config_file
elif [ -f $root_config_file -a "$USER" == "root" ]; then
source $root_config_file
elif [ -f $sys_config_file ]; then
source $sys_config_file
fi
## PADDING
if $enable_vertical_padding; then
local vertical_padding="\n"
else
local vertical_padding=""
fi
## CONFIG FOR "prompt_command_hook()"
SSP_ELEMENTS=($format "INPUT") # Append INPUT to elements that have to be shown
SSP_COLORS_USER=($font_color_user $background_user $texteffect_user)
SSP_COLORS_HOST=($font_color_host $background_host $texteffect_host)
SSP_COLORS_PWD=($font_color_pwd $background_pwd $texteffect_pwd)
SSP_COLORS_GIT=($font_color_git $background_git $texteffect_git)
SSP_COLORS_PYENV=($font_color_pyenv $background_pyenv $texteffect_pyenv)
SSP_COLORS_KUBE=($font_color_kube $background_kube $texteffect_kube)
SSP_COLORS_TF=($font_color_tf $background_tf $texteffect_tf)
SSP_COLORS_CLOCK=($font_color_clock $background_clock $texteffect_clock)
SSP_COLORS_INPUT=($font_color_input $background_input $texteffect_input)
SSP_VERTICAL_PADDING=$vertical_padding
SSP_MAX_PWD_CHAR=${max_pwd_char:-20}
SSP_GIT_SYNCED=$git_symbol_synced
SSP_GIT_AHEAD=$git_symbol_unpushed
SSP_GIT_BEHIND=$git_symbol_unpulled
SSP_GIT_DIVERGED=$git_symbol_unpushedunpulled
SSP_GIT_DIRTY=$git_symbol_dirty
SSP_GIT_DIRTY_AHEAD=$git_symbol_dirty_unpushed
SSP_GIT_DIRTY_BEHIND=$git_symbol_dirty_unpulled
SSP_GIT_DIRTY_DIVERGED=$git_symbol_dirty_unpushedunpulled
SSP_GIT_UPDATE_PERIOD_MINUTES=$git_update_period_minutes
## For terminal line coloring, leaving the rest standard
none="$(tput sgr0)"
trap 'echo -ne "${none}"' DEBUG
## ADD HOOK TO UPDATE PS1 AFTER EACH COMMAND
## Bash provides an environment variable called PROMPT_COMMAND.
## The contents of this variable are executed as a regular Bash command
## just before Bash displays a prompt.
## We want it to call our own command to truncate PWD and store it in NEW_PWD
PROMPT_COMMAND=prompt_command_hook
} # synth_shell_prompt()
##------------------------------------------------------------------------------
##
## CALL SCRIPT FUNCTION
## - CHECK IF SCRIPT IS _NOT_ BEING SOURCED
## - CHECK IF COLOR SUPPORTED
## - Check if compliant with Ecma-48 (ISO/IEC-6429)
## - Call script
## - Unset script
## If not running interactively, don't do anything
if [ -n "$( echo $- | grep i )" ]; then
if [ "${BASH_SOURCE[0]}" == "${0}" ]; then
echo -e "Do not run this script, it will do nothing.\nPlease source it instead by running:\n"
echo -e "\t. ${BASH_SOURCE[0]}\n"
elif [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
synth_shell_prompt
fi
unset synth_shell_prompt
unset include
fi

293
run.sh Normal file
View file

@ -0,0 +1,293 @@
#!/bin/bash
printf "\e[1;32m
###################################
___ ____ ___ _ ____ _ _ ___
| \ |___ |__] | |__| |\ | __ /
|__/ |___ |__] | | | | \| /__
####################################
\e[0m\n"
#--------- Programs ---------
# Installing nala
sudo apt install nala -y
sudo nala update
# X Window System and Input
sudo nala install -y xorg xbacklight xbindkeys xvkbd xinput xorg-dev wmctrl
#brightnessctl
# Python
sudo nala install -y python3-pip
# Java
#sudo nala install default-jdk
# CPU Microcode Updates
#sudo nala install -y amd64-microcode
sudo nala install -y intel-microcode
# Network Management
sudo nala install -y network-manager-gnome
# Appearance and Customization
sudo nala install -y lxappearance arandr
# System Utilities
sudo nala install -y dialog mtools dosfstools avahi-daemon acpi acpid gvfs-backends
sudo systemctl enable avahi-daemon
sudo systemctl enable acpid
# Terminal Emulators
sudo nala install -y alacritty
# Modern replacement for ls
sudo nala install -y exa
# File Managers
sudo nala install -y pcmanfm ranger
# XFCE Settings and Terminal
sudo nala install -y xfce4-settings xfce4-power-manager
# Audio Control
sudo nala install -y pulseaudio alsa-utils pavucontrol volumeicon-alsa
# System Information and Monitoring
sudo nala install -y neofetch htop
# Screenshots
sudo nala install -y flameshot
# Printer Support
sudo nala install -y cups simple-scan
sudo systemctl enable cups
# Bluetooth Support
#sudo nala install -y bluez blueman
#sudo systemctl enable bluetooth
# Messaging
sudo nala install -y telegram-desktop
# Menu and Window Managers
sudo nala install -y sxhkd numlockx rofi dunst libnotify-bin picom dmenu
# Archive Management
sudo nala install -y unzip zip
# Text Editors
sudo nala install -y geany vim mousepad
# Image Viewer
sudo nala install -y viewnior feh sxiv ueberzug
# Media Player
sudo nala install -y mpv
# Document Viewer
sudo nala install -y mupdf
# Disk Utilities and Cleaning Tools
sudo nala install -y gnome-disk-utility bleachbit
# Required packages for i3-gaps installation
sudo nala install -y meson dh-autoreconf libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev xcb libxcb1-dev libxcb-icccm4-dev libyajl-dev libev-dev libxcb-xkb-dev libxcb-cursor-dev libxkbcommon-dev libxcb-xinerama0-dev libxkbcommon-x11-dev libstartup-notification0-dev libxcb-randr0-dev libxcb-xrm0 libxcb-xrm-dev libxcb-shape0 libxcb-shape0-dev cmake i3status
# Brave-Browser
sudo nala install -y curl
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo nala update
sudo nala install -y brave-browser
# Install Codium
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
sudo nala update
sudo nala install -y codium
#--------- Configuration ---------
# Update User Directories (Documents,Downloads,...)
xdg-user-dirs-update
# Installing i3 gaps
cd
cd Downloads
git clone https://github.com/Airblader/i3 i3-gaps
cd i3-gaps
mkdir -p build && cd build
meson --prefix /usr/local
ninja
sudo ninja install
# Installing dependencies for Ly Console Manager
sudo apt install -y libpam0g-dev libxcb-xkb-dev
# Installing Ly Console Display Manager
cd
cd Downloads
git clone --recurse-submodules https://github.com/fairyglade/ly
cd ly/
make
sudo make install installsystemd
sudo systemctl enable ly.service
# Configure xsessions
if [[ ! -d /usr/share/xsessions ]]; then
sudo mkdir /usr/share/xsessions
fi
cat > ./temp << "EOF"
[Desktop Entry]
Encoding=UTF-8
Name=i3
Comment=Manual Window Manager
Exec=i3
Icon=i3
Type=XSession
EOF
sudo cp ./temp /usr/share/xsessions/i3.desktop;rm ./temp
#--------- Fonts ---------
sudo nala install -y fonts-font-awesome fonts-powerline
fonts_dir="$HOME/.local/share/fonts"
if [[ ! -d "$fonts_dir" ]]; then
mkdir -p "$fonts_dir"
fi
cd /tmp
fonts=(
"FiraCode"
"JetBrainsMono"
)
for font in ${fonts[@]}
do
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/$font.zip
unzip $font.zip -d $HOME/.local/share/fonts/$font/
rm $font.zip
done
cd
cd debian-z/
tar xzvf Hack-NerdFont.tar.gz
cd Hack-NerdFont/
mv *ttf ~/.local/share/fonts
cd ..
rm -r Hack-NerdFont/
fc-cache -fv
#--------- My Rice ---------
# Installing Polybar
sudo nala install -y polybar
#--------------------------------------------------
# For image viewer in kitty
#pip install pillow (for debian 11)
sudo nala install -y python3-pillow
#--------------------------------------------------
# Rice
cd
mkdir ~/.themes
mkdir ~/.icons
cd debian-z/theme
tar -xf BlueSky-Clean-Dark.tar.xz
tar xf Sunity-cursors.tar.gz
tar -xf Papirus.tar.xz
unzip Nordic.zip
tar xzf Dracula.tar.gz
tar xzf Dracula-icons.tar.gz
cp -r BlueSky-Clean-Dark ~/.themes
cp -r Dracula ~/.themes
cp -r Nordic ~/.themes
cp -r Papirus ~/.icons
cp -r Dracula-icons/ ~/.icons/
cp -r Sunity-cursors/ ~/.icons/
cd
cd debian-z/
cp -r config/wallpapers/ ~/.config
cp -r config/i3/ ~/.config
cp -r config/sxhkd/ ~/.config
cp -r config/scripts/ ~/.config
cp -r config/alacritty/ ~/.config
cp -r config/dunst/ ~/.config
cp -r config/rofi/ ~/.config
cp -r config/neofetch/ ~/.config
cp -r config/ranger/ ~/.config
cp -r config/polybar/ ~/.config
cp config/guide.pdf ~/.config
cp config/bookmarks.txt ~/.config
cp -r optional/synth-shell ~/.config
cp optional/.bashrc ~/
cp optional/.inputrc ~/
cp config/.fehbg ~/
cp -r scripts ~/
chmod +x ~/.config/i3/autostart.sh
chmod +x ~/.config/i3/scripts/*
cd
if [[ ! -d ~/.config/gtk-3.0 ]]; then
sudo mkdir -p ~/.config/gtk-3.0
fi
cd debian-z/
sudo cp config/settings.ini ~/.config/gtk-3.0/
cp config/.gtkrc-2.0 ~/
#--------------------------------------------------
# Fixing the volume keys
xbindkeys --defaults > ~/.xbindkeysrc
echo '# Increase volume
"amixer set Master 2%+"
XF86AudioRaiseVolume
# Decrease volume
"amixer set Master 2%-"
XF86AudioLowerVolume
# Mute volume
"amixer set Master toggle"
XF86AudioMute' >> ~/.xbindkeysrc
xbindkeys -f ~/.xbindkeysrc
#--------------------------------------------------
sudo mkdir -p ~/.local/share/file-manager/actions/
sudo echo "[Desktop Entry]
Type=Action
Tooltip=Open Terminal
Name=Open Terminal
Profiles=profile-one;
Icon=utilities-terminal
[X-Action-Profile profile-one]
MimeTypes=inode/directory;
Exec=alacritty --working-directory %f
Name=Default profile" > ~/.local/share/file-manager/actions/terminal.desktop
#--------------------------------------------------
cd
cd debian-z/
source optional/keyboard_layout.sh
#source optional/nvidia.sh
#--------------------------------------------------
sudo nala autoremove
printf "\e[1;32m
#####################################################
____ _ ____ ____ ___ ___ _ _ ___ ____ ___
|__/ | | |___ | \ |__] \_/ / |___ | \
| \ | |___ |___ |__/ |__] | /__ |___ |__/
######################################################
\e[0m\n"

BIN
theme/BlueSky-Clean-Dark.tar.xz Executable file

Binary file not shown.

BIN
theme/Dracula-icons.tar.gz Normal file

Binary file not shown.

BIN
theme/Dracula.tar.gz Normal file

Binary file not shown.

BIN
theme/Nordic.zip Executable file

Binary file not shown.

BIN
theme/Papirus.tar.xz Executable file

Binary file not shown.

BIN
theme/Sunity-cursors.tar.gz Executable file

Binary file not shown.