mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-11-24 17:39:37 +01:00
Move old config to old-dots branch
This commit is contained in:
commit
3dab77f779
29
.Xresources
Normal file
29
.Xresources
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Xft.autohint: 0
|
||||||
|
Xft.lcdfilter: lcddefault
|
||||||
|
Xft.hintstyle: hintslight
|
||||||
|
Xft.hinting: 1
|
||||||
|
Xft.antialias: 1
|
||||||
|
Xft.rgba: rgb
|
||||||
|
|
||||||
|
# colors
|
||||||
|
*background: #2E3440
|
||||||
|
*foreground: #D8DEE9
|
||||||
|
*cursorColor: #D8DEE9
|
||||||
|
|
||||||
|
*color0: #3B4252
|
||||||
|
*color1: #BF616A
|
||||||
|
*color2: #A3BE8C
|
||||||
|
*color3: #EBCB8B
|
||||||
|
*color4: #81A1C1
|
||||||
|
*color5: #B48EAD
|
||||||
|
*color6: #88C0D0
|
||||||
|
*color7: #E5E9F0
|
||||||
|
|
||||||
|
*color8: #4C566A
|
||||||
|
*color9: #BF616A
|
||||||
|
*color10: #A3BE8C
|
||||||
|
*color11: #EBCB8B
|
||||||
|
*color12: #81A1C1
|
||||||
|
*color13: #B48EAD
|
||||||
|
*color14: #8FBCBB
|
||||||
|
*color15: #ECEFF4
|
10
.config/Asocia/splash
Normal file
10
.config/Asocia/splash
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
_______ _____
|
||||||
|
___ |__Welcome back, _________(_)______ _
|
||||||
|
__ /| |__ ___/_ __ \_ ___/__ / _ __ `/
|
||||||
|
_ ___ |_(__ ) / /_/ // /__ _ / / /_/ /
|
||||||
|
/_/ |_|/____/ \____/ \___/ /_/ \__,_/
|
36
.config/betterlockscreenrc
Normal file
36
.config/betterlockscreenrc
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# ~/.config/betterlockscreenrc
|
||||||
|
|
||||||
|
# default options
|
||||||
|
display_on=0
|
||||||
|
span_image=false
|
||||||
|
lock_timeout=300
|
||||||
|
fx_list=(dim blur dimblur pixel dimpixel color)
|
||||||
|
dim_level=40
|
||||||
|
blur_level=1
|
||||||
|
pixel_scale=10,1000
|
||||||
|
solid_color=333333
|
||||||
|
wallpaper_cmd="feh --bg-fill"
|
||||||
|
# i3lockcolor_bin="i3lock-color" # Manually set command for i3lock-color
|
||||||
|
|
||||||
|
# default theme
|
||||||
|
loginbox=00000066
|
||||||
|
loginshadow=00000000
|
||||||
|
locktext="Type satrtapassword to unlock..."
|
||||||
|
font="sans-serif"
|
||||||
|
ringcolor=ffffffff
|
||||||
|
insidecolor=00000000
|
||||||
|
separatorcolor=00000000
|
||||||
|
ringvercolor=ffffffff
|
||||||
|
insidevercolor=00000000
|
||||||
|
ringwrongcolor=ffffffff
|
||||||
|
insidewrongcolor=d23c3dff
|
||||||
|
timecolor=ffffffff
|
||||||
|
time_format="%H:%M:%S"
|
||||||
|
greetercolor=ffffffff
|
||||||
|
layoutcolor=ffffffff
|
||||||
|
keyhlcolor=d23c3dff
|
||||||
|
bshlcolor=d23c3dff
|
||||||
|
verifcolor=ffffffff
|
||||||
|
wrongcolor=d23c3dff
|
||||||
|
modifcolor=d23c3dff
|
||||||
|
bgcolor=000000ff
|
27
.config/crontab
Normal file
27
.config/crontab
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
DISPLAY=:0
|
||||||
|
XDG_RUNTIME_DIR=/run/user/1000
|
||||||
|
|
||||||
|
|
||||||
|
# Example of job definition:
|
||||||
|
# .---------------- minute (0 - 59)
|
||||||
|
# | .------------- hour (0 - 23)
|
||||||
|
# | | .---------- day of month (1 - 31)
|
||||||
|
# | | | .------- month (1 - 12) OR Jan-Dec
|
||||||
|
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR SUN-SAT
|
||||||
|
# | | | | |
|
||||||
|
# * * * * * user-name command to be executed
|
||||||
|
|
||||||
|
# * any value
|
||||||
|
# , value list separator
|
||||||
|
# - range of values
|
||||||
|
# / step values
|
||||||
|
|
||||||
|
* * * * * /home/sahin/scripts/check-battery.sh 6
|
||||||
|
|
||||||
|
# At every 15th minute past every hour from 6 through 19.
|
||||||
|
*/15 06-19 * * * curl 'https://sks.itu.edu.tr/ExternalPages/sks/yemek-menu-v2/uzerinde-calisilan/yemek-menu.aspx' 2>/dev/null | grep -oP "js-nyro-modal.*?>\K(.+?)(?=<[is].*>)" > /home/sahin/.cronresults/todaysmenu
|
||||||
|
|
||||||
|
* * * * * cat /var/spool/cron/sahin > /home/sahin/.config/crontab
|
||||||
|
|
||||||
|
* * * * * /home/sahin/GitRepositories/binary-wallpaper/set_binary_wallpaper.sh
|
209
.config/dunst/dunstrc
Normal file
209
.config/dunst/dunstrc
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
|
||||||
|
[global]
|
||||||
|
|
||||||
|
# --- Display --- #
|
||||||
|
|
||||||
|
# The monitor to be displayed to
|
||||||
|
monitor = 0
|
||||||
|
|
||||||
|
# Follow monitor with mouse
|
||||||
|
follow = mouse
|
||||||
|
|
||||||
|
# The geometry of the window
|
||||||
|
# widthxheight +/-x+/-y
|
||||||
|
geometry = "270x6-24+68"
|
||||||
|
|
||||||
|
# geometry = "280x50-10+48"
|
||||||
|
|
||||||
|
# Show how many messages are hidden
|
||||||
|
indicate_hidden = yes
|
||||||
|
|
||||||
|
# Shrink window if it's smaller than the width.
|
||||||
|
shrink = no
|
||||||
|
|
||||||
|
# The transparency of the window.
|
||||||
|
transparency = 1
|
||||||
|
|
||||||
|
# Set height to padding + font size
|
||||||
|
notification_height = 0
|
||||||
|
|
||||||
|
# Draw a line between multiple notifications
|
||||||
|
separator_height = 3
|
||||||
|
separator_color = "#auto"
|
||||||
|
|
||||||
|
# Set notification padding
|
||||||
|
padding = 16
|
||||||
|
horizontal_padding = 16
|
||||||
|
|
||||||
|
# Disable frame (border)
|
||||||
|
frame_width = 3
|
||||||
|
|
||||||
|
# Sort messages by urgency.
|
||||||
|
sort = no
|
||||||
|
|
||||||
|
# Disable idle time
|
||||||
|
idle_threshold = 0
|
||||||
|
|
||||||
|
|
||||||
|
# --- Text --- #
|
||||||
|
|
||||||
|
# Set the font
|
||||||
|
# font = "Noto Sans 11"
|
||||||
|
# font = "Hack Nerd Font 9.5"
|
||||||
|
font = JetBrains Mono 10
|
||||||
|
|
||||||
|
# Set line height to font height
|
||||||
|
line_height = 4
|
||||||
|
|
||||||
|
# Reference for markup and formatting:
|
||||||
|
# <b>bold</b>
|
||||||
|
# <i>italic</i>
|
||||||
|
# <s>strikethrough</s>
|
||||||
|
# <u>underline</u>
|
||||||
|
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
|
||||||
|
# %a appname
|
||||||
|
# %s summary
|
||||||
|
# %b body
|
||||||
|
# %i iconname (including its path)
|
||||||
|
# %I iconname (without its path)
|
||||||
|
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||||
|
# %n progress value if set without any extra characters
|
||||||
|
# %% Literal %
|
||||||
|
|
||||||
|
markup = full
|
||||||
|
format = "<b>%s</b>\n%b"
|
||||||
|
|
||||||
|
# Left align the text
|
||||||
|
alignment = left
|
||||||
|
|
||||||
|
# Vertical alignment of message text and icon.
|
||||||
|
vertical_alignment = center
|
||||||
|
|
||||||
|
# Show age of message if message is old
|
||||||
|
show_age_threshold = 120
|
||||||
|
|
||||||
|
# Wrap text if it doesn't fit in geometry
|
||||||
|
word_wrap = yes
|
||||||
|
|
||||||
|
# Where to place ellipses if word wrap is disabled
|
||||||
|
# ellipsize = middle
|
||||||
|
|
||||||
|
# Use newlines '\n' in notifications.
|
||||||
|
ignore_newline = no
|
||||||
|
|
||||||
|
# Don't stack together notifications
|
||||||
|
stack_duplicates = false
|
||||||
|
|
||||||
|
# Hide the count of stacked notifications
|
||||||
|
# hide_duplicate_count = false
|
||||||
|
|
||||||
|
# Display indicators for URLs (U) and actions (A).
|
||||||
|
show_indicators = yes
|
||||||
|
|
||||||
|
|
||||||
|
# ---- Icons ---- #
|
||||||
|
|
||||||
|
# Align icons left/right/off
|
||||||
|
icon_position = left
|
||||||
|
|
||||||
|
# Scale small icons up to this size, set to 0 to disable.
|
||||||
|
min_icon_size = 0
|
||||||
|
|
||||||
|
# Scale larger icons down to this size, set to 0 to disable
|
||||||
|
max_icon_size = 40
|
||||||
|
|
||||||
|
# Paths to default icons.
|
||||||
|
icon_path = /usr/share/icons/ePapirus/128x128/apps:/usr/share/icons/ePapirus/128x128/devices:/usr/share/icons/ePapirus/128x128/mimetypes:/usr/share/icons/ePapirus/128x128/places:/usr/share/icons/Papirus/48x48/actions:/usr/share/icons/Papirus/48x48/apps:/usr/share/icons/Papirus/48x48/devices:/usr/share/icons/Papirus/48x48:emblems:/usr/share/icons/Papirus/48x48/emotes:/usr/share/icons/Papirus/48x48/mimetypes:/usr/share/icons/Papirus/48x48/places:/usr/share/icons/Papirus/48x48/status:/usr/share/icons/Papirus/16x16/actions:/usr/share/icons/Papirus/16x16/apps:/usr/share/icons/Papirus/16x16/devices:/usr/share/icons/Papirus/16x16/emblems:/usr/share/icons/Papirus/16x16/emotes:/usr/share/icons/Papirus/16x16/mimetypes:/usr/share/icons/Papirus/16x16/panel:/usr/share/icons/Papirus/16x16/places:/usr/share/icons/Papirus/16x16/status
|
||||||
|
|
||||||
|
|
||||||
|
# --- History --- #
|
||||||
|
|
||||||
|
# Avoid timing out hidden notifications
|
||||||
|
sticky_history = yes
|
||||||
|
|
||||||
|
# Maximum amount of notifications kept in history
|
||||||
|
history_length = 100
|
||||||
|
|
||||||
|
|
||||||
|
# --- Misc/Advanced --- #
|
||||||
|
|
||||||
|
dmenu = /usr/bin/dmenu -p dunst:
|
||||||
|
|
||||||
|
# Browser for opening urls in context menu.
|
||||||
|
browser = /usr/bin/firefox -new-tab
|
||||||
|
|
||||||
|
# Always run rule-defined scripts, even if the notification is suppressed
|
||||||
|
always_run_script = false
|
||||||
|
|
||||||
|
# Define the title of the windows spawned by dunst
|
||||||
|
title = Dunst
|
||||||
|
|
||||||
|
# Define the class of the windows spawned by dunst
|
||||||
|
class = Dunst
|
||||||
|
|
||||||
|
# Avoid printing a notification on startup
|
||||||
|
startup_notification = false
|
||||||
|
|
||||||
|
# Manage dunst's desire for talking
|
||||||
|
verbosity = mesg
|
||||||
|
|
||||||
|
# Define the corner radius of the notification window
|
||||||
|
corner_radius = 0
|
||||||
|
|
||||||
|
# Don't gnore the dbus closeNotification message.
|
||||||
|
ignore_dbusclose = false
|
||||||
|
|
||||||
|
|
||||||
|
# --- Legacy --- #
|
||||||
|
|
||||||
|
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||||
|
force_xinerama = false
|
||||||
|
|
||||||
|
|
||||||
|
# --- Mouse --- #
|
||||||
|
mouse_middle_click = close_current
|
||||||
|
mouse_left_click = do_action, close_current
|
||||||
|
mouse_right_click = close_all
|
||||||
|
|
||||||
|
|
||||||
|
# --- Shortcuts --- #
|
||||||
|
# Close notification.
|
||||||
|
close = ctrl+space
|
||||||
|
|
||||||
|
# Close all notifications.
|
||||||
|
close_all = ctrl+shift+space
|
||||||
|
|
||||||
|
# Redisplay last message(s).
|
||||||
|
history = ctrl+grave
|
||||||
|
|
||||||
|
# Context menu.
|
||||||
|
context = ctrl+shift+period
|
||||||
|
|
||||||
|
|
||||||
|
[experimental]
|
||||||
|
per_monitor_dpi = false
|
||||||
|
|
||||||
|
|
||||||
|
# --- Colors --- #
|
||||||
|
|
||||||
|
[urgency_low]
|
||||||
|
# background = "#6BC6DE"
|
||||||
|
# foreground = "#d1e2e8"
|
||||||
|
|
||||||
|
background = "#282C33"
|
||||||
|
foreground = "#D8D8D8"
|
||||||
|
timeout = 8
|
||||||
|
|
||||||
|
[urgency_normal]
|
||||||
|
# background = "#6BC6DE"
|
||||||
|
# foreground = "#d1e2e8"
|
||||||
|
background = "#282C33"
|
||||||
|
foreground = "#D8D8D8"
|
||||||
|
timeout = 8
|
||||||
|
|
||||||
|
[urgency_critical]
|
||||||
|
background = "#dd130ddd"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
frame_color = "#30343B"
|
||||||
|
timeout = 0
|
||||||
|
icon = abrt
|
531
.config/eww/bar/eww.scss
Normal file
531
.config/eww/bar/eww.scss
Normal file
@ -0,0 +1,531 @@
|
|||||||
|
/** EWW.SCSS
|
||||||
|
Created by saimoom **/
|
||||||
|
*{
|
||||||
|
all: unset;
|
||||||
|
font-family: "Iosevka Nerd Font", feather;
|
||||||
|
// font-family: DaddyTimeMono NF;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Variable Color's
|
||||||
|
$background: #1A1B26;
|
||||||
|
$foreground: #A9B1D6;
|
||||||
|
|
||||||
|
$black: #24283B;
|
||||||
|
$gray: #565F89;
|
||||||
|
$red: #F7768E;
|
||||||
|
$green: #73DACA;
|
||||||
|
$yellow: #E0AF68;
|
||||||
|
$blue: #7AA2F7;
|
||||||
|
$magenta: #BB9AF7;
|
||||||
|
$cyan: #7DCFFF;
|
||||||
|
$white: $foreground;
|
||||||
|
/** General **/
|
||||||
|
.bar_class {
|
||||||
|
background-color: #0f0f17;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
.module {
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
border-radius: 10px 16px 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** tooltip!! **/
|
||||||
|
tooltip.background {
|
||||||
|
background-color: #0f0f17;
|
||||||
|
font-size: 18;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #bfc9db;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip label {
|
||||||
|
margin: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Widgets **/
|
||||||
|
|
||||||
|
.clock_time_sep {
|
||||||
|
font-size: 27;
|
||||||
|
color: #bfc9db;
|
||||||
|
margin: 0px 4px 1px 4px;
|
||||||
|
}
|
||||||
|
.clock_time_class, .clock_minute_class {
|
||||||
|
font-size: 23;
|
||||||
|
}
|
||||||
|
.clock_date_class {
|
||||||
|
font-size: 18;
|
||||||
|
margin: 0px 20px 0px -1px;
|
||||||
|
color: #d7beda;
|
||||||
|
}
|
||||||
|
.clock_minute_class {
|
||||||
|
margin: 0px 20px 0px 3px;
|
||||||
|
color: #bfc9db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock_time_class {
|
||||||
|
color: #bfc9db;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0px 5px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diskbar {
|
||||||
|
color: #AD5C6C;
|
||||||
|
background-color: #38384d;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.cpubar {
|
||||||
|
color: #297379;
|
||||||
|
background-color: #38384d;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.membar {
|
||||||
|
color: #e0b089;
|
||||||
|
background-color: #38384d;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.bat{
|
||||||
|
// font-family: JetBrainsMono Nerd Font;
|
||||||
|
font-family: Iosevka Nerd Font;
|
||||||
|
font-size: 1.2em;
|
||||||
|
padding-right: .5rem;
|
||||||
|
color: $blue;
|
||||||
|
}
|
||||||
|
.brightbar trough highlight {
|
||||||
|
background-image: linear-gradient(to right, #e4c9af 30%, #f2cdcd 50%, #e0b089 100% *50);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.volbar trough highlight {
|
||||||
|
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.volume_icon {
|
||||||
|
font-size: 22;
|
||||||
|
color: #a1bdce;
|
||||||
|
margin: 0px 10px 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module_essid {
|
||||||
|
font-size: 18;
|
||||||
|
color: #a1bdce;
|
||||||
|
margin: 0px 10px 0px 0px;
|
||||||
|
}
|
||||||
|
.module_vpn {
|
||||||
|
font-size: 18;
|
||||||
|
color: #77DD77;
|
||||||
|
margin: 0px 10px 0px 0px;
|
||||||
|
}
|
||||||
|
.module-wif {
|
||||||
|
font-size: 22;
|
||||||
|
color: #a1bdce;
|
||||||
|
border-radius: 100%;
|
||||||
|
margin: 0px 10px 0px 5px;
|
||||||
|
}
|
||||||
|
.iconcpu {
|
||||||
|
color: #297379;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.icondisk {
|
||||||
|
color: #AD5C6C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconmem {
|
||||||
|
color: #e0b089;
|
||||||
|
}
|
||||||
|
.iconbat {
|
||||||
|
color: #afbea2;
|
||||||
|
}
|
||||||
|
.iconbat, .iconmem, .iconcpu, .icondisk {
|
||||||
|
font-size: 15;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
.bright_icon {
|
||||||
|
font-size: 22;
|
||||||
|
color: #e4c9af;
|
||||||
|
margin: 0px 10px 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.separ {
|
||||||
|
color: #3e424f;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 22px;
|
||||||
|
margin: 0px 8px 0px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mem_module, .cpu_module, .disk_module{
|
||||||
|
background-color: #0f0f17;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 0px 10px 0px 3px;
|
||||||
|
}
|
||||||
|
scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: #22242b;
|
||||||
|
box-shadow: 0 2px 3px 2px #06060b;
|
||||||
|
border-radius: 16px;
|
||||||
|
min-height: 10px;
|
||||||
|
min-width: 70px;
|
||||||
|
margin: 0px 10px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.works {
|
||||||
|
font-size: 27px;
|
||||||
|
// font-size: 45px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-family: Iosevka Nerd Font;
|
||||||
|
margin: 5px 0px 0px 20px;
|
||||||
|
background-color: #0f0f17;
|
||||||
|
}
|
||||||
|
|
||||||
|
.0 , .01, .02, .03, .04, .05, .06, .07, .08, .09, .00,
|
||||||
|
.011, .022, .033, .044, .055, .066, .077, .088, .099, .000 {
|
||||||
|
margin: 5px 10px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unoccupied */
|
||||||
|
.0 {
|
||||||
|
color:#131d2c;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Occupied */
|
||||||
|
.01, .02, .03, .04, .05, .06, .07, .08, .09, .00 {
|
||||||
|
color: #5c6c82;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Focused */
|
||||||
|
.011, .022, .033, .044, .055, .066, .077, .088, .099, .000 {
|
||||||
|
color: #e4e6ea
|
||||||
|
}
|
||||||
|
|
||||||
|
.033.thunderbird {
|
||||||
|
color: #1E5EBB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.066.twitter {
|
||||||
|
color: #1C9CEA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.firefox.077 {
|
||||||
|
color: #DF5D00;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.twitch.088 {
|
||||||
|
color: #613F9F;
|
||||||
|
}
|
||||||
|
|
||||||
|
.discord.099 {
|
||||||
|
color:#5661EF;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.telegram.000 {
|
||||||
|
color: #0084C6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.song_cover_art {
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
min-height: 24px;
|
||||||
|
min-width: 24px;
|
||||||
|
margin: 10px;
|
||||||
|
border-radius: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.song {
|
||||||
|
color: #a1bdce;
|
||||||
|
font-size : 18px;
|
||||||
|
font-weight : bold;
|
||||||
|
margin : 3px 5px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.song_btn_play {
|
||||||
|
color: #a1bdce;
|
||||||
|
font-size : 28px;
|
||||||
|
margin : 3px 0px 0px 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.song_btn_prev, .song_btn_next {
|
||||||
|
color: #bfc9db;
|
||||||
|
font-size : 24px;
|
||||||
|
margin : 3px 0px 0px 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
// Calendar
|
||||||
|
.cal {
|
||||||
|
background-color: #0f0f17;
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: normal;
|
||||||
|
|
||||||
|
.cal-in {
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
color: #bfc9db;
|
||||||
|
|
||||||
|
.cal {
|
||||||
|
&.highlight {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
padding: 5px 5px 5px 5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
calendar:selected {
|
||||||
|
color: $blue;
|
||||||
|
font-size: 24px;
|
||||||
|
background: $background;
|
||||||
|
}
|
||||||
|
|
||||||
|
calendar.header {
|
||||||
|
color: $blue;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
calendar.button {
|
||||||
|
color: $magenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
calendar.highlight {
|
||||||
|
color: $magenta;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
calendar:indeterminate {
|
||||||
|
color: $background;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.sys_sep {
|
||||||
|
color: #38384d;
|
||||||
|
font-size: 18;
|
||||||
|
margin: 0px 10px 0px 10px;
|
||||||
|
}
|
||||||
|
.sys_text_bat_sub, .sys_text_mem_sub {
|
||||||
|
font-size: 16;
|
||||||
|
color: #bbc5d7;
|
||||||
|
margin: 5px 0px 0px 25px;
|
||||||
|
}
|
||||||
|
.sys_text_bat, .sys_text_mem {
|
||||||
|
font-size: 21;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 14px 0px 0px 25px;
|
||||||
|
}
|
||||||
|
.sys_icon_bat, .sys_icon_mem {
|
||||||
|
font-size: 30;
|
||||||
|
margin: 30px;
|
||||||
|
}
|
||||||
|
.sys_win {
|
||||||
|
background-color: #0f0f17;
|
||||||
|
}
|
||||||
|
.sys_bat {
|
||||||
|
color: #afbea2;
|
||||||
|
background-color: #38384d;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.sys_mem {
|
||||||
|
color: #e4c9af;
|
||||||
|
background-color: #38384d;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.sys_icon_bat, .sys_text_bat {
|
||||||
|
color: #afbea2;
|
||||||
|
}
|
||||||
|
.sys_icon_mem, .sys_text_mem {
|
||||||
|
color: #e4c9af;
|
||||||
|
}
|
||||||
|
.sys_bat_box {
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 15px 10px 10px 20px;
|
||||||
|
}
|
||||||
|
.sys_mem_box {
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 10px 10px 15px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music_pop {
|
||||||
|
background-color: #0f0f17;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
.music_cover_art {
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
min-height: 100px;
|
||||||
|
box-shadow: 5px 5px 5px 5px #06060b;
|
||||||
|
min-width: 170px;
|
||||||
|
margin: 20px;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music {
|
||||||
|
color: #a1bdce;
|
||||||
|
font-size : 20px;
|
||||||
|
font-weight : bold;
|
||||||
|
margin : 20px 0px 0px -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music_artist {
|
||||||
|
color: #bbc5d7;
|
||||||
|
font-size : 16px;
|
||||||
|
font-weight : normal;
|
||||||
|
margin : 0px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music_btn_prev, .music_btn_play, .music_btn_next {
|
||||||
|
font-family: Iosevka Nerd Font;
|
||||||
|
}
|
||||||
|
.music_btn_prev {
|
||||||
|
color: #bbc5d7;
|
||||||
|
font-size : 32px;
|
||||||
|
font-weight : normal;
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
.music_btn_play {
|
||||||
|
color: #a1bdce;
|
||||||
|
font-size : 48px;
|
||||||
|
font-weight : normal;
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
.music_btn_next {
|
||||||
|
color: #bbc5d7;
|
||||||
|
font-size : 32px;
|
||||||
|
font-weight : normal;
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music_bar scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||||
|
border-radius: 24px;
|
||||||
|
}
|
||||||
|
.music_bar scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: #232232;
|
||||||
|
box-shadow: 0 6px 5px 2px #06060b;
|
||||||
|
border-radius: 24px;
|
||||||
|
min-height: 13px;
|
||||||
|
min-width: 190px;
|
||||||
|
margin : -10px 10px 20px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.audio-box {
|
||||||
|
background-color: #0f0f17;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
.speaker_icon {
|
||||||
|
background-size: cover;
|
||||||
|
background-image: url('images/speaker.png');
|
||||||
|
background-position: center;
|
||||||
|
min-height: 70px;
|
||||||
|
min-width: 75px;
|
||||||
|
margin: 10px 20px 5px 20px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.speaker_text {
|
||||||
|
color: #a1bdce;
|
||||||
|
font-size : 26px;
|
||||||
|
font-weight : bold;
|
||||||
|
margin: 20px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.speaker_bar scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||||
|
border-radius: 24px;
|
||||||
|
}
|
||||||
|
.speaker_bar scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: #232232;
|
||||||
|
box-shadow: 0 6px 5px 2px #06060b;
|
||||||
|
border-radius: 24px;
|
||||||
|
min-height: 13px;
|
||||||
|
min-width: 120px;
|
||||||
|
margin : 0px 0px 5px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mic_icon {
|
||||||
|
background-size: cover;
|
||||||
|
background-image: url('images/mic.png');
|
||||||
|
background-position: center;
|
||||||
|
min-height: 70px;
|
||||||
|
min-width: 75px;
|
||||||
|
margin: 5px 20px 20px 20px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mic_text {
|
||||||
|
color: #a1bdce;
|
||||||
|
font-size : 26px;
|
||||||
|
font-weight : bold;
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mic_bar scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||||
|
border-radius: 24px;
|
||||||
|
}
|
||||||
|
.mic_bar scale trough {
|
||||||
|
all: unset;
|
||||||
|
box-shadow: 0 6px 5px 2px #06060b;
|
||||||
|
background-color: #232232;
|
||||||
|
border-radius: 24px;
|
||||||
|
min-height: 13px;
|
||||||
|
min-width: 120px;
|
||||||
|
margin : 0px 0px 20px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.audio_sep {
|
||||||
|
color: #38384d;
|
||||||
|
font-size: 18;
|
||||||
|
margin : 0px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Powermenu
|
||||||
|
.powermenu {
|
||||||
|
font-family: feather;
|
||||||
|
font-size: 1.3em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.button-qtres, .button-reb, .button-lock,
|
||||||
|
.button-quit, .button-off{
|
||||||
|
padding: .5rem .2rem .5rem .2rem;
|
||||||
|
// transition: all .2s ease-in-out;
|
||||||
|
}
|
||||||
|
.button-off{
|
||||||
|
color: $red;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.button-qtres:hover, .button-reb:hover, .button-lock:hover,
|
||||||
|
.button-quit:hover, .button-off:hover{
|
||||||
|
font-size: 1.2em;
|
||||||
|
box-shadow: inset 0 0 0 10em $background;
|
||||||
|
}
|
||||||
|
.button-bspres{
|
||||||
|
color: $green;
|
||||||
|
}
|
||||||
|
.button-reb{
|
||||||
|
color: $yellow
|
||||||
|
}
|
||||||
|
.button-quit{
|
||||||
|
color: $magenta;
|
||||||
|
}
|
||||||
|
.button-lock{
|
||||||
|
color: $blue;
|
||||||
|
}
|
463
.config/eww/bar/eww.yuck
Normal file
463
.config/eww/bar/eww.yuck
Normal file
@ -0,0 +1,463 @@
|
|||||||
|
;; Variables
|
||||||
|
(defpoll clock_time :interval "5s" "date +\%H")
|
||||||
|
(defpoll clock_minute :interval "5s" "date +\%M")
|
||||||
|
(defpoll clock_date :interval "5s" "date '+%d/%m'")
|
||||||
|
(defpoll volume_percent :interval "3s" :run-while vol_reveal "amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||||
|
(defpoll mic_percent :interval "3s" :run-while vol_reveal "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||||
|
(defpoll brightness_percent :interval "5s" :run-while br_reveal "brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
|
||||||
|
(defpoll caps_num_scroll_indicator :interval "300ms" "scripts/indicator")
|
||||||
|
(defvar vol_reveal false)
|
||||||
|
(defvar bat_rev false)
|
||||||
|
(defvar cpu_rev false)
|
||||||
|
(defvar mem_rev false)
|
||||||
|
(defvar disk_rev false)
|
||||||
|
(defvar br_reveal false)
|
||||||
|
(defvar vpn_reveal false)
|
||||||
|
(defvar bluetooth_rev false)
|
||||||
|
(defvar music_reveal false)
|
||||||
|
(defvar wifi_rev false)
|
||||||
|
(defvar time_rev false)
|
||||||
|
(defvar power_rev false)
|
||||||
|
(deflisten workspace "scripts/workspace")
|
||||||
|
|
||||||
|
(deflisten CURRENT_LAYOUT_SYMBOL "scripts/layout")
|
||||||
|
|
||||||
|
(defvar eww "$HOME/scripts/eww -c $HOME/.config/eww/bar")
|
||||||
|
|
||||||
|
|
||||||
|
(defpoll COL_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --COL")
|
||||||
|
(defpoll ESSID_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --ESSID")
|
||||||
|
(defpoll VPN_NAME :interval "1s" "rofi-wireguard")
|
||||||
|
(defpoll BLUETOOTHDEV :interval "1s" "rofi-bluetooth --status")
|
||||||
|
(defpoll WLAN_ICON :interval "1m" "~/.config/eww/bar/scripts/wifi --ICON")
|
||||||
|
|
||||||
|
|
||||||
|
(defpoll song :interval "2s" "~/.config/eww/bar/scripts/music_info --song")
|
||||||
|
(defpoll song_artist :interval "2s" "~/.config/eww/bar/scripts/music_info --artist")
|
||||||
|
(defpoll current_status :interval "1s" "~/.config/eww/bar/scripts/music_info --time")
|
||||||
|
(defpoll song_status :interval "2s" "~/.config/eww/bar/scripts/music_info --status")
|
||||||
|
(defpoll cover_art :interval "2s" "~/.config/eww/bar/scripts/music_info --cover")
|
||||||
|
|
||||||
|
|
||||||
|
;; widgets
|
||||||
|
|
||||||
|
(defwidget wifi []
|
||||||
|
(eventbox :onhover "${eww} update wifi_rev=true"
|
||||||
|
:onhoverlost "${eww} update wifi_rev=false"
|
||||||
|
(box :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||||
|
(button :class "module-wif" :onclick "networkmanager_dmenu" :wrap "false" :limit-width 12 :style "color: ${COL_WLAN};" WLAN_ICON)
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:reveal wifi_rev
|
||||||
|
:duration "350ms"
|
||||||
|
(label :class "module_essid"
|
||||||
|
:text ESSID_WLAN
|
||||||
|
)))))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget workspaces []
|
||||||
|
(literal :content workspace))
|
||||||
|
|
||||||
|
(defwidget sep []
|
||||||
|
(box :class "module-2" :vexpand "false" :hexpand "false"
|
||||||
|
(label :class "separ" :text "|")))
|
||||||
|
|
||||||
|
(defwidget clock_module []
|
||||||
|
(eventbox :onhover "${eww} update time_rev=true"
|
||||||
|
:onhoverlost "${eww} update time_rev=false"
|
||||||
|
(box :class "module" :space-evenly "false" :orientation "h" :spacing "3"
|
||||||
|
(label :text clock_time :class "clock_time_class" )
|
||||||
|
(label :text ":" :class "clock_time_sep" )
|
||||||
|
(label :text clock_minute :class "clock_minute_class")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:reveal time_rev
|
||||||
|
:duration "350ms"
|
||||||
|
(button :class "clock_date_class"
|
||||||
|
:onclick "$HOME/.config/eww/bar/scripts/pop calendar" clock_date
|
||||||
|
)
|
||||||
|
))))
|
||||||
|
|
||||||
|
(defwidget volume []
|
||||||
|
(eventbox :onhover "${eww} update vol_reveal=true"
|
||||||
|
:onhoverlost "${eww} update vol_reveal=false"
|
||||||
|
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3"
|
||||||
|
(button :onclick "scripts/pop audio" :class "volume_icon" "${BLUETOOTHDEV=="" ? "": ""}")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:reveal vol_reveal
|
||||||
|
:duration "350ms"
|
||||||
|
(scale :class "volbar"
|
||||||
|
:value volume_percent
|
||||||
|
:orientation "h"
|
||||||
|
:tooltip "${volume_percent}%"
|
||||||
|
:max 100
|
||||||
|
:min 0
|
||||||
|
:onchange "amixer -D pulse sset Master {}%" )))))
|
||||||
|
|
||||||
|
(defwidget bright []
|
||||||
|
(eventbox :onhover "${eww} update br_reveal=true" :onhoverlost "${eww} update br_reveal=false"
|
||||||
|
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3"
|
||||||
|
(label :text "" :class "bright_icon" :tooltip "brightness")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:reveal br_reveal
|
||||||
|
:duration "350ms"
|
||||||
|
(scale :class "brightbar"
|
||||||
|
:value brightness_percent
|
||||||
|
:orientation "h"
|
||||||
|
:tooltip "${brightness_percent}%"
|
||||||
|
:max 100
|
||||||
|
:min 0
|
||||||
|
:onchange "brightnessctl set {}%" )))))
|
||||||
|
|
||||||
|
;; Battery Widgets ;;
|
||||||
|
(defwidget bat []
|
||||||
|
(eventbox :onhover "${eww} update bat_rev=true"
|
||||||
|
:onhoverlost "${eww} update bat_rev=false"
|
||||||
|
(box :space-evenly "false"
|
||||||
|
(label :class "bat"
|
||||||
|
:text battery
|
||||||
|
:tooltip "Battery: ${EWW_BATTERY["BAT0"].capacity}%")
|
||||||
|
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:reveal bat_rev
|
||||||
|
:duration "350ms"
|
||||||
|
:class "bat"
|
||||||
|
(label :text "${battery==""? "Charging": "Battery"}: ${EWW_BATTERY["BAT0"].capacity}%"))
|
||||||
|
)))
|
||||||
|
(defpoll battery :interval "1s" "scripts/battery icon")
|
||||||
|
|
||||||
|
(defwidget metric [widget widget_rev value tooltip_text]
|
||||||
|
(eventbox
|
||||||
|
:onhover "${eww} update ${widget}_rev=true"
|
||||||
|
:onhoverlost "${eww} update ${widget}_rev=false"
|
||||||
|
(box :class "${widget}_module" :vexpand "false" :hexpand "false"
|
||||||
|
(circular-progress
|
||||||
|
:value value
|
||||||
|
:class "${widget}bar"
|
||||||
|
:thickness 4
|
||||||
|
(button
|
||||||
|
:class "icon${widget}"
|
||||||
|
:limit-width 9
|
||||||
|
:tooltip tooltip_text
|
||||||
|
:onclick "$HOME/.config/eww/bar/scripts/pop system"
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false
|
||||||
|
(revealer
|
||||||
|
:transition "slideleft"
|
||||||
|
:reveal widget_rev
|
||||||
|
:duration "350ms"
|
||||||
|
:class "icon${widget}"
|
||||||
|
(label
|
||||||
|
:text value
|
||||||
|
:tooltip "${tooltip_text}: ${value}%"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget metrics []
|
||||||
|
(box :orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
(metric :widget "disk" :widget_rev disk_rev :value "${round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}" :tooltip_text "Disk usage")
|
||||||
|
(metric :widget "cpu" :widget_rev cpu_rev :value "${round(EWW_CPU.avg, 0)}" :tooltip_text "CPU usage")
|
||||||
|
(metric :widget "mem" :widget_rev mem_rev :value "${round(EWW_RAM.used_mem_perc, 0)}" :tooltip_text "RAM usage")
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget keyboard []
|
||||||
|
(box :class "volume_icon"
|
||||||
|
:orientation "v"
|
||||||
|
(label :text caps_num_scroll_indicator
|
||||||
|
:style "font-size: 7;"
|
||||||
|
:valign "end"
|
||||||
|
)
|
||||||
|
(label :text CURRENT_LAYOUT_SYMBOL
|
||||||
|
:valign "start"
|
||||||
|
:vexpand false
|
||||||
|
)
|
||||||
|
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget vpn []
|
||||||
|
(eventbox :onhover "${eww} update vpn_reveal=true"
|
||||||
|
:onhoverlost "${eww} update vpn_reveal=false"
|
||||||
|
(box :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||||
|
(button :class "module-wif" :timeout "10s" :onclick "rofi-wireguard --toggle" :wrap "false"
|
||||||
|
:limit-width 12 :style "color: ${VPN_NAME=="" ? "#3e424f": "#77DD77"};" "")
|
||||||
|
(revealer :transition "slideright"
|
||||||
|
:reveal vpn_reveal
|
||||||
|
:duration "350ms"
|
||||||
|
(button :class "module-wif" :timeout "10s" :onclick "rofi-wireguard --toggle" :wrap "false"
|
||||||
|
:limit-width 12 :style "color: ${VPN_NAME=="" ? "#3e424f": "#77DD77"};" VPN_NAME)
|
||||||
|
))))
|
||||||
|
|
||||||
|
(defwidget bluetooth []
|
||||||
|
(eventbox :onhover "${eww} update bluetooth_rev=true"
|
||||||
|
:onhoverlost "${eww} update bluetooth_rev=false"
|
||||||
|
(box :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||||
|
(button :class "module-wif" :timeout "30s" :onclick "rofi-bluetooth" :wrap "false" :limit-width 12
|
||||||
|
:style "color: ${BLUETOOTHDEV=="" ? "#3e424f": "#77DD77"};" {BLUETOOTHDEV=="" ? "" : ""})
|
||||||
|
(revealer :transition "slideright"
|
||||||
|
:reveal bluetooth_rev
|
||||||
|
:duration "350ms"
|
||||||
|
(button :class "module-wif" :timeout "30s" :onclick "rofi-bluetooth" :wrap "false" :limit-width 12
|
||||||
|
:style "color: ${BLUETOOTHDEV=="" ? "#3e424f": "#77DD77"};" BLUETOOTHDEV)
|
||||||
|
))))
|
||||||
|
|
||||||
|
(defwidget power []
|
||||||
|
(eventbox :onhover "${eww} update power_rev=true"
|
||||||
|
:onhoverlost "${eww} update power_rev=false"
|
||||||
|
(box :orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
:vexpand "false"
|
||||||
|
:class "powermenu"
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:reveal power_rev
|
||||||
|
:duration "550ms"
|
||||||
|
(box :orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
|
||||||
|
(button :class "button-qtres"
|
||||||
|
:tooltip "Restart qtile"
|
||||||
|
:onclick "scripts/qtile restart" "" )
|
||||||
|
|
||||||
|
(button :class "button-reb"
|
||||||
|
:tooltip "Reboot"
|
||||||
|
:onclick "reboot" "")
|
||||||
|
|
||||||
|
(button :class "button-quit"
|
||||||
|
:tooltip "Logout"
|
||||||
|
:onclick "scripts/qtile shutdown" "")
|
||||||
|
|
||||||
|
(button :class "button-lock"
|
||||||
|
:tooltip "Lock Screen"
|
||||||
|
:onclick "lock-screen" "")))
|
||||||
|
|
||||||
|
(button :class "button-off"
|
||||||
|
:tooltip "Shutdown"
|
||||||
|
:onclick "shutdown now" ""))))
|
||||||
|
|
||||||
|
|
||||||
|
;; Music
|
||||||
|
(defwidget music []
|
||||||
|
(eventbox :onhover "${eww} update music_reveal=true"
|
||||||
|
:onhoverlost "${eww} update music_reveal=false"
|
||||||
|
(box :class "module-2" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||||
|
(box :class "song_cover_art" :vexpand "false" :hexpand "false" :style "background-image: url('${cover_art}');")
|
||||||
|
(button :class "song" :onclick "~/.config/eww/bar/scripts/pop music" song)
|
||||||
|
(revealer :transition "slideright"
|
||||||
|
:reveal music_reveal
|
||||||
|
:duration "350ms"
|
||||||
|
(box :vexpand "false" :hexpand "false" :orientation "h"
|
||||||
|
(button :class "song_btn_prev" :onclick "~/.config/eww/bar/scripts/music_info --prev" "")
|
||||||
|
(button :class "song_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status)
|
||||||
|
(button :class "song_btn_next" :onclick "~/.config/eww/bar/scripts/music_info --next" ""))))))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget left []
|
||||||
|
(box :orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:halign "end"
|
||||||
|
:class "left_modules"
|
||||||
|
(keyboard)
|
||||||
|
(vpn)
|
||||||
|
(bluetooth)
|
||||||
|
(bright)
|
||||||
|
(volume)
|
||||||
|
(wifi)
|
||||||
|
(sep)
|
||||||
|
(metrics)
|
||||||
|
(bat)
|
||||||
|
(sep)
|
||||||
|
(clock_module)
|
||||||
|
(power)))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget right []
|
||||||
|
(box :orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:halign "start"
|
||||||
|
:class "right_modules"
|
||||||
|
(workspaces)))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget center []
|
||||||
|
(box :orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:halign "center"
|
||||||
|
:class "center_modules"
|
||||||
|
(music)))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget topbar []
|
||||||
|
(centerbox
|
||||||
|
:orientation "h"
|
||||||
|
:class "bar_class"
|
||||||
|
(right)
|
||||||
|
(center)
|
||||||
|
(left)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwindow bar
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :x "0%"
|
||||||
|
:y "4px"
|
||||||
|
:width "99%"
|
||||||
|
:height "50px"
|
||||||
|
:anchor "top center")
|
||||||
|
:stacking "fg"
|
||||||
|
:reserve (struts :distance "58px" :side "top")
|
||||||
|
:windowtype "dock"
|
||||||
|
:wm-ignore false
|
||||||
|
(topbar))
|
||||||
|
|
||||||
|
(defwidget system []
|
||||||
|
(box :class "sys_win" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 0
|
||||||
|
(box :class "sys_bat_box" :orientation "h" :space-evenly "false"
|
||||||
|
(circular-progress :value "${EWW_BATTERY["BAT0"].capacity}"
|
||||||
|
:class "sys_bat"
|
||||||
|
:thickness 9
|
||||||
|
(label :text ""
|
||||||
|
:class "sys_icon_bat"
|
||||||
|
:limit-width 2
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false))
|
||||||
|
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||||
|
(label :text "battery"
|
||||||
|
:halign "start"
|
||||||
|
:class "sys_text_bat"
|
||||||
|
:limit-width 9
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false)
|
||||||
|
(label :text "${EWW_BATTERY["BAT0"].capacity}%"
|
||||||
|
:halign "start"
|
||||||
|
:class "sys_text_bat_sub"
|
||||||
|
:limit-width 22
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false)
|
||||||
|
(label :text "${EWW_BATTERY["BAT0"].status}"
|
||||||
|
:halign "start"
|
||||||
|
:class "sys_text_bat_sub"
|
||||||
|
:limit-width 22
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false)))
|
||||||
|
(label :text "" :class "sys_sep" :halign "center")
|
||||||
|
(box :class "sys_mem_box" :orientation "h" :space-evenly "false" :halign "start"
|
||||||
|
(circular-progress :value "${round(EWW_RAM.used_mem_perc, 0)}"
|
||||||
|
:class "sys_mem"
|
||||||
|
:thickness 9
|
||||||
|
(label :text ""
|
||||||
|
:class "sys_icon_mem"
|
||||||
|
:limit-width 2
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false
|
||||||
|
:angle 0.0))
|
||||||
|
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||||
|
(label :text "memory"
|
||||||
|
:halign "start"
|
||||||
|
:class "sys_text_mem"
|
||||||
|
:limit-width 9
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false)
|
||||||
|
(label :text "${round(EWW_RAM.used_mem/1024, 0)} | ${round(EWW_RAM.total_mem/1024, 0)}mb "
|
||||||
|
:halign "start"
|
||||||
|
:class "sys_text_mem_sub"
|
||||||
|
:limit-width 22
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false)
|
||||||
|
(label :text "${round(EWW_RAM.free_mem/1024,0)}mb free"
|
||||||
|
:halign "start"
|
||||||
|
:class "sys_text_mem_sub"
|
||||||
|
:limit-width 22
|
||||||
|
:show_truncated false
|
||||||
|
:wrap false)))))
|
||||||
|
|
||||||
|
(defwidget cal []
|
||||||
|
(box :class "cal" :orientation "v"
|
||||||
|
(box :class "cal-in"
|
||||||
|
(calendar :class "cal"
|
||||||
|
; :onclick "echo {} is selected >> /home/sahin/caltest"
|
||||||
|
:show-day-names true
|
||||||
|
:show-heading true
|
||||||
|
:show-details true
|
||||||
|
:show-week-numbers true
|
||||||
|
))))
|
||||||
|
|
||||||
|
(defwindow calendar
|
||||||
|
:geometry (geometry :x "-20px"
|
||||||
|
:y "7%"
|
||||||
|
:anchor "top right"
|
||||||
|
:width "270px"
|
||||||
|
:height "60px")
|
||||||
|
(cal))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget audio []
|
||||||
|
(box :class "audio-box" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||||
|
(box :halign "v" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||||
|
(box :class "speaker_icon" :orientation "v")
|
||||||
|
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||||
|
(label :class "speaker_text" :text "speaker" :valign "center" :halign "left" )
|
||||||
|
(box :class "speaker_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||||
|
(scale :value volume_percent
|
||||||
|
:space-evenly "false"
|
||||||
|
:orientation "h"
|
||||||
|
:onchange "amixer -D pulse sset Master {}%"
|
||||||
|
:tooltip "volume on ${volume_percent}%"
|
||||||
|
:max 100
|
||||||
|
:min 0))))
|
||||||
|
(label :text "" :class "audio_sep" :halign "center")
|
||||||
|
(box :halign "v" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||||
|
(box :class "mic_icon" :orientation "v")
|
||||||
|
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||||
|
(label :class "mic_text" :text "mic" :valign "center" :halign "left" )
|
||||||
|
(box :class "mic_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||||
|
(scale :value mic_percent
|
||||||
|
:space-evenly "false"
|
||||||
|
:orientation "h"
|
||||||
|
:tooltip "mic on ${mic_percent}%"
|
||||||
|
:onchange "amixer -D pulse sset Capture {}%"
|
||||||
|
:max 100
|
||||||
|
:min 0))))))
|
||||||
|
|
||||||
|
(defwindow audio_ctl
|
||||||
|
:geometry (geometry :x "-20px"
|
||||||
|
:y "7%"
|
||||||
|
:anchor "top right"
|
||||||
|
:width "280px"
|
||||||
|
:height "60px")
|
||||||
|
(audio))
|
||||||
|
|
||||||
|
|
||||||
|
(defwindow system
|
||||||
|
:geometry (geometry :x "-20px"
|
||||||
|
:y "7%"
|
||||||
|
:anchor "top right"
|
||||||
|
:width "290px"
|
||||||
|
:height "120px")
|
||||||
|
(system))
|
||||||
|
|
||||||
|
;; Music
|
||||||
|
(defwidget music_pop []
|
||||||
|
(box :class "music_pop" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||||
|
(box :class "music_cover_art" :vexpand "false" :hexpand "false" :style "background-image: url('${cover_art}');")
|
||||||
|
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||||
|
(label :halign "center" :class "music" :wrap "true" :limit-width 13 :text song)
|
||||||
|
(label :halign "center" :class "music_artist" :wrap "true" :limit-width 15 :text song_artist)
|
||||||
|
(box :orientation "h" :spacing 15 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||||
|
(button :class "music_btn_prev" :onclick "~/.config/eww/bar/scripts/music_info --prev" "")
|
||||||
|
(button :class "music_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status)
|
||||||
|
(button :class "music_btn_next" :onclick "~/.config/eww/bar/scripts/music_info --next" ""))
|
||||||
|
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||||
|
(scale :onscroll "mpc -q seek {}" :min 0 :active "true" :max 100 :value current_status)))))
|
||||||
|
|
||||||
|
|
||||||
|
;; music
|
||||||
|
(defwindow music_win :stacking "fg" :focusable "false" :screen 1
|
||||||
|
:geometry (geometry :x "0" :y "7%" :width 428 :height 104 :anchor "top center")
|
||||||
|
(music_pop))
|
||||||
|
|
BIN
.config/eww/bar/images/mic.png
Normal file
BIN
.config/eww/bar/images/mic.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
.config/eww/bar/images/music.png
Normal file
BIN
.config/eww/bar/images/music.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
.config/eww/bar/images/speaker.png
Normal file
BIN
.config/eww/bar/images/speaker.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
43
.config/eww/bar/scripts/battery
Executable file
43
.config/eww/bar/scripts/battery
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
bat=/sys/class/power_supply/BAT0/
|
||||||
|
per="$(cat "$bat/capacity")"
|
||||||
|
|
||||||
|
icon() {
|
||||||
|
|
||||||
|
[ $(cat "$bat/status") = Charging ] && echo "" && exit
|
||||||
|
|
||||||
|
if [ "$per" -gt "90" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "80" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "70" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "60" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "50" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "40" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "30" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "20" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "10" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$per" -gt "0" ]; then
|
||||||
|
icon=""
|
||||||
|
else
|
||||||
|
echo && exit
|
||||||
|
fi
|
||||||
|
echo "$icon"
|
||||||
|
}
|
||||||
|
|
||||||
|
percent() {
|
||||||
|
echo $per
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$1" = "icon" ] && icon && exit
|
||||||
|
[ "$1" = "percent" ] && percent && exit
|
||||||
|
exit
|
||||||
|
|
14
.config/eww/bar/scripts/indicator
Executable file
14
.config/eww/bar/scripts/indicator
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
query=$(xset q | grep -Po "(?:Caps|Num|Scroll)\s+Lock:\s*(\w*)" | grep -Po "(off|on)")
|
||||||
|
|
||||||
|
|
||||||
|
result=""
|
||||||
|
for i in $query
|
||||||
|
do
|
||||||
|
[ $i = "off" ] && result+="ﰊ "|| result+="ﰉ "
|
||||||
|
done
|
||||||
|
|
||||||
|
# somehow results are shown reversed. So i am reversing them here to fix it
|
||||||
|
echo $result | rev | xargs
|
||||||
|
|
9
.config/eww/bar/scripts/layout
Executable file
9
.config/eww/bar/scripts/layout
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
xprop -spy -root _XKB_RULES_NAMES | while read -r line; do
|
||||||
|
variant=$(echo $line | cut -d',' -f4 | tr -d '"')
|
||||||
|
if [[ "$variant" == " cdhpt" ]]; then
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
done
|
98
.config/eww/bar/scripts/music_info
Executable file
98
.config/eww/bar/scripts/music_info
Executable file
@ -0,0 +1,98 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# scripts by adi1090x
|
||||||
|
|
||||||
|
## Get data
|
||||||
|
STATUS="$(mpc status)"
|
||||||
|
COVER="/tmp/.music_cover.png"
|
||||||
|
MUSIC_DIR="$HOME/Music"
|
||||||
|
|
||||||
|
## Get status
|
||||||
|
get_status() {
|
||||||
|
if [[ $STATUS == *"[playing]"* ]]; then
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo "奈"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## Get song
|
||||||
|
get_song() {
|
||||||
|
song=`mpc -f %title% current`
|
||||||
|
if [[ -z "$song" ]]; then
|
||||||
|
echo "Offline"
|
||||||
|
else
|
||||||
|
echo "$song"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## Get artist
|
||||||
|
get_artist() {
|
||||||
|
artist=`mpc -f %artist% current`
|
||||||
|
if [[ -z "$artist" ]]; then
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo "$artist"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## Get time
|
||||||
|
get_time() {
|
||||||
|
time=`mpc status | grep "%)" | awk '{print $4}' | tr -d '(%)'`
|
||||||
|
if [[ -z "$time" ]]; then
|
||||||
|
echo "0"
|
||||||
|
else
|
||||||
|
echo "$time"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
get_ctime() {
|
||||||
|
ctime=`mpc status | grep "#" | awk '{print $3}' | sed 's|/.*||g'`
|
||||||
|
if [[ -z "$ctime" ]]; then
|
||||||
|
echo "0:00"
|
||||||
|
else
|
||||||
|
echo "$ctime"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
get_ttime() {
|
||||||
|
ttime=`mpc -f %time% current`
|
||||||
|
if [[ -z "$ttime" ]]; then
|
||||||
|
echo "0:00"
|
||||||
|
else
|
||||||
|
echo "$ttime"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## Get cover
|
||||||
|
get_cover() {
|
||||||
|
ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &> /dev/null
|
||||||
|
STATUS=$?
|
||||||
|
|
||||||
|
# Check if the file has a embbeded album art
|
||||||
|
if [ "$STATUS" -eq 0 ];then
|
||||||
|
echo "$COVER"
|
||||||
|
else
|
||||||
|
echo "images/music.png"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## Execute accordingly
|
||||||
|
if [[ "$1" == "--song" ]]; then
|
||||||
|
get_song
|
||||||
|
elif [[ "$1" == "--artist" ]]; then
|
||||||
|
get_artist
|
||||||
|
elif [[ "$1" == "--status" ]]; then
|
||||||
|
get_status
|
||||||
|
elif [[ "$1" == "--time" ]]; then
|
||||||
|
get_time
|
||||||
|
elif [[ "$1" == "--ctime" ]]; then
|
||||||
|
get_ctime
|
||||||
|
elif [[ "$1" == "--ttime" ]]; then
|
||||||
|
get_ttime
|
||||||
|
elif [[ "$1" == "--cover" ]]; then
|
||||||
|
get_cover
|
||||||
|
elif [[ "$1" == "--toggle" ]]; then
|
||||||
|
mpc -q toggle
|
||||||
|
elif [[ "$1" == "--next" ]]; then
|
||||||
|
{ mpc -q next; get_cover; }
|
||||||
|
elif [[ "$1" == "--prev" ]]; then
|
||||||
|
{ mpc -q prev; get_cover; }
|
||||||
|
fi
|
89
.config/eww/bar/scripts/pop
Executable file
89
.config/eww/bar/scripts/pop
Executable file
@ -0,0 +1,89 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
calendar() {
|
||||||
|
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
|
||||||
|
EWW_BIN="eww"
|
||||||
|
|
||||||
|
run() {
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar open calendar
|
||||||
|
}
|
||||||
|
|
||||||
|
# Open widgets
|
||||||
|
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close system music_win audio_ctl
|
||||||
|
touch "$LOCK_FILE"
|
||||||
|
run && echo "ok good!"
|
||||||
|
else
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close calendar
|
||||||
|
rm "$LOCK_FILE" && echo "closed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
system() {
|
||||||
|
LOCK_FILE_MEM="$HOME/.cache/eww-system.lock"
|
||||||
|
|
||||||
|
run() {
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar open system
|
||||||
|
}
|
||||||
|
|
||||||
|
# Open widgets
|
||||||
|
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close calendar music_win audio_ctl
|
||||||
|
touch "$LOCK_FILE_MEM"
|
||||||
|
run && echo "ok good!"
|
||||||
|
else
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close system
|
||||||
|
rm "$LOCK_FILE_MEM" && echo "closed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
music() {
|
||||||
|
LOCK_FILE_SONG="$HOME/.cache/eww-song.lock"
|
||||||
|
|
||||||
|
run() {
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar open music_win
|
||||||
|
}
|
||||||
|
|
||||||
|
# Open widgets
|
||||||
|
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close system calendar
|
||||||
|
touch "$LOCK_FILE_SONG"
|
||||||
|
run && echo "ok good!"
|
||||||
|
else
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close music_win
|
||||||
|
rm "$LOCK_FILE_SONG" && echo "closed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
audio() {
|
||||||
|
LOCK_FILE_AUDIO="$HOME/.cache/eww-audio.lock"
|
||||||
|
|
||||||
|
run() {
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar open audio_ctl
|
||||||
|
}
|
||||||
|
|
||||||
|
# Open widgets
|
||||||
|
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close system calendar music
|
||||||
|
touch "$LOCK_FILE_AUDIO"
|
||||||
|
run && echo "ok good!"
|
||||||
|
else
|
||||||
|
${EWW_BIN} -c $HOME/.config/eww/bar close audio_ctl
|
||||||
|
rm "$LOCK_FILE_AUDIO" && echo "closed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "calendar" ]; then
|
||||||
|
calendar
|
||||||
|
elif [ "$1" = "system" ]; then
|
||||||
|
system
|
||||||
|
elif [ "$1" = "music" ]; then
|
||||||
|
music
|
||||||
|
elif [ "$1" = "audio" ]; then
|
||||||
|
audio
|
||||||
|
fi
|
12
.config/eww/bar/scripts/qtile
Executable file
12
.config/eww/bar/scripts/qtile
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
switch) qtile cmd-obj -o group $2 -f toscreen
|
||||||
|
;;
|
||||||
|
restart) qtile cmd-obj -o cmd -f restart
|
||||||
|
;;
|
||||||
|
shutdown) qtile cmd-obj -o cmd -f shutdown
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
26
.config/eww/bar/scripts/wifi
Executable file
26
.config/eww/bar/scripts/wifi
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
status=$(nmcli g | grep -oE "disconnected")
|
||||||
|
essid=$(nmcli c | grep wlan0 | awk '{print ($1)}')
|
||||||
|
|
||||||
|
if [ $status ] ; then
|
||||||
|
icon=""
|
||||||
|
text=""
|
||||||
|
col="#575268"
|
||||||
|
|
||||||
|
else
|
||||||
|
icon=""
|
||||||
|
text="${essid}"
|
||||||
|
col="#a1bdce"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$1" == "--COL" ]]; then
|
||||||
|
echo $col
|
||||||
|
elif [[ "$1" == "--ESSID" ]]; then
|
||||||
|
echo $text
|
||||||
|
elif [[ "$1" == "--ICON" ]]; then
|
||||||
|
echo $icon
|
||||||
|
fi
|
||||||
|
|
6
.config/eww/bar/scripts/workspace
Executable file
6
.config/eww/bar/scripts/workspace
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
dir=`dirname $0`
|
||||||
|
python3 $dir/workspaces.py
|
||||||
|
tail -F -n1 ~/.cache/workspaces | while read -r; do
|
||||||
|
python3 $dir/workspaces.py
|
||||||
|
done
|
53
.config/eww/bar/scripts/workspaces.py
Normal file
53
.config/eww/bar/scripts/workspaces.py
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
from libqtile.command.client import CommandClient
|
||||||
|
c = CommandClient()
|
||||||
|
|
||||||
|
|
||||||
|
groups = {}
|
||||||
|
|
||||||
|
for name, group in c.call('groups').items():
|
||||||
|
if name == "scratchpad":
|
||||||
|
continue
|
||||||
|
occupied = len(group["windows"]) > 0
|
||||||
|
focused = group['screen'] is not None
|
||||||
|
groups[name] = {"occupied": occupied, "focused": focused}
|
||||||
|
|
||||||
|
output = '(box :class "works" :orientation "h" :spacing 5 :space-evenly "false" '
|
||||||
|
for name, prop in groups.items():
|
||||||
|
command = f"scripts/qtile switch {name}"
|
||||||
|
class_ = "0"
|
||||||
|
focused, occupied = prop['focused'], prop['occupied']
|
||||||
|
if focused:
|
||||||
|
class_ += name * 2
|
||||||
|
elif occupied:
|
||||||
|
class_ += name
|
||||||
|
|
||||||
|
if occupied:
|
||||||
|
if name == "3":
|
||||||
|
class_ += " thunderbird"
|
||||||
|
elif name == "6":
|
||||||
|
class_ += " twitter"
|
||||||
|
elif name == "7":
|
||||||
|
class_ += " firefox"
|
||||||
|
elif name == "8":
|
||||||
|
class_ += " twitch"
|
||||||
|
elif name == "9":
|
||||||
|
class_ += " discord"
|
||||||
|
elif name == "0":
|
||||||
|
class_ += " telegram"
|
||||||
|
icons = {
|
||||||
|
"1": "1",
|
||||||
|
"2": "",
|
||||||
|
"3": "",
|
||||||
|
"4": "",
|
||||||
|
"5": "",
|
||||||
|
"6": "",
|
||||||
|
"7": "",
|
||||||
|
"8": "既",
|
||||||
|
"9": "ﭮ",
|
||||||
|
"0": "",
|
||||||
|
}
|
||||||
|
icon = icons[name]
|
||||||
|
output += f'(button :onclick "{command}" :class "{class_}" "{icon}") '
|
||||||
|
|
||||||
|
output += ')'
|
||||||
|
print(output)
|
12
.config/layouts/colemak/cdhpt.xml
Normal file
12
.config/layouts/colemak/cdhpt.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<variant>
|
||||||
|
<configItem>
|
||||||
|
<name>cdhpt</name>
|
||||||
|
<description>English (Programmer Colemak-DH with Turkish support)</description>
|
||||||
|
</configItem>
|
||||||
|
</variant>
|
||||||
|
<variant>
|
||||||
|
<configItem>
|
||||||
|
<name>cdhisopt</name>
|
||||||
|
<description>English (Programmer Colemak-DH ISO with Turkish support)</description>
|
||||||
|
</configItem>
|
||||||
|
</variant>
|
62
.config/layouts/colemak/colemakdh
Normal file
62
.config/layouts/colemak/colemakdh
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
// Colemak-DH (ANSI) symbols for xkb on X.Org Server 7.x
|
||||||
|
// 2014-10-25 by SteveP, https://colemakmods.github.io/mod-dh/
|
||||||
|
|
||||||
|
xkb_symbols "cdhpt" {
|
||||||
|
|
||||||
|
name[Group1]= "English (Programmer Colemak-DH with Turkish support)";
|
||||||
|
|
||||||
|
key <TLDE> { [ grave, asciitilde, dead_tilde, asciitilde ] };
|
||||||
|
key <AE01> { [ at, 1 ] };
|
||||||
|
key <AE02> { [ bracketleft, 2 ] };
|
||||||
|
key <AE03> { [ braceleft, 3 ] };
|
||||||
|
key <AE04> { [ parenleft, 4 ] };
|
||||||
|
key <AE05> { [ plus, 5 ] };
|
||||||
|
key <AE06> { [ equal, 6 ] };
|
||||||
|
key <AE07> { [ parenright, 7 ] };
|
||||||
|
key <AE08> { [ braceright, 8 ] };
|
||||||
|
key <AE09> { [ bracketright, 9 ] };
|
||||||
|
key <AE10> { [ percent, 0 ] };
|
||||||
|
key <AE11> { [ asterisk, numbersign ] };
|
||||||
|
key <AE12> { [ ampersand, exclam ] };
|
||||||
|
|
||||||
|
key <AD01> { [ q, Q ] };
|
||||||
|
key <AD02> { [ w, W ] };
|
||||||
|
key <AD03> { [ f, F ] };
|
||||||
|
key <AD04> { [ p, P ] };
|
||||||
|
key <AD05> { [ b, B ] };
|
||||||
|
key <AD06> { [ j, J ] };
|
||||||
|
key <AD07> { [ l, L ] };
|
||||||
|
key <AD08> { [ u, U, udiaeresis, Udiaeresis ] };
|
||||||
|
key <AD09> { [ y, Y ] };
|
||||||
|
key <AD10> { [ semicolon, colon ] };
|
||||||
|
key <AD11> { [ minus, underscore ] };
|
||||||
|
key <AD12> { [ dollar, asciicircum ] };
|
||||||
|
key <BKSL> { [ backslash, bar ] };
|
||||||
|
|
||||||
|
key <AC01> { [ a, A ] };
|
||||||
|
key <AC02> { [ r, R ] };
|
||||||
|
key <AC03> { [ s, S, scedilla, Scedilla ] };
|
||||||
|
key <AC04> { [ t, T ] };
|
||||||
|
key <AC05> { [ g, G, gbreve, Gbreve ] };
|
||||||
|
key <AC06> { [ m, M ] };
|
||||||
|
key <AC07> { [ n, N ] };
|
||||||
|
key <AC08> { [ e, E ] };
|
||||||
|
key <AC09> { [ i, I, idotless, Iabovedot ] };
|
||||||
|
key <AC10> { [ o, O, odiaeresis, Odiaeresis ] };
|
||||||
|
key <AC11> { [ apostrophe, quotedbl ] };
|
||||||
|
|
||||||
|
key <AB01> { [ z, Z ] };
|
||||||
|
key <AB02> { [ x, X ] };
|
||||||
|
key <AB03> { [ c, C, ccedilla, Ccedilla ] };
|
||||||
|
key <AB04> { [ d, D ] };
|
||||||
|
key <AB05> { [ v, V ] } ;
|
||||||
|
key <AB06> { [ k, K ] };
|
||||||
|
key <AB07> { [ h, H ] };
|
||||||
|
key <AB08> { [ comma, less ] };
|
||||||
|
key <AB09> { [ period, greater ] };
|
||||||
|
key <AB10> { [ slash, question ] };
|
||||||
|
|
||||||
|
key <SPCE> { [ space, space, space, nobreakspace ] };
|
||||||
|
|
||||||
|
include "level3(ralt_switch)"
|
||||||
|
};
|
38
.config/layouts/colemak/colemakdhiso
Normal file
38
.config/layouts/colemak/colemakdhiso
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// Colemak-DH (ISO) symbols for xkb on X.Org Server 7.x
|
||||||
|
// https://colemakmods.github.io/mod-dh/
|
||||||
|
|
||||||
|
xkb_symbols "cdhisopt" {
|
||||||
|
|
||||||
|
include "us(colemak_dh)"
|
||||||
|
name[Group1]= "English (Programmer Colemak-DH ISO with Turkish support)";
|
||||||
|
|
||||||
|
key <TLDE> { [ grave, asciitilde, dead_tilde, asciitilde ] };
|
||||||
|
key <AE01> { [ at, 1 ] };
|
||||||
|
key <AE02> { [ bracketleft, 2 ] };
|
||||||
|
key <AE03> { [ braceleft, 3 ] };
|
||||||
|
key <AE04> { [ parenleft, 4 ] };
|
||||||
|
key <AE05> { [ plus, 5 ] };
|
||||||
|
key <AE06> { [ equal, 6 ] };
|
||||||
|
key <AE07> { [ parenright, 7 ] };
|
||||||
|
key <AE08> { [ braceright, 8 ] };
|
||||||
|
key <AE09> { [ bracketright, 9 ] };
|
||||||
|
key <AE10> { [ percent, 0 ] };
|
||||||
|
key <AE11> { [ asterisk, numbersign ] };
|
||||||
|
key <AE12> { [ ampersand, exclam ] };
|
||||||
|
|
||||||
|
key <AD08> { [ u, U, udiaeresis, Udiaeresis ] };
|
||||||
|
key <AD11> { [ minus, underscore ] };
|
||||||
|
key <AC06> { [ m, M, Left, Left ] };
|
||||||
|
key <AC07> { [ n, N, Down, Down ] };
|
||||||
|
key <AC08> { [ e, E, Up, Up ] };
|
||||||
|
key <AC09> { [ i, I, Right, Right ] };
|
||||||
|
key <AC11> { [ apostrophe, quotedbl, idotless, Iabovedot ] };
|
||||||
|
key <AC03> { [ s, S, scedilla, Scedilla ] };
|
||||||
|
key <AC05> { [ g, G, gbreve, Gbreve ] };
|
||||||
|
key <AB02> { [ c, C, ccedilla, Ccedilla ] };
|
||||||
|
key <AC10> { [ o, O, odiaeresis, Odiaeresis ] };
|
||||||
|
key <AD12> { [ dollar, asciicircum ] };
|
||||||
|
key <AB05> { [ backslash, bar, asciitilde, brokenbar] };
|
||||||
|
|
||||||
|
include "level3(ralt_switch)"
|
||||||
|
};
|
61
.config/layouts/dvorak/rdvpt
Normal file
61
.config/layouts/dvorak/rdvpt
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
// based on Michael Paulson's poor ideas.
|
||||||
|
|
||||||
|
partial alphanumeric_keys
|
||||||
|
xkb_symbols "rdvpt" {
|
||||||
|
|
||||||
|
include "level3(ralt_switch)"
|
||||||
|
name[Group1]= "English (Real Programmers Dvorak)";
|
||||||
|
|
||||||
|
key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
|
||||||
|
|
||||||
|
key <AE01> { [ at, 1 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE02> { [ bracketleft, 2 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE03> { [ braceleft, 3 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE04> { [ parenleft, 4 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE05> { [ plus, 5 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE06> { [ equal, 6, dead_circumflex, dead_circumflex ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE07> { [ parenright, 7 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE08> { [ braceright, 8 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE09> { [ bracketright, 9, dead_grave] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC"};
|
||||||
|
key <AE10> { [ percent, 0 ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
key <AE11> { [ asterisk, numbersign ] };
|
||||||
|
key <AE12> { [ ampersand , exclam ] };
|
||||||
|
|
||||||
|
key <AD01> { [ semicolon, colon, dead_acute, dead_diaeresis ] };
|
||||||
|
key <AD02> { [ comma, less, dead_cedilla, dead_caron ] };
|
||||||
|
key <AD03> { [ period, greater, dead_abovedot, periodcentered ] };
|
||||||
|
key <AD04> { [ p, P ] };
|
||||||
|
key <AD05> { [ y, Y ] };
|
||||||
|
key <AD06> { [ f, F ] };
|
||||||
|
key <AD07> { [ g, G, gbreve, Gbreve ] };
|
||||||
|
key <AD08> { [ c, C ,ccedilla, Ccedilla ] };
|
||||||
|
key <AD09> { [ r, R ] };
|
||||||
|
key <AD10> { [ l, L ] };
|
||||||
|
key <AD11> { [ slash, question ] };
|
||||||
|
key <AD12> { [ dollar, asciicircum] };
|
||||||
|
|
||||||
|
key <AC01> { [ a, A ] };
|
||||||
|
key <AC02> { [ o, O,odiaeresis, Odiaeresis ] };
|
||||||
|
key <AC03> { [ e, E ] };
|
||||||
|
key <AC04> { [ u, U, udiaeresis, Udiaeresis ] };
|
||||||
|
key <AC05> { [ i, I, idotless,Iabovedot ] };
|
||||||
|
key <AC06> { [ d, D ] };
|
||||||
|
key <AC07> { [ h, H ] };
|
||||||
|
key <AC08> { [ t, T ] };
|
||||||
|
key <AC09> { [ n, N ] };
|
||||||
|
key <AC10> { [ s, S,scedilla, Scedilla ] };
|
||||||
|
key <AC11> { [ minus, underscore ] ,type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
|
||||||
|
|
||||||
|
key <AB01> { [ apostrophe, quotedbl, dead_ogonek, dead_doubleacute ] };
|
||||||
|
key <AB02> { [ q, Q ] };
|
||||||
|
key <AB03> { [ j, J ] };
|
||||||
|
key <AB04> { [ k, K ] };
|
||||||
|
key <AB05> { [ x, X ] };
|
||||||
|
key <AB06> { [ b, B, grave,dead_grave ] };
|
||||||
|
key <AB07> { [ m, M ] };
|
||||||
|
key <AB08> { [ w, W ] };
|
||||||
|
key <AB09> { [ v, V ] };
|
||||||
|
key <AB10> { [ z, Z ] };
|
||||||
|
|
||||||
|
key <BKSL> { [ backslash, bar ] };
|
||||||
|
};
|
100
.config/layouts/dvorak/rdvpt.map
Normal file
100
.config/layouts/dvorak/rdvpt.map
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
! Real Programmer's Dvorak keymap with Turkish support
|
||||||
|
!
|
||||||
|
! Original from: http://www.kaufmann.no/roland/dvorak/
|
||||||
|
! This file edited by: Merlin Dou (11 March 2014)
|
||||||
|
!
|
||||||
|
! This file 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 2 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, write to the Free Software
|
||||||
|
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
!
|
||||||
|
keymaps 0-2,4-6,8-9,12
|
||||||
|
alt_is_meta
|
||||||
|
include "linux-with-two-alt-keys.inc"
|
||||||
|
strings as usual
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
! Row 1
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
keycode 1 = Escape
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
! Row 2
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
keycode 41 = grave asciitilde
|
||||||
|
keycode 2 = at 1
|
||||||
|
keycode 3 = bracketleft 2
|
||||||
|
keycode 4 = braceleft 3
|
||||||
|
keycode 5 = parenleft 4
|
||||||
|
keycode 6 = plus 5
|
||||||
|
keycode 7 = equal 6
|
||||||
|
keycode 8 = parenright 7
|
||||||
|
keycode 9 = braceright 8
|
||||||
|
keycode 10 = bracketright 9
|
||||||
|
keycode 11 = percent 0
|
||||||
|
keycode 12 = asterisk numbersign
|
||||||
|
keycode 13 = ampersand exclam
|
||||||
|
keycode 14 = Delete
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
! Row 3
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
keycode 15 = Tab
|
||||||
|
keycode 16 = semicolon colon
|
||||||
|
keycode 17 = comma less
|
||||||
|
keycode 18 = period greater
|
||||||
|
keycode 19 = p
|
||||||
|
keycode 20 = y
|
||||||
|
keycode 21 = f
|
||||||
|
keycode 22 = g
|
||||||
|
keycode 23 = c
|
||||||
|
keycode 24 = r
|
||||||
|
keycode 25 = l
|
||||||
|
keycode 26 = slash question
|
||||||
|
keycode 27 = dollar asciicircum
|
||||||
|
keycode 28 = Return
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
! Row 4
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
keycode 58 = Caps_Lock
|
||||||
|
keycode 30 = a
|
||||||
|
keycode 31 = o
|
||||||
|
keycode 32 = e
|
||||||
|
keycode 33 = u
|
||||||
|
keycode 34 = i
|
||||||
|
keycode 35 = d
|
||||||
|
keycode 36 = h
|
||||||
|
keycode 37 = t
|
||||||
|
keycode 38 = n
|
||||||
|
keycode 39 = s
|
||||||
|
keycode 40 = minus underscore
|
||||||
|
keycode 43 = backslash bar
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
! Row 5
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
keycode 42 = Shift
|
||||||
|
keycode 44 = apostrophe quotedbl
|
||||||
|
keycode 45 = q
|
||||||
|
keycode 46 = j
|
||||||
|
keycode 47 = k
|
||||||
|
keycode 48 = x
|
||||||
|
keycode 49 = b
|
||||||
|
keycode 50 = m
|
||||||
|
keycode 51 = w
|
||||||
|
keycode 52 = v
|
||||||
|
keycode 53 = z
|
||||||
|
keycode 54 = Shift
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
! Row 6
|
||||||
|
! --------------------------------------------------------------------------
|
||||||
|
keycode 29 = Control
|
||||||
|
keycode 56 = Alt
|
||||||
|
keycode 57 = space
|
||||||
|
keycode 97 = Control
|
6
.config/layouts/dvorak/rdvpt.xml
Normal file
6
.config/layouts/dvorak/rdvpt.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<variant>
|
||||||
|
<configItem>
|
||||||
|
<name>rdvpt</name>
|
||||||
|
<description>English (real programmer Dvorak with Turkish characters)</description>
|
||||||
|
</configItem>
|
||||||
|
</variant>
|
426
.config/mpd/mpd.conf
Normal file
426
.config/mpd/mpd.conf
Normal file
@ -0,0 +1,426 @@
|
|||||||
|
# An example configuration file for MPD.
|
||||||
|
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
|
||||||
|
|
||||||
|
|
||||||
|
# Files and directories #######################################################
|
||||||
|
#
|
||||||
|
# This setting controls the top directory which MPD will search to discover the
|
||||||
|
# available audio files and add them to the daemon's online database. This
|
||||||
|
# setting defaults to the XDG directory, otherwise the music directory will be
|
||||||
|
# be disabled and audio files will only be accepted over ipc socket (using
|
||||||
|
# file:// protocol) or streaming files over an accepted protocol.
|
||||||
|
#
|
||||||
|
#music_directory "~/music"
|
||||||
|
music_directory "~/Music"
|
||||||
|
#
|
||||||
|
# This setting sets the MPD internal playlist directory. The purpose of this
|
||||||
|
# directory is storage for playlists created by MPD. The server will use
|
||||||
|
# playlist files not created by the server but only if they are in the MPD
|
||||||
|
# format. This setting defaults to playlist saving being disabled.
|
||||||
|
#
|
||||||
|
#playlist_directory "~/.mpd/playlists"
|
||||||
|
playlist_directory "~/.config/mpd/playlists"
|
||||||
|
#
|
||||||
|
# This setting sets the location of the MPD database. This file is used to
|
||||||
|
# load the database at server start up and store the database while the
|
||||||
|
# server is not up. This setting defaults to disabled which will allow
|
||||||
|
# MPD to accept files over ipc socket (using file:// protocol) or streaming
|
||||||
|
# files over an accepted protocol.
|
||||||
|
#
|
||||||
|
# db_file "~/.mpd/database"
|
||||||
|
|
||||||
|
db_file "~/.config/mpd/database"
|
||||||
|
# These settings are the locations for the daemon log files for the daemon.
|
||||||
|
#
|
||||||
|
# The special value "syslog" makes MPD use the local syslog daemon. This
|
||||||
|
# setting defaults to logging to syslog.
|
||||||
|
#
|
||||||
|
# If you use systemd, do not configure a log_file. With systemd, MPD
|
||||||
|
# defaults to the systemd journal, which is fine.
|
||||||
|
#
|
||||||
|
# log_file "~/.mpd/log"
|
||||||
|
log_file "syslog"
|
||||||
|
|
||||||
|
# This setting sets the location of the file which stores the process ID
|
||||||
|
# for use of mpd --kill and some init scripts. This setting is disabled by
|
||||||
|
# default and the pid file will not be stored.
|
||||||
|
#
|
||||||
|
# If you use systemd, do not configure a pid_file.
|
||||||
|
#
|
||||||
|
# pid_file "~/.mpd/pid"
|
||||||
|
pid_file "~/.config/mpd/pid"
|
||||||
|
|
||||||
|
# This setting sets the location of the file which contains information about
|
||||||
|
# most variables to get MPD back into the same general shape it was in before
|
||||||
|
# it was brought down. This setting is disabled by default and the server
|
||||||
|
# state will be reset on server start up.
|
||||||
|
#
|
||||||
|
#state_file "~/.mpd/state"
|
||||||
|
state_file "~/.config/mpd/state"
|
||||||
|
#
|
||||||
|
# The location of the sticker database. This is a database which
|
||||||
|
# manages dynamic information attached to songs.
|
||||||
|
#
|
||||||
|
#sticker_file "~/.mpd/sticker.sql"
|
||||||
|
sticker_file "~/.config/mpd/sticker.sql"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# General music daemon options ################################################
|
||||||
|
#
|
||||||
|
# This setting specifies the user that MPD will run as. MPD should never run as
|
||||||
|
# root and you may use this setting to make MPD change its user ID after
|
||||||
|
# initialization. This setting is disabled by default and MPD is run as the
|
||||||
|
# current user.
|
||||||
|
#
|
||||||
|
#user "nobody"
|
||||||
|
#
|
||||||
|
# This setting specifies the group that MPD will run as. If not specified
|
||||||
|
# primary group of user specified with "user" setting will be used (if set).
|
||||||
|
# This is useful if MPD needs to be a member of group such as "audio" to
|
||||||
|
# have permission to use sound card.
|
||||||
|
#
|
||||||
|
#group "nogroup"
|
||||||
|
#
|
||||||
|
# This setting sets the address for the daemon to listen on. Careful attention
|
||||||
|
# should be paid if this is assigned to anything other than the default, any.
|
||||||
|
# This setting can deny access to control of the daemon. Not effective if
|
||||||
|
# systemd socket activiation is in use.
|
||||||
|
#
|
||||||
|
# For network
|
||||||
|
#bind_to_address "any"
|
||||||
|
#
|
||||||
|
# And for Unix Socket
|
||||||
|
#bind_to_address "~/.mpd/socket"
|
||||||
|
#
|
||||||
|
# This setting is the TCP port that is desired for the daemon to get assigned
|
||||||
|
# to.
|
||||||
|
#
|
||||||
|
#port "6600"
|
||||||
|
#
|
||||||
|
# Suppress all messages below the given threshold. Use "verbose" for
|
||||||
|
# troubleshooting. Available setting arguments are "notice", "info", "verbose",
|
||||||
|
# "warning" and "error".
|
||||||
|
#
|
||||||
|
#log_level "notice"
|
||||||
|
#
|
||||||
|
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
|
||||||
|
# of starting playback after startup.
|
||||||
|
#
|
||||||
|
#restore_paused "no"
|
||||||
|
#
|
||||||
|
# This setting enables MPD to create playlists in a format usable by other
|
||||||
|
# music players.
|
||||||
|
#
|
||||||
|
#save_absolute_paths_in_playlists "no"
|
||||||
|
#
|
||||||
|
# This setting defines a list of tag types that will be extracted during the
|
||||||
|
# audio file discovery process. The complete list of possible values can be
|
||||||
|
# found in the user manual.
|
||||||
|
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
|
||||||
|
#
|
||||||
|
# This example just enables the "comment" tag without disabling all
|
||||||
|
# the other supported tags:
|
||||||
|
#metadata_to_use "+comment"
|
||||||
|
#
|
||||||
|
# This setting enables automatic update of MPD's database when files in
|
||||||
|
# music_directory are changed.
|
||||||
|
#
|
||||||
|
#auto_update "yes"
|
||||||
|
auto_update "yes"
|
||||||
|
#
|
||||||
|
# Limit the depth of the directories being watched, 0 means only watch
|
||||||
|
# the music directory itself. There is no limit by default.
|
||||||
|
#
|
||||||
|
#auto_update_depth "3"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Symbolic link behavior ######################################################
|
||||||
|
#
|
||||||
|
# If this setting is set to "yes", MPD will discover audio files by following
|
||||||
|
# symbolic links outside of the configured music_directory.
|
||||||
|
#
|
||||||
|
#follow_outside_symlinks "yes"
|
||||||
|
#
|
||||||
|
# If this setting is set to "yes", MPD will discover audio files by following
|
||||||
|
# symbolic links inside of the configured music_directory.
|
||||||
|
#
|
||||||
|
#follow_inside_symlinks "yes"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Zeroconf / Avahi Service Discovery ##########################################
|
||||||
|
#
|
||||||
|
# If this setting is set to "yes", service information will be published with
|
||||||
|
# Zeroconf / Avahi.
|
||||||
|
#
|
||||||
|
#zeroconf_enabled "yes"
|
||||||
|
#
|
||||||
|
# The argument to this setting will be the Zeroconf / Avahi unique name for
|
||||||
|
# this MPD server on the network. %h will be replaced with the hostname.
|
||||||
|
#
|
||||||
|
#zeroconf_name "Music Player @ %h"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Permissions #################################################################
|
||||||
|
#
|
||||||
|
# If this setting is set, MPD will require password authorization. The password
|
||||||
|
# setting can be specified multiple times for different password profiles.
|
||||||
|
#
|
||||||
|
#password "password@read,add,control,admin"
|
||||||
|
#
|
||||||
|
# This setting specifies the permissions a user has who has not yet logged in.
|
||||||
|
#
|
||||||
|
#default_permissions "read,add,control,admin"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Database #######################################################################
|
||||||
|
#
|
||||||
|
# An example of a database section instead of the old 'db_file' setting.
|
||||||
|
# It enables mounting other storages into the music directory.
|
||||||
|
#
|
||||||
|
#database {
|
||||||
|
# plugin "simple"
|
||||||
|
# path "~/.local/share/mpd/db
|
||||||
|
# cache_directory "~/.local/share/mpd/cache"
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of database config for a sattelite setup
|
||||||
|
#
|
||||||
|
#music_directory "nfs://fileserver.local/srv/mp3"
|
||||||
|
#database {
|
||||||
|
# plugin "proxy"
|
||||||
|
# host "other.mpd.host"
|
||||||
|
# port "6600"
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Input #######################################################################
|
||||||
|
#
|
||||||
|
input {
|
||||||
|
plugin "curl"
|
||||||
|
# proxy "proxy.isp.com:8080"
|
||||||
|
# proxy_user "user"
|
||||||
|
# proxy_password "password"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Audio Output ################################################################
|
||||||
|
#
|
||||||
|
# MPD supports various audio output types, as well as playing through multiple
|
||||||
|
# audio outputs at the same time, through multiple audio_output settings
|
||||||
|
# blocks. Setting this block is optional, though the server will only attempt
|
||||||
|
# autodetection for one sound card.
|
||||||
|
#
|
||||||
|
# An example of an ALSA output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "alsa"
|
||||||
|
# name "My ALSA Device"
|
||||||
|
## device "hw:0,0" # optional
|
||||||
|
## mixer_type "hardware" # optional
|
||||||
|
## mixer_device "default" # optional
|
||||||
|
## mixer_control "PCM" # optional
|
||||||
|
## mixer_index "0" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of an OSS output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "oss"
|
||||||
|
# name "My OSS Device"
|
||||||
|
## device "/dev/dsp" # optional
|
||||||
|
## mixer_type "hardware" # optional
|
||||||
|
## mixer_device "/dev/mixer" # optional
|
||||||
|
## mixer_control "PCM" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a shout output (for streaming to Icecast):
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "shout"
|
||||||
|
# encoder "vorbis" # optional
|
||||||
|
# name "My Shout Stream"
|
||||||
|
# host "localhost"
|
||||||
|
# port "8000"
|
||||||
|
# mount "/mpd.ogg"
|
||||||
|
# password "hackme"
|
||||||
|
# quality "5.0"
|
||||||
|
# bitrate "128"
|
||||||
|
# format "44100:16:1"
|
||||||
|
## protocol "icecast2" # optional
|
||||||
|
## user "source" # optional
|
||||||
|
## description "My Stream Description" # optional
|
||||||
|
## url "http://example.com" # optional
|
||||||
|
## genre "jazz" # optional
|
||||||
|
## public "no" # optional
|
||||||
|
## timeout "2" # optional
|
||||||
|
## mixer_type "software" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a recorder output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "recorder"
|
||||||
|
# name "My recorder"
|
||||||
|
# encoder "vorbis" # optional, vorbis or lame
|
||||||
|
# path "/var/lib/mpd/recorder/mpd.ogg"
|
||||||
|
## quality "5.0" # do not define if bitrate is defined
|
||||||
|
# bitrate "128" # do not define if quality is defined
|
||||||
|
# format "44100:16:1"
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a httpd output (built-in HTTP streaming server):
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "httpd"
|
||||||
|
# name "My HTTP Stream"
|
||||||
|
# encoder "vorbis" # optional, vorbis or lame
|
||||||
|
# port "8000"
|
||||||
|
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
|
||||||
|
## quality "5.0" # do not define if bitrate is defined
|
||||||
|
# bitrate "128" # do not define if quality is defined
|
||||||
|
# format "44100:16:1"
|
||||||
|
# max_clients "0" # optional 0=no limit
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "pulse"
|
||||||
|
# name "My Pulse Output"
|
||||||
|
## server "remote_server" # optional
|
||||||
|
## sink "remote_server_sink" # optional
|
||||||
|
## media_role "media_role" #optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a winmm output (Windows multimedia API).
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "winmm"
|
||||||
|
# name "My WinMM output"
|
||||||
|
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||||
|
# or
|
||||||
|
## device "0" # optional
|
||||||
|
## mixer_type "hardware" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a wasapi output (Windows multimedia API).
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "wasapi"
|
||||||
|
# name "My WASAPI output"
|
||||||
|
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||||
|
# or
|
||||||
|
## device "0" # optional
|
||||||
|
## Exclusive mode blocks all other audio source, and get best audio quality without resampling.
|
||||||
|
## exclusive "no" # optional
|
||||||
|
## Enumerate all devices in log.
|
||||||
|
## enumerate "no" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of an openal output.
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "openal"
|
||||||
|
# name "My OpenAL output"
|
||||||
|
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of an sndio output.
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "sndio"
|
||||||
|
# name "sndio output"
|
||||||
|
# mixer_type "hardware"
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of an OS X output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "osx"
|
||||||
|
# name "My OS X Device"
|
||||||
|
## device "Built-in Output" # optional
|
||||||
|
## channel_map "-1,-1,0,1" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
## Example "pipe" output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "pipe"
|
||||||
|
# name "my pipe"
|
||||||
|
# command "aplay -f cd 2>/dev/null"
|
||||||
|
## Or if you're want to use AudioCompress
|
||||||
|
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
|
||||||
|
## Or to send raw PCM stream through PCM:
|
||||||
|
# command "nc example.org 8765"
|
||||||
|
# format "44100:16:2"
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
## An example of a null output (for no audio output):
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "null"
|
||||||
|
# name "My Null Output"
|
||||||
|
# mixer_type "none" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Normalization automatic volume adjustments ##################################
|
||||||
|
#
|
||||||
|
# This setting specifies the type of ReplayGain to use. This setting can have
|
||||||
|
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
|
||||||
|
# chooses between "track" and "album" depending on the current state of
|
||||||
|
# random playback. If random playback is enabled then "track" mode is used.
|
||||||
|
# See <https://wiki.hydrogenaud.io/index.php?title=Replaygain> for
|
||||||
|
# more details about ReplayGain.
|
||||||
|
# This setting is off by default.
|
||||||
|
#
|
||||||
|
#replaygain "album"
|
||||||
|
#
|
||||||
|
# This setting sets the pre-amp used for files that have ReplayGain tags. By
|
||||||
|
# default this setting is disabled.
|
||||||
|
#
|
||||||
|
#replaygain_preamp "0"
|
||||||
|
#
|
||||||
|
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
|
||||||
|
# By default this setting is disabled.
|
||||||
|
#
|
||||||
|
#replaygain_missing_preamp "0"
|
||||||
|
#
|
||||||
|
# This setting enables or disables ReplayGain limiting.
|
||||||
|
# MPD calculates actual amplification based on the ReplayGain tags
|
||||||
|
# and replaygain_preamp / replaygain_missing_preamp setting.
|
||||||
|
# If replaygain_limit is enabled MPD will never amplify audio signal
|
||||||
|
# above its original level. If replaygain_limit is disabled such amplification
|
||||||
|
# might occur. By default this setting is enabled.
|
||||||
|
#
|
||||||
|
#replaygain_limit "yes"
|
||||||
|
#
|
||||||
|
# This setting enables on-the-fly normalization volume adjustment. This will
|
||||||
|
# result in the volume of all playing audio to be adjusted so the output has
|
||||||
|
# equal "loudness". This setting is disabled by default.
|
||||||
|
#
|
||||||
|
#volume_normalization "no"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Character Encoding ##########################################################
|
||||||
|
#
|
||||||
|
# If file or directory names do not display correctly for your locale then you
|
||||||
|
# may need to modify this setting.
|
||||||
|
#
|
||||||
|
#filesystem_charset "UTF-8"
|
||||||
|
#
|
||||||
|
###############################################################################
|
180
.config/mpv/input.conf
Normal file
180
.config/mpv/input.conf
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
# mpv keybindings
|
||||||
|
#
|
||||||
|
# Location of user-defined bindings: ~/.config/mpv/input.conf
|
||||||
|
#
|
||||||
|
|
||||||
|
# Lines starting with # are comments. Use SHARP to assign the # key.
|
||||||
|
# Copy this file and uncomment and edit the bindings you want to change.
|
||||||
|
#
|
||||||
|
# List of commands and further details: DOCS/man/input.rst
|
||||||
|
# List of special keys: --input-keylist
|
||||||
|
# Keybindings testing mode: mpv --input-test --force-window --idle
|
||||||
|
#
|
||||||
|
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
|
||||||
|
#
|
||||||
|
# Strings need to be quoted and escaped:
|
||||||
|
# KEY show-text "This is a single backslash: \\ and a quote: \" !"
|
||||||
|
#
|
||||||
|
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
|
||||||
|
# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal).
|
||||||
|
#
|
||||||
|
# The default keybindings are hardcoded into the mpv binary.
|
||||||
|
# You can disable them completely with: --no-input-default-bindings
|
||||||
|
|
||||||
|
# Developer note:
|
||||||
|
# On compilation, this file is baked into the mpv binary, and all lines are
|
||||||
|
# uncommented (unless '#' is followed by a space) - thus this file defines the
|
||||||
|
# default key bindings.
|
||||||
|
|
||||||
|
# If this is enabled, treat all the following bindings as default.
|
||||||
|
#default-bindings start
|
||||||
|
|
||||||
|
#MBTN_LEFT ignore # don't do anything
|
||||||
|
#MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen
|
||||||
|
#MBTN_RIGHT cycle pause # toggle pause/playback mode
|
||||||
|
#MBTN_BACK playlist-prev # skip to the previous file
|
||||||
|
#MBTN_FORWARD playlist-next # skip to the next file
|
||||||
|
|
||||||
|
# Mouse wheels, touchpad or other input devices that have axes
|
||||||
|
# if the input devices supports precise scrolling it will also scale the
|
||||||
|
# numeric value accordingly
|
||||||
|
#WHEEL_UP seek 10 # seek 10 seconds forward
|
||||||
|
#WHEEL_DOWN seek -10 # seek 10 seconds backward
|
||||||
|
#WHEEL_LEFT add volume -2
|
||||||
|
#WHEEL_RIGHT add volume 2
|
||||||
|
|
||||||
|
## Seek units are in seconds, but note that these are limited by keyframes
|
||||||
|
#RIGHT seek 5 # seek 5 seconds forward
|
||||||
|
#LEFT seek -5 # seek 5 seconds backward
|
||||||
|
#UP seek 60 # seek 1 minute forward
|
||||||
|
#DOWN seek -60 # seek 1 minute backward
|
||||||
|
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
|
||||||
|
# Don't show them on the OSD (no-osd).
|
||||||
|
#Shift+RIGHT no-osd seek 1 exact # seek exactly 1 second forward
|
||||||
|
#Shift+LEFT no-osd seek -1 exact # seek exactly 1 second backward
|
||||||
|
#Shift+UP no-osd seek 5 exact # seek exactly 5 seconds forward
|
||||||
|
#Shift+DOWN no-osd seek -5 exact # seek exactly 5 seconds backward
|
||||||
|
#Ctrl+LEFT no-osd sub-seek -1 # seek to the previous subtitle
|
||||||
|
#Ctrl+RIGHT no-osd sub-seek 1 # seek to the next subtitle
|
||||||
|
#Ctrl+Shift+LEFT sub-step -1 # change subtitle timing such that the previous subtitle is displayed
|
||||||
|
#Ctrl+Shift+RIGHT sub-step 1 # change subtitle timing such that the next subtitle is displayed
|
||||||
|
#Alt+left add video-pan-x 0.1 # move the video right
|
||||||
|
#Alt+right add video-pan-x -0.1 # move the video left
|
||||||
|
#Alt+up add video-pan-y 0.1 # move the video down
|
||||||
|
#Alt+down add video-pan-y -0.1 # move the video up
|
||||||
|
#Alt++ add video-zoom 0.1 # zoom in
|
||||||
|
#Alt+- add video-zoom -0.1 # zoom out
|
||||||
|
#Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 # reset zoom and pan settings
|
||||||
|
#PGUP add chapter 1 # seek to the next chapter
|
||||||
|
#PGDWN add chapter -1 # seek to the previous chapter
|
||||||
|
#Shift+PGUP seek 600 # seek 10 minutes forward
|
||||||
|
#Shift+PGDWN seek -600 # seek 10 minutes backward
|
||||||
|
#[ multiply speed 1/1.1 # decrease the playback speed
|
||||||
|
#] multiply speed 1.1 # increase the playback speed
|
||||||
|
< multiply speed 1/1.5
|
||||||
|
> multiply speed 1.5
|
||||||
|
#BS set speed 1.0 # reset the speed to normal
|
||||||
|
#Shift+BS revert-seek # undo the previous (or marked) seek
|
||||||
|
#Shift+Ctrl+BS revert-seek mark # mark the position for revert-seek
|
||||||
|
#q quit
|
||||||
|
#Q quit-watch-later # exit and remember the playback position
|
||||||
|
#q {encode} quit 4
|
||||||
|
#ESC set fullscreen no # leave fullscreen
|
||||||
|
#ESC {encode} quit 4
|
||||||
|
#p cycle pause # toggle pause/playback mode
|
||||||
|
#. frame-step # advance one frame and pause
|
||||||
|
#, frame-back-step # go back by one frame and pause
|
||||||
|
#SPACE cycle pause # toggle pause/playback mode
|
||||||
|
#> playlist-next # skip to the next file
|
||||||
|
#ENTER playlist-next # skip to the next file
|
||||||
|
#< playlist-prev # skip to the previous file
|
||||||
|
#O no-osd cycle-values osd-level 3 1 # toggle displaying the OSD on user interaction or always
|
||||||
|
#o show-progress # show playback progress
|
||||||
|
#P show-progress # show playback progress
|
||||||
|
#i script-binding stats/display-stats # display information and statistics
|
||||||
|
#I script-binding stats/display-stats-toggle # toggle displaying information and statistics
|
||||||
|
#` script-binding console/enable # open the console
|
||||||
|
#z add sub-delay -0.1 # shift subtitles 100 ms earlier
|
||||||
|
#Z add sub-delay +0.1 # delay subtitles by 100 ms
|
||||||
|
#x add sub-delay +0.1 # delay subtitles by 100 ms
|
||||||
|
#ctrl++ add audio-delay 0.100 # change audio/video sync by delaying the audio
|
||||||
|
#ctrl+- add audio-delay -0.100 # change audio/video sync by shifting the audio earlier
|
||||||
|
#Shift+g add sub-scale +0.1 # increase the subtitle font size
|
||||||
|
#Shift+f add sub-scale -0.1 # decrease the subtitle font size
|
||||||
|
#9 add volume -2
|
||||||
|
#/ add volume -2
|
||||||
|
#0 add volume 2
|
||||||
|
#* add volume 2
|
||||||
|
#m cycle mute # toggle mute
|
||||||
|
#1 add contrast -1
|
||||||
|
#2 add contrast 1
|
||||||
|
#3 add brightness -1
|
||||||
|
#4 add brightness 1
|
||||||
|
#5 add gamma -1
|
||||||
|
#6 add gamma 1
|
||||||
|
#7 add saturation -1
|
||||||
|
#8 add saturation 1
|
||||||
|
#Alt+0 set current-window-scale 0.5 # halve the window size
|
||||||
|
#Alt+1 set current-window-scale 1.0 # reset the window size
|
||||||
|
#Alt+2 set current-window-scale 2.0 # double the window size
|
||||||
|
#d cycle deinterlace # toggle the deinterlacing filter
|
||||||
|
#r add sub-pos -1 # move subtitles up
|
||||||
|
#R add sub-pos +1 # move subtitles down
|
||||||
|
#t add sub-pos +1 # move subtitles down
|
||||||
|
#v cycle sub-visibility # hide or show the subtitles
|
||||||
|
#Alt+v cycle secondary-sub-visibility # hide or show the secondary subtitles
|
||||||
|
#V cycle sub-ass-vsfilter-aspect-compat # toggle stretching SSA/ASS subtitles with anamorphic videos to match the historical renderer
|
||||||
|
#u cycle-values sub-ass-override "force" "no" # toggle overriding SSA/ASS subtitle styles with the normal styles
|
||||||
|
#j cycle sub # switch subtitle track
|
||||||
|
#J cycle sub down # switch subtitle track backwards
|
||||||
|
#SHARP cycle audio # switch audio track
|
||||||
|
#_ cycle video # switch video track
|
||||||
|
#T cycle ontop # toggle placing the video on top of other windows
|
||||||
|
#f cycle fullscreen # toggle fullscreen
|
||||||
|
#s screenshot # take a screenshot of the video in its original resolution with subtitles
|
||||||
|
#S screenshot video # take a screenshot of the video in its original resolution without subtitles
|
||||||
|
#Ctrl+s screenshot window # take a screenshot of the window with OSD and subtitles
|
||||||
|
#Alt+s screenshot each-frame # automatically screenshot every frame; issue this command again to stop taking screenshots
|
||||||
|
#w add panscan -0.1 # decrease panscan
|
||||||
|
#W add panscan +0.1 # shrink black bars by cropping the video
|
||||||
|
#e add panscan +0.1 # shrink black bars by cropping the video
|
||||||
|
#A cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1" # cycle the video aspect ratio ("-1" is the container aspect)
|
||||||
|
#POWER quit
|
||||||
|
#PLAY cycle pause # toggle pause/playback mode
|
||||||
|
#PAUSE cycle pause # toggle pause/playback mode
|
||||||
|
#PLAYPAUSE cycle pause # toggle pause/playback mode
|
||||||
|
#PLAYONLY set pause no # unpause
|
||||||
|
#PAUSEONLY set pause yes # pause
|
||||||
|
#STOP quit
|
||||||
|
#FORWARD seek 60 # seek 1 minute forward
|
||||||
|
#REWIND seek -60 # seek 1 minute backward
|
||||||
|
#NEXT playlist-next # skip to the next file
|
||||||
|
#PREV playlist-prev # skip to the previous file
|
||||||
|
#VOLUME_UP add volume 2
|
||||||
|
#VOLUME_DOWN add volume -2
|
||||||
|
#MUTE cycle mute # toggle mute
|
||||||
|
#CLOSE_WIN quit
|
||||||
|
#CLOSE_WIN {encode} quit 4
|
||||||
|
#ctrl+w quit
|
||||||
|
#E cycle edition # switch edition
|
||||||
|
#l ab-loop # set/clear A-B loop points
|
||||||
|
#L cycle-values loop-file "inf" "no" # toggle infinite looping
|
||||||
|
#ctrl+c quit 4
|
||||||
|
#DEL script-binding osc/visibility # cycle OSC visibility between never, auto (mouse-move) and always
|
||||||
|
#ctrl+h cycle-values hwdec "auto" "no" # toggle hardware decoding
|
||||||
|
#F8 show-text ${playlist} # show the playlist
|
||||||
|
#F9 show-text ${track-list} # show the list of video, audio and sub tracks
|
||||||
|
|
||||||
|
#
|
||||||
|
# Legacy bindings (may or may not be removed in the future)
|
||||||
|
#
|
||||||
|
! add chapter -1 # seek to the previous chapter
|
||||||
|
@ add chapter 1 # seek to the next chapter
|
||||||
|
|
||||||
|
#
|
||||||
|
# Not assigned by default
|
||||||
|
# (not an exhaustive list of unbound commands)
|
||||||
|
#
|
||||||
|
|
||||||
|
# ? cycle sub-forced-only # toggle DVD forced subs
|
||||||
|
# ? stop # stop playback (quit or enter idle mode)
|
3
.config/mpv/mpv.conf
Normal file
3
.config/mpv/mpv.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
script-opts=ytdl_hook-ytdl_path=/usr/bin/yt-dlp
|
||||||
|
ytdl-format=bestvideo[height<=?480]+bestaudio/best
|
||||||
|
|
212
.config/mpv/scripts/autload.lua
Normal file
212
.config/mpv/scripts/autload.lua
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
-- This script automatically loads playlist entries before and after the
|
||||||
|
-- the currently played file. It does so by scanning the directory a file is
|
||||||
|
-- located in when starting playback. It sorts the directory entries
|
||||||
|
-- alphabetically, and adds entries before and after the current file to
|
||||||
|
-- the internal playlist. (It stops if it would add an already existing
|
||||||
|
-- playlist entry at the same position - this makes it "stable".)
|
||||||
|
-- Add at most 5000 * 2 files when starting a file (before + after).
|
||||||
|
--[[
|
||||||
|
To configure this script use file autoload.conf in directory script-opts (the "script-opts"
|
||||||
|
directory must be in the mpv configuration directory, typically ~/.config/mpv/).
|
||||||
|
|
||||||
|
Example configuration would be:
|
||||||
|
|
||||||
|
disabled=no
|
||||||
|
images=no
|
||||||
|
videos=yes
|
||||||
|
audio=yes
|
||||||
|
ignore_hidden=yes
|
||||||
|
|
||||||
|
--]] MAXENTRIES = 5000
|
||||||
|
|
||||||
|
local msg = require 'mp.msg'
|
||||||
|
local options = require 'mp.options'
|
||||||
|
local utils = require 'mp.utils'
|
||||||
|
|
||||||
|
o = {
|
||||||
|
disabled = false,
|
||||||
|
images = true,
|
||||||
|
videos = true,
|
||||||
|
audio = true,
|
||||||
|
ignore_hidden = true
|
||||||
|
}
|
||||||
|
options.read_options(o)
|
||||||
|
|
||||||
|
function Set(t)
|
||||||
|
local set = {}
|
||||||
|
for _, v in pairs(t) do set[v] = true end
|
||||||
|
return set
|
||||||
|
end
|
||||||
|
|
||||||
|
function SetUnion(a, b)
|
||||||
|
local res = {}
|
||||||
|
for k in pairs(a) do res[k] = true end
|
||||||
|
for k in pairs(b) do res[k] = true end
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
|
||||||
|
EXTENSIONS_VIDEO = Set {
|
||||||
|
'mkv', 'avi', 'mp4', 'ogv', 'webm', 'rmvb', 'flv', 'wmv', 'mpeg', 'mpg',
|
||||||
|
'm4v', '3gp'
|
||||||
|
}
|
||||||
|
|
||||||
|
EXTENSIONS_AUDIO = Set {
|
||||||
|
'mp3', 'wav', 'ogm', 'flac', 'm4a', 'wma', 'ogg', 'opus'
|
||||||
|
}
|
||||||
|
|
||||||
|
EXTENSIONS_IMAGES = Set {
|
||||||
|
'jpg', 'jpeg', 'png', 'tif', 'tiff', 'gif', 'webp', 'svg', 'bmp'
|
||||||
|
}
|
||||||
|
|
||||||
|
EXTENSIONS = Set {}
|
||||||
|
if o.videos then EXTENSIONS = SetUnion(EXTENSIONS, EXTENSIONS_VIDEO) end
|
||||||
|
if o.audio then EXTENSIONS = SetUnion(EXTENSIONS, EXTENSIONS_AUDIO) end
|
||||||
|
if o.images then EXTENSIONS = SetUnion(EXTENSIONS, EXTENSIONS_IMAGES) end
|
||||||
|
|
||||||
|
function add_files_at(index, files)
|
||||||
|
index = index - 1
|
||||||
|
local oldcount = mp.get_property_number('playlist-count', 1)
|
||||||
|
for i = 1, #files do
|
||||||
|
mp.commandv('loadfile', files[i], 'append')
|
||||||
|
mp.commandv('playlist-move', oldcount + i - 1, index + i - 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function get_extension(path)
|
||||||
|
match = string.match(path, '%.([^%.]+)$')
|
||||||
|
if match == nil then
|
||||||
|
return 'nomatch'
|
||||||
|
else
|
||||||
|
return match
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
table.filter = function(t, iter)
|
||||||
|
for i = #t, 1, -1 do if not iter(t[i]) then table.remove(t, i) end end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- splitbynum and alnumcomp from alphanum.lua (C) Andre Bogus
|
||||||
|
-- Released under the MIT License
|
||||||
|
-- http://www.davekoelle.com/files/alphanum.lua
|
||||||
|
|
||||||
|
-- split a string into a table of number and string values
|
||||||
|
function splitbynum(s)
|
||||||
|
local result = {}
|
||||||
|
for x, y in (s or ''):gmatch('(%d*)(%D*)') do
|
||||||
|
if x ~= '' then table.insert(result, tonumber(x)) end
|
||||||
|
if y ~= '' then table.insert(result, y) end
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
function clean_key(k)
|
||||||
|
k = (' ' .. k .. ' '):gsub('%s+', ' '):sub(2, -2):lower()
|
||||||
|
return splitbynum(k)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- compare two strings
|
||||||
|
function alnumcomp(x, y)
|
||||||
|
local xt, yt = clean_key(x), clean_key(y)
|
||||||
|
for i = 1, math.min(#xt, #yt) do
|
||||||
|
local xe, ye = xt[i], yt[i]
|
||||||
|
if type(xe) == 'string' then
|
||||||
|
ye = tostring(ye)
|
||||||
|
elseif type(ye) == 'string' then
|
||||||
|
xe = tostring(xe)
|
||||||
|
end
|
||||||
|
if xe ~= ye then return xe < ye end
|
||||||
|
end
|
||||||
|
return #xt < #yt
|
||||||
|
end
|
||||||
|
|
||||||
|
local autoloaded = nil
|
||||||
|
|
||||||
|
function find_and_add_entries()
|
||||||
|
local path = mp.get_property('path', '')
|
||||||
|
local dir, filename = utils.split_path(path)
|
||||||
|
msg.trace(('dir: %s, filename: %s'):format(dir, filename))
|
||||||
|
if o.disabled then
|
||||||
|
msg.verbose('stopping: autoload disabled')
|
||||||
|
return
|
||||||
|
elseif #dir == 0 then
|
||||||
|
msg.verbose('stopping: not a local path')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pl_count = mp.get_property_number('playlist-count', 1)
|
||||||
|
-- check if this is a manually made playlist
|
||||||
|
if (pl_count > 1 and autoloaded == nil) or
|
||||||
|
(pl_count == 1 and EXTENSIONS[string.lower(get_extension(filename))] ==
|
||||||
|
nil) then
|
||||||
|
msg.verbose('stopping: manually made playlist')
|
||||||
|
return
|
||||||
|
else
|
||||||
|
autoloaded = true
|
||||||
|
end
|
||||||
|
|
||||||
|
local pl = mp.get_property_native('playlist', {})
|
||||||
|
local pl_current = mp.get_property_number('playlist-pos-1', 1)
|
||||||
|
msg.trace(('playlist-pos-1: %s, playlist: %s'):format(pl_current,
|
||||||
|
utils.to_string(pl)))
|
||||||
|
|
||||||
|
local files = utils.readdir(dir, 'files')
|
||||||
|
if files == nil then
|
||||||
|
msg.verbose('no other files in directory')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
table.filter(files, function(v, k)
|
||||||
|
-- The current file could be a hidden file, ignoring it doesn't load other
|
||||||
|
-- files from the current directory.
|
||||||
|
if (o.ignore_hidden and not (v == filename) and string.match(v, '^%.')) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local ext = get_extension(v)
|
||||||
|
if ext == nil then return false end
|
||||||
|
return EXTENSIONS[string.lower(ext)]
|
||||||
|
end)
|
||||||
|
table.sort(files, alnumcomp)
|
||||||
|
|
||||||
|
if dir == '.' then dir = '' end
|
||||||
|
|
||||||
|
-- Find the current pl entry (dir+"/"+filename) in the sorted dir list
|
||||||
|
local current
|
||||||
|
for i = 1, #files do
|
||||||
|
if files[i] == filename then
|
||||||
|
current = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if current == nil then return end
|
||||||
|
msg.trace('current file position in files: ' .. current)
|
||||||
|
|
||||||
|
local append = {[-1] = {}, [1] = {}}
|
||||||
|
for direction = -1, 1, 2 do -- 2 iterations, with direction = -1 and +1
|
||||||
|
for i = 1, MAXENTRIES do
|
||||||
|
local file = files[current + i * direction]
|
||||||
|
local pl_e = pl[pl_current + i * direction]
|
||||||
|
if file == nil or file[1] == '.' then break end
|
||||||
|
|
||||||
|
local filepath = dir .. file
|
||||||
|
if pl_e then
|
||||||
|
-- If there's a playlist entry, and it's the same file, stop.
|
||||||
|
msg.trace(pl_e.filename .. ' == ' .. filepath .. ' ?')
|
||||||
|
if pl_e.filename == filepath then break end
|
||||||
|
end
|
||||||
|
|
||||||
|
if direction == -1 then
|
||||||
|
if pl_current == 1 then -- never add additional entries in the middle
|
||||||
|
msg.info('Prepending ' .. file)
|
||||||
|
table.insert(append[-1], 1, filepath)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
msg.info('Adding ' .. file)
|
||||||
|
table.insert(append[1], filepath)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
add_files_at(pl_current + 1, append[1])
|
||||||
|
add_files_at(pl_current, append[-1])
|
||||||
|
end
|
||||||
|
|
||||||
|
mp.register_event('start-file', find_and_add_entries)
|
173
.config/mpv/scripts/mpv_chapters.js
Normal file
173
.config/mpv/scripts/mpv_chapters.js
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
//display chapter on osd and easily switch between chapters by click on title of chapter
|
||||||
|
mp.register_event("file-loaded", init);
|
||||||
|
mp.observe_property("chapter", "number", onChapterChange);
|
||||||
|
mp.observe_property("chapter-list/count", "number", init);
|
||||||
|
var options = {
|
||||||
|
font_size: 16,
|
||||||
|
font_color: "00FFFF",
|
||||||
|
border_size: 1.0,
|
||||||
|
border_color: "000000",
|
||||||
|
font_color_currentChapter: "C27F1B",
|
||||||
|
};
|
||||||
|
var playinfo = {
|
||||||
|
chapters: [], //array
|
||||||
|
chaptercount: "", // int
|
||||||
|
assinterface: [], //array(deprecated, use single assdraw instead)
|
||||||
|
currentChapter: "", //int
|
||||||
|
loaded:false,
|
||||||
|
};
|
||||||
|
var toggle_switch = false;
|
||||||
|
var assdraw = mp.create_osd_overlay("ass-events");
|
||||||
|
var autohidedelay = mp.get_property_number("cursor-autohide");
|
||||||
|
//function
|
||||||
|
function init() {
|
||||||
|
playinfo.chapters = getChapters();
|
||||||
|
playinfo.chaptercount = playinfo.chapters.length;
|
||||||
|
if(playinfo.chaptercount == 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
while (playinfo.chaptercount * options.font_size > 1000 / 1.5) {
|
||||||
|
options.font_size = options.font_size - 1;
|
||||||
|
}
|
||||||
|
drawChapterList();
|
||||||
|
mp.msg.info("initiated");
|
||||||
|
playinfo.loaded = true;
|
||||||
|
}
|
||||||
|
function getChapters() {
|
||||||
|
var chapterCount = mp.get_property("chapter-list/count");
|
||||||
|
if (chapterCount === 0) {
|
||||||
|
return ["null"];
|
||||||
|
} else {
|
||||||
|
var chaptersArray = [];
|
||||||
|
for (var index = 0; index < chapterCount; index++) {
|
||||||
|
var chapterTitle = mp.get_property_native(
|
||||||
|
"chapter-list/" + index + "/title"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (chapterTitle != undefined) {
|
||||||
|
chaptersArray.push(chapterTitle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return chaptersArray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawChapterList() {
|
||||||
|
var resY = 0;
|
||||||
|
var resX = 0;
|
||||||
|
var assdrawdata = "";
|
||||||
|
function setPos(str, _X, _Y) {
|
||||||
|
str = str + "{\\pos(" + _X + ", " + _Y + ")}";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
function setborderSize(str) {
|
||||||
|
str = str + "{\\bord" + options.border_size + "}";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
function setborderColor(str) {
|
||||||
|
str = str + "{\\3c&H" + options.border_color + "&}";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
function setFontColor(str, index) {
|
||||||
|
var _color;
|
||||||
|
if (playinfo.currentChapter == index) {
|
||||||
|
_color = options.font_color_currentChapter;
|
||||||
|
} else {
|
||||||
|
_color = options.font_color;
|
||||||
|
}
|
||||||
|
str = str + "{\\c&H" + _color + "&}";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
function setFont(str) {
|
||||||
|
str = str + "{\\fs" + options.font_size + "}";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
function setEndofmodifiers(str) {
|
||||||
|
str = str + "{\\p0}";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
function setEndofLine(str) {
|
||||||
|
str = str + "\n";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
playinfo.chapters.forEach(function (element, index) {
|
||||||
|
assdrawdata = setPos(assdrawdata, resX, resY);
|
||||||
|
assdrawdata = setborderSize(assdrawdata);
|
||||||
|
assdrawdata = setborderColor(assdrawdata);
|
||||||
|
assdrawdata = setFontColor(assdrawdata, index);
|
||||||
|
assdrawdata = setFont(assdrawdata);
|
||||||
|
assdrawdata = setEndofmodifiers(assdrawdata);
|
||||||
|
assdrawdata = assdrawdata + element;
|
||||||
|
assdrawdata = setEndofLine(assdrawdata);
|
||||||
|
resY += options.font_size;
|
||||||
|
});
|
||||||
|
assdraw.data = assdrawdata
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleOverlay() {
|
||||||
|
if(!playinfo.loaded){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!toggle_switch) {
|
||||||
|
drawChapterList();
|
||||||
|
assdraw.update();
|
||||||
|
mp.set_property("cursor-autohide", "no");
|
||||||
|
toggle_switch = !toggle_switch;
|
||||||
|
} else {
|
||||||
|
assdraw.remove();
|
||||||
|
mp.set_property("cursor-autohide", autohidedelay);
|
||||||
|
toggle_switch = !toggle_switch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onChapterChange() {
|
||||||
|
playinfo.currentChapter = mp.get_property_native("chapter");
|
||||||
|
if (playinfo.currentChapter != undefined) {
|
||||||
|
drawChapterList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((playinfo.currentChapter != undefined) & toggle_switch) {
|
||||||
|
assdraw.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function pos2chapter(x, y, overallscale) {
|
||||||
|
var vectical = y / (options.font_size * overallscale);
|
||||||
|
if(vectical > playinfo.chaptercount){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var intVectical = Math.floor(vectical);
|
||||||
|
var lengthofTitleClicked = playinfo.chapters[intVectical].length;
|
||||||
|
var lengthofTitleClicked_px =
|
||||||
|
(lengthofTitleClicked * options.font_size) / overallscale;
|
||||||
|
if (x < lengthofTitleClicked_px) {
|
||||||
|
return intVectical;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getOverallScale() {
|
||||||
|
return mp.get_osd_size().height / 720;
|
||||||
|
}
|
||||||
|
function onMBTN_LEFT() {
|
||||||
|
//get mouse position
|
||||||
|
if(!playinfo.loaded){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (toggle_switch) {
|
||||||
|
var overallscale = getOverallScale();
|
||||||
|
var pos = mp.get_mouse_pos();
|
||||||
|
var chapterClicked = pos2chapter(pos.x, pos.y, overallscale);
|
||||||
|
if (chapterClicked != null) {
|
||||||
|
mp.set_property_native("chapter", chapterClicked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mp.add_key_binding("TAB", "tab", function () {
|
||||||
|
toggleOverlay();
|
||||||
|
});
|
||||||
|
mp.add_key_binding("MBTN_LEFT", "mbtn_left", function () {
|
||||||
|
onMBTN_LEFT();
|
||||||
|
});
|
597
.config/mpv/scripts/sponsorblock.lua
Normal file
597
.config/mpv/scripts/sponsorblock.lua
Normal file
@ -0,0 +1,597 @@
|
|||||||
|
-- sponsorblock.lua
|
||||||
|
--
|
||||||
|
-- This script skips sponsored segments of YouTube videos
|
||||||
|
-- using data from https://github.com/ajayyy/SponsorBlock
|
||||||
|
local ON_WINDOWS = package.config:sub(1, 1) ~= '/'
|
||||||
|
|
||||||
|
local options = {
|
||||||
|
server_address = 'https://sponsor.ajay.app',
|
||||||
|
|
||||||
|
python_path = ON_WINDOWS and 'python' or 'python3',
|
||||||
|
|
||||||
|
-- Categories to fetch
|
||||||
|
categories = 'sponsor,intro,outro,interaction,selfpromo',
|
||||||
|
|
||||||
|
-- Categories to skip automatically
|
||||||
|
skip_categories = 'sponsor,intro,outro,interaction,selfpromo',
|
||||||
|
|
||||||
|
-- If true, sponsored segments will only be skipped once
|
||||||
|
skip_once = true,
|
||||||
|
|
||||||
|
-- Note that sponsored segments may ocasionally be inaccurate if this is turned off
|
||||||
|
-- see https://blog.ajay.app/voting-and-pseudo-randomness-or-sponsorblock-or-youtube-sponsorship-segment-blocker
|
||||||
|
local_database = false,
|
||||||
|
|
||||||
|
-- Update database on first run, does nothing if local_database is false
|
||||||
|
auto_update = true,
|
||||||
|
|
||||||
|
-- How long to wait between local database updates
|
||||||
|
-- Format: "X[d,h,m]", leave blank to update on every mpv run
|
||||||
|
auto_update_interval = '6h',
|
||||||
|
|
||||||
|
-- User ID used to submit sponsored segments, leave blank for random
|
||||||
|
user_id = '',
|
||||||
|
|
||||||
|
-- Name to display on the stats page https://sponsor.ajay.app/stats/ leave blank to keep current name
|
||||||
|
display_name = '',
|
||||||
|
|
||||||
|
-- Tell the server when a skip happens
|
||||||
|
report_views = true,
|
||||||
|
|
||||||
|
-- Auto upvote skipped sponsors
|
||||||
|
auto_upvote = false,
|
||||||
|
|
||||||
|
-- Use sponsor times from server if they're more up to date than our local database
|
||||||
|
server_fallback = true,
|
||||||
|
|
||||||
|
-- Create chapters at sponsor boundaries for OSC display and manual skipping
|
||||||
|
make_chapters = true,
|
||||||
|
|
||||||
|
-- Minimum duration for sponsors (in seconds), segments under that threshold will be ignored
|
||||||
|
min_duration = 1,
|
||||||
|
|
||||||
|
-- Fade audio for smoother transitions
|
||||||
|
audio_fade = false,
|
||||||
|
|
||||||
|
-- Audio fade step, applied once every 100ms until cap is reached
|
||||||
|
audio_fade_step = 10,
|
||||||
|
|
||||||
|
-- Audio fade cap
|
||||||
|
audio_fade_cap = 0,
|
||||||
|
|
||||||
|
-- Fast forward through sponsors instead of skipping
|
||||||
|
fast_forward = false,
|
||||||
|
|
||||||
|
-- Playback speed modifier when fast forwarding, applied once every second until cap is reached
|
||||||
|
fast_forward_increase = .2,
|
||||||
|
|
||||||
|
-- Playback speed cap
|
||||||
|
fast_forward_cap = 2,
|
||||||
|
|
||||||
|
-- Length of the sha256 prefix (3-32) when querying server, 0 to disable
|
||||||
|
sha256_length = 4,
|
||||||
|
|
||||||
|
-- Pattern for video id in local files, ignored if blank
|
||||||
|
-- Recommended value for base youtube-dl is "-([%w-_]+)%.[mw][kpe][v4b]m?$"
|
||||||
|
local_pattern = '',
|
||||||
|
|
||||||
|
-- Legacy option, use skip_categories instead
|
||||||
|
skip = true
|
||||||
|
}
|
||||||
|
|
||||||
|
mp.options = require 'mp.options'
|
||||||
|
mp.options.read_options(options, 'sponsorblock')
|
||||||
|
|
||||||
|
local legacy = mp.command_native_async == nil
|
||||||
|
if legacy then options.local_database = false end
|
||||||
|
|
||||||
|
local utils = require 'mp.utils'
|
||||||
|
scripts_dir = mp.find_config_file('scripts')
|
||||||
|
|
||||||
|
local sponsorblock = utils.join_path(scripts_dir,
|
||||||
|
'sponsorblock_shared/sponsorblock.py')
|
||||||
|
local uid_path = utils.join_path(scripts_dir,
|
||||||
|
'sponsorblock_shared/sponsorblock.txt')
|
||||||
|
local database_file = options.local_database and
|
||||||
|
utils.join_path(scripts_dir,
|
||||||
|
'sponsorblock_shared/sponsorblock.db') or
|
||||||
|
''
|
||||||
|
local youtube_id = nil
|
||||||
|
local ranges = {}
|
||||||
|
local init = false
|
||||||
|
local segment = {a = 0, b = 0, progress = 0, first = true}
|
||||||
|
local retrying = false
|
||||||
|
local last_skip = {uuid = '', dir = nil}
|
||||||
|
local speed_timer = nil
|
||||||
|
local fade_timer = nil
|
||||||
|
local fade_dir = nil
|
||||||
|
local volume_before = mp.get_property_number('volume')
|
||||||
|
local categories = {}
|
||||||
|
local all_categories = {
|
||||||
|
'sponsor', 'intro', 'outro', 'interaction', 'selfpromo', 'music_offtopic'
|
||||||
|
}
|
||||||
|
local chapter_cache = {}
|
||||||
|
|
||||||
|
for category in string.gmatch(options.skip_categories, '([^,]+)') do
|
||||||
|
categories[category] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
function file_exists(name)
|
||||||
|
local f = io.open(name, 'r')
|
||||||
|
if f ~= nil then
|
||||||
|
io.close(f)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function t_count(t)
|
||||||
|
local count = 0
|
||||||
|
for _ in pairs(t) do count = count + 1 end
|
||||||
|
return count
|
||||||
|
end
|
||||||
|
|
||||||
|
function time_sort(a, b)
|
||||||
|
if a.time == b.time then return string.match(a.title, 'segment end') end
|
||||||
|
return a.time < b.time
|
||||||
|
end
|
||||||
|
|
||||||
|
function parse_update_interval()
|
||||||
|
local s = options.auto_update_interval
|
||||||
|
if s == '' then return 0 end -- Interval Disabled
|
||||||
|
|
||||||
|
local num, mod = s:match '^(%d+)([hdm])$'
|
||||||
|
|
||||||
|
if num == nil or mod == nil then
|
||||||
|
mp.osd_message('[sponsorblock] auto_update_interval ' .. s .. ' is invalid',
|
||||||
|
5)
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local time_table = {m = 60, h = 60 * 60, d = 60 * 60 * 24}
|
||||||
|
|
||||||
|
return num * time_table[mod]
|
||||||
|
end
|
||||||
|
|
||||||
|
function clean_chapters()
|
||||||
|
local chapters = mp.get_property_native('chapter-list')
|
||||||
|
local new_chapters = {}
|
||||||
|
for _, chapter in pairs(chapters) do
|
||||||
|
if chapter.title ~= 'Preview segment start' and chapter.title ~=
|
||||||
|
'Preview segment end' then table.insert(new_chapters, chapter) end
|
||||||
|
end
|
||||||
|
mp.set_property_native('chapter-list', new_chapters)
|
||||||
|
end
|
||||||
|
|
||||||
|
function create_chapter(chapter_title, chapter_time)
|
||||||
|
local chapters = mp.get_property_native('chapter-list')
|
||||||
|
local duration = mp.get_property_native('duration')
|
||||||
|
table.insert(chapters, {
|
||||||
|
title = chapter_title,
|
||||||
|
time = (duration == nil or duration > chapter_time) and chapter_time or
|
||||||
|
duration - .001
|
||||||
|
})
|
||||||
|
table.sort(chapters, time_sort)
|
||||||
|
mp.set_property_native('chapter-list', chapters)
|
||||||
|
end
|
||||||
|
|
||||||
|
function process(uuid, t, new_ranges)
|
||||||
|
start_time = tonumber(string.match(t, '[^,]+'))
|
||||||
|
end_time = tonumber(string.sub(string.match(t, ',[^,]+'), 2))
|
||||||
|
for o_uuid, o_t in pairs(ranges) do
|
||||||
|
if (start_time >= o_t.start_time and start_time <= o_t.end_time) or
|
||||||
|
(o_t.start_time >= start_time and o_t.start_time <= end_time) then
|
||||||
|
new_ranges[o_uuid] = o_t
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
category = string.match(t, '[^,]+$')
|
||||||
|
if categories[category] and end_time - start_time >= options.min_duration then
|
||||||
|
new_ranges[uuid] = {
|
||||||
|
start_time = start_time,
|
||||||
|
end_time = end_time,
|
||||||
|
category = category,
|
||||||
|
skipped = false
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if options.make_chapters and not chapter_cache[uuid] then
|
||||||
|
chapter_cache[uuid] = true
|
||||||
|
local category_title = (category:gsub('^%l', string.upper):gsub('_', ' '))
|
||||||
|
create_chapter(category_title .. ' segment start (' ..
|
||||||
|
string.sub(uuid, 1, 6) .. ')', start_time)
|
||||||
|
create_chapter(
|
||||||
|
category_title .. ' segment end (' .. string.sub(uuid, 1, 6) .. ')',
|
||||||
|
end_time)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function getranges(_, exists, db, more)
|
||||||
|
if type(exists) == 'table' and exists['status'] == '1' then
|
||||||
|
if options.server_fallback then
|
||||||
|
mp.add_timeout(0, function() getranges(true, true, '') end)
|
||||||
|
else
|
||||||
|
return mp.osd_message('[sponsorblock] database update failed, gave up')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if db ~= '' and db ~= database_file then db = database_file end
|
||||||
|
if exists ~= true and not file_exists(db) then
|
||||||
|
if not retrying then
|
||||||
|
mp.osd_message('[sponsorblock] database update failed, retrying...')
|
||||||
|
retrying = true
|
||||||
|
end
|
||||||
|
return update()
|
||||||
|
end
|
||||||
|
if retrying then
|
||||||
|
mp.osd_message('[sponsorblock] database update succeeded')
|
||||||
|
retrying = false
|
||||||
|
end
|
||||||
|
local sponsors
|
||||||
|
local args = {
|
||||||
|
options.python_path, sponsorblock, 'ranges', db, options.server_address,
|
||||||
|
youtube_id, options.categories, tostring(options.sha256_length)
|
||||||
|
}
|
||||||
|
if not legacy then
|
||||||
|
sponsors = mp.command_native({
|
||||||
|
name = 'subprocess',
|
||||||
|
capture_stdout = true,
|
||||||
|
playback_only = false,
|
||||||
|
args = args
|
||||||
|
})
|
||||||
|
else
|
||||||
|
sponsors = utils.subprocess({args = args})
|
||||||
|
end
|
||||||
|
mp.msg.debug('Got: ' .. string.gsub(sponsors.stdout, '[\n\r]', ''))
|
||||||
|
if not string.match(sponsors.stdout, '^%s*(.*%S)') then return end
|
||||||
|
if string.match(sponsors.stdout, 'error') then return getranges(true, true) end
|
||||||
|
local new_ranges = {}
|
||||||
|
local r_count = 0
|
||||||
|
if more then r_count = -1 end
|
||||||
|
for t in string.gmatch(sponsors.stdout, '[^:%s]+') do
|
||||||
|
uuid = string.match(t, '([^,]+),[^,]+$')
|
||||||
|
if ranges[uuid] then
|
||||||
|
new_ranges[uuid] = ranges[uuid]
|
||||||
|
else
|
||||||
|
process(uuid, t, new_ranges)
|
||||||
|
end
|
||||||
|
r_count = r_count + 1
|
||||||
|
end
|
||||||
|
local c_count = t_count(ranges)
|
||||||
|
if c_count == 0 or r_count >= c_count then ranges = new_ranges end
|
||||||
|
end
|
||||||
|
|
||||||
|
function fast_forward()
|
||||||
|
if options.fast_forward and options.fast_forward == true then
|
||||||
|
speed_timer = nil
|
||||||
|
mp.set_property('speed', 1)
|
||||||
|
end
|
||||||
|
local last_speed = mp.get_property_number('speed')
|
||||||
|
local new_speed = math.min(last_speed + options.fast_forward_increase,
|
||||||
|
options.fast_forward_cap)
|
||||||
|
if new_speed <= last_speed then return end
|
||||||
|
mp.set_property('speed', new_speed)
|
||||||
|
end
|
||||||
|
|
||||||
|
function fade_audio(step)
|
||||||
|
local last_volume = mp.get_property_number('volume')
|
||||||
|
local new_volume = math.max(options.audio_fade_cap,
|
||||||
|
math.min(last_volume + step, volume_before))
|
||||||
|
if new_volume == last_volume then
|
||||||
|
if step >= 0 then fade_dir = nil end
|
||||||
|
if fade_timer ~= nil then fade_timer:kill() end
|
||||||
|
fade_timer = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
mp.set_property('volume', new_volume)
|
||||||
|
end
|
||||||
|
|
||||||
|
function skip_ads(name, pos)
|
||||||
|
if pos == nil then return end
|
||||||
|
local sponsor_ahead = false
|
||||||
|
for uuid, t in pairs(ranges) do
|
||||||
|
if (options.fast_forward == uuid or not options.skip_once or not t.skipped) and
|
||||||
|
t.start_time <= pos and t.end_time > pos then
|
||||||
|
if options.fast_forward == uuid then return end
|
||||||
|
if options.fast_forward == false then
|
||||||
|
mp.osd_message('[sponsorblock] ' .. t.category .. ' skipped')
|
||||||
|
mp.set_property('time-pos', t.end_time)
|
||||||
|
else
|
||||||
|
mp.osd_message('[sponsorblock] skipping ' .. t.category)
|
||||||
|
end
|
||||||
|
t.skipped = true
|
||||||
|
last_skip = {uuid = uuid, dir = nil}
|
||||||
|
if options.report_views or options.auto_upvote then
|
||||||
|
local args = {
|
||||||
|
options.python_path, sponsorblock, 'stats', database_file,
|
||||||
|
options.server_address, youtube_id, uuid,
|
||||||
|
options.report_views and '1' or '', uid_path, options.user_id,
|
||||||
|
options.auto_upvote and '1' or ''
|
||||||
|
}
|
||||||
|
if not legacy then
|
||||||
|
mp.command_native_async({
|
||||||
|
name = 'subprocess',
|
||||||
|
playback_only = false,
|
||||||
|
args = args
|
||||||
|
}, function() end)
|
||||||
|
else
|
||||||
|
utils.subprocess_detached({args = args})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if options.fast_forward ~= false then
|
||||||
|
options.fast_forward = uuid
|
||||||
|
if speed_timer ~= nil then speed_timer:kill() end
|
||||||
|
speed_timer = mp.add_periodic_timer(1, fast_forward)
|
||||||
|
end
|
||||||
|
return
|
||||||
|
elseif (not options.skip_once or not t.skipped) and t.start_time <= pos + 1 and
|
||||||
|
t.end_time > pos + 1 then
|
||||||
|
sponsor_ahead = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if options.audio_fade then
|
||||||
|
if sponsor_ahead then
|
||||||
|
if fade_dir ~= false then
|
||||||
|
if fade_dir == nil then
|
||||||
|
volume_before = mp.get_property_number('volume')
|
||||||
|
end
|
||||||
|
if fade_timer ~= nil then fade_timer:kill() end
|
||||||
|
fade_dir = false
|
||||||
|
fade_timer = mp.add_periodic_timer(.1, function()
|
||||||
|
fade_audio(-options.audio_fade_step)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
elseif fade_dir == false then
|
||||||
|
fade_dir = true
|
||||||
|
if fade_timer ~= nil then fade_timer:kill() end
|
||||||
|
fade_timer = mp.add_periodic_timer(.1, function()
|
||||||
|
fade_audio(options.audio_fade_step)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if options.fast_forward and options.fast_forward ~= true then
|
||||||
|
options.fast_forward = true
|
||||||
|
speed_timer:kill()
|
||||||
|
speed_timer = nil
|
||||||
|
mp.set_property('speed', 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function vote(dir)
|
||||||
|
if last_skip.uuid == '' then
|
||||||
|
return mp.osd_message(
|
||||||
|
'[sponsorblock] no sponsors skipped, can\'t submit vote')
|
||||||
|
end
|
||||||
|
local updown = dir == '1' and 'up' or 'down'
|
||||||
|
if last_skip.dir == dir then
|
||||||
|
return mp.osd_message('[sponsorblock] ' .. updown ..
|
||||||
|
'vote already submitted')
|
||||||
|
end
|
||||||
|
last_skip.dir = dir
|
||||||
|
local args = {
|
||||||
|
options.python_path, sponsorblock, 'stats', database_file,
|
||||||
|
options.server_address, youtube_id, last_skip.uuid, '', uid_path,
|
||||||
|
options.user_id, dir
|
||||||
|
}
|
||||||
|
if not legacy then
|
||||||
|
mp.command_native_async({
|
||||||
|
name = 'subprocess',
|
||||||
|
playback_only = false,
|
||||||
|
args = args
|
||||||
|
}, function() end)
|
||||||
|
else
|
||||||
|
utils.subprocess({args = args})
|
||||||
|
end
|
||||||
|
mp.osd_message('[sponsorblock] ' .. updown .. 'vote submitted')
|
||||||
|
end
|
||||||
|
|
||||||
|
function update()
|
||||||
|
mp.command_native_async({
|
||||||
|
name = 'subprocess',
|
||||||
|
playback_only = false,
|
||||||
|
args = {
|
||||||
|
options.python_path, sponsorblock, 'update', database_file,
|
||||||
|
options.server_address
|
||||||
|
}
|
||||||
|
}, getranges)
|
||||||
|
end
|
||||||
|
|
||||||
|
function file_loaded()
|
||||||
|
local initialized = init
|
||||||
|
ranges = {}
|
||||||
|
segment = {a = 0, b = 0, progress = 0, first = true}
|
||||||
|
last_skip = {uuid = '', dir = nil}
|
||||||
|
chapter_cache = {}
|
||||||
|
local video_path = mp.get_property('path', '')
|
||||||
|
mp.msg.debug('Path: ' .. video_path)
|
||||||
|
local video_referer = string.match(mp.get_property('http-header-fields', ''),
|
||||||
|
'Referer:([^,]+)') or ''
|
||||||
|
mp.msg.debug('Referer: ' .. video_referer)
|
||||||
|
|
||||||
|
local urls = {
|
||||||
|
'https?://youtu%.be/([%w-_]+).*',
|
||||||
|
'https?://w?w?w?%.?youtube%.com/v/([%w-_]+).*', '/watch.*[?&]v=([%w-_]+).*',
|
||||||
|
'/embed/([%w-_]+).*'
|
||||||
|
}
|
||||||
|
youtube_id = nil
|
||||||
|
for i, url in ipairs(urls) do
|
||||||
|
youtube_id = youtube_id or string.match(video_path, url) or
|
||||||
|
string.match(video_referer, url)
|
||||||
|
end
|
||||||
|
youtube_id = youtube_id or string.match(video_path, options.local_pattern)
|
||||||
|
|
||||||
|
if not youtube_id or string.len(youtube_id) < 11 or
|
||||||
|
(local_pattern and string.len(youtube_id) ~= 11) then return end
|
||||||
|
youtube_id = string.sub(youtube_id, 1, 11)
|
||||||
|
mp.msg.debug('Found YouTube ID: ' .. youtube_id)
|
||||||
|
init = true
|
||||||
|
if not options.local_database then
|
||||||
|
getranges(true, true)
|
||||||
|
else
|
||||||
|
local exists = file_exists(database_file)
|
||||||
|
if exists and options.server_fallback then
|
||||||
|
getranges(true, true)
|
||||||
|
mp.add_timeout(0, function() getranges(true, true, '', true) end)
|
||||||
|
elseif exists then
|
||||||
|
getranges(true, true)
|
||||||
|
elseif options.server_fallback then
|
||||||
|
mp.add_timeout(0, function() getranges(true, true, '') end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if initialized then return end
|
||||||
|
if options.skip then mp.observe_property('time-pos', 'native', skip_ads) end
|
||||||
|
if options.display_name ~= '' then
|
||||||
|
local args = {
|
||||||
|
options.python_path, sponsorblock, 'username', database_file,
|
||||||
|
options.server_address, youtube_id, '', '', uid_path, options.user_id,
|
||||||
|
options.display_name
|
||||||
|
}
|
||||||
|
if not legacy then
|
||||||
|
mp.command_native_async({
|
||||||
|
name = 'subprocess',
|
||||||
|
playback_only = false,
|
||||||
|
args = args
|
||||||
|
}, function() end)
|
||||||
|
else
|
||||||
|
utils.subprocess_detached({args = args})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not options.local_database or
|
||||||
|
(not options.auto_update and file_exists(database_file)) then return end
|
||||||
|
|
||||||
|
if file_exists(database_file) then
|
||||||
|
local db_info = utils.file_info(database_file)
|
||||||
|
local cur_time = os.time(os.date('*t'))
|
||||||
|
local upd_interval = parse_update_interval()
|
||||||
|
if upd_interval == nil or os.difftime(cur_time, db_info.mtime) <
|
||||||
|
upd_interval then return end
|
||||||
|
end
|
||||||
|
|
||||||
|
update()
|
||||||
|
end
|
||||||
|
|
||||||
|
function set_segment()
|
||||||
|
if not youtube_id then return end
|
||||||
|
local pos = mp.get_property_number('time-pos')
|
||||||
|
if pos == nil then return end
|
||||||
|
if segment.progress > 1 then segment.progress = segment.progress - 2 end
|
||||||
|
if segment.progress == 1 then
|
||||||
|
segment.progress = 0
|
||||||
|
segment.b = pos
|
||||||
|
mp.osd_message(
|
||||||
|
'[sponsorblock] segment boundary B set, press again for boundary A', 3)
|
||||||
|
else
|
||||||
|
segment.progress = 1
|
||||||
|
segment.a = pos
|
||||||
|
mp.osd_message(
|
||||||
|
'[sponsorblock] segment boundary A set, press again for boundary B', 3)
|
||||||
|
end
|
||||||
|
if options.make_chapters and not segment.first then
|
||||||
|
local start_time = math.min(segment.a, segment.b)
|
||||||
|
local end_time = math.max(segment.a, segment.b)
|
||||||
|
if end_time - start_time ~= 0 and end_time ~= 0 then
|
||||||
|
clean_chapters()
|
||||||
|
create_chapter('Preview segment start', start_time)
|
||||||
|
create_chapter('Preview segment end', end_time)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
segment.first = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function select_category(selected)
|
||||||
|
for category in string.gmatch(options.categories, '([^,]+)') do
|
||||||
|
mp.remove_key_binding('select_category_' .. category)
|
||||||
|
mp.remove_key_binding('kp_select_category_' .. category)
|
||||||
|
end
|
||||||
|
submit_segment(selected)
|
||||||
|
end
|
||||||
|
|
||||||
|
function submit_segment(category)
|
||||||
|
if not youtube_id then return end
|
||||||
|
local start_time = math.min(segment.a, segment.b)
|
||||||
|
local end_time = math.max(segment.a, segment.b)
|
||||||
|
if end_time - start_time == 0 or end_time == 0 then
|
||||||
|
mp.osd_message('[sponsorblock] empty segment, not submitting')
|
||||||
|
elseif segment.progress <= 1 then
|
||||||
|
segment.progress = segment.progress + 2
|
||||||
|
local category_list = ''
|
||||||
|
for category_id, category in pairs(all_categories) do
|
||||||
|
local category_title = (category:gsub('^%l', string.upper):gsub('_', ' '))
|
||||||
|
category_list = category_list .. category_id .. ': ' .. category_title ..
|
||||||
|
'\n'
|
||||||
|
mp.add_forced_key_binding(tostring(category_id),
|
||||||
|
'select_category_' .. category,
|
||||||
|
function() select_category(category) end)
|
||||||
|
mp.add_forced_key_binding('KP' .. tostring(category_id),
|
||||||
|
'kp_select_category_' .. category,
|
||||||
|
function() select_category(category) end)
|
||||||
|
end
|
||||||
|
mp.osd_message(string.format(
|
||||||
|
'[sponsorblock] press a number to select category for segment: %.2d:%.2d:%.2d to %.2d:%.2d:%.2d\n\n' ..
|
||||||
|
category_list ..
|
||||||
|
'\nyou can press Shift+G again for default (Sponsor) or hide this message with g',
|
||||||
|
math.floor(start_time / (60 * 60)),
|
||||||
|
math.floor(start_time / 60 % 60),
|
||||||
|
math.floor(start_time % 60),
|
||||||
|
math.floor(end_time / (60 * 60)),
|
||||||
|
math.floor(end_time / 60 % 60), math.floor(end_time % 60)),
|
||||||
|
30)
|
||||||
|
else
|
||||||
|
mp.osd_message('[sponsorblock] submitting segment...', 30)
|
||||||
|
local submit
|
||||||
|
local args = {
|
||||||
|
options.python_path, sponsorblock, 'submit', database_file,
|
||||||
|
options.server_address, youtube_id, tostring(start_time),
|
||||||
|
tostring(end_time), uid_path, options.user_id, category or 'sponsor'
|
||||||
|
}
|
||||||
|
if not legacy then
|
||||||
|
submit = mp.command_native({
|
||||||
|
name = 'subprocess',
|
||||||
|
capture_stdout = true,
|
||||||
|
playback_only = false,
|
||||||
|
args = args
|
||||||
|
})
|
||||||
|
else
|
||||||
|
submit = utils.subprocess({args = args})
|
||||||
|
end
|
||||||
|
if string.match(submit.stdout, 'success') then
|
||||||
|
segment = {a = 0, b = 0, progress = 0, first = true}
|
||||||
|
mp.osd_message('[sponsorblock] segment submitted')
|
||||||
|
if options.make_chapters then
|
||||||
|
clean_chapters()
|
||||||
|
create_chapter('Submitted segment start', start_time)
|
||||||
|
create_chapter('Submitted segment end', end_time)
|
||||||
|
end
|
||||||
|
elseif string.match(submit.stdout, 'error') then
|
||||||
|
mp.osd_message(
|
||||||
|
'[sponsorblock] segment submission failed, server may be down. try again',
|
||||||
|
5)
|
||||||
|
elseif string.match(submit.stdout, '502') then
|
||||||
|
mp.osd_message(
|
||||||
|
'[sponsorblock] segment submission failed, server is down. try again',
|
||||||
|
5)
|
||||||
|
elseif string.match(submit.stdout, '400') then
|
||||||
|
mp.osd_message(
|
||||||
|
'[sponsorblock] segment submission failed, impossible inputs', 5)
|
||||||
|
segment = {a = 0, b = 0, progress = 0, first = true}
|
||||||
|
elseif string.match(submit.stdout, '429') then
|
||||||
|
mp.osd_message(
|
||||||
|
'[sponsorblock] segment submission failed, rate limited. try again', 5)
|
||||||
|
elseif string.match(submit.stdout, '409') then
|
||||||
|
mp.osd_message('[sponsorblock] segment already submitted', 3)
|
||||||
|
segment = {a = 0, b = 0, progress = 0, first = true}
|
||||||
|
else
|
||||||
|
mp.osd_message('[sponsorblock] segment submission failed', 5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
mp.register_event('file-loaded', file_loaded)
|
||||||
|
mp.add_key_binding('g', 'set_segment', set_segment)
|
||||||
|
mp.add_key_binding('G', 'submit_segment', submit_segment)
|
||||||
|
mp.add_key_binding('h', 'upvote_segment', function() return vote('1') end)
|
||||||
|
mp.add_key_binding('H', 'downvote_segment', function() return vote('0') end)
|
||||||
|
-- Bindings below are for backwards compatibility and could be removed at any time
|
||||||
|
mp.add_key_binding(nil, 'sponsorblock_set_segment', set_segment)
|
||||||
|
mp.add_key_binding(nil, 'sponsorblock_submit_segment', submit_segment)
|
||||||
|
mp.add_key_binding(nil, 'sponsorblock_upvote', function() return vote('1') end)
|
||||||
|
mp.add_key_binding(nil, 'sponsorblock_downvote', function() return vote('0') end)
|
3
.config/mpv/scripts/sponsorblock_shared/main.lua
Normal file
3
.config/mpv/scripts/sponsorblock_shared/main.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- This is a dummy main.lua
|
||||||
|
-- required for mpv 0.33
|
||||||
|
-- do not delete
|
124
.config/mpv/scripts/sponsorblock_shared/sponsorblock.py
Normal file
124
.config/mpv/scripts/sponsorblock_shared/sponsorblock.py
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
import urllib.request
|
||||||
|
import urllib.parse
|
||||||
|
import hashlib
|
||||||
|
import sqlite3
|
||||||
|
import random
|
||||||
|
import string
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
if sys.argv[1] in ["submit", "stats", "username"]:
|
||||||
|
if not sys.argv[8]:
|
||||||
|
if os.path.isfile(sys.argv[7]):
|
||||||
|
with open(sys.argv[7]) as f:
|
||||||
|
uid = f.read()
|
||||||
|
else:
|
||||||
|
uid = "".join(random.choices(string.ascii_letters + string.digits, k=36))
|
||||||
|
with open(sys.argv[7], "w") as f:
|
||||||
|
f.write(uid)
|
||||||
|
else:
|
||||||
|
uid = sys.argv[8]
|
||||||
|
|
||||||
|
opener = urllib.request.build_opener()
|
||||||
|
opener.addheaders = [("User-Agent", "mpv_sponsorblock/1.0 (https://github.com/po5/mpv_sponsorblock)")]
|
||||||
|
urllib.request.install_opener(opener)
|
||||||
|
|
||||||
|
if sys.argv[1] == "ranges" and (not sys.argv[2] or not os.path.isfile(sys.argv[2])):
|
||||||
|
sha = None
|
||||||
|
if 3 <= int(sys.argv[6]) <= 32:
|
||||||
|
sha = hashlib.sha256(sys.argv[4].encode()).hexdigest()[:int(sys.argv[6])]
|
||||||
|
times = []
|
||||||
|
try:
|
||||||
|
response = urllib.request.urlopen(sys.argv[3] + "/api/skipSegments" + ("/" + sha + "?" if sha else "?videoID=" + sys.argv[4] + "&") + urllib.parse.urlencode([("categories", json.dumps(sys.argv[5].split(",")))]))
|
||||||
|
segments = json.load(response)
|
||||||
|
for segment in segments:
|
||||||
|
if sha and sys.argv[4] != segment["videoID"]:
|
||||||
|
continue
|
||||||
|
if sha:
|
||||||
|
for s in segment["segments"]:
|
||||||
|
times.append(str(s["segment"][0]) + "," + str(s["segment"][1]) + "," + s["UUID"] + "," + s["category"])
|
||||||
|
else:
|
||||||
|
times.append(str(segment["segment"][0]) + "," + str(segment["segment"][1]) + "," + segment["UUID"] + "," + segment["category"])
|
||||||
|
print(":".join(times))
|
||||||
|
except (TimeoutError, urllib.error.URLError) as e:
|
||||||
|
print("error")
|
||||||
|
except urllib.error.HTTPError as e:
|
||||||
|
if e.code == 404:
|
||||||
|
print("")
|
||||||
|
else:
|
||||||
|
print("error")
|
||||||
|
elif sys.argv[1] == "ranges":
|
||||||
|
conn = sqlite3.connect(sys.argv[2])
|
||||||
|
conn.row_factory = sqlite3.Row
|
||||||
|
c = conn.cursor()
|
||||||
|
times = []
|
||||||
|
for category in sys.argv[5].split(","):
|
||||||
|
c.execute("SELECT startTime, endTime, votes, UUID, category FROM sponsorTimes WHERE videoID = ? AND shadowHidden = 0 AND votes > -1 AND category = ?", (sys.argv[4], category))
|
||||||
|
sponsors = c.fetchall()
|
||||||
|
best = list(sponsors)
|
||||||
|
dealtwith = []
|
||||||
|
similar = []
|
||||||
|
for sponsor_a in sponsors:
|
||||||
|
for sponsor_b in sponsors:
|
||||||
|
if sponsor_a is not sponsor_b and sponsor_a["startTime"] >= sponsor_b["startTime"] and sponsor_a["startTime"] <= sponsor_b["endTime"]:
|
||||||
|
similar.append([sponsor_a, sponsor_b])
|
||||||
|
if sponsor_a in best:
|
||||||
|
best.remove(sponsor_a)
|
||||||
|
if sponsor_b in best:
|
||||||
|
best.remove(sponsor_b)
|
||||||
|
for sponsors_a in similar:
|
||||||
|
if sponsors_a in dealtwith:
|
||||||
|
continue
|
||||||
|
group = set(sponsors_a)
|
||||||
|
for sponsors_b in similar:
|
||||||
|
if sponsors_b[0] in group or sponsors_b[1] in group:
|
||||||
|
group.add(sponsors_b[0])
|
||||||
|
group.add(sponsors_b[1])
|
||||||
|
dealtwith.append(sponsors_b)
|
||||||
|
best.append(max(group, key=lambda x:x["votes"]))
|
||||||
|
for time in best:
|
||||||
|
times.append(str(time["startTime"]) + "," + str(time["endTime"]) + "," + time["UUID"] + "," + time["category"])
|
||||||
|
print(":".join(times))
|
||||||
|
elif sys.argv[1] == "update":
|
||||||
|
try:
|
||||||
|
urllib.request.urlretrieve(sys.argv[3] + "/database.db", sys.argv[2] + ".tmp")
|
||||||
|
os.replace(sys.argv[2] + ".tmp", sys.argv[2])
|
||||||
|
except PermissionError:
|
||||||
|
print("database update failed, file currently in use", file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
except ConnectionResetError:
|
||||||
|
print("database update failed, connection reset", file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
except TimeoutError:
|
||||||
|
print("database update failed, timed out", file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
except urllib.error.URLError as e:
|
||||||
|
print("database update failed", file=sys.stderr)
|
||||||
|
print(e, file=sys.stderr)
|
||||||
|
|
||||||
|
sys.exit(1)
|
||||||
|
elif sys.argv[1] == "submit":
|
||||||
|
try:
|
||||||
|
req = urllib.request.Request(sys.argv[3] + "/api/skipSegments", data=json.dumps({"videoID": sys.argv[4], "segments": [{"segment": [float(sys.argv[5]), float(sys.argv[6])], "category": sys.argv[9]}], "userID": uid}).encode(), headers={"Content-Type": "application/json"})
|
||||||
|
response = urllib.request.urlopen(req)
|
||||||
|
print("success")
|
||||||
|
except urllib.error.HTTPError as e:
|
||||||
|
print(e.code)
|
||||||
|
except:
|
||||||
|
print("error")
|
||||||
|
elif sys.argv[1] == "stats":
|
||||||
|
try:
|
||||||
|
if sys.argv[6]:
|
||||||
|
urllib.request.urlopen(sys.argv[3] + "/api/viewedVideoSponsorTime?UUID=" + sys.argv[5])
|
||||||
|
if sys.argv[9]:
|
||||||
|
urllib.request.urlopen(sys.argv[3] + "/api/voteOnSponsorTime?UUID=" + sys.argv[5] + "&userID=" + uid + "&type=" + sys.argv[9])
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
elif sys.argv[1] == "username":
|
||||||
|
try:
|
||||||
|
data = urllib.parse.urlencode({"userID": uid, "userName": sys.argv[9]}).encode()
|
||||||
|
req = urllib.request.Request(sys.argv[3] + "/api/setUsername", data=data)
|
||||||
|
urllib.request.urlopen(req)
|
||||||
|
except:
|
||||||
|
pass
|
1
.config/mpv/scripts/sponsorblock_shared/sponsorblock.txt
Normal file
1
.config/mpv/scripts/sponsorblock_shared/sponsorblock.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
VvdShPVADjWuTg9L44tkj5B1IqOS8Jfak5XX
|
1
.config/nvim
Submodule
1
.config/nvim
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit b36dc411e3a430e0c80561e60c463214351225a7
|
414
.config/picom/picom.conf
Normal file
414
.config/picom/picom.conf
Normal file
@ -0,0 +1,414 @@
|
|||||||
|
#################################
|
||||||
|
# Shadows #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Enabled client-side shadows on windows. Note desktop windows
|
||||||
|
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
||||||
|
# unless explicitly requested using the wintypes option.
|
||||||
|
#
|
||||||
|
# shadow = false
|
||||||
|
shadow = false;
|
||||||
|
|
||||||
|
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||||
|
# shadow-radius = 12
|
||||||
|
shadow-radius = 24;
|
||||||
|
|
||||||
|
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
||||||
|
shadow-opacity = .86
|
||||||
|
|
||||||
|
# The left offset for shadows, in pixels. (defaults to -15)
|
||||||
|
shadow-offset-x = -15
|
||||||
|
# shadow-offset-x = -7;
|
||||||
|
|
||||||
|
# The top offset for shadows, in pixels. (defaults to -15)
|
||||||
|
shadow-offset-y = -15
|
||||||
|
# shadow-offset-y = -7;
|
||||||
|
|
||||||
|
# Red color value of shadow (0.0 - 1.0, defaults to 0).
|
||||||
|
# shadow-red = 0
|
||||||
|
|
||||||
|
# Green color value of shadow (0.0 - 1.0, defaults to 0).
|
||||||
|
# shadow-green = 0
|
||||||
|
|
||||||
|
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
|
||||||
|
# shadow-blue = 0
|
||||||
|
|
||||||
|
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
|
||||||
|
# shadow-color = "#000000"
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should have no shadow.
|
||||||
|
#
|
||||||
|
# examples:
|
||||||
|
# shadow-exclude = "n:e:Notification";
|
||||||
|
#
|
||||||
|
# shadow-exclude = []
|
||||||
|
shadow-exclude = [
|
||||||
|
"name = 'Notification'",
|
||||||
|
"class_g = 'Conky'",
|
||||||
|
"class_g ?= 'Notify-osd'",
|
||||||
|
"class_g = 'Cairo-clock'",
|
||||||
|
"_GTK_FRAME_EXTENTS@:c"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
|
||||||
|
# clip-shadow-above = []
|
||||||
|
|
||||||
|
# Specify a X geometry that describes the region in which shadow should not
|
||||||
|
# be painted in, such as a dock window region. Use
|
||||||
|
# shadow-exclude-reg = "x10+0+0"
|
||||||
|
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
|
||||||
|
#
|
||||||
|
# shadow-exclude-reg = ""
|
||||||
|
|
||||||
|
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
|
||||||
|
# xinerama-shadow-crop = false
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Fading #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Fade windows in/out when opening/closing and when opacity changes,
|
||||||
|
# unless no-fading-openclose is used.
|
||||||
|
# fading = false
|
||||||
|
fading = true;
|
||||||
|
|
||||||
|
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
|
||||||
|
# fade-in-step = 0.028
|
||||||
|
fade-in-step = 0.03;
|
||||||
|
|
||||||
|
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
|
||||||
|
# fade-out-step = 0.03
|
||||||
|
fade-out-step = 0.03;
|
||||||
|
|
||||||
|
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
|
||||||
|
# fade-delta = 10
|
||||||
|
fade-delta = 5
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should not be faded.
|
||||||
|
# fade-exclude = []
|
||||||
|
|
||||||
|
# Do not fade on window open/close.
|
||||||
|
# no-fading-openclose = false
|
||||||
|
|
||||||
|
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
|
||||||
|
# no-fading-destroyed-argb = false
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Transparency / Opacity #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||||
|
# inactive-opacity = 1
|
||||||
|
inactive-opacity = 0.5;
|
||||||
|
|
||||||
|
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||||
|
# frame-opacity = 1.0
|
||||||
|
# frame-opacity = 0.9;
|
||||||
|
|
||||||
|
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
|
||||||
|
# inactive-opacity-override = true
|
||||||
|
inactive-opacity-override = true;
|
||||||
|
|
||||||
|
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
|
||||||
|
# active-opacity = 1.0
|
||||||
|
|
||||||
|
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
|
||||||
|
# inactive-dim = 0.0
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should never be considered focused.
|
||||||
|
# focus-exclude = []
|
||||||
|
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||||
|
|
||||||
|
# Use fixed inactive dim value, instead of adjusting according to window opacity.
|
||||||
|
# inactive-dim-fixed = 1.0
|
||||||
|
|
||||||
|
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
|
||||||
|
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
|
||||||
|
# Note we don't make any guarantee about possible conflicts with other
|
||||||
|
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
|
||||||
|
# example:
|
||||||
|
# opacity-rule = [ "80:class_g = 'URxvt'" ];
|
||||||
|
#
|
||||||
|
# opacity-rule = []
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Corners #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Sets the radius of rounded window corners. When > 0, the compositor will
|
||||||
|
# round the corners of windows. Does not interact well with
|
||||||
|
# `transparent-clipping`.
|
||||||
|
# corner-radius = 13
|
||||||
|
|
||||||
|
# Exclude conditions for rounded corners.
|
||||||
|
rounded-corners-exclude = [
|
||||||
|
"window_type = 'dock'",
|
||||||
|
"window_type = 'desktop'"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Background-Blurring #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Parameters for background blurring, see the *BLUR* section for more information.
|
||||||
|
blur-method = "dual_kawase"
|
||||||
|
blur-size = 12
|
||||||
|
#
|
||||||
|
# blur-deviation = false
|
||||||
|
#
|
||||||
|
blur-strength = 5
|
||||||
|
|
||||||
|
# Blur background of semi-transparent / ARGB windows.
|
||||||
|
# Bad in performance, with driver-dependent behavior.
|
||||||
|
# The name of the switch may change without prior notifications.
|
||||||
|
#
|
||||||
|
blur-background = false
|
||||||
|
|
||||||
|
# Blur background of windows when the window frame is not opaque.
|
||||||
|
# Implies:
|
||||||
|
# blur-background
|
||||||
|
# Bad in performance, with driver-dependent behavior. The name may change.
|
||||||
|
#
|
||||||
|
# blur-background-frame = false
|
||||||
|
|
||||||
|
|
||||||
|
# Use fixed blur strength rather than adjusting according to window opacity.
|
||||||
|
# blur-background-fixed = false
|
||||||
|
|
||||||
|
|
||||||
|
# Specify the blur convolution kernel, with the following format:
|
||||||
|
# example:
|
||||||
|
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||||
|
#
|
||||||
|
# blur-kern = ""
|
||||||
|
blur-kern = "3x3box";
|
||||||
|
|
||||||
|
|
||||||
|
# Exclude conditions for background blur.
|
||||||
|
# blur-background-exclude = []
|
||||||
|
blur-background-exclude = [
|
||||||
|
"window_type = 'dock'",
|
||||||
|
"window_type = 'desktop'",
|
||||||
|
"_GTK_FRAME_EXTENTS@:c"
|
||||||
|
];
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# General Settings #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||||
|
# daemon = false
|
||||||
|
|
||||||
|
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
|
||||||
|
# `xrender` is the default one.
|
||||||
|
#
|
||||||
|
backend = "glx"
|
||||||
|
# backend = "xrender";
|
||||||
|
|
||||||
|
# Enable/disable VSync.
|
||||||
|
# vsync = false
|
||||||
|
vsync = false;
|
||||||
|
|
||||||
|
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||||
|
# dbus = false
|
||||||
|
|
||||||
|
# Try to detect WM windows (a non-override-redirect window with no
|
||||||
|
# child that has 'WM_STATE') and mark them as active.
|
||||||
|
#
|
||||||
|
# mark-wmwin-focused = false
|
||||||
|
mark-wmwin-focused = true;
|
||||||
|
|
||||||
|
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
|
||||||
|
# mark-ovredir-focused = false
|
||||||
|
mark-ovredir-focused = true;
|
||||||
|
|
||||||
|
# Try to detect windows with rounded corners and don't consider them
|
||||||
|
# shaped windows. The accuracy is not very high, unfortunately.
|
||||||
|
#
|
||||||
|
# detect-rounded-corners = false
|
||||||
|
detect-rounded-corners = true;
|
||||||
|
|
||||||
|
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
|
||||||
|
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
|
||||||
|
#
|
||||||
|
# detect-client-opacity = false
|
||||||
|
detect-client-opacity = true;
|
||||||
|
|
||||||
|
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
|
||||||
|
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
|
||||||
|
# provided that the WM supports it.
|
||||||
|
#
|
||||||
|
# use-ewmh-active-win = false
|
||||||
|
|
||||||
|
# Unredirect all windows if a full-screen opaque window is detected,
|
||||||
|
# to maximize performance for full-screen windows. Known to cause flickering
|
||||||
|
# when redirecting/unredirecting windows.
|
||||||
|
#
|
||||||
|
# unredir-if-possible = false
|
||||||
|
|
||||||
|
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
|
||||||
|
# unredir-if-possible-delay = 0
|
||||||
|
|
||||||
|
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
|
||||||
|
# unredir-if-possible-exclude = []
|
||||||
|
|
||||||
|
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
|
||||||
|
# in the same group focused at the same time.
|
||||||
|
#
|
||||||
|
# detect-transient = false
|
||||||
|
detect-transient = true;
|
||||||
|
|
||||||
|
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
|
||||||
|
# group focused at the same time. This usually means windows from the same application
|
||||||
|
# will be considered focused or unfocused at the same time.
|
||||||
|
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
|
||||||
|
#
|
||||||
|
# detect-client-leader = false
|
||||||
|
|
||||||
|
# Resize damaged region by a specific number of pixels.
|
||||||
|
# A positive value enlarges it while a negative one shrinks it.
|
||||||
|
# If the value is positive, those additional pixels will not be actually painted
|
||||||
|
# to screen, only used in blur calculation, and such. (Due to technical limitations,
|
||||||
|
# with use-damage, those pixels will still be incorrectly painted to screen.)
|
||||||
|
# Primarily used to fix the line corruption issues of blur,
|
||||||
|
# in which case you should use the blur radius value here
|
||||||
|
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
|
||||||
|
# with a 5x5 one you use `--resize-damage 2`, and so on).
|
||||||
|
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
|
||||||
|
#
|
||||||
|
# resize-damage = 1
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should be painted with inverted color.
|
||||||
|
# Resource-hogging, and is not well tested.
|
||||||
|
#
|
||||||
|
# invert-color-include = []
|
||||||
|
|
||||||
|
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
|
||||||
|
# Might cause incorrect opacity when rendering transparent content (but never
|
||||||
|
# practically happened) and may not work with blur-background.
|
||||||
|
# My tests show a 15% performance boost. Recommended.
|
||||||
|
#
|
||||||
|
glx-no-stencil = true;
|
||||||
|
|
||||||
|
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||||
|
# Probably could improve performance on rapid window content changes,
|
||||||
|
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||||
|
# Recommended if it works.
|
||||||
|
#
|
||||||
|
# glx-no-rebind-pixmap = false
|
||||||
|
|
||||||
|
# Disable the use of damage information.
|
||||||
|
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||||
|
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
|
||||||
|
# The opposing option is use-damage
|
||||||
|
#
|
||||||
|
# no-use-damage = false
|
||||||
|
use-damage = true;
|
||||||
|
|
||||||
|
# Use X Sync fence to sync clients' draw calls, to make sure all draw
|
||||||
|
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||||
|
# with GLX backend for some users.
|
||||||
|
#
|
||||||
|
# xrender-sync-fence = false
|
||||||
|
|
||||||
|
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
||||||
|
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
||||||
|
# in the source tree for examples.
|
||||||
|
#
|
||||||
|
# glx-fshader-win = ""
|
||||||
|
|
||||||
|
# Force all windows to be painted with blending. Useful if you
|
||||||
|
# have a glx-fshader-win that could turn opaque pixels transparent.
|
||||||
|
#
|
||||||
|
# force-win-blend = false
|
||||||
|
|
||||||
|
# Do not use EWMH to detect fullscreen windows.
|
||||||
|
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||||
|
#
|
||||||
|
# no-ewmh-fullscreen = false
|
||||||
|
|
||||||
|
# Dimming bright windows so their brightness doesn't exceed this set value.
|
||||||
|
# Brightness of a window is estimated by averaging all pixels in the window,
|
||||||
|
# so this could comes with a performance hit.
|
||||||
|
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
|
||||||
|
#
|
||||||
|
# max-brightness = 1.0
|
||||||
|
|
||||||
|
# Make transparent windows clip other windows like non-transparent windows do,
|
||||||
|
# instead of blending on top of them.
|
||||||
|
#
|
||||||
|
# transparent-clipping = false
|
||||||
|
|
||||||
|
# Set the log level. Possible values are:
|
||||||
|
# "trace", "debug", "info", "warn", "error"
|
||||||
|
# in increasing level of importance. Case doesn't matter.
|
||||||
|
# If using the "TRACE" log level, it's better to log into a file
|
||||||
|
# using *--log-file*, since it can generate a huge stream of logs.
|
||||||
|
#
|
||||||
|
# log-level = "debug"
|
||||||
|
log-level = "warn";
|
||||||
|
|
||||||
|
# Set the log file.
|
||||||
|
# If *--log-file* is never specified, logs will be written to stderr.
|
||||||
|
# Otherwise, logs will to written to the given file, though some of the early
|
||||||
|
# logs might still be written to the stderr.
|
||||||
|
# When setting this option from the config file, it is recommended to use an absolute path.
|
||||||
|
#
|
||||||
|
# log-file = "/path/to/your/log/file"
|
||||||
|
|
||||||
|
# Show all X errors (for debugging)
|
||||||
|
# show-all-xerrors = false
|
||||||
|
|
||||||
|
# Write process ID to a file.
|
||||||
|
# write-pid-path = "/path/to/your/log/file"
|
||||||
|
|
||||||
|
# Window type settings
|
||||||
|
#
|
||||||
|
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
|
||||||
|
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
|
||||||
|
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
|
||||||
|
# "tooltip", "notification", "combo", and "dnd".
|
||||||
|
#
|
||||||
|
# Following per window-type options are available: ::
|
||||||
|
#
|
||||||
|
# fade, shadow:::
|
||||||
|
# Controls window-type-specific shadow and fade settings.
|
||||||
|
#
|
||||||
|
# opacity:::
|
||||||
|
# Controls default opacity of the window type.
|
||||||
|
#
|
||||||
|
# focus:::
|
||||||
|
# Controls whether the window of this type is to be always considered focused.
|
||||||
|
# (By default, all window types except "normal" and "dialog" has this on.)
|
||||||
|
#
|
||||||
|
# full-shadow:::
|
||||||
|
# Controls whether shadow is drawn under the parts of the window that you
|
||||||
|
# normally won't be able to see. Useful when the window has parts of it
|
||||||
|
# transparent, and you want shadows in those areas.
|
||||||
|
#
|
||||||
|
# clip-shadow-above:::
|
||||||
|
# Controls wether shadows that would have been drawn above the window should
|
||||||
|
# be clipped. Useful for dock windows that should have no shadow painted on top.
|
||||||
|
#
|
||||||
|
# redir-ignore:::
|
||||||
|
# Controls whether this type of windows should cause screen to become
|
||||||
|
# redirected again after been unredirected. If you have unredir-if-possible
|
||||||
|
# set, and doesn't want certain window to cause unnecessary screen redirection,
|
||||||
|
# you can set this to `true`.
|
||||||
|
#
|
||||||
|
wintypes:
|
||||||
|
{
|
||||||
|
tooltip = { fade = true; shadow = true; opacity = 0.90; focus = true; full-shadow = false; };
|
||||||
|
dock = { shadow = false; clip-shadow-above = true; }
|
||||||
|
dnd = { shadow = false; }
|
||||||
|
popup_menu = { opacity = 1.0; shadow=false }
|
||||||
|
dropdown_menu = { opacity = 1.0; shadow=false }
|
||||||
|
};
|
19
.config/qtile/config.py
Normal file
19
.config/qtile/config.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
from modules.groups import groups
|
||||||
|
from modules.keys import keys, mod
|
||||||
|
from modules.layouts import floating_layout, layouts
|
||||||
|
from modules.mouse import mouse
|
||||||
|
from modules.hooks import *
|
||||||
|
from modules.screens import screens
|
||||||
|
|
||||||
|
dgroups_key_binder = None
|
||||||
|
dgroups_app_rules = [] # type: List
|
||||||
|
main = None # WARNING: this is deprecated and will be removed soon
|
||||||
|
follow_mouse_focus = True
|
||||||
|
bring_front_click = False
|
||||||
|
cursor_warp = False
|
||||||
|
auto_fullscreen = True
|
||||||
|
focus_on_window_activation = "urgent"
|
||||||
|
wmname = "LG3D"
|
||||||
|
widget_defaults = dict(
|
||||||
|
font="Cascadia Code", fontsize=16, padding=12, foreground="CEC8C6"
|
||||||
|
)
|
52
.config/qtile/modules/groups.py
Normal file
52
.config/qtile/modules/groups.py
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
from libqtile.config import Group, Key, Match, ScratchPad, DropDown
|
||||||
|
from libqtile.lazy import lazy
|
||||||
|
|
||||||
|
from .keys import keys, mod
|
||||||
|
|
||||||
|
groups = [Group(i) for i in "1234567890"]
|
||||||
|
|
||||||
|
browsers = [Match(wm_class=["firefox", "Google-chrome"])]
|
||||||
|
file_managers = [Match(wm_class="Thunar")]
|
||||||
|
video_players = [Match(wm_class=["streamlink-twitch-gui", "mpv"])]
|
||||||
|
groups = [
|
||||||
|
Group("1"),
|
||||||
|
Group("2", matches=[Match(wm_class="VirtualBox Manager")]),
|
||||||
|
Group("3", matches=[Match(wm_class="Thunderbird")]),
|
||||||
|
Group("4", matches=[Match(wm_class="st-256color")]),
|
||||||
|
Group("5", matches=file_managers),
|
||||||
|
Group("6", matches=[Match(wm_class="ModernDeck")]),
|
||||||
|
Group("7", matches=browsers),
|
||||||
|
Group("8", matches=video_players),
|
||||||
|
Group("9"),
|
||||||
|
Group("0", matches=[Match(wm_class="TelegramDesktop")]),
|
||||||
|
]
|
||||||
|
groups.append(
|
||||||
|
ScratchPad(
|
||||||
|
"scratchpad",
|
||||||
|
[
|
||||||
|
# define a drop down terminal.
|
||||||
|
# it is placed in the upper third of screen by default.
|
||||||
|
DropDown("term", "st", opacity=1.0)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
symbols = "arstgmneio"
|
||||||
|
|
||||||
|
for i, j in zip(groups, symbols):
|
||||||
|
keys.extend(
|
||||||
|
[
|
||||||
|
Key(
|
||||||
|
[mod],
|
||||||
|
j,
|
||||||
|
lazy.group[i.name].toscreen(),
|
||||||
|
desc="Switch to group {}".format(i.name),
|
||||||
|
),
|
||||||
|
Key(
|
||||||
|
[mod, "shift"],
|
||||||
|
j,
|
||||||
|
lazy.window.togroup(i.name, switch_group=True),
|
||||||
|
desc="Switch to & move focused window to group {}".format(i.name),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
35
.config/qtile/modules/hooks.py
Normal file
35
.config/qtile/modules/hooks.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
|
from libqtile import hook
|
||||||
|
|
||||||
|
|
||||||
|
@hook.subscribe.startup
|
||||||
|
def autostart():
|
||||||
|
subprocess.call(["autostart.sh"])
|
||||||
|
|
||||||
|
|
||||||
|
@hook.subscribe.client_managed
|
||||||
|
def show_window(window):
|
||||||
|
window.group.cmd_toscreen()
|
||||||
|
|
||||||
|
|
||||||
|
@hook.subscribe.client_killed
|
||||||
|
def toggle_previous_group_if_last_window_killed(window):
|
||||||
|
group = window.group
|
||||||
|
if len(group.info()['windows']) == 1:
|
||||||
|
group.screen.toggle_group()
|
||||||
|
|
||||||
|
|
||||||
|
@hook.subscribe.client_managed
|
||||||
|
@hook.subscribe.client_urgent_hint_changed
|
||||||
|
@hook.subscribe.client_killed
|
||||||
|
@hook.subscribe.setgroup
|
||||||
|
@hook.subscribe.group_window_add
|
||||||
|
@hook.subscribe.current_screen_change
|
||||||
|
@hook.subscribe.changegroup
|
||||||
|
def hook_response(*args, **kwargs):
|
||||||
|
file = os.path.expanduser('~/.cache/workspaces')
|
||||||
|
with open(file, 'a') as f:
|
||||||
|
print('workspace changed', file=f)
|
||||||
|
|
168
.config/qtile/modules/keys.py
Normal file
168
.config/qtile/modules/keys.py
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from libqtile.config import Key, KeyChord
|
||||||
|
from libqtile.lazy import lazy
|
||||||
|
|
||||||
|
mod = "mod4"
|
||||||
|
terminal = "st"
|
||||||
|
# terminal = "xfce4-terminal"
|
||||||
|
home = os.path.expanduser
|
||||||
|
|
||||||
|
|
||||||
|
@lazy.function
|
||||||
|
def explore(qtile):
|
||||||
|
""" open the app attached to current workspace"""
|
||||||
|
|
||||||
|
preffered_apps = {
|
||||||
|
"1": "default",
|
||||||
|
"2": "virtualbox",
|
||||||
|
"3": "thunderbird",
|
||||||
|
"4": "st",
|
||||||
|
"5": "thunar",
|
||||||
|
"6": "ModernDeck",
|
||||||
|
"7": "firefox",
|
||||||
|
"8": "streamlink-twitch-gui",
|
||||||
|
"9": "default",
|
||||||
|
"0": "telegram-desktop",
|
||||||
|
}
|
||||||
|
group = qtile.current_group.info()['name']
|
||||||
|
command = preffered_apps[group]
|
||||||
|
if command == "default":
|
||||||
|
command = "rofi -show drun"
|
||||||
|
|
||||||
|
qtile.cmd_spawn(f'notify-send -t 1000 "Launching {command}"')
|
||||||
|
qtile.cmd_spawn(command)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
keys = [
|
||||||
|
# '`': 'grave',
|
||||||
|
# '-': 'minus',
|
||||||
|
# '=': 'equal',
|
||||||
|
# '[': 'bracketleft',
|
||||||
|
# ']': 'bracketright',
|
||||||
|
# '\\': 'backslash',
|
||||||
|
# ';': 'semicolon',
|
||||||
|
# '\'': 'quote',
|
||||||
|
# ',': 'comma',
|
||||||
|
# '.': 'dot',
|
||||||
|
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
|
||||||
|
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
|
||||||
|
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
||||||
|
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
|
||||||
|
Key([mod], "u", explore, desc="Open app related with current group"),
|
||||||
|
Key(
|
||||||
|
[mod],
|
||||||
|
"Tab",
|
||||||
|
lazy.screen.toggle_group(),
|
||||||
|
desc="Toggle back and forth between latest groups",
|
||||||
|
),
|
||||||
|
Key([mod], "d", lazy.spawn("rofi -show combi"), desc="spawn rofi"),
|
||||||
|
# Move windows between left/right columns or move up/down in current
|
||||||
|
# stack. Moving out of range in Columns layout will create new column.
|
||||||
|
Key(
|
||||||
|
[mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"
|
||||||
|
),
|
||||||
|
Key(
|
||||||
|
[mod, "shift"],
|
||||||
|
"l",
|
||||||
|
lazy.layout.shuffle_right(),
|
||||||
|
desc="Move window to the right",
|
||||||
|
),
|
||||||
|
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
|
||||||
|
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
|
||||||
|
# Grow windows. If current window is on the edge of screen and direction
|
||||||
|
# will be to screen edge - window would shrink.
|
||||||
|
Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
|
||||||
|
Key(
|
||||||
|
[mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"
|
||||||
|
),
|
||||||
|
Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
|
||||||
|
Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
|
||||||
|
# KeyChord([mod], "w", [
|
||||||
|
# Key([mod], "g", lazy.layout.grow()),
|
||||||
|
# Key([mod], "s", lazy.layout.shrink()),
|
||||||
|
# Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
|
||||||
|
# Key([mod], "m", lazy.layout.maximize())],
|
||||||
|
# mode="Windows"
|
||||||
|
# ),
|
||||||
|
Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"),
|
||||||
|
Key([mod, "shift"], "f", lazy.window.toggle_floating(), desc="Toggle floating"),
|
||||||
|
# Toggle between split and unsplit sides of stack.
|
||||||
|
# Split = all windows displayed
|
||||||
|
# Unsplit = 1 window displayed, like Max layout, but still with
|
||||||
|
# multiple stack panes
|
||||||
|
Key(
|
||||||
|
[mod, "shift"],
|
||||||
|
"Return",
|
||||||
|
lazy.layout.toggle_split(),
|
||||||
|
desc="Toggle between split and unsplit sides of stack",
|
||||||
|
),
|
||||||
|
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||||
|
# Toggle between different layouts as defined below
|
||||||
|
Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"),
|
||||||
|
Key([mod, "shift"], "space", lazy.spawn("chlayout"), desc="Next keyboard layout."),
|
||||||
|
Key([mod], "comma", lazy.screen.prev_group(), desc="Move to the group on the left"),
|
||||||
|
Key(
|
||||||
|
[mod], "period", lazy.screen.next_group(), desc="Move to the group on the right"
|
||||||
|
),
|
||||||
|
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
|
||||||
|
Key([mod, "shift", "control"], "h", lazy.layout.swap_column_left()),
|
||||||
|
Key([mod, "shift", "control"], "l", lazy.layout.swap_column_right()),
|
||||||
|
# Key([mod, "shift"], "space", lazy.layout.flip()),
|
||||||
|
Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"),
|
||||||
|
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
|
||||||
|
Key([mod, "control"], "n", lazy.spawn("lock-screen"), desc="Lock screen"),
|
||||||
|
Key(
|
||||||
|
[mod, "control"],
|
||||||
|
"s",
|
||||||
|
lazy.spawn("toggle-screenkey"),
|
||||||
|
desc="Show keys on screen",
|
||||||
|
),
|
||||||
|
Key(
|
||||||
|
[mod, "shift"],
|
||||||
|
"d",
|
||||||
|
lazy.spawncmd(),
|
||||||
|
desc="Spawn a command using a prompt widget",
|
||||||
|
),
|
||||||
|
Key([mod], "p", lazy.spawn("passmenu"), desc="Spawn passmenu"),
|
||||||
|
# Key([mod, "shift"], "e", lazy.spawn("menu_powermenu"), desc="Spawn powermenu using rofi"),
|
||||||
|
# Key([mod], "n", lazy.spawn(home("~/Desktop/GitRepositories/networkmanager-dmenu/networkmanager_dmenu")), desc="Launch network manager"),
|
||||||
|
# Key([mod], "i", lazy.spawn("sxiv " + home("~/Pictures/keyboard-layout.jpg")), desc="Show current keyboard layout"),
|
||||||
|
Key([mod], "b", lazy.spawn("rofi-bluetooth"), desc="Manage bluetooth devices"),
|
||||||
|
Key(
|
||||||
|
[mod],
|
||||||
|
"v",
|
||||||
|
lazy.spawn("rofi-wireguard --toggle"),
|
||||||
|
desc="Manage VPN connections",
|
||||||
|
),
|
||||||
|
# Key([mod], "x", lazy.spawn(home("~/scripts/kill-process.sh")),
|
||||||
|
# desc="Kill processes using rofi"),
|
||||||
|
# == audio
|
||||||
|
Key(
|
||||||
|
[],
|
||||||
|
"XF86AudioRaiseVolume",
|
||||||
|
lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%"),
|
||||||
|
),
|
||||||
|
Key(
|
||||||
|
[],
|
||||||
|
"XF86AudioLowerVolume",
|
||||||
|
lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%"),
|
||||||
|
),
|
||||||
|
Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
|
||||||
|
Key(
|
||||||
|
[],
|
||||||
|
"XF86AudioMicMute",
|
||||||
|
lazy.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle"),
|
||||||
|
),
|
||||||
|
# == backlight
|
||||||
|
Key([], "XF86MonBrightnessUp", lazy.spawn("light -A 5")),
|
||||||
|
Key([], "XF86MonBrightnessDown", lazy.spawn("light -U 5")),
|
||||||
|
Key([], "Print", lazy.spawn("flameshot gui")),
|
||||||
|
Key(["shift"], "Print", lazy.spawn("flameshot full")),
|
||||||
|
Key(["control"], "Print", lazy.spawn("flameshot full")),
|
||||||
|
Key([], "F12", lazy.group["scratchpad"].dropdown_toggle("term")),
|
||||||
|
Key([], "XF86KbdBrightnessUp", lazy.spawn("keyboard_backlight.sh inc")),
|
||||||
|
Key([], "XF86KbdBrightnessDown", lazy.spawn("keyboard_backlight.sh dec")),
|
||||||
|
Key([], "XF86TouchpadToggle", lazy.spawn("toggle-touchpad.sh")),
|
||||||
|
]
|
42
.config/qtile/modules/layouts.py
Normal file
42
.config/qtile/modules/layouts.py
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
from libqtile import layout
|
||||||
|
from libqtile.config import Match
|
||||||
|
|
||||||
|
# default = {
|
||||||
|
# "border_width": 2,
|
||||||
|
# "margin": 8,
|
||||||
|
# "border_focus": "#5294e2",
|
||||||
|
# "border_normal": "#2c5380"}
|
||||||
|
layouts = [
|
||||||
|
# layout.MonadTall(margin=8, border_focus='#5294e2',
|
||||||
|
# border_normal='#2c5380'),
|
||||||
|
layout.Columns(margin=8, border_focus_stack="#d75f5f"),
|
||||||
|
layout.Max(),
|
||||||
|
# Try more layouts by unleashing below layouts.
|
||||||
|
# layout.Stack(num_stacks=2),
|
||||||
|
# layout.Bsp(),
|
||||||
|
# layout.Matrix(),
|
||||||
|
# layout.MonadTall(),
|
||||||
|
# layout.MonadWide(),
|
||||||
|
# layout.RatioTile(),
|
||||||
|
# layout.Tile(),
|
||||||
|
# layout.TreeTab(),
|
||||||
|
# layout.VerticalTile(),
|
||||||
|
# layout.Zoomy(),
|
||||||
|
]
|
||||||
|
|
||||||
|
floating_layout = layout.Floating(
|
||||||
|
float_rules=[
|
||||||
|
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||||
|
*layout.Floating.default_float_rules,
|
||||||
|
Match(wm_class="confirmreset"), # gitk
|
||||||
|
Match(wm_class="makebranch"), # gitk
|
||||||
|
Match(wm_class="maketag"), # gitk
|
||||||
|
Match(wm_class="ssh-askpass"), # ssh-askpass
|
||||||
|
Match(wm_class="sxiv"),
|
||||||
|
Match(wm_class="telegram-desktop"),
|
||||||
|
Match(wm_class="streamlink-twitch-gui"),
|
||||||
|
Match(wm_class="pinentry-gtk-2"),
|
||||||
|
Match(title="branchdialog"), # gitk
|
||||||
|
Match(title="pinentry"), # GPG key password entry
|
||||||
|
]
|
||||||
|
)
|
17
.config/qtile/modules/mouse.py
Normal file
17
.config/qtile/modules/mouse.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
from libqtile.config import Click, Drag
|
||||||
|
from libqtile.lazy import lazy
|
||||||
|
from .keys import mod
|
||||||
|
|
||||||
|
# Drag floating layouts.
|
||||||
|
mouse = [
|
||||||
|
Drag(
|
||||||
|
[mod],
|
||||||
|
"Button1",
|
||||||
|
lazy.window.set_position_floating(),
|
||||||
|
start=lazy.window.get_position(),
|
||||||
|
),
|
||||||
|
Drag(
|
||||||
|
[mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()
|
||||||
|
),
|
||||||
|
Click([mod], "Button2", lazy.window.bring_to_front()),
|
||||||
|
]
|
3
.config/qtile/modules/screens.py
Normal file
3
.config/qtile/modules/screens.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from libqtile.config import Screen
|
||||||
|
|
||||||
|
screens = [Screen()]
|
308
.config/qtile/scripts/Default.sh
Executable file
308
.config/qtile/scripts/Default.sh
Executable file
@ -0,0 +1,308 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Copyright (C) 2020-2021 Aditya Shakya <adi1090x@gmail.com>
|
||||||
|
## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3
|
||||||
|
|
||||||
|
## Dirs #############################################
|
||||||
|
qtile_path="$HOME/.config/qtile"
|
||||||
|
polybar_path="$HOME/.config/qtile/polybar"
|
||||||
|
rofi_path="$HOME/.config/qtile/rofi"
|
||||||
|
terminal_path="$HOME/.config/alacritty"
|
||||||
|
xfce_term_path="$HOME/.config/xfce4/terminal"
|
||||||
|
geany_path="$HOME/.config/geany"
|
||||||
|
dunst_path="$HOME/.config/dunst"
|
||||||
|
|
||||||
|
# wallpaper ---------------------------------
|
||||||
|
set_wallpaper() {
|
||||||
|
nitrogen --save --set-zoom-fill /usr/share/backgrounds/"$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# polybar -----------------------------------
|
||||||
|
change_polybar() {
|
||||||
|
sed -i -e "s/STYLE=.*/STYLE=\"$1\"/g" ${polybar_path}/launch.sh
|
||||||
|
sed -i -e "s/font-0 = .*/font-0 = \"$2\"/g" ${polybar_path}/"$1"/config.ini
|
||||||
|
}
|
||||||
|
|
||||||
|
# rofi --------------------------------------
|
||||||
|
change_rofi() {
|
||||||
|
sed -i -e "s/STYLE=.*/STYLE=\"$1\"/g" ${rofi_path}/bin/music ${rofi_path}/bin/network ${rofi_path}/bin/screenshot ${rofi_path}/bin/runner
|
||||||
|
sed -i -e "s/DIR=.*/DIR=\"$1\"/g" ${rofi_path}/bin/launcher ${rofi_path}/bin/powermenu
|
||||||
|
sed -i -e 's/STYLE=.*/STYLE="launcher"/g' ${rofi_path}/bin/launcher
|
||||||
|
sed -i -e 's/STYLE=.*/STYLE="powermenu"/g' ${rofi_path}/bin/powermenu
|
||||||
|
sed -i -e "s/font:.*/font: \"$2\";/g" ${rofi_path}/"$1"/font.rasi
|
||||||
|
|
||||||
|
sed -i -e "s/font:.*/font: \"$2\";/g" ${rofi_path}/dialogs/askpass.rasi ${rofi_path}/dialogs/confirm.rasi
|
||||||
|
sed -i -e "s/border:.*/border: $3;/g" ${rofi_path}/dialogs/askpass.rasi ${rofi_path}/dialogs/confirm.rasi
|
||||||
|
sed -i -e "s/border-radius:.*/border-radius: $4;/g" ${rofi_path}/dialogs/askpass.rasi ${rofi_path}/dialogs/confirm.rasi
|
||||||
|
|
||||||
|
if [[ -f "$HOME"/.config/rofi/config.rasi ]]; then
|
||||||
|
sed -i -e "s/icon-theme:.*/icon-theme: \"$5\";/g" "$HOME"/.config/rofi/config.rasi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat > ${rofi_path}/dialogs/colors.rasi <<- _EOF_
|
||||||
|
/* Color-Scheme */
|
||||||
|
|
||||||
|
* {
|
||||||
|
BG: #282C33ff;
|
||||||
|
FG: #D8D8D8ff;
|
||||||
|
BDR: #62AEEFff;
|
||||||
|
}
|
||||||
|
_EOF_
|
||||||
|
}
|
||||||
|
|
||||||
|
# network manager ---------------------------
|
||||||
|
change_nm() {
|
||||||
|
sed -i -e "s#dmenu_command = .*#dmenu_command = rofi -dmenu -theme ~/.config/qtile/rofi/$1/networkmenu.rasi#g" "$HOME"/.config/networkmanager-dmenu/config.ini
|
||||||
|
}
|
||||||
|
|
||||||
|
# terminal ----------------------------------
|
||||||
|
change_terminal() {
|
||||||
|
sed -i -e "s/family: .*/family: \"$1\"/g" ${terminal_path}/fonts.yml
|
||||||
|
sed -i -e "s/size: .*/size: $2/g" ${terminal_path}/fonts.yml
|
||||||
|
|
||||||
|
cat > ${terminal_path}/colors.yml <<- _EOF_
|
||||||
|
## Colors configuration
|
||||||
|
colors:
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: '#1E2128'
|
||||||
|
foreground: '#ABB2BF'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '#32363D'
|
||||||
|
red: '#E06B74'
|
||||||
|
green: '#98C379'
|
||||||
|
yellow: '#E5C07A'
|
||||||
|
blue: '#62AEEF'
|
||||||
|
magenta: '#C778DD'
|
||||||
|
cyan: '#55B6C2'
|
||||||
|
white: '#ABB2BF'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '#50545B'
|
||||||
|
red: '#EA757E'
|
||||||
|
green: '#A2CD83'
|
||||||
|
yellow: '#EFCA84'
|
||||||
|
blue: '#6CB8F9'
|
||||||
|
magenta: '#D282E7'
|
||||||
|
cyan: '#5FC0CC'
|
||||||
|
white: '#B5BCC9'
|
||||||
|
_EOF_
|
||||||
|
}
|
||||||
|
|
||||||
|
# xfce terminal -----------------------------
|
||||||
|
change_xfce_terminal() {
|
||||||
|
sed -i -e "s/FontName=.*/FontName=$1/g" ${xfce_term_path}/terminalrc
|
||||||
|
sed -i -e 's/ColorForeground=.*/ColorForeground=#ababb2b2bfbf/g' ${xfce_term_path}/terminalrc
|
||||||
|
sed -i -e 's/ColorBackground=.*/ColorBackground=#1e1e21212828/g' ${xfce_term_path}/terminalrc
|
||||||
|
sed -i -e 's/ColorCursor=.*/ColorCursor=#ababb2b2bfbf/g' ${xfce_term_path}/terminalrc
|
||||||
|
sed -i -e 's/ColorPalette=.*/ColorPalette=#323236363d3d;#e0e06b6b7474;#9898c3c37979;#e5e5c0c07a7a;#6262aeaeefef;#c7c77878dddd;#5555b6b6c2c2;#ababb2b2bfbf;#505054545b5b;#eaea75757e7e;#a2a2cdcd8383;#efefcaca8484;#6c6cb8b8f9f9;#d2d28282e7e7;#5f5fc0c0cccc;#b5b5bcbcc9c9/g' ${xfce_term_path}/terminalrc
|
||||||
|
}
|
||||||
|
|
||||||
|
# geany -------------------------------------
|
||||||
|
change_geany() {
|
||||||
|
sed -i -e "s/color_scheme=.*/color_scheme=$1.conf/g" ${geany_path}/geany.conf
|
||||||
|
sed -i -e "s/editor_font=.*/editor_font=$2/g" ${geany_path}/geany.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
# gtk theme, icons and fonts ----------------
|
||||||
|
change_appearance() {
|
||||||
|
xfconf-query -c xsettings -p /Net/ThemeName -s "$1"
|
||||||
|
xfconf-query -c xsettings -p /Net/IconThemeName -s "$2"
|
||||||
|
xfconf-query -c xsettings -p /Gtk/CursorThemeName -s "$3"
|
||||||
|
xfconf-query -c xsettings -p /Gtk/FontName -s "$4"
|
||||||
|
|
||||||
|
if [[ -f "$HOME"/.icons/default/index.theme ]]; then
|
||||||
|
sed -i -e "s/Inherits=.*/Inherits=$3/g" "$HOME"/.icons/default/index.theme
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# qtile -----------------------------------
|
||||||
|
obconfig () {
|
||||||
|
namespace="http://qtile.org/3.4/rc"
|
||||||
|
config="$qtile_path/rc.xml"
|
||||||
|
theme="$1"
|
||||||
|
layout="$2"
|
||||||
|
font="$3"
|
||||||
|
fontsize="$4"
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:name' -v "$theme" "$config"
|
||||||
|
|
||||||
|
# Title
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:titleLayout' -v "$layout" "$config"
|
||||||
|
|
||||||
|
# Fonts
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveWindow"]/a:name' -v "$font" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "$fontsize" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' -v Bold "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' -v Normal "$config"
|
||||||
|
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveWindow"]/a:name' -v "$font" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "$fontsize" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveWindow"]/a:weight' -v Normal "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveWindow"]/a:slant' -v Normal "$config"
|
||||||
|
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuHeader"]/a:name' -v "$font" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuHeader"]/a:size' -v "$fontsize" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuHeader"]/a:weight' -v Bold "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuHeader"]/a:slant' -v Normal "$config"
|
||||||
|
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuItem"]/a:name' -v "$font" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuItem"]/a:size' -v "$fontsize" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuItem"]/a:weight' -v Normal "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="MenuItem"]/a:slant' -v Normal "$config"
|
||||||
|
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveOnScreenDisplay"]/a:name' -v "$font" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveOnScreenDisplay"]/a:size' -v "$fontsize" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveOnScreenDisplay"]/a:weight' -v Bold "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="ActiveOnScreenDisplay"]/a:slant' -v Normal "$config"
|
||||||
|
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveOnScreenDisplay"]/a:name' -v "$font" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveOnScreenDisplay"]/a:size' -v "$fontsize" "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveOnScreenDisplay"]/a:weight' -v Normal "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:theme/a:font[@place="InactiveOnScreenDisplay"]/a:slant' -v Normal "$config"
|
||||||
|
|
||||||
|
# qtile Menu Style
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:menu/a:file' -v "$5" "$config"
|
||||||
|
|
||||||
|
# Margins
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:margins/a:top' -v 0 "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:margins/a:bottom' -v 10 "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:margins/a:left' -v 10 "$config"
|
||||||
|
xmlstarlet ed -L -N a="$namespace" -u '/a:qtile_config/a:margins/a:right' -v 10 "$config"
|
||||||
|
}
|
||||||
|
|
||||||
|
# dunst -------------------------------------
|
||||||
|
change_dunst() {
|
||||||
|
sed -i -e "s/geometry = .*/geometry = \"$1\"/g" ${dunst_path}/dunstrc
|
||||||
|
sed -i -e "s/font = .*/font = $2/g" ${dunst_path}/dunstrc
|
||||||
|
sed -i -e "s/frame_width = .*/frame_width = $3/g" ${dunst_path}/dunstrc
|
||||||
|
|
||||||
|
sed -i '/urgency_low/Q' ${dunst_path}/dunstrc
|
||||||
|
cat >> ${dunst_path}/dunstrc <<- _EOF_
|
||||||
|
[urgency_low]
|
||||||
|
timeout = 2
|
||||||
|
background = "#282C33"
|
||||||
|
foreground = "#D8D8D8"
|
||||||
|
frame_color = "#30343B"
|
||||||
|
|
||||||
|
[urgency_normal]
|
||||||
|
timeout = 5
|
||||||
|
background = "#282C33"
|
||||||
|
foreground = "#D8D8D8"
|
||||||
|
frame_color = "#30343B"
|
||||||
|
|
||||||
|
[urgency_critical]
|
||||||
|
timeout = 0
|
||||||
|
background = "#282C33"
|
||||||
|
foreground = "#E06B74"
|
||||||
|
frame_color = "#30343B"
|
||||||
|
_EOF_
|
||||||
|
|
||||||
|
pkill dunst && dunst &
|
||||||
|
}
|
||||||
|
|
||||||
|
# Plank -------------------------------------
|
||||||
|
change_dock() {
|
||||||
|
cat > "$HOME"/.cache/plank.conf <<- _EOF_
|
||||||
|
[dock1]
|
||||||
|
alignment='center'
|
||||||
|
auto-pinning=true
|
||||||
|
current-workspace-only=false
|
||||||
|
dock-items=['xfce-settings-manager.dockitem', 'Alacritty.dockitem', 'thunar.dockitem', 'firefox.dockitem', 'geany.dockitem']
|
||||||
|
hide-delay=0
|
||||||
|
hide-mode='intelligent'
|
||||||
|
icon-size=32
|
||||||
|
items-alignment='center'
|
||||||
|
lock-items=false
|
||||||
|
monitor=''
|
||||||
|
offset=0
|
||||||
|
pinned-only=false
|
||||||
|
position='bottom'
|
||||||
|
pressure-reveal=false
|
||||||
|
show-dock-item=false
|
||||||
|
theme='Transparent'
|
||||||
|
tooltips-enabled=true
|
||||||
|
unhide-delay=0
|
||||||
|
zoom-enabled=true
|
||||||
|
zoom-percent=120
|
||||||
|
_EOF_
|
||||||
|
}
|
||||||
|
|
||||||
|
# compositor --------------------------------
|
||||||
|
compositor() {
|
||||||
|
comp_file="$HOME/.config/picom.conf"
|
||||||
|
|
||||||
|
backend="$1"
|
||||||
|
cradius="$2"
|
||||||
|
shadow_r="$(echo $3 | cut -d' ' -f1)"
|
||||||
|
shadow_o="$(echo $3 | cut -d' ' -f2)"
|
||||||
|
shadow_x="$(echo $3 | cut -d' ' -f3)"
|
||||||
|
shadow_y="$(echo $3 | cut -d' ' -f4)"
|
||||||
|
method="$(echo $4 | cut -d' ' -f1)"
|
||||||
|
strength="$(echo $4 | cut -d' ' -f2)"
|
||||||
|
|
||||||
|
# Rounded Corners
|
||||||
|
sed -i -e "s/backend = .*/backend = \"$backend\";/g" ${comp_file}
|
||||||
|
sed -i -e "s/corner-radius = .*/corner-radius = $cradius;/g" ${comp_file}
|
||||||
|
|
||||||
|
# Shadows
|
||||||
|
sed -i -e "s/shadow-radius = .*/shadow-radius = $shadow_r;/g" ${comp_file}
|
||||||
|
sed -i -e "s/shadow-opacity = .*/shadow-opacity = $shadow_o;/g" ${comp_file}
|
||||||
|
sed -i -e "s/shadow-offset-x = .*/shadow-offset-x = $shadow_x;/g" ${comp_file}
|
||||||
|
sed -i -e "s/shadow-offset-y = .*/shadow-offset-y = $shadow_y;/g" ${comp_file}
|
||||||
|
|
||||||
|
# Blur
|
||||||
|
sed -i -e "s/backend = .*/backend = \"$backend\";/g" ${comp_file}
|
||||||
|
sed -i -e "s/method = .*/method = \"$method\";/g" ${comp_file}
|
||||||
|
sed -i -e "s/strength = .*/strength = $strength;/g" ${comp_file}
|
||||||
|
}
|
||||||
|
|
||||||
|
# notify ------------------------------------
|
||||||
|
notify_user() {
|
||||||
|
local style=`basename $0`
|
||||||
|
dunstify -u normal --replace=699 -i /usr/share/archcraft/icons/dunst/themes.png "Applying Style : ${style%.*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
## Execute Script ---------------------------
|
||||||
|
notify_user
|
||||||
|
|
||||||
|
# funct WALLPAPER
|
||||||
|
set_wallpaper 'default.jpg'
|
||||||
|
|
||||||
|
# funct STYLE FONT
|
||||||
|
change_polybar 'default' 'JetBrains Mono:size=10;3' && "$polybar_path"/launch.sh
|
||||||
|
"$polybar_path"/launch.sh
|
||||||
|
|
||||||
|
# funct STYLE FONT BORDER BORDER-RADIUS ICON (Change colors in funct)
|
||||||
|
change_rofi 'default' 'Iosevka 10' '0px 0px 2px 0px' '8px' 'Zafiro'
|
||||||
|
|
||||||
|
# funct STYLE (network manager applet)
|
||||||
|
change_nm 'default'
|
||||||
|
|
||||||
|
# funct FONT SIZE (Change colors in funct)
|
||||||
|
change_terminal 'JetBrainsMono Nerd Font' '10'
|
||||||
|
|
||||||
|
# funct FONT (Change colors in funct)
|
||||||
|
change_xfce_terminal 'JetBrainsMono Nerd Font 10'
|
||||||
|
|
||||||
|
# funct SCHEME FONT
|
||||||
|
change_geany 'arc' 'JetBrains Mono 10'
|
||||||
|
|
||||||
|
# funct THEME ICON CURSOR FONT
|
||||||
|
change_appearance 'Arc-Dark' 'Zafiro' 'Qogirr' 'Noto Sans 9'
|
||||||
|
|
||||||
|
# funct THEME LAYOUT FONT SIZE (Change margin in funct)
|
||||||
|
# obconfig 'Arc-Dark' 'DLIMC' 'JetBrains Mono' '9' 'menu-icons.xml' && qtile --reconfigure
|
||||||
|
|
||||||
|
# funct GEOMETRY FONT BORDER (Change colors in funct)
|
||||||
|
change_dunst '280x50-10+48' 'JetBrains Mono 10' '6'
|
||||||
|
|
||||||
|
# Paste settings in funct (PLANK)
|
||||||
|
change_dock && cat "$HOME"/.cache/plank.conf | dconf load /net/launchpad/plank/docks/
|
||||||
|
|
||||||
|
# Change compositor settings
|
||||||
|
#compositor 'glx' '6' '14 0.30 -12 -12' 'none 0'
|
1
.config/tmux/plugins/tpm
Submodule
1
.config/tmux/plugins/tpm
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit b699a7e01c253ffb7818b02d62bce24190ec1019
|
188
.config/tmux/tmux.conf
Normal file
188
.config/tmux/tmux.conf
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
# remap prefix to Control + Space
|
||||||
|
set -g prefix C-Space
|
||||||
|
bind C-Space send-prefix
|
||||||
|
unbind C-b
|
||||||
|
|
||||||
|
|
||||||
|
# Smart pane switching with awareness of Vim splits.
|
||||||
|
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||||
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||||
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||||
|
bind-key -n 'C-h' if-shell "$is_vim" { send-keys C-h } { if -F '#{pane_at_left}' { select-pane -L } { select-pane -L }
|
||||||
|
}
|
||||||
|
bind-key -n 'C-j' if-shell "$is_vim" { send-keys C-j } { if -F '#{pane_at_bottom}' { select-pane -D } { select-pane -D }
|
||||||
|
}
|
||||||
|
bind-key -n 'C-k' if-shell "$is_vim" { send-keys C-k } { if -F '#{pane_at_top}' { select-pane -U } { select-pane -U }
|
||||||
|
}
|
||||||
|
bind-key -n 'C-l' if-shell "$is_vim" { send-keys C-l } { if -F '#{pane_at_right}' { select-pane -R } { select-pane -R } }
|
||||||
|
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
||||||
|
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||||
|
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
|
||||||
|
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||||
|
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
|
||||||
|
|
||||||
|
bind-key -n C-] copy-mode
|
||||||
|
bind-key -n 'C-M-c' copy-mode
|
||||||
|
bind-key C-] copy-mode
|
||||||
|
|
||||||
|
bind-key -n C-_ run-shell '/bin/bash ~/scripts/search-notes.sh'
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
||||||
|
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||||
|
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||||
|
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||||
|
|
||||||
|
# vim like copy mode
|
||||||
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
|
||||||
|
|
||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
# Mouse support - set to on if you want to use the mouse
|
||||||
|
setw -g mouse on
|
||||||
|
|
||||||
|
|
||||||
|
# source the .tmux.conf file with prefix + r
|
||||||
|
bind r source-file ~/.config/tmux/tmux.conf \; display "Configuration Reloaded!"
|
||||||
|
|
||||||
|
bind-key - split-window -v
|
||||||
|
bind-key '\' split-window -h
|
||||||
|
bind-key _ split-window -fv
|
||||||
|
bind-key | split-window -fh
|
||||||
|
|
||||||
|
bind -r h resize-pane -L 5
|
||||||
|
bind -r j resize-pane -D 5
|
||||||
|
bind -r k resize-pane -U 5
|
||||||
|
bind -r l resize-pane -R 5
|
||||||
|
|
||||||
|
|
||||||
|
# set -g lock-after-time 300
|
||||||
|
# set -g lock-command "asciiquarium"
|
||||||
|
|
||||||
|
# bind-key "'" choose-window
|
||||||
|
# bind-key '"' choose-session
|
||||||
|
# kill current pane/window
|
||||||
|
# bind-key -n q confirm-before kill-pane
|
||||||
|
# bind-key Q confirm-before kill-window
|
||||||
|
bind-key -n C-q confirm-before kill-pane
|
||||||
|
# bind-key -n C-w confirm-before kill-window
|
||||||
|
|
||||||
|
# no prefix, just c-x
|
||||||
|
bind C-x setw synchronize-panes
|
||||||
|
|
||||||
|
# reorder windows
|
||||||
|
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
|
||||||
|
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
|
||||||
|
bind-key -n C-Up swap-pane -s '{up-of}'
|
||||||
|
bind-key -n C-Down swap-pane -s '{down-of}'
|
||||||
|
bind-key -n C-Left swap-pane -s '{left-of}'
|
||||||
|
bind-key -n C-Right swap-pane -s '{right-of}'
|
||||||
|
|
||||||
|
set -g default-terminal "tmux-256color"
|
||||||
|
# tell Tmux that outside terminal supports true color
|
||||||
|
set -ga terminal-overrides ",xterm-256color*:Tc"
|
||||||
|
|
||||||
|
# start session number from 1 rather than 0
|
||||||
|
# set -g base-index 1
|
||||||
|
|
||||||
|
# start pane number from 1 similar to windows
|
||||||
|
# setw -g pane-base-index 1
|
||||||
|
|
||||||
|
|
||||||
|
# highlight active pane
|
||||||
|
# set -g window-style 'fg=colour247,bg=colour236'
|
||||||
|
# set -g window-active-style 'fg=colour250,bg=black'
|
||||||
|
# set-option -g pane-active-border-style fg=red
|
||||||
|
|
||||||
|
# use <prefix> C-l to clear screen
|
||||||
|
bind C-l send-keys 'C-l'
|
||||||
|
|
||||||
|
# use <prefix> Enter for zooming the current pane
|
||||||
|
bind-key Enter if-shell "$is_vim" {
|
||||||
|
resize-pane -Z
|
||||||
|
send-keys C-w =
|
||||||
|
} {
|
||||||
|
resize-pane -Z
|
||||||
|
}
|
||||||
|
|
||||||
|
bind-key i run-shell "tmux neww ~/scripts/cheat.sh"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# use <prefix> C-j for join pane
|
||||||
|
bind-key C-j join-pane
|
||||||
|
|
||||||
|
|
||||||
|
# status bar theme
|
||||||
|
set -g status 'on'
|
||||||
|
# set -g status-bg 'colour235'
|
||||||
|
set -g status-justify 'centre'
|
||||||
|
set -g status-style 'none'
|
||||||
|
set -g status-left-style 'none'
|
||||||
|
set -g status-left-length '20'
|
||||||
|
set -g status-right-style 'none'
|
||||||
|
set -g status-right-length '100'
|
||||||
|
set -g message-command-style fg='colour222',bg='colour238'
|
||||||
|
set -g message-style bg='colour238',fg='colour222'
|
||||||
|
set -g pane-active-border-style fg='colour154'
|
||||||
|
set -g pane-border-style fg='colour238'
|
||||||
|
setw -g window-status-style fg='colour121',bg='colour235','none'
|
||||||
|
setw -g window-status-activity-style bg='colour235',fg='colour154','none'
|
||||||
|
setw -g window-status-separator ''
|
||||||
|
set-option -g status-style bg=default
|
||||||
|
set -g status-left '#[fg=colour232,bg=colour37] #S #[fg=colour37,bg=colour73,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour73] #W #[fg=colour73,bg=default,nobold,nounderscore,noitalics] '
|
||||||
|
# above status + whoami and uptime
|
||||||
|
# set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami) #(uptime | cut -d " " -f 1,2,3) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
|
||||||
|
setw -g window-status-current-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=default,bg=colour235,bold,underscore]#I #W #F#[fg=colour235,bg=default,nobold,nounderscore,noitalics]'
|
||||||
|
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour150,bg=default]#I #W#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
|
||||||
|
set -g status-right '#[fg=colour235,bg=default,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235]%R %a %h-%d #[fg=colour37,bg=colour235,nobold,nounderscore,noitalics] #{prefix_highlight}'
|
||||||
|
|
||||||
|
|
||||||
|
set -g status-interval 1
|
||||||
|
|
||||||
|
set-option -g automatic-rename on
|
||||||
|
set-option -g automatic-rename-format '#{b:pane_current_path}'
|
||||||
|
|
||||||
|
# Plugin Customizations
|
||||||
|
|
||||||
|
set -g @prefix_highlight_fg 'colour0'
|
||||||
|
set -g @prefix_highlight_bg 'colour37'
|
||||||
|
set -g @prefix_highlight_sync_mode_attr 'fg=colour0,bg=colour36'
|
||||||
|
set -g @prefix_highlight_copy_mode_attr 'fg=colour0,bg=colour33'
|
||||||
|
set -g @prefix_highlight_show_copy_mode 'on'
|
||||||
|
set -g @prefix_highlight_show_sync_mode 'on'
|
||||||
|
set -g @prefix_highlight_sync_prompt 'SYNC'
|
||||||
|
|
||||||
|
set -g @resurrect-strategy-vim 'session'
|
||||||
|
set -g @batt_icon_status_charging '⚡'
|
||||||
|
set -g @yank_selection_mouse 'clipboard' # or 'primary' or 'secondary'
|
||||||
|
set -g @yank_action 'copy-pipe' # or 'copy-pipe-and-cancel' for the default
|
||||||
|
set -g @copycat_hash_search 'C-h'
|
||||||
|
set -g @copycat_ip_search 'M-i'
|
||||||
|
set -g @copytk-copy-command "xsel --clipboard"
|
||||||
|
set -g @menus_trigger 't'
|
||||||
|
|
||||||
|
# set -g @pomodoro_start 'a' # Start a Pomodoro with tmux-prefix + p
|
||||||
|
# set -g @pomodoro_cancel 'A' # Cancel a Pomodoro with tmux-prefix key + P
|
||||||
|
# set -g @pomodoro_on " #[fg=$text_red]🍅 " # The formatted output when the pomodoro is running
|
||||||
|
# set -g @pomodoro_complete " #[fg=$text_green]🍅 " # The formatted output when the break is running
|
||||||
|
|
||||||
|
# set -g @continuum-boot 'on'
|
||||||
|
# set -g @continuum-restore 'on'
|
||||||
|
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-open'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-battery'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-cowboy'
|
||||||
|
set -g @plugin 'jaclu/tmux-menus'
|
||||||
|
set -g @plugin 'laktak/extrakto'
|
||||||
|
set -g @plugin 'CrispyConductor/tmux-copy-toolkit'
|
||||||
|
# set -g @plugin 'olimorris/tmux-pomodoro-plus'
|
||||||
|
run '~/.config/tmux/plugins/tpm/tpm'
|
||||||
|
|
47
.config/tridactyl/tridactylrc
Normal file
47
.config/tridactyl/tridactylrc
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
" General Settings
|
||||||
|
set update.lastchecktime 1648676458956
|
||||||
|
set configversion 2.0
|
||||||
|
set smoothscroll true
|
||||||
|
|
||||||
|
" Binds
|
||||||
|
bind j scrollline 5
|
||||||
|
bind h back
|
||||||
|
bind l forward
|
||||||
|
bind H tabprev
|
||||||
|
bind L tabnext
|
||||||
|
bind J scrollpx -50
|
||||||
|
bind K scrollpx 50
|
||||||
|
bind q back
|
||||||
|
bind Q forward
|
||||||
|
bindurl github.com gp open github.com/Asocia
|
||||||
|
bindurl github.com gc composite git_clone | clipboard yank
|
||||||
|
bindurl github.com gC composite git_clone_ssh | clipboard yank
|
||||||
|
bindurl github.com yr composite js "\"" + document.location.href.split('#')[0].split('/').slice(3, 5).join('/') + "\"" | clipboard yank
|
||||||
|
bindurl gitlab.com gp open gitlab.com/Asocia
|
||||||
|
bindurl gitlab.com gc composite git_clone | clipboard yank
|
||||||
|
bindurl gitlab.com gC composite git_clone_ssh | clipboard yank
|
||||||
|
bindurl gitlab.com yr composite js "\"" + document.location.href.split('#')[0].split('/').slice(3, 5).join('/') + "\"" | clipboard yank
|
||||||
|
bindurl reddit.com gp open reddit.com/user/Asocia
|
||||||
|
bindurl stackoverflow.com gp open stackoverflow.com/users/9608759/asocia
|
||||||
|
bindurl youtube.com p composite get_current_url | mpvsafe
|
||||||
|
bindurl youtube.com P hint -W mpvsafe
|
||||||
|
|
||||||
|
" Subconfig Settings
|
||||||
|
seturl monkeytype.com allowautofocus true
|
||||||
|
seturl www.google.com followpagepatterns.next Next
|
||||||
|
seturl overleaf.com allowautofocus true
|
||||||
|
seturl .*/.*\.ipynb allowautofocus true
|
||||||
|
seturl nitrotype.com allowautofocus true
|
||||||
|
|
||||||
|
" Aliases
|
||||||
|
alias git_clone js "git clone " + document.location.href.split('#')[0].split('/').slice(0, 5).join('/') + " ;cd " + document.location.href.split('#')[0].split('/').at(4)
|
||||||
|
alias git_clone_ssh js "git clone " + document.location.href.split('#')[0].split('/').slice(0, 5).join('/').replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") + " ;cd " + document.location.href.split('#')[0].split('/').at(4)
|
||||||
|
|
||||||
|
" Autocmds
|
||||||
|
autocmd DocStart monkeytype.com mode ignore
|
||||||
|
autocmd DocStart overleaf.com mode ignore
|
||||||
|
autocmd DocStart undefined mode ignore
|
||||||
|
autocmd DocStart .*/.*\.ipynb mode ignore
|
||||||
|
|
||||||
|
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
|
||||||
|
" vim: set filetype=tridactyl
|
56
.config/zsh/.aliases
Normal file
56
.config/zsh/.aliases
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# alias af=alias-finder
|
||||||
|
alias menu="menu | lolcat"
|
||||||
|
alias nomnom="menu | lolcat"
|
||||||
|
alias so="shrout"
|
||||||
|
alias sf="shrfile"
|
||||||
|
alias co="cpyout"
|
||||||
|
alias cf="cpyfile"
|
||||||
|
alias ls=lsd
|
||||||
|
alias lsl="clear; ls"
|
||||||
|
alias lll="clear; ll"
|
||||||
|
alias rake='noglob bundled_rake'
|
||||||
|
alias weather='curl wttr.in/?0'
|
||||||
|
alias gdm='gd master'
|
||||||
|
alias s='gst .'
|
||||||
|
alias d='gd .'
|
||||||
|
alias intel="sudo prime-select intel"
|
||||||
|
alias nvidia="sudo prime-select nvidia"
|
||||||
|
alias pls="sudo"
|
||||||
|
alias p="pyenv"
|
||||||
|
alias cat="bat"
|
||||||
|
alias bd="batdiff"
|
||||||
|
alias man="batman"
|
||||||
|
alias cd.="cd .."
|
||||||
|
alias cd..="cd .."
|
||||||
|
alias xd="xdg-open &>/dev/null"
|
||||||
|
alias xd.="xdg-open &>/dev/null ."
|
||||||
|
alias suod="sudo"
|
||||||
|
alias sduo="sudo"
|
||||||
|
alias zz='z -c' # restrict matches to subdirs of $PWD
|
||||||
|
alias zi='z -I' # use fzf to select in multiple matches
|
||||||
|
alias n=z
|
||||||
|
alias ni='z -I'
|
||||||
|
alias nn='z -c'
|
||||||
|
alias nb='z -b'
|
||||||
|
alias t="todo.sh"
|
||||||
|
alias ta="todo.sh add"
|
||||||
|
alias tl="todo.sh list"
|
||||||
|
alias td="todo.sh do"
|
||||||
|
alias tp="todo.sh pri"
|
||||||
|
alias vim="nvim"
|
||||||
|
alias v="vim"
|
||||||
|
alias viz="vim ${ZDOTDIR:-$HOME}/.zshrc"
|
||||||
|
alias vizp="vim ${ZDOTDIR:-$HOME}/.zpreztorc"
|
||||||
|
alias vit="vim ~/.config/tmux/tmux.conf"
|
||||||
|
alias vip="vim ~/.config/polybar/config.ini"
|
||||||
|
alias viv="vim ~/.vimrc"
|
||||||
|
alias viw="vim ~/.which-key.vim"
|
||||||
|
alias via="vim ${ZDOTDIR:-$HOME}/.aliases"
|
||||||
|
alias vi3="vim ~/.config/i3/config"
|
||||||
|
alias viq="vim ~/.config/qtile/config.py"
|
||||||
|
alias top='htop'
|
||||||
|
alias cp='cp -ri'
|
||||||
|
alias mv='mv -i'
|
||||||
|
alias mkdir='mkdir -p'
|
||||||
|
alias dotfiles='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
|
alias dots='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
1619
.config/zsh/.p10k.zsh
Normal file
1619
.config/zsh/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
26
.config/zsh/.zlogin
Normal file
26
.config/zsh/.zlogin
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#
|
||||||
|
# Executes commands at login post-zshrc.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
# Execute code that does not affect the current session in the background.
|
||||||
|
{
|
||||||
|
# Compile the completion dump to increase startup speed.
|
||||||
|
zcompdump="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump"
|
||||||
|
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
|
||||||
|
zcompile "$zcompdump"
|
||||||
|
fi
|
||||||
|
} &!
|
||||||
|
|
||||||
|
# Execute code only if STDERR is bound to a TTY.
|
||||||
|
if [[ -o INTERACTIVE && -t 2 ]]; then
|
||||||
|
|
||||||
|
# Print a random, hopefully interesting, adage.
|
||||||
|
if (( $+commands[fortune] )); then
|
||||||
|
fortune -s
|
||||||
|
print
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi >&2
|
19
.config/zsh/.zlogout
Normal file
19
.config/zsh/.zlogout
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# Executes commands at logout.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
# Execute code only if STDERR is bound to a TTY.
|
||||||
|
[[ -o INTERACTIVE && -t 2 ]] && {
|
||||||
|
|
||||||
|
SAYINGS=(
|
||||||
|
"So long and thanks for all the fish.\n -- Douglas Adams"
|
||||||
|
"Good morning! And in case I don't see ya, good afternoon, good evening and goodnight.\n --Truman Burbank"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Print a randomly-chosen message:
|
||||||
|
echo $SAYINGS[$(($RANDOM % ${#SAYINGS} + 1))]
|
||||||
|
|
||||||
|
} >&2
|
237
.config/zsh/.zpreztorc
Normal file
237
.config/zsh/.zpreztorc
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
#
|
||||||
|
# Sets Prezto options.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# General
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set case-sensitivity for completion, history lookup, etc.
|
||||||
|
# zstyle ':prezto:*:*' case-sensitive 'yes'
|
||||||
|
|
||||||
|
# Color output (auto set to 'no' on dumb terminals).
|
||||||
|
zstyle ':prezto:*:*' color 'yes'
|
||||||
|
|
||||||
|
# Add additional directories to load prezto modules from
|
||||||
|
# zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib
|
||||||
|
|
||||||
|
# Allow module overrides when pmodule-dirs causes module name collisions
|
||||||
|
# zstyle ':prezto:load' pmodule-allow-overrides 'yes'
|
||||||
|
|
||||||
|
# Set the Zsh modules to load (man zshmodules).
|
||||||
|
# zstyle ':prezto:load' zmodule 'attr' 'stat'
|
||||||
|
|
||||||
|
# Set the Zsh functions to load (man zshcontrib).
|
||||||
|
# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
|
||||||
|
|
||||||
|
# Set the Prezto modules to load (browse modules).
|
||||||
|
# The order matters.
|
||||||
|
zstyle ':prezto:load' pmodule \
|
||||||
|
'environment' \
|
||||||
|
'terminal' \
|
||||||
|
'editor' \
|
||||||
|
'history' \
|
||||||
|
'directory' \
|
||||||
|
'spectrum' \
|
||||||
|
'utility' \
|
||||||
|
'rsync' \
|
||||||
|
'tmux' \
|
||||||
|
'archive' \
|
||||||
|
'completion' \
|
||||||
|
'syntax-highlighting' \
|
||||||
|
'history-substring-search' \
|
||||||
|
'autosuggestions' \
|
||||||
|
'prompt'
|
||||||
|
|
||||||
|
# 'rsync' \ rsync-copy rsync-move
|
||||||
|
# 'git' \ use oh my zsh git
|
||||||
|
# https://github.com/Asocia/prezto/tree/master/modules/spectrum
|
||||||
|
#
|
||||||
|
# Autosuggestions
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the query found color.
|
||||||
|
zstyle ':prezto:module:autosuggestions:color' found 'fg=32,bold'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Completions
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the entries to ignore in static '/etc/hosts' for host completion.
|
||||||
|
# zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \
|
||||||
|
# '0.0.0.0' '127.0.0.1'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Editor
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the key mapping style to 'emacs' or 'vi'.
|
||||||
|
zstyle ':prezto:module:editor' key-bindings 'vi'
|
||||||
|
|
||||||
|
# Auto convert .... to ../..
|
||||||
|
zstyle ':prezto:module:editor' dot-expansion 'yes'
|
||||||
|
|
||||||
|
# Allow the zsh prompt context to be shown.
|
||||||
|
zstyle ':prezto:module:editor' ps-context 'yes'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Git
|
||||||
|
#
|
||||||
|
|
||||||
|
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
|
||||||
|
# zstyle ':prezto:module:git:status:ignore' submodules 'all'
|
||||||
|
|
||||||
|
#
|
||||||
|
# GNU Utility
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the command prefix on non-GNU systems.
|
||||||
|
# zstyle ':prezto:module:gnu-utility' prefix 'g'
|
||||||
|
|
||||||
|
#
|
||||||
|
# History Substring Search
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the query found color.
|
||||||
|
# zstyle ':prezto:module:history-substring-search:color' found ''
|
||||||
|
|
||||||
|
# Set the query not found color.
|
||||||
|
# zstyle ':prezto:module:history-substring-search:color' not-found ''
|
||||||
|
|
||||||
|
# Set the search globbing flags.
|
||||||
|
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||||
|
|
||||||
|
#
|
||||||
|
# macOS
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the keyword used by `mand` to open man pages in Dash.app
|
||||||
|
# zstyle ':prezto:module:osx:man' dash-keyword 'manpages'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Pacman
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the Pacman frontend.
|
||||||
|
# zstyle ':prezto:module:pacman' frontend 'yaourt'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prompt
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the prompt theme to load.
|
||||||
|
# Setting it to 'random' loads a random theme.
|
||||||
|
# Auto set to 'off' on dumb terminals.
|
||||||
|
zstyle ':prezto:module:prompt' theme 'powerlevel10k'
|
||||||
|
|
||||||
|
# Set the working directory prompt display length.
|
||||||
|
# By default, it is set to 'short'. Set it to 'long' (without '~' expansion)
|
||||||
|
# for longer or 'full' (with '~' expansion) for even longer prompt display.
|
||||||
|
# zstyle ':prezto:module:prompt' pwd-length 'short'
|
||||||
|
|
||||||
|
# Set the prompt to display the return code along with an indicator for non-zero
|
||||||
|
# return codes. This is not supported by all prompts.
|
||||||
|
# zstyle ':prezto:module:prompt' show-return-val 'yes'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Python
|
||||||
|
#
|
||||||
|
|
||||||
|
# Auto switch the Python virtualenv on directory change.
|
||||||
|
# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
|
||||||
|
|
||||||
|
# Automatically initialize virtualenvwrapper if pre-requisites are met.
|
||||||
|
# zstyle ':prezto:module:python:virtualenv' initialize 'yes'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Ruby
|
||||||
|
#
|
||||||
|
|
||||||
|
# Auto switch the Ruby version on directory change.
|
||||||
|
# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Screen
|
||||||
|
#
|
||||||
|
|
||||||
|
# Auto start a session when Zsh is launched in a local terminal.
|
||||||
|
# zstyle ':prezto:module:screen:auto-start' local 'yes'
|
||||||
|
|
||||||
|
# Auto start a session when Zsh is launched in a SSH connection.
|
||||||
|
# zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
||||||
|
|
||||||
|
#
|
||||||
|
# SSH
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the SSH identities to load into the agent.
|
||||||
|
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Syntax Highlighting
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set syntax highlighters.
|
||||||
|
# By default, only the main highlighter is enabled.
|
||||||
|
zstyle ':prezto:module:syntax-highlighting' highlighters \
|
||||||
|
'main' \
|
||||||
|
'brackets' \
|
||||||
|
'pattern' \
|
||||||
|
'line' \
|
||||||
|
'cursor' \
|
||||||
|
'root'
|
||||||
|
#
|
||||||
|
# Set syntax highlighting styles.
|
||||||
|
# zstyle ':prezto:module:syntax-highlighting' styles \
|
||||||
|
# 'builtin' 'bg=blue' \
|
||||||
|
# 'command' 'bg=blue' \
|
||||||
|
# 'function' 'bg=blue'
|
||||||
|
#
|
||||||
|
# Set syntax pattern styles.
|
||||||
|
# zstyle ':prezto:module:syntax-highlighting' pattern \
|
||||||
|
# 'rm*-rf*' 'fg=white,bold,bg=red'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Terminal
|
||||||
|
#
|
||||||
|
|
||||||
|
# Auto set the tab and window titles.
|
||||||
|
# zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||||
|
|
||||||
|
# Set the window title format.
|
||||||
|
# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
|
||||||
|
|
||||||
|
# Set the tab title format.
|
||||||
|
# zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
|
||||||
|
|
||||||
|
# Set the terminal multiplexer title format.
|
||||||
|
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tmux
|
||||||
|
#
|
||||||
|
|
||||||
|
# Auto start a session when Zsh is launched in a local terminal.
|
||||||
|
zstyle ':prezto:module:tmux:auto-start' local 'no'
|
||||||
|
|
||||||
|
# Auto start a session when Zsh is launched in a SSH connection.
|
||||||
|
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
||||||
|
|
||||||
|
# Integrate with iTerm2.
|
||||||
|
# zstyle ':prezto:module:tmux:iterm' integrate 'yes'
|
||||||
|
|
||||||
|
# Set the default session name:
|
||||||
|
session_name=$(echo $TERM | cut -d"-" -f1)
|
||||||
|
zstyle ':prezto:module:tmux:session' name $session_name
|
||||||
|
|
||||||
|
#
|
||||||
|
# Utility
|
||||||
|
#
|
||||||
|
|
||||||
|
# Enabled safe options. This aliases cp, ln, mv and rm so that they prompt
|
||||||
|
# before deleting or overwriting files. Set to 'no' to disable this safer
|
||||||
|
# behavior.
|
||||||
|
# zstyle ':prezto:module:utility' safe-ops 'yes'
|
65
.config/zsh/.zprofile
Normal file
65
.config/zsh/.zprofile
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
#
|
||||||
|
# Executes commands at login pre-zshrc.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
export npm_config_prefix="$HOME/.local"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Browser
|
||||||
|
#
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == darwin* ]]; then
|
||||||
|
export BROWSER='open'
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Editors
|
||||||
|
#
|
||||||
|
|
||||||
|
export EDITOR='nvim'
|
||||||
|
export VISUAL="$EDITOR"
|
||||||
|
export PAGER='less'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Language
|
||||||
|
#
|
||||||
|
|
||||||
|
if [[ -z "$LANG" ]]; then
|
||||||
|
export LANG='en_US.UTF-8'
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Paths
|
||||||
|
#
|
||||||
|
|
||||||
|
# Ensure path arrays do not contain duplicates.
|
||||||
|
typeset -gU cdpath fpath mailpath path
|
||||||
|
|
||||||
|
# Set the list of directories that cd searches.
|
||||||
|
# cdpath=(
|
||||||
|
# $cdpath
|
||||||
|
# )
|
||||||
|
|
||||||
|
# Set the list of directories that Zsh searches for programs.
|
||||||
|
path=(
|
||||||
|
/usr/local/{bin,sbin}
|
||||||
|
$path
|
||||||
|
)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Less
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the default Less options.
|
||||||
|
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
||||||
|
# Remove -X to enable it.
|
||||||
|
export LESS='-g -i -M -R -S -w -z-4'
|
||||||
|
|
||||||
|
# Set the Less input preprocessor.
|
||||||
|
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
||||||
|
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
||||||
|
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
||||||
|
fi
|
294
.config/zsh/.zsh/_git
Normal file
294
.config/zsh/.zsh/_git
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
#compdef git gitk
|
||||||
|
|
||||||
|
# zsh completion wrapper for git
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012-2020 Felipe Contreras <felipe.contreras@gmail.com>
|
||||||
|
#
|
||||||
|
# The recommended way to install this script is to make a copy of it as a
|
||||||
|
# file named '_git' inside any directory in your fpath.
|
||||||
|
#
|
||||||
|
# For example, create a directory '~/.zsh/', copy this file to '~/.zsh/_git',
|
||||||
|
# and then add the following to your ~/.zshrc file:
|
||||||
|
#
|
||||||
|
# fpath=(~/.zsh $fpath)
|
||||||
|
#
|
||||||
|
# You need git's bash completion script installed. By default bash-completion's
|
||||||
|
# location will be used (e.g. pkg-config --variable=completionsdir bash-completion).
|
||||||
|
#
|
||||||
|
# If your bash completion script is somewhere else, you can specify the
|
||||||
|
# location in your ~/.zshrc:
|
||||||
|
#
|
||||||
|
# zstyle ':completion:*:*:git:*' script ~/.git-completion.bash
|
||||||
|
#
|
||||||
|
|
||||||
|
zstyle -T ':completion:*:*:git:*' tag-order && \
|
||||||
|
zstyle ':completion:*:*:git:*' tag-order 'common-commands'
|
||||||
|
|
||||||
|
zstyle -s ":completion:*:*:git:*" script script
|
||||||
|
if [ -z "$script" ]; then
|
||||||
|
local -a locations
|
||||||
|
local e bash_completion
|
||||||
|
|
||||||
|
bash_completion=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null) ||
|
||||||
|
bash_completion='/usr/share/bash-completion/completions/'
|
||||||
|
|
||||||
|
locations=(
|
||||||
|
"$(dirname ${funcsourcetrace[1]%:*})"/git-completion.bash
|
||||||
|
"$HOME/.local/share/bash-completion/completions/git"
|
||||||
|
"$bash_completion/git"
|
||||||
|
'/etc/bash_completion.d/git' # old debian
|
||||||
|
)
|
||||||
|
for e in $locations; do
|
||||||
|
test -f $e && script="$e" && break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
local old_complete="$functions[complete]"
|
||||||
|
functions[complete]=:
|
||||||
|
GIT_SOURCING_ZSH_COMPLETION=y . "$script"
|
||||||
|
functions[complete]="$old_complete"
|
||||||
|
|
||||||
|
__gitcomp ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
local cur_="${3-$cur}"
|
||||||
|
|
||||||
|
case "$cur_" in
|
||||||
|
--*=)
|
||||||
|
;;
|
||||||
|
--no-*)
|
||||||
|
local c IFS=$' \t\n'
|
||||||
|
local -a array
|
||||||
|
for c in ${=1}; do
|
||||||
|
if [[ $c == "--" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
c="$c${4-}"
|
||||||
|
case $c in
|
||||||
|
--*=|*.) ;;
|
||||||
|
*) c="$c " ;;
|
||||||
|
esac
|
||||||
|
array+=("$c")
|
||||||
|
done
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
local c IFS=$' \t\n'
|
||||||
|
local -a array
|
||||||
|
for c in ${=1}; do
|
||||||
|
if [[ $c == "--" ]]; then
|
||||||
|
c="--no-...${4-}"
|
||||||
|
array+=("$c ")
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
c="$c${4-}"
|
||||||
|
case $c in
|
||||||
|
--*=|*.) ;;
|
||||||
|
*) c="$c " ;;
|
||||||
|
esac
|
||||||
|
array+=("$c")
|
||||||
|
done
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_direct ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S '' -- ${(f)1} && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_nl ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_file ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -f -p "${2-}" -- ${(f)1} && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_direct_append ()
|
||||||
|
{
|
||||||
|
__gitcomp_direct "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_nl_append ()
|
||||||
|
{
|
||||||
|
__gitcomp_nl "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_file_direct ()
|
||||||
|
{
|
||||||
|
__gitcomp_file "$1" ""
|
||||||
|
}
|
||||||
|
|
||||||
|
_git_zsh ()
|
||||||
|
{
|
||||||
|
__gitcomp "v1.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_complete_command ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
local command="$1"
|
||||||
|
local completion_func="_git_${command//-/_}"
|
||||||
|
if (( $+functions[$completion_func] )); then
|
||||||
|
emulate ksh -c $completion_func
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_bash_func ()
|
||||||
|
{
|
||||||
|
emulate -L ksh
|
||||||
|
|
||||||
|
local command=$1
|
||||||
|
|
||||||
|
__git_complete_command "$command" && return
|
||||||
|
|
||||||
|
local expansion=$(__git_aliased_command "$command")
|
||||||
|
if [ -n "$expansion" ]; then
|
||||||
|
words[1]=$expansion
|
||||||
|
__git_complete_command "$expansion"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_cmd_common ()
|
||||||
|
{
|
||||||
|
local -a list
|
||||||
|
list=(
|
||||||
|
add:'add file contents to the index'
|
||||||
|
bisect:'find by binary search the change that introduced a bug'
|
||||||
|
branch:'list, create, or delete branches'
|
||||||
|
checkout:'checkout a branch or paths to the working tree'
|
||||||
|
clone:'clone a repository into a new directory'
|
||||||
|
commit:'record changes to the repository'
|
||||||
|
diff:'show changes between commits, commit and working tree, etc'
|
||||||
|
fetch:'download objects and refs from another repository'
|
||||||
|
grep:'print lines matching a pattern'
|
||||||
|
init:'create an empty Git repository or reinitialize an existing one'
|
||||||
|
log:'show commit logs'
|
||||||
|
merge:'join two or more development histories together'
|
||||||
|
mv:'move or rename a file, a directory, or a symlink'
|
||||||
|
pull:'fetch from and merge with another repository or a local branch'
|
||||||
|
push:'update remote refs along with associated objects'
|
||||||
|
rebase:'forward-port local commits to the updated upstream head'
|
||||||
|
reset:'reset current HEAD to the specified state'
|
||||||
|
restore:'restore working tree files'
|
||||||
|
rm:'remove files from the working tree and from the index'
|
||||||
|
show:'show various types of objects'
|
||||||
|
status:'show the working tree status'
|
||||||
|
switch:'switch branches'
|
||||||
|
tag:'create, list, delete or verify a tag object signed with GPG')
|
||||||
|
_describe -t common-commands 'common commands' list && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_cmd_alias ()
|
||||||
|
{
|
||||||
|
local -a list
|
||||||
|
list=(${${(0)"$(git config -z --get-regexp '^alias\.*')"}#alias.})
|
||||||
|
list=(${(f)"$(printf "%s:alias for '%s'\n" ${(f@)list})"})
|
||||||
|
_describe -t alias-commands 'aliases' list && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_cmd_all ()
|
||||||
|
{
|
||||||
|
local -a list
|
||||||
|
emulate ksh -c __git_compute_all_commands
|
||||||
|
list=( ${=__git_all_commands} )
|
||||||
|
_describe -t all-commands 'all commands' list && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_main ()
|
||||||
|
{
|
||||||
|
local curcontext="$curcontext" state state_descr line
|
||||||
|
typeset -A opt_args
|
||||||
|
local -a orig_words
|
||||||
|
|
||||||
|
orig_words=( ${words[@]} )
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \
|
||||||
|
'(-p --paginate)--no-pager[do not pipe git output into a pager]' \
|
||||||
|
'--git-dir=-[set the path to the repository]: :_directories' \
|
||||||
|
'--bare[treat the repository as a bare repository]' \
|
||||||
|
'(- :)--version[prints the git suite version]' \
|
||||||
|
'--exec-path=-[path to where your core git programs are installed]:: :_directories' \
|
||||||
|
'--html-path[print the path where git''s HTML documentation is installed]' \
|
||||||
|
'--info-path[print the path where the Info files are installed]' \
|
||||||
|
'--man-path[print the manpath (see `man(1)`) for the man pages]' \
|
||||||
|
'--work-tree=-[set the path to the working tree]: :_directories' \
|
||||||
|
'--namespace=-[set the git namespace]' \
|
||||||
|
'--no-replace-objects[do not use replacement refs to replace git objects]' \
|
||||||
|
'(- :)--help[prints the synopsis and a list of the most commonly used commands]: :->arg' \
|
||||||
|
'(-): :->command' \
|
||||||
|
'(-)*:: :->arg' && return
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
_tags common-commands alias-commands all-commands
|
||||||
|
while _tags; do
|
||||||
|
_requested common-commands && __git_zsh_cmd_common
|
||||||
|
_requested alias-commands && __git_zsh_cmd_alias
|
||||||
|
_requested all-commands && __git_zsh_cmd_all
|
||||||
|
let _ret || break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
(arg)
|
||||||
|
local command="${words[1]}" __git_dir
|
||||||
|
|
||||||
|
if (( $+opt_args[--bare] )); then
|
||||||
|
__git_dir='.'
|
||||||
|
else
|
||||||
|
__git_dir=${opt_args[--git-dir]}
|
||||||
|
fi
|
||||||
|
|
||||||
|
(( $+opt_args[--help] )) && command='help'
|
||||||
|
|
||||||
|
words=( ${orig_words[@]} )
|
||||||
|
|
||||||
|
__git_zsh_bash_func $command
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
_git ()
|
||||||
|
{
|
||||||
|
local _ret=1
|
||||||
|
local cur cword prev
|
||||||
|
|
||||||
|
cur=${words[CURRENT]}
|
||||||
|
prev=${words[CURRENT-1]}
|
||||||
|
let cword=CURRENT-1
|
||||||
|
|
||||||
|
if (( $+functions[__${service}_zsh_main] )); then
|
||||||
|
__${service}_zsh_main
|
||||||
|
elif (( $+functions[__${service}_main] )); then
|
||||||
|
emulate ksh -c __${service}_main
|
||||||
|
elif (( $+functions[_${service}] )); then
|
||||||
|
emulate ksh -c _${service}
|
||||||
|
elif (( $+functions[_${service//-/_}] )); then
|
||||||
|
emulate ksh -c _${service//-/_}
|
||||||
|
fi
|
||||||
|
|
||||||
|
let _ret && _default && _ret=0
|
||||||
|
return _ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_git
|
12
.config/zsh/.zshenv
Normal file
12
.config/zsh/.zshenv
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Defines environment variables.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
# Şahin Akkaya <sahin@sahinakkaya.dev>
|
||||||
|
|
||||||
|
# Ensure that a non-login, non-interactive shell has a defined environment.
|
||||||
|
if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
||||||
|
source "${ZDOTDIR:-$HOME}/.zprofile"
|
||||||
|
fi
|
||||||
|
. "$HOME/.cargo/env"
|
147
.config/zsh/.zshrc
Normal file
147
.config/zsh/.zshrc
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
|
||||||
|
d="$HOME/scripts/colorscripts"
|
||||||
|
bash "$d/`ls $d | shuf -n 1`"
|
||||||
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
||||||
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Executes commands at the start of an interactive session.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Source Prezto.
|
||||||
|
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
||||||
|
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fpath=("${ZDOTDIR:-$HOME}/.zsh" $fpath)
|
||||||
|
|
||||||
|
# Customize to your needs...
|
||||||
|
source "${ZDOTDIR:-$HOME}/.aliases"
|
||||||
|
|
||||||
|
ZSH_AUTOSUGGEST_STRATEGY=(history)
|
||||||
|
ZSH_AUTOSUGGEST_MANUAL_REBIND=true
|
||||||
|
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
|
||||||
|
|
||||||
|
### Added by Zinit's installer
|
||||||
|
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
|
||||||
|
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
|
||||||
|
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
|
||||||
|
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
|
||||||
|
print -P "%F{33} %F{34}Installation successful.%f%b" || \
|
||||||
|
print -P "%F{160} The clone has failed.%f%b"
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
|
||||||
|
autoload -Uz _zinit
|
||||||
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||||
|
|
||||||
|
# Load a few important annexes, without Turbo
|
||||||
|
# (this is currently required for annexes)
|
||||||
|
zinit light-mode for \
|
||||||
|
zdharma-continuum/zinit-annex-as-monitor \
|
||||||
|
zdharma-continuum/zinit-annex-bin-gem-node \
|
||||||
|
zdharma-continuum/zinit-annex-patch-dl \
|
||||||
|
zdharma-continuum/zinit-annex-rust
|
||||||
|
|
||||||
|
### End of Zinit's installer chunk
|
||||||
|
|
||||||
|
zinit snippet OMZ::plugins/git/git.plugin.zsh
|
||||||
|
zinit snippet OMZ::plugins/last-working-dir/last-working-dir.plugin.zsh
|
||||||
|
zinit snippet OMZ::plugins/dirhistory/dirhistory.plugin.zsh
|
||||||
|
zinit light skywind3000/z.lua
|
||||||
|
|
||||||
|
# ZVM
|
||||||
|
function zvm_config() {
|
||||||
|
ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
|
||||||
|
ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BEAM
|
||||||
|
ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BLOCK
|
||||||
|
ZVM_LAZY_KEYBINDINGS=true
|
||||||
|
ZVM_VI_INSERT_ESCAPE_BINDKEY=kj
|
||||||
|
}
|
||||||
|
|
||||||
|
zinit ice depth=1
|
||||||
|
zinit light jeffreytse/zsh-vi-mode
|
||||||
|
|
||||||
|
# The plugin will auto execute this zvm_after_init function
|
||||||
|
function zvm_after_init() {
|
||||||
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|
||||||
|
bindkey '^b' backward-word
|
||||||
|
bindkey '^f' forward-word
|
||||||
|
bindkey '^g' autosuggest-accept
|
||||||
|
# allow ctrl-r and ctrl-s to search the history
|
||||||
|
# bindkey '^r' history-incremental-search-backward
|
||||||
|
# bindkey '^s' history-incremental-search-forward
|
||||||
|
bindkey '^h' backward-kill-word
|
||||||
|
bindkey '^[[M' kill-word
|
||||||
|
bindkey -s '^@' ""
|
||||||
|
bindkey -s '' "fg\n"
|
||||||
|
|
||||||
|
|
||||||
|
# allow ctrl-a and ctrl-e to move to beginning/end of line
|
||||||
|
bindkey '^a' beginning-of-line
|
||||||
|
bindkey '^e' end-of-line
|
||||||
|
|
||||||
|
|
||||||
|
# allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour)
|
||||||
|
# bindkey '^h' backward-delete-char
|
||||||
|
bindkey '^w' backward-kill-word
|
||||||
|
|
||||||
|
|
||||||
|
bindkey '^x' fzf-cd-widget
|
||||||
|
bindkey "\e[1;3D" dirhistory_zle_dirhistory_back
|
||||||
|
bindkey "\e[1;3C" dirhistory_zle_dirhistory_future
|
||||||
|
bindkey "\e[1;3A" dirhistory_zle_dirhistory_up
|
||||||
|
bindkey "\e[1;3B" dirhistory_zle_dirhistory_down
|
||||||
|
}
|
||||||
|
|
||||||
|
doit ()
|
||||||
|
{
|
||||||
|
# this function is created for forcing the deletion of the file or directory.
|
||||||
|
#
|
||||||
|
# ❯ rm somedir
|
||||||
|
# rm: cannot remove 'somedir': Is a directory
|
||||||
|
# ❯ rmdir somedir/
|
||||||
|
# rmdir: failed to remove 'somedir/': Directory not empty
|
||||||
|
# ❯ rm -rf somedir/
|
||||||
|
# rm: cannot remove 'somedir/': Permission denied
|
||||||
|
#
|
||||||
|
# Just remove the f**king directory!!
|
||||||
|
|
||||||
|
|
||||||
|
lastCommand=$(history | tail -n 1 | cut -d' ' -f3-)
|
||||||
|
firstWord=$(echo $lastCommand | cut -d' ' -f1)
|
||||||
|
RED="\033[1;31m"
|
||||||
|
GREEN="\033[1;32m"
|
||||||
|
NOCOLOR="\033[0m"
|
||||||
|
|
||||||
|
lastWord=$(echo $lastCommand | awk '{print $NF}')
|
||||||
|
case "$firstWord" in
|
||||||
|
"rm"|"rmdir")
|
||||||
|
echo -en "Execute ${RED}\"sudo rm -rf $lastWord\"${NOCOLOR}?"
|
||||||
|
read -k "? " ans
|
||||||
|
echo
|
||||||
|
if [ "$ans" = "y" ]; then
|
||||||
|
sudo rm -rf $lastWord
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"cd")
|
||||||
|
mkdir $lastWord && cd $lastWord
|
||||||
|
;;
|
||||||
|
*) echo "Don't know what to do with \"$lastCommand\"."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.cfg
|
26
.gitmodules
vendored
Normal file
26
.gitmodules
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[submodule "GitRepositories/st"]
|
||||||
|
path = GitRepositories/st
|
||||||
|
url = https://github.com/Asocia/st.git
|
||||||
|
[submodule ".config/nvim"]
|
||||||
|
path = .config/nvim
|
||||||
|
url = https://github.com/Asocia/nvim-config.git
|
||||||
|
[submodule "GitRepositories/polybar-wireguard"]
|
||||||
|
path = GitRepositories/polybar-wireguard
|
||||||
|
url = https://github.com/mil-ad/polybar-wireguard.git
|
||||||
|
ignore = dirty
|
||||||
|
[submodule "GitRepositories/rofi-bluetooth"]
|
||||||
|
path = GitRepositories/rofi-bluetooth
|
||||||
|
url = https://github.com/nickclyde/rofi-bluetooth.git
|
||||||
|
ignore = dirty
|
||||||
|
[submodule "GitRepositories/binary-wallpaper"]
|
||||||
|
path = GitRepositories/binary-wallpaper
|
||||||
|
url = https://github.com/Asocia/binary-clock-wallpaper.git
|
||||||
|
[submodule "GitRepositories/bat-extras"]
|
||||||
|
path = GitRepositories/bat-extras
|
||||||
|
url = https://github.com/eth-p/bat-extras.git
|
||||||
|
[submodule "GitRepositories/fzf"]
|
||||||
|
path = GitRepositories/fzf
|
||||||
|
url = https://github.com/junegunn/fzf
|
||||||
|
[submodule ".config/tmux/plugins/tpm"]
|
||||||
|
path = .config/tmux/plugins/tpm
|
||||||
|
url = https://github.com/tmux-plugins/tpm
|
35
.local/bin/passmenu
Executable file
35
.local/bin/passmenu
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
shopt -s nullglob globstar
|
||||||
|
|
||||||
|
typeit=0
|
||||||
|
if [[ $1 == "--type" ]]; then
|
||||||
|
typeit=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $WAYLAND_DISPLAY ]]; then
|
||||||
|
dmenu=dmenu-wl
|
||||||
|
xdotool="ydotool type --file -"
|
||||||
|
elif [[ -n $DISPLAY ]]; then
|
||||||
|
dmenu=dmenu
|
||||||
|
xdotool="xdotool type --clearmodifiers --file -"
|
||||||
|
else
|
||||||
|
echo "Error: No Wayland or X11 display detected" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||||
|
password_files=( "$prefix"/**/*.gpg )
|
||||||
|
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||||
|
password_files=( "${password_files[@]%.gpg}" )
|
||||||
|
|
||||||
|
password=$(printf '%s\n' "${password_files[@]}" | "$dmenu" "$@")
|
||||||
|
|
||||||
|
[[ -n $password ]] || exit
|
||||||
|
|
||||||
|
if [[ $typeit -eq 0 ]]; then
|
||||||
|
pass show -c "$password" 2>/dev/null
|
||||||
|
else
|
||||||
|
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool
|
||||||
|
fi
|
8
.profile
Normal file
8
.profile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export ZDOTDIR="/home/sahin/.config/zsh"
|
||||||
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
|
||||||
|
export PATH="$PATH:$HOME/scripts:"
|
||||||
|
export PATH="$PATH:$HOME/.config/rofi/bin/:"
|
||||||
|
export PATH="$PATH:$HOME/.local/bin/"
|
||||||
|
|
||||||
|
[ ! -s ~/.config/mpd/pid ] && mpd
|
1
GitRepositories/bat-extras
Submodule
1
GitRepositories/bat-extras
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 8ad00bd978678b67d61176e8397369e1e6afa4fc
|
1
GitRepositories/binary-wallpaper
Submodule
1
GitRepositories/binary-wallpaper
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 356f3bb253ecc14997e1abaf7406b914f69f06dc
|
1
GitRepositories/fzf
Submodule
1
GitRepositories/fzf
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 5f385d88e0a786f20c4231b82f250945a6583a17
|
33
GitRepositories/patches/polybar-wireguard/wireguard.patch
Normal file
33
GitRepositories/patches/polybar-wireguard/wireguard.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
diff --git a/polybar-wireguard b/rofi-wireguard
|
||||||
|
similarity index 88%
|
||||||
|
rename from polybar-wireguard
|
||||||
|
rename to rofi-wireguard
|
||||||
|
index 6712185..03e7dcb 100755
|
||||||
|
--- a/polybar-wireguard
|
||||||
|
+++ b/rofi-wireguard
|
||||||
|
@@ -6,11 +6,11 @@
|
||||||
|
# https://github.com/polybar/polybar/wiki/Formatting#format-tags-inside-polybar-config
|
||||||
|
green=#55aa55
|
||||||
|
|
||||||
|
-configs_path="/PATH/TO/CONF/FILES"
|
||||||
|
+configs_path="$HOME/.config/wireguard"
|
||||||
|
connected_interface=$(sudo wg | grep interface | cut -d " " -f2)
|
||||||
|
|
||||||
|
connect() {
|
||||||
|
- selected_config=$(ls $configs_path/*.conf | xargs basename -a -s .conf | dmenu)
|
||||||
|
+ selected_config=$(ls $configs_path/*.conf | xargs basename -a -s .conf | rofi -i -dmenu -p "Select a VPN server to connect: ")
|
||||||
|
[[ $selected_config ]] && sudo wg-quick up "$configs_path"/"$selected_config".conf
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -36,9 +36,9 @@ toggle() {
|
||||||
|
print() {
|
||||||
|
if [[ $connected_interface ]]
|
||||||
|
then
|
||||||
|
- echo %{u"$green"}%{+u}%{T4}%{F"$green"}%{T-}%{F-} "$connected_interface"
|
||||||
|
+ echo $connected_interface
|
||||||
|
else
|
||||||
|
- echo %{T4}%{T-}
|
||||||
|
+ echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
71
GitRepositories/patches/rofi-bluetooth/dontshowmenu.patch
Normal file
71
GitRepositories/patches/rofi-bluetooth/dontshowmenu.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
diff --git a/rofi-bluetooth b/rofi-bluetooth
|
||||||
|
index 5c52fd8..012e612 100755
|
||||||
|
--- a/rofi-bluetooth
|
||||||
|
+++ b/rofi-bluetooth
|
||||||
|
@@ -33,7 +33,6 @@ power_on() {
|
||||||
|
toggle_power() {
|
||||||
|
if power_on; then
|
||||||
|
bluetoothctl power off
|
||||||
|
- show_menu
|
||||||
|
else
|
||||||
|
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||||
|
rfkill unblock bluetooth && sleep 3
|
||||||
|
@@ -59,7 +58,6 @@ toggle_scan() {
|
||||||
|
if scan_on; then
|
||||||
|
kill $(pgrep -f "bluetoothctl scan on")
|
||||||
|
bluetoothctl scan off
|
||||||
|
- show_menu
|
||||||
|
else
|
||||||
|
bluetoothctl scan on &
|
||||||
|
echo "Scanning..."
|
||||||
|
@@ -83,10 +81,8 @@ pairable_on() {
|
||||||
|
toggle_pairable() {
|
||||||
|
if pairable_on; then
|
||||||
|
bluetoothctl pairable off
|
||||||
|
- show_menu
|
||||||
|
else
|
||||||
|
bluetoothctl pairable on
|
||||||
|
- show_menu
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -105,10 +101,8 @@ discoverable_on() {
|
||||||
|
toggle_discoverable() {
|
||||||
|
if discoverable_on; then
|
||||||
|
bluetoothctl discoverable off
|
||||||
|
- show_menu
|
||||||
|
else
|
||||||
|
bluetoothctl discoverable on
|
||||||
|
- show_menu
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -126,10 +120,8 @@ device_connected() {
|
||||||
|
toggle_connection() {
|
||||||
|
if device_connected $1; then
|
||||||
|
bluetoothctl disconnect $1
|
||||||
|
- device_menu "$device"
|
||||||
|
else
|
||||||
|
bluetoothctl connect $1
|
||||||
|
- device_menu "$device"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -183,8 +175,6 @@ toggle_trust() {
|
||||||
|
# Useful for status bars like polybar, etc.
|
||||||
|
print_status() {
|
||||||
|
if power_on; then
|
||||||
|
- printf ''
|
||||||
|
-
|
||||||
|
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
|
||||||
|
counter=0
|
||||||
|
|
||||||
|
@@ -202,8 +192,6 @@ print_status() {
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
printf "\n"
|
||||||
|
- else
|
||||||
|
- echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
1
GitRepositories/polybar-wireguard
Submodule
1
GitRepositories/polybar-wireguard
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 838ec1c59f9b9686bece53f9d6e470ff51e35d06
|
1
GitRepositories/rofi-bluetooth
Submodule
1
GitRepositories/rofi-bluetooth
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 893db1f2b549e7bc0e9c62e7670314349a29cdf2
|
1
GitRepositories/st
Submodule
1
GitRepositories/st
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 137175be7526764a3b00600dd9ff4c65393718b0
|
674
LICENSE
Normal file
674
LICENSE
Normal file
@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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 <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
BIN
Pictures/Screenshots/ricing/Desktop.png
Normal file
BIN
Pictures/Screenshots/ricing/Desktop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
BIN
Pictures/Screenshots/ricing/terms.png
Normal file
BIN
Pictures/Screenshots/ricing/terms.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 994 KiB |
BIN
Pictures/Wallpapers/default.jpg
Normal file
BIN
Pictures/Wallpapers/default.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# sahinakkaya's dotfiles
|
||||||
|
|
||||||
|
**Note: These are my old dotfiles. You can find up-to-date version at [sahinakkaya/dotfiles](https://github.com/sahinakkaya/dotfiles/).**
|
||||||
|
|
||||||
|
### Showcase
|
||||||
|
![showcase](https://user-images.githubusercontent.com/32161460/160180461-efc75d21-ccd4-45f5-8a14-5ea47efc51eb.gif)
|
||||||
|
![Desktop](https://raw.github.com/sahinakkaya/old-dotfiles/master/Pictures/Screenshots/ricing/Desktop.png)
|
||||||
|
![Some terminals](https://raw.github.com/sahinakkaya/old-dotfiles/master/Pictures/Screenshots/ricing/terms.png)
|
||||||
|
|
||||||
|
|
||||||
|
### My dotfiles
|
||||||
|
|
||||||
|
- Window manager: [Qtile](https://qtile.org)
|
||||||
|
- Compositor: [Picom](https://github.com/yshui/picom)
|
||||||
|
- Status bar: [Eww - Elkowars Wacky Widgets](https://github.com/elkowar/eww)
|
||||||
|
- Terminal: [My own st build](https://github.com/sahinakkaya/st)
|
||||||
|
- Shell: [zsh](https://www.zsh.org/) configured with [Prezto](https://github.com/sorin-ionescu/prezto)
|
||||||
|
- Shell theme: [powerlevel10k](https://github.com/romkatv/powerlevel10k/)
|
||||||
|
- Editor: [neovim](https://github.com/neovim/neovim)
|
||||||
|
- Notifications: [dunst](https://github.com/dunst-project/dunst)
|
||||||
|
|
||||||
|
### Todo
|
||||||
|
- Create an installation script
|
||||||
|
|
22
scripts/autostart.sh
Executable file
22
scripts/autostart.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
function run {
|
||||||
|
if ! pgrep $1 > /dev/null ;
|
||||||
|
then
|
||||||
|
$@&
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#feh --bg-scale /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png
|
||||||
|
|
||||||
|
rm ~/.cache/workspaces
|
||||||
|
nitrogen --save --set-zoom-fill ~/Pictures/Wallpapers/default.jpg
|
||||||
|
# run picom --experimental-backends -b # --vsync should prevent screen tearing on most setups if needed
|
||||||
|
run picom -b # --vsync should prevent screen tearing on most setups if needed
|
||||||
|
|
||||||
|
eww -c ~/.config/eww/bar/ close-all
|
||||||
|
eww -c ~/.config/eww/bar/ open bar
|
||||||
|
|
||||||
|
keynav daemonize
|
||||||
|
|
||||||
|
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & disown # start polkit agent from GNOME
|
19
scripts/check-battery.sh
Executable file
19
scripts/check-battery.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Set limit to shell argument
|
||||||
|
batteryLimit=$1
|
||||||
|
fullAt=92
|
||||||
|
|
||||||
|
# Get the current battery level with acpi
|
||||||
|
batteryLevel=$(acpi | cut -d ' ' -f 4 | tr -d '%|,| ')
|
||||||
|
charging=$(acpi | cut -d ' ' -f 3 | tr -d ',| ')
|
||||||
|
|
||||||
|
echo $batteryLevel
|
||||||
|
|
||||||
|
if [[ "$batteryLevel" -le "$batteryLimit" ]] && [[ "$charging" == "Discharging" ]]; then
|
||||||
|
/usr/bin/notify-send -a "Battery Warning" --urgency critical "Battery level at ${batteryLevel}%" -i abrt -t 10000
|
||||||
|
/usr/bin/paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
#elif [[ "$batteryLevel" -gt "$fullAt" ]] && [[ ! "$charging" == "Discharging" ]]; then
|
||||||
|
# /usr/bin/notify-send -a "Battery Warning" "Battery is full: ${batteryLevel}" -i abrt -t 10000
|
||||||
|
# /usr/bin/paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
fi
|
11
scripts/chlayout
Executable file
11
scripts/chlayout
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
variant=$(setxkbmap -query | grep variant | cut -d" " -f5)
|
||||||
|
|
||||||
|
if [[ $variant == "cdhisopt" ]]
|
||||||
|
then
|
||||||
|
setxkbmap us cdhpt -option ''
|
||||||
|
else
|
||||||
|
setxkbmap us cdhisopt 'caps:ctrl_modifier'
|
||||||
|
fi
|
86
scripts/colorscripts/animals
Executable file
86
scripts/colorscripts/animals
Executable file
@ -0,0 +1,86 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# ============
|
||||||
|
# ASCII ANIMAL
|
||||||
|
# ============
|
||||||
|
|
||||||
|
# ANSI COLOUR CODES
|
||||||
|
RD='\x1B[0;31m'
|
||||||
|
GR='\x1B[0;32m'
|
||||||
|
YL='\x1B[1;33m'
|
||||||
|
OR='\x1B[0;33m'
|
||||||
|
BL='\x1B[0;34m'
|
||||||
|
LBL='\x1B[1;34m'
|
||||||
|
CY='\x1B[1;36m'
|
||||||
|
NC='\x1B[0m' # No Color
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# LIZARD ####################################################################
|
||||||
|
# Adapted from: http://chris.com/ascii/index.php?art=animals/reptiles/lizards - Glo Pearl
|
||||||
|
liz1="${GR} ${YL}O${GR}--${YL}O${GR}^^^^^^^^^^^^\________${NC}\n"
|
||||||
|
liz2="${GR} \__/||-------||---------~${NC}\n"
|
||||||
|
liz="$liz1$liz2"
|
||||||
|
|
||||||
|
# DINOSAUR ##################################################################
|
||||||
|
# Adapted from: http://chris.com/ascii/index.php?art=animals/reptiles/dinosaurs
|
||||||
|
din1="${OR} __ ${NC}\n"
|
||||||
|
din2="${OR} / ${LBL}°${OR}_)${NC}\n"
|
||||||
|
din3="${OR} _.----. _ / / ${NC}\n"
|
||||||
|
din4="${OR} / ../ ${NC}\n"
|
||||||
|
din5="${OR} ___/ ( | ( ..| ${NC}\n"
|
||||||
|
din6="${OR} -------|_|--|_| ${NC}\n"
|
||||||
|
din="$din1$din2$din3$din4$din5$din6"
|
||||||
|
|
||||||
|
# DUCK #####################################################################
|
||||||
|
# Adapted from: http://textart.io/art/tag/duck
|
||||||
|
duc1=" __ \n"
|
||||||
|
duc2=" ___( o)${OR}>${NC} \n"
|
||||||
|
duc3=" \ <_. ) ${GR}V${NC} \n"
|
||||||
|
duc4=" ${BL}~~~~~${NC}\`---'${BL}~~~~~${GR}|${BL}~~~${NC}\n"
|
||||||
|
duc="$duc1$duc2$duc3$duc4"
|
||||||
|
|
||||||
|
# PEACOCK #################################################################
|
||||||
|
# Adapted from: http://www.chris.com/ascii/joan/www.geocities.com/SoHo/7373/birds.html#peacockk
|
||||||
|
pea1=" ${CY}_ _ ${NC}\n"
|
||||||
|
pea2=" ${GR}__${CY}/o'V'o\\\\${GR}__ ${NC}\n"
|
||||||
|
pea3=" ${CY}__${GR}/o ${CY}\\ : / ${GR}o\\\\${CY}__ ${NC}\n"
|
||||||
|
pea4=" ${CY}/o ${GR}\`. ${CY}\ : / ${GR}.' ${CY}o\\ ${NC}\n"
|
||||||
|
pea5=" ${GR}_${CY}\\ ${GR}'. ${NC}/\"\\ ${GR}.' ${CY}/${GR}_ ${NC}\n"
|
||||||
|
pea6=" ${GR}/o${CY} \`-._ ${GR}'${NC}\\\v/${GR}' ${CY}_.-\` ${GR}o\\\ ${NC}\n"
|
||||||
|
pea7=" ${GR}\\_${CY} \`-.${NC}/ \\\\${CY}.-\` ${GR}_/ ${NC}\n"
|
||||||
|
pea8=" ${CY}/o${NC} ${GR}\`\`---._${NC}/ \\\\${GR}_.---'' ${CY}o\\\\${NC}\n"
|
||||||
|
pea9=" ${CY}\_________${NC}\ /${CY}_________/${NC}\n"
|
||||||
|
pea10=" '\_/' \n"
|
||||||
|
pea11=" ${OR}_|_|_${NC} \n"
|
||||||
|
pea="$pea1$pea2$pea3$pea4$pea5$pea6$pea7$pea8$pea9$pea10$pea11"
|
||||||
|
|
||||||
|
# SQUIRREL ################################################################
|
||||||
|
# Adapted from: http://www.heartnsoul.com/ascii_art/squirrels.txt
|
||||||
|
squ1="${OR} ,;;:;, ${NC}\n"
|
||||||
|
squ2="${OR} ;;;;; ${NC}\n"
|
||||||
|
squ3="${OR} ,:;;:; ,'=. ${NC}\n"
|
||||||
|
squ4="${OR} ;:;:;' .=\" ,'_\\\\${NC}\n"
|
||||||
|
squ5="${OR} ':;:;,/ ,__:=${RD}@${NC}\n"
|
||||||
|
squ6="${OR} ';;:; =./)_ ${NC}\n"
|
||||||
|
squ7="${OR} \`\"=\_ )_\"\` ${NC}\n"
|
||||||
|
squ8="${OR} \`\`'\"\` ${NC}\n"
|
||||||
|
squ="$squ1$squ2$squ3$squ4$squ5$squ6$squ7$squ8"
|
||||||
|
|
||||||
|
# Generate random number
|
||||||
|
RAND=$((((RANDOM + RANDOM) % 5) + 1))
|
||||||
|
|
||||||
|
case "$RAND" in
|
||||||
|
1) echo -e "$liz"
|
||||||
|
;;
|
||||||
|
2) echo -e "$din"
|
||||||
|
;;
|
||||||
|
3) echo -e "$duc"
|
||||||
|
;;
|
||||||
|
4) echo -e "$pea"
|
||||||
|
;;
|
||||||
|
5) echo -e "$squ"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
48
scripts/colorscripts/bonsai
Executable file
48
scripts/colorscripts/bonsai
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# &&
|
||||||
|
# &&&&&
|
||||||
|
# &&&\/& &&&
|
||||||
|
# &&|,/ |/& &&
|
||||||
|
# &&/ / /_& &&
|
||||||
|
# \ { |_____/_&
|
||||||
|
# { / / &&&
|
||||||
|
# .`. \{___\________\/_\}
|
||||||
|
# \} \}\{ \
|
||||||
|
# }\{\{ \____&
|
||||||
|
# \{\}\{ `&&&
|
||||||
|
# {{} &&
|
||||||
|
# , -=-~{ .-^- _
|
||||||
|
# `.
|
||||||
|
|
||||||
|
# File: bonsai-tree.textart
|
||||||
|
# Description: Bonsai tree
|
||||||
|
# Author: Hazel Levine
|
||||||
|
# └─ https://git.knightsofthelambdacalcul.us/hazel
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: bonsai-tree
|
||||||
|
# └─ https://git.knightsofthelambdacalcul.us/hazel/etc/src/branch/canon/bin/bonsai-tree
|
||||||
|
# This file from NNB's text art collections
|
||||||
|
# └─ https://github.com/NNBnh/nnbs-text-art/blob/main/other/bonsai-tree.textart
|
||||||
|
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[32m&&
|
||||||
|
\033[32m&&&&&
|
||||||
|
\033[32m&&&\033[33m\/\033[32m& &&&
|
||||||
|
\033[32m&&\033[33m|,/ |/\033[32m& &&
|
||||||
|
\033[32m&&\033[33m/ / /_\033[32m& &&
|
||||||
|
\033[33m\ { |_____/_\033[32m&
|
||||||
|
\033[33m{ / / \033[32m&&&
|
||||||
|
\033[33m.\`. \\{___\________\/_\}
|
||||||
|
\033[33m\} \}\{ \\
|
||||||
|
\033[33m}\{\{ \\____\033[32m&
|
||||||
|
\033[33m\{\}\{ \`\033[32m&\033[33m\\033[32m&&
|
||||||
|
\033[33m{{} \033[32m&&
|
||||||
|
\033[33m, -=-~{ .-^- _
|
||||||
|
\`.\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
22
scripts/colorscripts/colorblocks
Executable file
22
scripts/colorscripts/colorblocks
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒
|
||||||
|
# ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒
|
||||||
|
# ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒ ░░░░░░▒▒
|
||||||
|
# ▓▓▓▓▓▓██ ▓▓▓▓▓▓██ ▓▓▓▓▓▓██ ▓▓▓▓▓▓██ ▓▓▓▓▓▓██ ▓▓▓▓▓▓██
|
||||||
|
|
||||||
|
# File: colorblocks.textart
|
||||||
|
# Description: Show the terminal colourscheme as blocks
|
||||||
|
# Author: Adhi Pambudi
|
||||||
|
# └─ https://github.com/addy-dclxvi
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/colorblocks.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n\033[41m \033[101m \033[0m \033[42m \033[102m \033[0m \033[43m \033[103m \033[0m \033[44m \033[104m \033[0m \033[45m \033[105m \033[0m \033[46m \033[106m \033[0m
|
||||||
|
\033[41m \033[101m \033[0m \033[42m \033[102m \033[0m \033[43m \033[103m \033[0m \033[44m \033[104m \033[0m \033[45m \033[105m \033[0m \033[46m \033[106m \033[0m
|
||||||
|
\033[41m \033[101m \033[0m \033[42m \033[102m \033[0m \033[43m \033[103m \033[0m \033[44m \033[104m \033[0m \033[45m \033[105m \033[0m \033[46m \033[106m \033[0m
|
||||||
|
\033[47m \033[107m \033[0m \033[47m \033[107m \033[0m \033[47m \033[107m \033[0m \033[47m \033[107m \033[0m \033[47m \033[107m \033[0m \033[47m \033[107m \033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
25
scripts/colorscripts/colorwheel
Executable file
25
scripts/colorscripts/colorwheel
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# ||||||
|
||||||
|
# ||||||||||
|
||||||
|
# ||||||||||
|
||||||
|
# ||||||||||
|
||||||
|
# ||||||
|
||||||
|
|
||||||
|
# File: colorwheel.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Bastien Dejean
|
||||||
|
# └─ https://github.com/baskerville
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/stark/colorwheel.textart
|
||||||
|
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[49;35m|\033[49;31m|\033[101;31m|\033[41;97m|\033[49;91m|\033[49;93m|\033[0m
|
||||||
|
\033[105;35m|\033[45;97m|\033[49;97m||\033[100;97m||\033[49;37m||\033[103;33m|\033[43;97m|\033[0m
|
||||||
|
\033[49;95m|\033[49;94m|\033[100;37m||\033[40;97m||\033[40;37m||\033[49;33m|\033[49;32m|\033[0m
|
||||||
|
\033[104;34m|\033[44;97m|\033[49;90m||\033[40;39m||\033[49;39m||\033[102;32m|\033[42;97m|\033[0m
|
||||||
|
\033[49;34m|\033[49;36m|\033[106;36m|\033[46;97m|\033[49;96m|\033[49;92m|\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
18
scripts/colorscripts/crunch
Executable file
18
scripts/colorscripts/crunch
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: crunch.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Gutterslob
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=3763
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/crunch.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[41m \033[0m \033[41m \033[0m \033[42m \033[0m \033[42m \033[0m \033[43m \033[0m \033[43m \033[0m \033[44m \033[0m \033[44m \033[0m \033[45m \033[0m \033[45m \033[0m \033[46m \033[0m \033[46m \033[0m
|
||||||
|
\033[41m \033[0m \033[42m \033[0m \033[43m \033[0m \033[44m \033[0m \033[45m \033[0m \033[46m \033[0m
|
||||||
|
\033[41m \033[101m \033[41m \033[0m \033[42m \033[102m \033[42m \033[0m \033[43m \033[103m \033[43m \033[0m \033[44m \033[104m \033[44m \033[0m \033[45m \033[105m \033[45m \033[0m \033[46m \033[106m \033[46m \033[0m
|
||||||
|
\033[41m \033[0m \033[42m \033[0m \033[43m \033[0m \033[44m \033[0m \033[45m \033[0m \033[46m \033[0m
|
||||||
|
\033[41m \033[0m \033[41m \033[0m \033[42m \033[0m \033[42m \033[0m \033[43m \033[0m \033[43m \033[0m \033[44m \033[0m \033[44m \033[0m \033[45m \033[0m \033[45m \033[0m \033[46m \033[0m \033[46m \033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
40
scripts/colorscripts/crunchbang
Executable file
40
scripts/colorscripts/crunchbang
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# ANSI Color -- use these variables to easily have different color
|
||||||
|
# and format output. Make sure to output the reset sequence after
|
||||||
|
# colors (f = foreground, b = background), and use the 'off'
|
||||||
|
# feature for anything you turn on.
|
||||||
|
|
||||||
|
initializeANSI()
|
||||||
|
{
|
||||||
|
esc=""
|
||||||
|
|
||||||
|
blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
|
||||||
|
yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
|
||||||
|
cyanf="${esc}[36m"; whitef="${esc}[37m"
|
||||||
|
|
||||||
|
blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
|
||||||
|
yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
|
||||||
|
cyanb="${esc}[46m"; whiteb="${esc}[47m"
|
||||||
|
|
||||||
|
boldon="${esc}[1m"; boldoff="${esc}[22m"
|
||||||
|
italicson="${esc}[3m"; italicsoff="${esc}[23m"
|
||||||
|
ulon="${esc}[4m"; uloff="${esc}[24m"
|
||||||
|
invon="${esc}[7m"; invoff="${esc}[27m"
|
||||||
|
|
||||||
|
reset="${esc}[0m"
|
||||||
|
}
|
||||||
|
|
||||||
|
# note in this first use that switching colors doesn't require a reset
|
||||||
|
# first - the new color overrides the old one.
|
||||||
|
|
||||||
|
initializeANSI
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
${reset}${redf}▄█▄█▄ ${reset}${boldon}${redf}█ ${reset}${greenf}▄█▄█▄ ${reset}${boldon}${greenf}█ ${reset}${yellowf}▄█▄█▄ ${reset}${boldon}${yellowf}█ ${reset}${bluef}▄█▄█▄ ${reset}${boldon}${bluef}█ ${reset}${purplef}▄█▄█▄ ${reset}${boldon}${purplef}█ ${reset}${cyanf}▄█▄█▄ ${reset}${boldon}${cyanf}█${reset}
|
||||||
|
${reset}${redf}▄█▄█▄ ${reset}${boldon}${redf}▀ ${reset}${greenf}▄█▄█▄ ${reset}${boldon}${greenf}▀ ${reset}${yellowf}▄█▄█▄ ${reset}${boldon}${yellowf}▀ ${reset}${bluef}▄█▄█▄ ${reset}${boldon}${bluef}▀ ${reset}${purplef}▄█▄█▄ ${reset}${boldon}${purplef}▀ ${reset}${cyanf}▄█▄█▄ ${reset}${boldon}${cyanf}▀${reset}
|
||||||
|
${reset}${redf} ▀ ▀ ${reset}${boldon}${redf}▀ ${reset}${greenf} ▀ ▀ ${reset}${boldon}${greenf}▀ ${reset}${yellowf} ▀ ▀ ${reset}${boldon}${yellowf}▀ ${reset}${bluef} ▀ ▀ ${reset}${boldon}${bluef}▀ ${reset}${purplef} ▀ ▀ ${reset}${boldon}${purplef}▀ ${reset}${cyanf} ▀ ▀ ${reset}${boldon}${cyanf}▀${reset}
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
31
scripts/colorscripts/dna
Executable file
31
scripts/colorscripts/dna
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: dna.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Pfh
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=9103
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/dna.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[31m\\---\033[91m/\033[0m \033[32m\\---\033[92m/\033[0m \033[33m\\---\033[93m/\033[0m \033[34m\\---\033[94m/\033[0m \033[35m\\---\033[95m/\033[0m \033[36m\\---\033[96m/\033[0m
|
||||||
|
\033[31m\\-\033[91m/\033[0m \033[32m\\-\033[92m/\033[0m \033[33m\\-\033[93m/\033[0m \033[34m\\-\033[94m/\033[0m \033[35m\\-\033[95m/\033[0m \033[36m\\-\033[96m/\033[0m
|
||||||
|
\033[31m\\\\\033[0m \033[32m\\\\\033[0m \033[33m\\\\\033[0m \033[34m\\\\\033[0m \033[35m\\\\\033[0m \033[36m\\\\\033[0m
|
||||||
|
\033[91m/-\033[31m\\\\\033[0m \033[92m/-\033[32m\\\\\033[0m \033[93m/-\033[33m\\\\\033[0m \033[94m/-\033[34m\\\\\033[0m \033[95m/-\033[35m\\\\\033[0m \033[96m/-\033[36m\\\\\033[0m
|
||||||
|
\033[91m/---\033[31m\\\\\033[0m \033[92m/---\033[32m\\\\\033[0m \033[93m/---\033[33m\\\\\033[0m \033[94m/---\033[34m\\\\\033[0m \033[95m/---\033[35m\\\\\033[0m \033[96m/---\033[36m\\\\\033[0m
|
||||||
|
\033[91m(-----\033[31m)\033[0m \033[92m(-----\033[32m)\033[0m \033[93m(-----\033[33m)\033[0m \033[94m(-----\033[34m)\033[0m \033[95m(-----\033[35m)\033[0m \033[96m(-----\033[36m)\033[0m
|
||||||
|
\033[91m\\---\033[31m/\033[0m \033[92m\\---\033[32m/\033[0m \033[93m\\---\033[33m/\033[0m \033[94m\\---\033[34m/\033[0m \033[95m\\---\033[35m/\033[0m \033[96m\\---\033[36m/\033[0m
|
||||||
|
\033[91m\\-\033[31m/\033[0m \033[92m\\-\033[32m/\033[0m \033[93m\\-\033[33m/\033[0m \033[94m\\-\033[34m/\033[0m \033[95m\\-\033[35m/\033[0m \033[96m\\-\033[36m/\033[0m
|
||||||
|
\033[91m/\033[0m \033[92m/\033[0m \033[93m/\033[0m \033[94m/\033[0m \033[95m/\033[0m \033[96m/\033[0m
|
||||||
|
\033[31m/-\033[91m\\\\\033[0m \033[32m/-\033[92m\\\\\033[0m \033[33m/-\033[93m\\\\\033[0m \033[34m/-\033[94m\\\\\033[0m \033[35m/-\033[95m\\\\\033[0m \033[36m/-\033[96m\\\\\033[0m
|
||||||
|
\033[31m/---\033[91m\\\\\033[0m \033[32m/---\033[92m\\\\\033[0m \033[33m/---\033[93m\\\\\033[0m \033[34m/---\033[94m\\\\\033[0m \033[35m/---\033[95m\\\\\033[0m \033[36m/---\033[96m\\\\\033[0m
|
||||||
|
\033[31m(-----\033[91m)\033[0m \033[32m(-----\033[92m)\033[0m \033[33m(-----\033[93m)\033[0m \033[34m(-----\033[94m)\033[0m \033[35m(-----\033[95m)\033[0m \033[36m(-----\033[96m)\033[0m
|
||||||
|
\033[31m\\---\033[91m/\033[0m \033[32m\\---\033[92m/\033[0m \033[33m\\---\033[93m/\033[0m \033[34m\\---\033[94m/\033[0m \033[35m\\---\033[95m/\033[0m \033[36m\\---\033[96m/\033[0m
|
||||||
|
\033[31m\\-\033[91m/\033[0m \033[32m\\-\033[92m/\033[0m \033[33m\\-\033[93m/\033[0m \033[34m\\-\033[94m/\033[0m \033[35m\\-\033[95m/\033[0m \033[36m\\-\033[96m/\033[0m
|
||||||
|
\033[31m\\\\\033[0m \033[32m\\\\\033[0m \033[33m\\\\\033[0m \033[34m\\\\\033[0m \033[35m\\\\\033[0m \033[36m\\\\\033[0m
|
||||||
|
\033[91m/\033[0m \033[92m/\033[0m \033[93m/\033[0m \033[94m/\033[0m \033[95m/\033[0m \033[96m/\033[0m
|
||||||
|
\033[31m/-\033[91m\\\\\033[0m \033[32m/-\033[92m\\\\\033[0m \033[33m/-\033[93m\\\\\033[0m \033[34m/-\033[94m\\\\\033[0m \033[35m/-\033[95m\\\\\033[0m \033[36m/-\033[96m\\\\\033[0m
|
||||||
|
\033[31m/---\033[91m\\\\\033[0m \033[32m/---\033[92m\\\\\033[0m \033[33m/---\033[93m\\\\\033[0m \033[34m/---\033[94m\\\\\033[0m \033[35m/---\033[95m\\\\\033[0m \033[36m/---\033[96m\\\\\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
66
scripts/colorscripts/emwave
Executable file
66
scripts/colorscripts/emwave
Executable file
@ -0,0 +1,66 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
|
||||||
|
|
||||||
|
# File: emwave.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Ilya144
|
||||||
|
# └─ https://github.com/ilya144
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/emwave.textart
|
||||||
|
|
||||||
|
# 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 <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
# Values
|
||||||
|
TEXT="${1:-/\\}"
|
||||||
|
|
||||||
|
while [ "${#TEXTS}" -le '75' ]; do
|
||||||
|
TEXTS="$TEXTS$TEXT"
|
||||||
|
done
|
||||||
|
|
||||||
|
TEXTS=$(printf '%s' "$TEXTS" | sed -e 's/^\(.\{75\}\).*/\1/')
|
||||||
|
|
||||||
|
|
||||||
|
# Start
|
||||||
|
i='0'
|
||||||
|
|
||||||
|
while [ -n "$TEXTS" ]; do
|
||||||
|
charater=$(echo "$TEXTS" | sed -e 's/^\(.\{1\}\).*/\1/')
|
||||||
|
TEXTS="${TEXTS#?}"
|
||||||
|
|
||||||
|
case "$charater" in
|
||||||
|
'\') charater='\\' ;;
|
||||||
|
'%') charater='%%' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
r=$(( 255 - ( i * ( 255 / 76 ) ) ))
|
||||||
|
g=$(( i * ( 512 / 76 ) ))
|
||||||
|
b=$(( i * ( 255 / 76 ) ))
|
||||||
|
|
||||||
|
[ "$g" -gt 255 ] && g=$(( 510 - g ))
|
||||||
|
|
||||||
|
rr=$(( 255 - r ))
|
||||||
|
gg=$(( 255 - g ))
|
||||||
|
bb=$(( 255 - b ))
|
||||||
|
|
||||||
|
print="$print\033[48;2;${r};${g};${b}m\033[38;2;${rr};${gg};${bb}m$charater\033[0m"
|
||||||
|
|
||||||
|
i=$(( i + 1 ))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "$print"
|
||||||
|
|
||||||
|
exit 0
|
19
scripts/colorscripts/faces
Executable file
19
scripts/colorscripts/faces
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: faces.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Pfh
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=9103
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/faces.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n╔══════════════════════════════════════════════════════════════════╗
|
||||||
|
║ \033[31m▄█ █▄ \033[32m▄█ █▄ \033[33m▄█ █▄ \033[34m▄█ █▄ \033[35m▄█ █▄ \033[36m▄█ █▄ \033[0m║
|
||||||
|
║ \033[91m▄█◄► ◄►█▄ \033[92m▄█◄► ◄►█▄ \033[93m▄█◄► ◄►█▄ \033[94m▄█◄► ◄►█▄ \033[95m▄█◄► ◄►█▄ \033[96m▄█◄► ◄►█▄ \033[0m║
|
||||||
|
║ \033[91m▀█ █▀ \033[92m▀█ █▀ \033[93m▀█ █▀ \033[94m▀█ █▀ \033[95m▀█ █▀ \033[96m▀█ █▀ \033[0m║
|
||||||
|
║ \033[31m▀█ █▀ \033[32m▀█ █▀ \033[33m▀█ █▀ \033[34m▀█ █▀ \033[35m▀█ █▀ \033[36m▀█ █▀ \033[0m║
|
||||||
|
╚══════════════════════════════════════════════════════════════════╝\n"
|
||||||
|
|
||||||
|
exit 0
|
16
scripts/colorscripts/fade
Executable file
16
scripts/colorscripts/fade
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: fade.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Pfh
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=9103
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/fade.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n\033[31m▒▒▒▒ \033[91m▒▒ \033[32m▒▒▒▒ \033[92m▒▒ \033[33m▒▒▒▒ \033[93m▒▒ \033[34m▒▒▒▒ \033[94m▒▒ \033[35m▒▒▒▒ \033[95m▒▒ \033[36m▒▒▒▒ \033[96m▒▒\033[0m
|
||||||
|
\033[31m▒▒ ■ \033[91m▒▒ \033[32m▒▒ ■ \033[92m▒▒ \033[33m▒▒ ■ \033[93m▒▒ \033[34m▒▒ ■ \033[94m▒▒ \033[35m▒▒ ■ \033[95m▒▒ \033[36m▒▒ ■ \033[96m▒▒\033[0m
|
||||||
|
\033[31m▒▒ \033[91m▒▒▒▒ \033[32m▒▒ \033[92m▒▒▒▒ \033[33m▒▒ \033[93m▒▒▒▒ \033[34m▒▒ \033[94m▒▒▒▒ \033[35m▒▒ \033[95m▒▒▒▒ \033[36m▒▒ \033[96m▒▒▒▒\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
24
scripts/colorscripts/ghosts
Executable file
24
scripts/colorscripts/ghosts
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: ghosts.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Pfh
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=9103
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/ghosts.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[31m▄▄▄ \033[32m▄▄▄ \033[33m▄▄▄ \033[34m▄▄▄ \033[35m▄▄▄ \033[36m▄▄▄\033[0m
|
||||||
|
\033[31m▀█▀██ ▄ \033[32m▀█▀██ ▄ \033[33m▀█▀██ ▄ \033[34m▀█▀██ ▄ \033[35m▀█▀██ ▄ \033[36m▀█▀██ ▄\033[0m
|
||||||
|
\033[31m▀▄██████▀ \033[32m▀▄██████▀ \033[33m▀▄██████▀ \033[34m▀▄██████▀ \033[35m▀▄██████▀ \033[36m▀▄██████▀\033[0m
|
||||||
|
\033[31m▀█████ \033[32m▀█████ \033[33m▀█████ \033[34m▀█████ \033[35m▀█████ \033[36m▀█████\033[0m
|
||||||
|
\033[31m▀▀▀▀▄ \033[32m▀▀▀▀▄ \033[33m▀▀▀▀▄ \033[34m▀▀▀▀▄ \033[35m▀▀▀▀▄ \033[36m▀▀▀▀▄\033[0m
|
||||||
|
|
||||||
|
\033[91m▄▄▄ \033[92m▄▄▄ \033[93m▄▄▄ \033[94m▄▄▄ \033[95m▄▄▄ \033[96m▄▄▄\033[0m
|
||||||
|
\033[91m▀█▀██ ▄ \033[92m▀█▀██ ▄ \033[93m▀█▀██ ▄ \033[94m▀█▀██ ▄ \033[95m▀█▀██ ▄ \033[96m▀█▀██ ▄\033[0m
|
||||||
|
\033[91m▀▄██████▀ \033[92m▀▄██████▀ \033[93m▀▄██████▀ \033[94m▀▄██████▀ \033[95m▀▄██████▀ \033[96m▀▄██████▀\033[0m
|
||||||
|
\033[91m▀█████ \033[92m▀█████ \033[93m▀█████ \033[94m▀█████ \033[95m▀█████ \033[96m▀█████\033[0m
|
||||||
|
\033[91m▀▀▀▀▄ \033[92m▀▀▀▀▄ \033[93m▀▀▀▀▄ \033[94m▀▀▀▀▄ \033[95m▀▀▀▀▄ \033[96m▀▀▀▀▄\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
26
scripts/colorscripts/hedgehogs
Executable file
26
scripts/colorscripts/hedgehogs
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# ANSI color scheme script by github.com/joshdk
|
||||||
|
|
||||||
|
red=$(printf '\e[31m')
|
||||||
|
grn=$(printf '\e[32m')
|
||||||
|
ylw=$(printf '\e[33m')
|
||||||
|
blu=$(printf '\e[34m')
|
||||||
|
mag=$(printf '\e[35m')
|
||||||
|
cya=$(printf '\e[36m')
|
||||||
|
|
||||||
|
bld=$(printf '\e[1m')
|
||||||
|
rst=$(printf '\e[0m')
|
||||||
|
|
||||||
|
cat << ART
|
||||||
|
|
||||||
|
$red ╷╽╽╽╽╽╽╽╽╽╷ $grn ╷╽╽╽╽╽╽╽╽╽╷ $ylw ╷╽╽╽╽╽╽╽╽╽╷ $blu ╷╽╽╽╽╽╽╽╽╽╷ $mag ╷╽╽╽╽╽╽╽╽╽╷ $cya ╷╽╽╽╽╽╽╽╽╽╷
|
||||||
|
$red ╽┃┃┃┃┃┃┃┃┃┃┃╽ $grn ╽┃┃┃┃┃┃┃┃┃┃┃╽ $ylw ╽┃┃┃┃┃┃┃┃┃┃┃╽ $blu ╽┃┃┃┃┃┃┃┃┃┃┃╽ $mag ╽┃┃┃┃┃┃┃┃┃┃┃╽ $cya ╽┃┃┃┃┃┃┃┃┃┃┃╽
|
||||||
|
$red ┪┃┃┃┃┃┃┃┃┃┃' .\ $grn /. '✿┃┃┃┃┃┃┃┃┃┢ $ylw ┪┃┃┃┃┃┃┃┃┃┃' .\ $blu /. '✿┃┃┃┃┃┃┃┃┃┢ $mag ┪┃┃┃┃┃┃┃┃┃┃' .\ $cya /. '✿┃┃┃┃┃┃┃┃┃┢
|
||||||
|
$red ╹┃┃┃┃┃┃┃┃⧓ ___• $grn •___ ┃┃┃┃┃┃┃┃┃╹ $ylw ╹┃┃┃┃┃┃┃┃⧓ ___• $blu •___ ┃┃┃┃┃┃┃┃┃╹ $mag ╹┃┃┃┃┃┃┃┃⧓ ___• $cya •___ ┃┃┃┃┃┃┃┃┃╹
|
||||||
|
$bld
|
||||||
|
$red ╷╽╽╽╽╽╽╽╽╽╷ $grn ╷╽╽╽╽╽╽╽╽╽╷ $ylw ╷╽╽╽╽╽╽╽╽╽╷ $blu ╷╽╽╽╽╽╽╽╽╽╷ $mag ╷╽╽╽╽╽╽╽╽╽╷ $cya ╷╽╽╽╽╽╽╽╽╽╷
|
||||||
|
$red ╽┃┃┃┃┃┃┃┃┃┃┃╽ $grn ╽┃┃┃┃┃┃┃┃┃┃┃╽ $ylw ╽┃┃┃┃┃┃┃┃┃┃┃╽ $blu ╽┃┃┃┃┃┃┃┃┃┃┃╽ $mag ╽┃┃┃┃┃┃┃┃┃┃┃╽ $cya ╽┃┃┃┃┃┃┃┃┃┃┃╽
|
||||||
|
$red ┪┃┃┃┃┃┃┃┃┃✿' .\ $grn /. '┃┃┃┃┃┃┃┃┃┃┢ $ylw ┪┃┃┃┃┃┃┃┃┃✿' .\ $blu /. '┃┃┃┃┃┃┃┃┃┃┢ $mag ┪┃┃┃┃┃┃┃┃┃✿' .\ $cya /. '┃┃┃┃┃┃┃┃┃┃┢
|
||||||
|
$red ╹┃┃┃┃┃┃┃┃┃ ___• $grn •___ ⧓┃┃┃┃┃┃┃┃╹ $ylw ╹┃┃┃┃┃┃┃┃┃ ___• $blu •___ ⧓┃┃┃┃┃┃┃┃╹ $mag ╹┃┃┃┃┃┃┃┃┃ ___• $cya •___ ⧓┃┃┃┃┃┃┃┃╹
|
||||||
|
$rst
|
||||||
|
ART
|
47
scripts/colorscripts/illumina
Executable file
47
scripts/colorscripts/illumina
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# ._________________________________.
|
||||||
|
# |▓▓▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░▒|
|
||||||
|
# |░▒ _ ▒░|
|
||||||
|
# |▓ //\ ▒|
|
||||||
|
# |▓ //-- // \ ========, ▒|
|
||||||
|
# |▒ // // \ / ▒|
|
||||||
|
# |▒ // // \ / ▒|
|
||||||
|
# |▒ __________ ___▒█__ _________▒|
|
||||||
|
# |▒ / \ █▒ // // ▓|
|
||||||
|
# |▒ / \ // // ▓|
|
||||||
|
# |▒ /__________________// ▓|
|
||||||
|
# |▓ \ // ▓|
|
||||||
|
# |▓ \// ▓|
|
||||||
|
# | ▒ " ▓█|
|
||||||
|
# |▓░ ░░░░░░░▓▓▓▓▓▓▓████████▓|
|
||||||
|
# '---------------------------------'
|
||||||
|
|
||||||
|
# File: illumina.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Venam
|
||||||
|
# └─ https://venam.nixers.net/blog
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/stark/illumina.textart
|
||||||
|
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n\033[1;33m._________________________________.\033[0m
|
||||||
|
\033[1;33m|\033[0;104;94m##\033[0m\033[46;36m########\033[106;96m#######\033[45;35m#######\033[105;95m#######\033[45;35m#\033[41;31m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;106;96m#\033[0m\033[44;34m#\033[0m \033[34m_ \033[101;91m#\033[105;95m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;104;94m#\033[0m \033[34m//\ \033[41;31m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;104;94m#\033[0m \033[32m/\033[1;32m/-- \033[0;34m/\033[1;34m/ \033[0;36m\ \033[32m========, \033[41;31m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;44;34m#\033[0m \033[32m/\033[1;32m/ \033[0;34m/\033[1;34m/ \033[0;36m\ \033[32m/ \033[101;91m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;44;34m#\033[0m \033[32m/\033[1;32m/ \033[0;34m/\033[1;34m/ \033[0;36m\ \033[32m/ \033[101;91m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;44;34m#\033[0m \033[1;31m__________ ___\033[41;31m#\033[107;97m#\033[0;31m__ _________\033[101;91m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;42;32m#\033[0m \033[32m/ \033[34m\ \033[47;37m#\033[101;91m#\033[0m \033[1;34m/\033[0;34m/ \033[1;32m/\033[0;32m/ \033[43;33m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;42;32m#\033[0m \033[32m/ \033[34m\ \033[1;34m/\033[0;34m/ \033[1;32m/\033[0;32m/ \033[43;33m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;42;32m#\033[0m \033[32m/__________________\033[1;32m/\033[0;32m/ \033[43;33m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;102;92m#\033[0m \033[34m\ \033[1;34m/\033[0;34m/ \033[103;93m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;102;92m#\033[0m \033[34m\\\\\033[1;34m/\033[0;34m/ \033[103;93m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;40;30m#\033[42;32m#\033[0m \033[1;34m\" \033[0;43;33m#\033[107;97m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m|\033[0;102;92m#\033[100;90m#\033[40;30m########\033[100;90m#######\033[47;37m#######\033[107;97m#######\033[47;37m#\033[103;93m#\033[0;1;33m|\033[0m
|
||||||
|
\033[1;33m'---------------------------------'\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
30
scripts/colorscripts/invaders
Executable file
30
scripts/colorscripts/invaders
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: space-invaders.textart
|
||||||
|
# Description: Space Invaders
|
||||||
|
# Author: Lolilolicon
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/space-invaders.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[31m▀▄ ▄▀ \033[32m▄▄▄████▄▄▄ \033[33m▄██▄ \033[34m▀▄ ▄▀ \033[35m▄▄▄████▄▄▄ \033[36m▄██▄\033[0m
|
||||||
|
\033[31m▄█▀███▀█▄ \033[32m███▀▀██▀▀███ \033[33m▄█▀██▀█▄ \033[34m▄█▀███▀█▄ \033[35m███▀▀██▀▀███ \033[36m▄█▀██▀█▄\033[0m
|
||||||
|
\033[31m█▀███████▀█ \033[32m▀▀███▀▀███▀▀ \033[33m▀█▀██▀█▀ \033[34m█▀███████▀█ \033[35m▀▀███▀▀███▀▀ \033[36m▀█▀██▀█▀\033[0m
|
||||||
|
\033[31m▀ ▀▄▄ ▄▄▀ ▀ \033[32m▀█▄ ▀▀ ▄█▀ \033[33m▀▄ ▄▀ \033[34m▀ ▀▄▄ ▄▄▀ ▀ \033[35m▀█▄ ▀▀ ▄█▀ \033[36m▀▄ ▄▀\033[0m
|
||||||
|
|
||||||
|
\033[91m▄ ▀▄ ▄▀ ▄ \033[92m▄▄▄████▄▄▄ \033[93m▄██▄ \033[94m▄ ▀▄ ▄▀ ▄ \033[95m▄▄▄████▄▄▄ \033[96m▄██▄\033[0m
|
||||||
|
\033[91m█▄█▀███▀█▄█ \033[92m███▀▀██▀▀███ \033[93m▄█▀██▀█▄ \033[94m█▄█▀███▀█▄█ \033[95m███▀▀██▀▀███ \033[96m▄█▀██▀█▄\033[0m
|
||||||
|
\033[91m▀█████████▀ \033[92m▀▀▀██▀▀██▀▀▀ \033[93m▀▀█▀▀█▀▀ \033[94m▀█████████▀ \033[95m▀▀▀██▀▀██▀▀▀ \033[96m▀▀█▀▀█▀▀\033[0m
|
||||||
|
\033[91m▄▀ ▀▄ \033[92m▄▄▀▀ ▀▀ ▀▀▄▄ \033[93m▄▀▄▀▀▄▀▄ \033[94m▄▀ ▀▄ \033[95m▄▄▀▀ ▀▀ ▀▀▄▄ \033[96m▄▀▄▀▀▄▀▄\033[0m
|
||||||
|
|
||||||
|
|
||||||
|
\033[37m▌\033[0m
|
||||||
|
|
||||||
|
\033[37m▌\033[0m
|
||||||
|
|
||||||
|
\033[37m▄█▄\033[0m
|
||||||
|
\033[37m▄█████████▄\033[0m
|
||||||
|
\033[37m▀▀▀▀▀▀▀▀▀▀▀\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
18
scripts/colorscripts/mouseface
Executable file
18
scripts/colorscripts/mouseface
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: mouseface2.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Ivo
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=10160
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/mouseface2.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[91m██ ██ \033[92m██ ██ \033[93m██ ██ \033[94m██ ██ \033[95m██ ██ \033[96m██ ██\033[0m
|
||||||
|
\033[91m█ \033[37m■\033[91m█ █\033[37m■ \033[91m█ \033[92m█ \033[37m■\033[92m█ █\033[37m■ \033[92m█ \033[93m█ \033[37m■\033[93m█ █\033[37m■ \033[93m█ \033[94m█ \033[37m■\033[94m█ █\033[37m■ \033[94m█ \033[95m█ \033[37m■\033[95m█ █\033[37m■ \033[95m█ \033[96m█ \033[37m■\033[96m█ █\033[37m■ \033[96m█\033[0m
|
||||||
|
\033[31m█ █ █ █ \033[32m█ █ █ █ \033[33m█ █ █ █ \033[34m█ █ █ █ \033[35m█ █ █ █ \033[36m█ █ █ █\033[0m
|
||||||
|
\033[31m█ █ █ \033[32m█ █ █ \033[33m█ █ █ \033[34m█ █ █ \033[35m█ █ █ \033[36m█ █ █\033[0m
|
||||||
|
\033[31m=■= \033[32m=■= \033[33m=■= \033[34m=■= \033[35m=■= \033[36m=■=\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
22
scripts/colorscripts/panes
Executable file
22
scripts/colorscripts/panes
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Author: GekkoP
|
||||||
|
# Source: http://linuxbbq.org/bbs/viewtopic.php?f=4&t=1656#p33189
|
||||||
|
|
||||||
|
f=3 b=4
|
||||||
|
for j in f b; do
|
||||||
|
for i in {0..7}; do
|
||||||
|
printf -v $j$i %b "\e[${!j}${i}m"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
d=$'\e[1m'
|
||||||
|
t=$'\e[0m'
|
||||||
|
v=$'\e[7m'
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
$f0████$d▄$t $f1████$d▄$t $f2████$d▄$t $f3████$d▄$t $f4████$d▄$t $f5████$d▄$t $f6████$d▄$t $f7████$d▄$t
|
||||||
|
$f0████$d█$t $f1████$d█$t $f2████$d█$t $f3████$d█$t $f4████$d█$t $f5████$d█$t $f6████$d█$t $f7████$d█$t
|
||||||
|
$f0████$d█$t $f1████$d█$t $f2████$d█$t $f3████$d█$t $f4████$d█$t $f5████$d█$t $f6████$d█$t $f7████$d█$t
|
||||||
|
$d$f0 ▀▀▀▀ $d$f1 ▀▀▀▀ $f2▀▀▀▀ $f3▀▀▀▀ $f4▀▀▀▀ $f5▀▀▀▀ $f6▀▀▀▀ $f7▀▀▀▀$t
|
||||||
|
EOF
|
142
scripts/colorscripts/pipes
Executable file
142
scripts/colorscripts/pipes
Executable file
@ -0,0 +1,142 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# pipes.sh: Animated pipes terminal screensaver.
|
||||||
|
# Copyleft (ↄ) 2015 - Acidhub <acidhub@craft.net.br>
|
||||||
|
# 2015 - Pipeseroni - http://github.com/pipeseroni
|
||||||
|
# 2014 - Yu-Jie Lin <livibetter@gmail.com>
|
||||||
|
# ???? - Mathew Simpson
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
VERSION=1.2
|
||||||
|
|
||||||
|
M=32768
|
||||||
|
p=3
|
||||||
|
f=75 s=13 r=2000 t=0
|
||||||
|
w=$(tput cols) h=$(tput lines)
|
||||||
|
# ab -> idx = a*4 + b
|
||||||
|
# 0: up, 1: right, 2: down, 3: left
|
||||||
|
# 00 means going up , then going up -> ┃
|
||||||
|
# 12 means going right, then going down -> ┓
|
||||||
|
sets=(
|
||||||
|
"┃┏ ┓┛━┓ ┗┃┛┗ ┏━" # -t 0 "default"
|
||||||
|
"│╭ ╮╯─╮ ╰│╯╰ ╭─" # -t 1 "round"
|
||||||
|
"│┌ ┐┘─┐ └│┘└ ┌─" # -t 2 "weak"
|
||||||
|
"║╔ ╗╝═╗ ╚║╝╚ ╔═" # -t 3 "double"
|
||||||
|
"|+ ++-+ +|++ +-" # -t 4 "add/sub"
|
||||||
|
"|/ \/-\ \|/\ /-" # -t 5 "It' something"
|
||||||
|
".. .... .... .." # -t 6 "dots"
|
||||||
|
".o oo.o o.oo o." # -t 7 "dot-O"
|
||||||
|
"-\ /\|/ /-\/ \|" # -t 8 "railway"
|
||||||
|
"▓≡▓≡≡▓≡ ≡▓≡≡▓≡▓" # -t 9 "blocks"
|
||||||
|
)
|
||||||
|
v=()
|
||||||
|
RNDSTART=0
|
||||||
|
BOLD=1
|
||||||
|
NOCOLOR=0
|
||||||
|
|
||||||
|
OPTIND=1
|
||||||
|
while getopts "p:t:f:s:r:RBChv" arg; do
|
||||||
|
case $arg in
|
||||||
|
p) ((p=(OPTARG>0)?OPTARG:p));;
|
||||||
|
t)
|
||||||
|
if [[ "$OPTARG" = c???????????????? ]]; then
|
||||||
|
V+=(${#sets[@]})
|
||||||
|
sets+=("${OPTARG:1}")
|
||||||
|
else
|
||||||
|
((OPTARG>=0 && OPTARG<${#sets[@]})) && V+=($OPTARG)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
f) ((f=(OPTARG>19 && OPTARG<101)?OPTARG:f));;
|
||||||
|
s) ((s=(OPTARG>4 && OPTARG<16 )?OPTARG:s));;
|
||||||
|
r) ((r=(OPTARG>=0)?OPTARG:r));;
|
||||||
|
R) RNDSTART=1;;
|
||||||
|
B) BOLD=0;;
|
||||||
|
C) NOCOLOR=1;;
|
||||||
|
h) echo -e "Usage: $(basename $0) [OPTION]..."
|
||||||
|
echo -e "Animated pipes terminal screensaver.\n"
|
||||||
|
echo -e " -p [1-?]\tnumber of pipes (D=3)."
|
||||||
|
echo -e " -t [0-$((${#sets[@]} - 1))]\ttype of pipes, can be used more than once (D=0)."
|
||||||
|
echo -e " -t c[16 chars]\tcustom type of pipes."
|
||||||
|
echo -e " -f [20-100]\tframerate (D=75)."
|
||||||
|
echo -e " -s [5-15]\tprobability of a straight fitting (D=13)."
|
||||||
|
echo -e " -r LIMIT\treset after x characters, 0 if no limit (D=2000)."
|
||||||
|
echo -e " -R \t\trandom starting point."
|
||||||
|
echo -e " -B \t\tno bold effect."
|
||||||
|
echo -e " -C \t\tno color."
|
||||||
|
echo -e " -h\t\thelp (this screen)."
|
||||||
|
echo -e " -v\t\tprint version number.\n"
|
||||||
|
exit 0;;
|
||||||
|
v) echo "$(basename -- "$0") $VERSION"
|
||||||
|
exit 0
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# set default values if not by options
|
||||||
|
((${#V[@]})) || V=(0)
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
# clear up standard input
|
||||||
|
read -t 0.001 && cat </dev/stdin>/dev/null
|
||||||
|
|
||||||
|
# terminal has no smcup and rmcup capabilities
|
||||||
|
((FORCE_RESET)) && reset && exit 0
|
||||||
|
|
||||||
|
tput rmcup
|
||||||
|
tput cnorm
|
||||||
|
stty echo
|
||||||
|
((NOCOLOR)) && echo -ne '\e[0m'
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
trap cleanup HUP TERM
|
||||||
|
trap 'break 2' INT
|
||||||
|
|
||||||
|
for (( i=1; i<=p; i++ )); do
|
||||||
|
c[i]=$((i%8)) n[i]=0 l[i]=0
|
||||||
|
((x[i]=RNDSTART==1?RANDOM*w/32768:w/2))
|
||||||
|
((y[i]=RNDSTART==1?RANDOM*h/32768:h/2))
|
||||||
|
v[i]=${V[${#V[@]} * RANDOM / M]}
|
||||||
|
done
|
||||||
|
|
||||||
|
stty -echo
|
||||||
|
tput smcup || FORCE_RESET=1
|
||||||
|
tput civis
|
||||||
|
tput clear
|
||||||
|
# any key press exits the loop and this script
|
||||||
|
while REPLY=; read -t 0.0$((1000/f)) -n 1; [[ -z $REPLY ]] ; do
|
||||||
|
for (( i=1; i<=p; i++ )); do
|
||||||
|
# New position:
|
||||||
|
((${l[i]}%2)) && ((x[i]+=-${l[i]}+2,1)) || ((y[i]+=${l[i]}-1))
|
||||||
|
|
||||||
|
# Loop on edges (change color on loop):
|
||||||
|
((${x[i]}>w||${x[i]}<0||${y[i]}>h||${y[i]}<0)) && ((c[i]=RANDOM%8, v[i]=V[${#V[@]}*RANDOM/M]))
|
||||||
|
((x[i]=(x[i]+w)%w))
|
||||||
|
((y[i]=(y[i]+h)%h))
|
||||||
|
|
||||||
|
# New random direction:
|
||||||
|
((n[i]=RANDOM%s-1))
|
||||||
|
((n[i]=(${n[i]}>1||${n[i]}==0)?${l[i]}:${l[i]}+${n[i]}))
|
||||||
|
((n[i]=(${n[i]}<0)?3:${n[i]}%4))
|
||||||
|
|
||||||
|
# Print:
|
||||||
|
tput cup ${y[i]} ${x[i]}
|
||||||
|
echo -ne "\e[${BOLD}m"
|
||||||
|
[[ $NOCOLOR == 0 ]] && echo -ne "\e[3${c[i]}m"
|
||||||
|
echo -n "${sets[v[i]]:l[i]*4+n[i]:1}"
|
||||||
|
l[i]=${n[i]}
|
||||||
|
done
|
||||||
|
((r>0 && t*p>=r)) && tput reset && tput civis && t=0 || ((t++))
|
||||||
|
done
|
||||||
|
|
||||||
|
cleanup
|
187
scripts/colorscripts/pipes3d
Executable file
187
scripts/colorscripts/pipes3d
Executable file
@ -0,0 +1,187 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Animated pipes.sh terminal screensaver at an angle.
|
||||||
|
# Copyright (C) 2013 by Yu-Jie Lin
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Blog: http://blog.yjl.im/2013/07/pipesxsh-animated-pipessh-terminal.html
|
||||||
|
# Gist: https://gist.github.com/livibetter/5974905
|
||||||
|
# Screenshot: https://lh3.googleusercontent.com/-UaCta_DtgrQ/Ud6dqIgcfmI/AAAAAAAAE_8/VXPac0OpULU/s800/pipesX.sh.gif
|
||||||
|
# Screenshot: https://lh6.googleusercontent.com/-yBety-A8J_c/Ud6dk10sjBI/AAAAAAAAE_0/S98aRRV8t0s/s800/pipesX.sh%25202013-07-11--19%253A51%253A05.png
|
||||||
|
# Screencast: http://youtu.be/dITTlFPYVPA
|
||||||
|
|
||||||
|
W=$(tput cols) H=$(tput lines)
|
||||||
|
# maximal random value + 1
|
||||||
|
M=32768
|
||||||
|
|
||||||
|
SETS=('╱╲' '/\')
|
||||||
|
COLORS=(31 32 33 34 35 36 37)
|
||||||
|
|
||||||
|
# default values
|
||||||
|
N=1
|
||||||
|
T=0
|
||||||
|
I=0.05
|
||||||
|
P=25
|
||||||
|
R=$((W * H / 4))
|
||||||
|
|
||||||
|
HELP="Usage: $(basename $0) [OPTIONS]
|
||||||
|
Animated pipes.sh terminal screensaver at an angle.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
-n [1-] number of pipes. (Default: $N)
|
||||||
|
-t [0-$((${#SETS[@]} - 1))] type of pipes. (Default: $T)
|
||||||
|
-i [float] piping interval or maze generation interval. (Default: $I)
|
||||||
|
-P [0-100] probability of a turning pipe or of \\ in maze generation. (Default: $P)
|
||||||
|
-r [LIMIT] reset after x characters, 0 if no limit. (Default: $R)
|
||||||
|
-R random starting point.
|
||||||
|
-C no color.
|
||||||
|
-X maze generation.
|
||||||
|
-h this help message.
|
||||||
|
"
|
||||||
|
|
||||||
|
while getopts "n:t:i:P:r:RCXh" arg; do
|
||||||
|
case $arg in
|
||||||
|
n)
|
||||||
|
((N = OPTARG > 0 ? OPTARG : N))
|
||||||
|
;;
|
||||||
|
t)
|
||||||
|
((T = (OPTARG >= 0 && OPTARG < ${#SETS[@]}) ? OPTARG : T))
|
||||||
|
;;
|
||||||
|
i)
|
||||||
|
I=$OPTARG
|
||||||
|
;;
|
||||||
|
P)
|
||||||
|
((P = (OPTARG >= 0 && OPTARG <= 100) ? OPTARG : P))
|
||||||
|
;;
|
||||||
|
r)
|
||||||
|
((R = OPTARG >= 0 ? OPTARG : R))
|
||||||
|
;;
|
||||||
|
R)
|
||||||
|
RNDSTART=1
|
||||||
|
;;
|
||||||
|
C)
|
||||||
|
NOCOLOR=1
|
||||||
|
;;
|
||||||
|
X)
|
||||||
|
MAZE=1
|
||||||
|
;;
|
||||||
|
h)
|
||||||
|
echo -e "$HELP"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
do_exit() {
|
||||||
|
# Show cursor and echo stdin
|
||||||
|
echo -ne "\e[?25h"
|
||||||
|
stty echo
|
||||||
|
clear
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
trap do_exit INT TERM
|
||||||
|
|
||||||
|
# No echo stdin and hide the cursor
|
||||||
|
stty -echo
|
||||||
|
echo -ne "\e[?25l"
|
||||||
|
|
||||||
|
# maze geneartion
|
||||||
|
while [[ $MAZE ]] && clear; do
|
||||||
|
[[ $NOCOLOR ]] || echo -ne "\e[1;${COLORS[${#COLORS[@]} * RANDOM / M]}m"
|
||||||
|
for ((i = 0; i < W * H; i++ )); do
|
||||||
|
echo -ne ${SETS[T]:100 * RANDOM / M < P:1}
|
||||||
|
done
|
||||||
|
read -t $I -n 1 && [[ $REPLY =~ q|Q ]] && do_exit
|
||||||
|
done
|
||||||
|
|
||||||
|
# initialze values
|
||||||
|
for ((n = 0; n < N; n++)); do
|
||||||
|
((X[n] = RNDSTART ? (W + 2) * RANDOM / M : W / 2))
|
||||||
|
((Y[n] = RNDSTART ? (H + 2) * RANDOM / M : H / 2))
|
||||||
|
D[n]=$((4 * RANDOM / M))
|
||||||
|
C[n]=${COLORS[${#COLORS[@]} * RANDOM / M]}
|
||||||
|
done
|
||||||
|
|
||||||
|
clear
|
||||||
|
while :; do
|
||||||
|
for ((n = 0; n < N; n++, CC = 0)); do
|
||||||
|
x=${X[n]} y=${Y[n]}
|
||||||
|
d=${D[n]} c=${C[n]}
|
||||||
|
|
||||||
|
# calculate new direction `d`
|
||||||
|
# 1 0
|
||||||
|
# \/ 4 directions 0 to 3
|
||||||
|
# /\
|
||||||
|
# 2 3
|
||||||
|
# valid directions: d: dd', d' is the new direction
|
||||||
|
# d
|
||||||
|
# 0: / 00 \ 01 03
|
||||||
|
# / / /\
|
||||||
|
# 1: / 10 \ 11 12
|
||||||
|
# \ \ /\
|
||||||
|
# 2: \/ 21 / 22 / 23
|
||||||
|
# / \
|
||||||
|
# 3: \/ 30 \ 32 \ 33
|
||||||
|
# / \
|
||||||
|
((d = (100 * RANDOM / M) < P ? ((d + 1) + 2 * (RANDOM % 2)) % 4 : d))
|
||||||
|
((e = (d + 1) % 4))
|
||||||
|
|
||||||
|
# calculate new position
|
||||||
|
# d' x' y'
|
||||||
|
# 0: x+1 y-1
|
||||||
|
# 1: x-1 y-1
|
||||||
|
# 2: x-1 y+1
|
||||||
|
# 3: x+1 y+1
|
||||||
|
((xn = e < 2 ? x + 1 : x - 1))
|
||||||
|
((yn = d < 2 ? y - 1 : y + 1))
|
||||||
|
|
||||||
|
# adjust position and change color?
|
||||||
|
((d < 2 && y == 0)) && ((yn--, CC=1))
|
||||||
|
((e > 1 && x == 0)) && ((xn--, CC=1))
|
||||||
|
((d > 1 && y == H)) && ((yn++, CC=1))
|
||||||
|
((e < 2 && x == W)) && ((xn++, CC=1))
|
||||||
|
((CC)) && c=${COLORS[${#COLORS[@]} * RANDOM / M]}
|
||||||
|
|
||||||
|
# warp pipe
|
||||||
|
((xn = (xn + W + 1) % (W + 1)))
|
||||||
|
((yn = (yn + H + 1) % (H + 1)))
|
||||||
|
|
||||||
|
# calculate position in terminal
|
||||||
|
# d' xt yt
|
||||||
|
# 0: x' y'+1
|
||||||
|
# 1: x'+1 y'+1
|
||||||
|
# 2: x'+1 y'
|
||||||
|
# 3: x' y'
|
||||||
|
((xt = e < 2 ? xn : xn + 1))
|
||||||
|
((yt = d < 2 ? yn + 1 : yn))
|
||||||
|
|
||||||
|
echo -ne "\e[${yt};${xt}H"
|
||||||
|
[[ $NOCOLOR ]] || echo -ne "\e[1;${c}m"
|
||||||
|
echo -n "${SETS[T]:d%2:1}"
|
||||||
|
|
||||||
|
X[n]=$xn Y[n]=$yn
|
||||||
|
D[n]=$d C[n]=$c
|
||||||
|
done
|
||||||
|
read -t $I -n 1 && [[ $REPLY =~ q|Q ]] && do_exit
|
||||||
|
((R)) && ((r += N, r >= R)) && r=0 && clear
|
||||||
|
done
|
||||||
|
|
||||||
|
do_exit
|
||||||
|
|
18
scripts/colorscripts/railcars
Executable file
18
scripts/colorscripts/railcars
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: rails.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Pfh
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=9103
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/rails.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n\033[31m╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗ \033[32m╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗ \033[33m╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗\033[0m
|
||||||
|
\033[1;31m╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝ \033[32m╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝ \033[33m╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝\033[0m
|
||||||
|
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
|
||||||
|
\033[34m╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗ \033[35m╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗ \033[36m╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗\033[0m
|
||||||
|
\033[1;34m╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝ \033[35m╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝ \033[36m╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
28
scripts/colorscripts/rally-x
Executable file
28
scripts/colorscripts/rally-x
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: rally-x.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Pfh
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=9103
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/rally-x.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[33m▄ \033[31m▄▄ \033[32m▄▄ \033[34m▄▄ \033[35m▄▄ \033[36m▄▄\033[0m
|
||||||
|
\033[33m███▄▄ \033[31m██▬██▬██ \033[32m██▬██▬██ \033[34m██▬██▬██ \033[35m██▬██▬██ \033[36m██▬██▬██\033[0m
|
||||||
|
\033[33m█████▀▀ \033[31m████ \033[32m████ \033[34m████ \033[35m████ \033[36m████ \033[0m
|
||||||
|
\033[33m█▀▀ \033[31m▄██ ██▄ \033[32m▄██ ██▄ \033[34m▄██ ██▄ \033[35m▄██ ██▄ \033[36m▄██ ██▄\033[0m
|
||||||
|
\033[33m█ \033[31m▄▄▄▀█ █▀▄▄▄ \033[32m▄▄▄▀█ █▀▄▄▄ \033[34m▄▄▄▀█ █▀▄▄▄ \033[35m▄▄▄▀█ █▀▄▄▄ \033[36m▄▄▄▀█ █▀▄▄▄\033[0m
|
||||||
|
\033[33m▄█▄ \033[31m███▀████▀███ \033[32m███▀████▀███ \033[34m███▀████▀███ \033[35m███▀████▀███ \033[36m███▀████▀███\033[0m
|
||||||
|
\033[31m▀ ▀ \033[32m▀ ▀ \033[34m▀ ▀ \033[35m▀ ▀ \033[36m▀ ▀\033[0m
|
||||||
|
|
||||||
|
\033[93m▄ \033[91m▄▄ \033[92m▄▄ \033[94m▄▄ \033[95m▄▄ \033[96m▄▄\033[0m
|
||||||
|
\033[93m███▄▄ \033[91m██▬██▬██ \033[92m██▬██▬██ \033[94m██▬██▬██ \033[95m██▬██▬██ \033[96m██▬██▬██\033[0m
|
||||||
|
\033[93m█████▀▀ \033[91m████ \033[92m████ \033[94m████ \033[95m████ \033[96m████ \033[0m
|
||||||
|
\033[93m█▀▀ \033[91m▄██ ██▄ \033[92m▄██ ██▄ \033[94m▄██ ██▄ \033[95m▄██ ██▄ \033[96m▄██ ██▄\033[0m
|
||||||
|
\033[93m█ \033[91m▄▄▄▀█ █▀▄▄▄ \033[92m▄▄▄▀█ █▀▄▄▄ \033[94m▄▄▄▀█ █▀▄▄▄ \033[95m▄▄▄▀█ █▀▄▄▄ \033[96m▄▄▄▀█ █▀▄▄▄\033[0m
|
||||||
|
\033[93m▄█▄ \033[91m███▀████▀███ \033[92m███▀████▀███ \033[94m███▀████▀███ \033[95m███▀████▀███ \033[96m███▀████▀███\033[0m
|
||||||
|
\033[91m▀ ▀ \033[92m▀ ▀ \033[94m▀ ▀ \033[95m▀ ▀ \033[96m▀ ▀\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
16
scripts/colorscripts/square
Executable file
16
scripts/colorscripts/square
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: square.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Muzieca
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=6838
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/square.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n\033[31m▀ █ \033[91m█ ▀ \033[32m▀ █ \033[92m█ ▀ \033[33m▀ █ \033[93m█ ▀ \033[34m▀ █ \033[94m█ ▀ \033[35m▀ █ \033[95m█ ▀ \033[36m▀ █ \033[96m█ ▀\033[0m
|
||||||
|
\033[31m██ \033[91m██ \033[32m██ \033[92m██ \033[33m██ \033[93m██ \033[34m██ \033[94m██ \033[35m██ \033[95m██ \033[36m██ \033[96m██\033[0m
|
||||||
|
\033[31m▄ █ \033[91m█ ▄ \033[32m▄ █ \033[92m█ ▄ \033[33m▄ █ \033[93m█ ▄ \033[34m▄ █ \033[94m█ ▄ \033[35m▄ █ \033[95m█ ▄ \033[36m▄ █ \033[96m█ ▄\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
24
scripts/colorscripts/tanks
Executable file
24
scripts/colorscripts/tanks
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: tanks.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Muzieca
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=6838
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/tanks.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n \033[31m█ \033[32m█ \033[33m█ \033[34m█ \033[35m█ \033[36m█\033[0m
|
||||||
|
\033[31m▄▄ █ ▄▄ \033[32m▄▄ █ ▄▄ \033[33m▄▄ █ ▄▄ \033[34m▄▄ █ ▄▄ \033[35m▄▄ █ ▄▄ \033[36m▄▄ █ ▄▄\033[0m
|
||||||
|
\033[31m███▀▀▀███ \033[32m███▀▀▀███ \033[33m███▀▀▀███ \033[34m███▀▀▀███ \033[35m███▀▀▀███ \033[36m███▀▀▀███\033[0m
|
||||||
|
\033[31m███ █ ███ \033[32m███ █ ███ \033[33m███ █ ███ \033[34m███ █ ███ \033[35m███ █ ███ \033[36m███ █ ███\033[0m
|
||||||
|
\033[31m██ ▀▀▀ ██ \033[32m██ ▀▀▀ ██ \033[33m██ ▀▀▀ ██ \033[34m██ ▀▀▀ ██ \033[35m██ ▀▀▀ ██ \033[36m██ ▀▀▀ ██\033[0m
|
||||||
|
|
||||||
|
\033[91m█ \033[92m█ \033[93m█ \033[94m█ \033[95m█ \033[96m█\033[0m
|
||||||
|
\033[91m▄▄ █ ▄▄ \033[92m▄▄ █ ▄▄ \033[93m▄▄ █ ▄▄ \033[94m▄▄ █ ▄▄ \033[95m▄▄ █ ▄▄ \033[96m▄▄ █ ▄▄\033[0m
|
||||||
|
\033[91m███▀▀▀███ \033[92m███▀▀▀███ \033[93m███▀▀▀███ \033[94m███▀▀▀███ \033[95m███▀▀▀███ \033[96m███▀▀▀███\033[0m
|
||||||
|
\033[91m███ █ ███ \033[92m███ █ ███ \033[93m███ █ ███ \033[94m███ █ ███ \033[95m███ █ ███ \033[96m███ █ ███\033[0m
|
||||||
|
\033[91m██ ▀▀▀ ██ \033[92m██ ▀▀▀ ██ \033[93m██ ▀▀▀ ██ \033[94m██ ▀▀▀ ██ \033[95m██ ▀▀▀ ██ \033[96m██ ▀▀▀ ██\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
26
scripts/colorscripts/tiefighter
Executable file
26
scripts/colorscripts/tiefighter
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# File: tiefighter2.textart
|
||||||
|
# Description: {{des}}
|
||||||
|
# Author: Pfh
|
||||||
|
# └─ https://crunchbang.org/forums/profile.php?id=9103
|
||||||
|
# Converted to textart: NNB
|
||||||
|
# └─ https://github.com/NNBnh
|
||||||
|
# URL: https://github.com/NNBnh/nnbs-text-art/blob/main/color/icon/tiefighter2.textart
|
||||||
|
|
||||||
|
# Start
|
||||||
|
echo -e "\n\033[31m█ █ \033[32m█ █ \033[33m█ █ \033[34m█ █ \033[35m█ █ \033[36m█ █\033[0m
|
||||||
|
\033[31m█ ▄▄▄ █ \033[32m█ ▄▄▄ █ \033[33m█ ▄▄▄ █ \033[34m█ ▄▄▄ █ \033[35m█ ▄▄▄ █ \033[36m█ ▄▄▄ █\033[0m
|
||||||
|
\033[31m█▄▄██▀██▄▄█ \033[32m█▄▄██▀██▄▄█ \033[33m█▄▄██▀██▄▄█ \033[34m█▄▄██▀██▄▄█ \033[35m█▄▄██▀██▄▄█ \033[36m█▄▄██▀██▄▄█\033[0m
|
||||||
|
\033[31m█▀▀█████▀▀█ \033[32m█▀▀█████▀▀█ \033[33m█▀▀█████▀▀█ \033[34m█▀▀█████▀▀█ \033[35m█▀▀█████▀▀█ \033[36m█▀▀█████▀▀█\033[0m
|
||||||
|
\033[31m█ ▀▀▀ █ \033[32m█ ▀▀▀ █ \033[33m█ ▀▀▀ █ \033[34m█ ▀▀▀ █ \033[35m█ ▀▀▀ █ \033[36m█ ▀▀▀ █\033[0m
|
||||||
|
\033[31m█ █ \033[32m█ █ \033[33m█ █ \033[34m█ █ \033[35m█ █ \033[36m█ █\033[0m
|
||||||
|
|
||||||
|
\033[91m█ █ \033[92m█ █ \033[93m█ █ \033[94m█ █ \033[95m█ █ \033[96m█ █\033[0m
|
||||||
|
\033[91m█ ▄▄▄ █ \033[92m█ ▄▄▄ █ \033[93m█ ▄▄▄ █ \033[94m█ ▄▄▄ █ \033[95m█ ▄▄▄ █ \033[96m█ ▄▄▄ █\033[0m
|
||||||
|
\033[91m█▄▄██▀██▄▄█ \033[92m█▄▄██▀██▄▄█ \033[93m█▄▄██▀██▄▄█ \033[94m█▄▄██▀██▄▄█ \033[95m█▄▄██▀██▄▄█ \033[96m█▄▄██▀██▄▄█\033[0m
|
||||||
|
\033[91m█▀▀█████▀▀█ \033[92m█▀▀█████▀▀█ \033[93m█▀▀█████▀▀█ \033[94m█▀▀█████▀▀█ \033[95m█▀▀█████▀▀█ \033[96m█▀▀█████▀▀█\033[0m
|
||||||
|
\033[91m█ ▀▀▀ █ \033[92m█ ▀▀▀ █ \033[93m█ ▀▀▀ █ \033[94m█ ▀▀▀ █ \033[95m█ ▀▀▀ █ \033[96m█ ▀▀▀ █\033[0m
|
||||||
|
\033[91m█ █ \033[92m█ █ \033[93m█ █ \033[94m█ █ \033[95m█ █ \033[96m█ █\033[0m\n"
|
||||||
|
|
||||||
|
exit 0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user