Julio E. Assunção
2 years ago
commit
518f76020f
175 changed files with 26982 additions and 0 deletions
@ -0,0 +1,152 @@ |
|||
[global] |
|||
monitor = 0 |
|||
follow = keyboard |
|||
geometry = "350x5-0+24" |
|||
indicate_hidden = yes |
|||
shrink = yes |
|||
transparency = 20 |
|||
notification_height = 0 |
|||
separator_height = 2 |
|||
padding = 0 |
|||
horizontal_padding = 8 |
|||
frame_width = 3 |
|||
frame_color = "#282828" |
|||
|
|||
# Define a color for the separator. |
|||
# possible values are: |
|||
# * auto: dunst tries to find a color fitting to the background; |
|||
# * foreground: use the same color as the foreground; |
|||
# * frame: use the same color as the frame; |
|||
# * anything else will be interpreted as a X color. |
|||
separator_color = frame |
|||
|
|||
# Sort messages by urgency. |
|||
sort = yes |
|||
|
|||
idle_threshold = 120 |
|||
font = Monospace 14 |
|||
line_height = 0 |
|||
markup = full |
|||
|
|||
# The format of the message. Possible variables are: |
|||
# %a appname |
|||
# %s summary |
|||
# %b body |
|||
# %i iconname (including its path) |
|||
# %I iconname (without its path) |
|||
# %p progress value if set ([ 0%] to [100%]) or nothing |
|||
# %n progress value if set without any extra characters |
|||
# %% Literal % |
|||
# Markup is allowed |
|||
format = "<b>%s</b>\n%b" |
|||
|
|||
alignment = left |
|||
show_age_threshold = 60 |
|||
word_wrap = yes |
|||
ellipsize = middle |
|||
ignore_newline = no |
|||
stack_duplicates = true |
|||
hide_duplicate_count = true |
|||
show_indicators = yes |
|||
icon_position = left |
|||
max_icon_size = 40 |
|||
#icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/ |
|||
sticky_history = yes |
|||
history_length = 20 |
|||
dmenu = /usr/bin/dmenu -p dunst: |
|||
browser = /usr/bin/firefox -new-tab |
|||
|
|||
# Always run rule-defined scripts, even if the notification is suppressed |
|||
always_run_script = true |
|||
|
|||
title = Dunst |
|||
class = Dunst |
|||
startup_notification = false |
|||
force_xinerama = false |
|||
[experimental] |
|||
per_monitor_dpi = false |
|||
|
|||
[shortcuts] |
|||
close = ctrl+space |
|||
close_all = ctrl+shift+space |
|||
history = ctrl+grave |
|||
context = ctrl+shift+period |
|||
|
|||
[urgency_low] |
|||
# IMPORTANT: colors have to be defined in quotation marks. |
|||
# Otherwise the "#" and following would be interpreted as a comment. |
|||
background = "#282828" |
|||
foreground = "#928374" |
|||
timeout = 5 |
|||
# Icon for notifications with low urgency, uncomment to enable |
|||
#icon = /path/to/icon |
|||
|
|||
[urgency_normal] |
|||
background = "#458588" |
|||
foreground = "#ebdbb2" |
|||
timeout = 5 |
|||
|
|||
[urgency_critical] |
|||
background = "#cc2421" |
|||
foreground = "#ebdbb2" |
|||
frame_color = "#fabd2f" |
|||
timeout = 0 |
|||
|
|||
# Every section that isn't one of the above is interpreted as a rules to |
|||
# override settings for certain messages. |
|||
# Messages can be matched by "appname", "summary", "body", "icon", "category", |
|||
# "msg_urgency" and you can override the "timeout", "urgency", "foreground", |
|||
# "background", "new_icon" and "format". |
|||
# Shell-like globbing will get expanded. |
|||
# |
|||
# SCRIPTING |
|||
# You can specify a script that gets run when the rule matches by |
|||
# setting the "script" option. |
|||
# The script will be called as follows: |
|||
# script appname summary body icon urgency |
|||
# where urgency can be "LOW", "NORMAL" or "CRITICAL". |
|||
# |
|||
# NOTE: if you don't want a notification to be displayed, set the format |
|||
# to "". |
|||
# NOTE: It might be helpful to run dunst -print in a terminal in order |
|||
# to find fitting options for rules. |
|||
|
|||
#[espeak] |
|||
# summary = "*" |
|||
# script = dunst_espeak.sh |
|||
|
|||
#[script-test] |
|||
# summary = "*script*" |
|||
# script = dunst_test.sh |
|||
|
|||
#[ignore] |
|||
# # This notification will not be displayed |
|||
# summary = "foobar" |
|||
# format = "" |
|||
|
|||
#[history-ignore] |
|||
# # This notification will not be saved in history |
|||
# summary = "foobar" |
|||
# history_ignore = yes |
|||
|
|||
#[signed_on] |
|||
# appname = Pidgin |
|||
# summary = "*signed on*" |
|||
# urgency = low |
|||
# |
|||
#[signed_off] |
|||
# appname = Pidgin |
|||
# summary = *signed off* |
|||
# urgency = low |
|||
# |
|||
#[says] |
|||
# appname = Pidgin |
|||
# summary = *says* |
|||
# urgency = critical |
|||
# |
|||
#[twitter] |
|||
# appname = Pidgin |
|||
# summary = *twitter.com* |
|||
# urgency = normal |
|||
# |
|||
# vim: ft=cfg |
@ -0,0 +1,46 @@ |
|||
<?xml version='1.0'?> |
|||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> |
|||
<fontconfig> |
|||
<alias> |
|||
<family>serif</family> |
|||
<prefer> |
|||
<family>Linux Libertine</family> |
|||
<family>Noto Serif CJK JP</family> |
|||
<family>Joy Pixels</family> |
|||
<family>FontAwesome</family> |
|||
</prefer> |
|||
</alias> |
|||
<alias> |
|||
<family>sans-serif</family> |
|||
<prefer> |
|||
<family>Linux Biolinum</family> |
|||
<family>Noto Sans CJK JP</family> |
|||
<family>Joy Pixels</family> |
|||
<family>FontAwesome</family> |
|||
</prefer> |
|||
</alias> |
|||
<alias> |
|||
<family>sans</family> |
|||
<prefer> |
|||
<family>Linux Biolinum</family> |
|||
<family>Noto Sans CJK JP</family> |
|||
<family>Joy Pixels</family> |
|||
<family>FontAwesome</family> |
|||
</prefer> |
|||
</alias> |
|||
<alias> |
|||
<family>monospace</family> |
|||
<prefer> |
|||
<family>Inconsolata LGC Nerd Font Mono</family> |
|||
<family>Noto Sans Mono CJK JP</family> |
|||
<family>Joy Pixels</family> |
|||
<family>FontAwesome</family> |
|||
</prefer> |
|||
</alias> |
|||
<alias> |
|||
<family>emoji</family> |
|||
<prefer> |
|||
<family>Symbola</family> |
|||
</prefer> |
|||
</alias> |
|||
</fontconfig> |
@ -0,0 +1,11 @@ |
|||
[Filechooser Settings] |
|||
LocationMode=path-bar |
|||
ShowHidden=false |
|||
ShowSizeColumn=true |
|||
GeometryX=114 |
|||
GeometryY=96 |
|||
GeometryWidth=796 |
|||
GeometryHeight=596 |
|||
SortColumn=name |
|||
SortOrder=ascending |
|||
StartupMode=recent |
@ -0,0 +1,19 @@ |
|||
# DO NOT EDIT! This file will be overwritten by LXAppearance. |
|||
# Any customization should be done in ~/.gtkrc-2.0.mine instead. |
|||
|
|||
include "/home/tomato/.gtkrc-2.0.mine" |
|||
gtk-theme-name="oomox-katrielle_2x" |
|||
gtk-icon-theme-name="oomox-katrielle_Suru++" |
|||
gtk-font-name="Sans 10" |
|||
gtk-cursor-theme-name="Numix-Cursor-Light" |
|||
gtk-cursor-theme-size=0 |
|||
gtk-toolbar-style=GTK_TOOLBAR_TEXT |
|||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR |
|||
gtk-button-images=0 |
|||
gtk-menu-images=1 |
|||
gtk-enable-event-sounds=1 |
|||
gtk-enable-input-feedback-sounds=1 |
|||
gtk-xft-antialias=1 |
|||
gtk-xft-hinting=1 |
|||
gtk-xft-hintstyle="hintfull" |
|||
gtk-xft-rgba="rgb" |
@ -0,0 +1,8 @@ |
|||
file:///home/tomato/Documents |
|||
file:///mnt |
|||
file:///home/tomato/Documents/funer%C3%A1ria/reserva |
|||
file:///home/tomato/Downloads |
|||
file:///home/tomato/Documents/55animu/emotes |
|||
file:///home/tomato/Pictures/assets |
|||
file:///home/tomato/Pictures |
|||
file:///home/tomato/Videos |
@ -0,0 +1,16 @@ |
|||
[Settings] |
|||
gtk-theme-name=oomox-katrielle_2x |
|||
gtk-icon-theme-name=oomox-katrielle_Suru++ |
|||
gtk-font-name=Sans 10 |
|||
gtk-cursor-theme-size=0 |
|||
gtk-toolbar-style=GTK_TOOLBAR_TEXT |
|||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR |
|||
gtk-button-images=0 |
|||
gtk-menu-images=1 |
|||
gtk-enable-event-sounds=1 |
|||
gtk-enable-input-feedback-sounds=1 |
|||
gtk-xft-antialias=1 |
|||
gtk-xft-hinting=1 |
|||
gtk-xft-hintstyle=hintmedium |
|||
gtk-xft-rgba=rgb |
|||
gtk-cursor-theme-name=Numix-Cursor-Light |
@ -0,0 +1,403 @@ |
|||
# vim: filetype=i3 |
|||
# File originally by Luke Smith <https://lukesmith.xyz> |
|||
|
|||
# This config file will use environmental variables such as $BROWSER and $TERMINAL. |
|||
# You can set these variables in ~/.profile or ~/.bash_profile if you have it as below: |
|||
# |
|||
# export TERMINAL="st" |
|||
font pango: mono bold 12 |
|||
# #---Colors---# # |
|||
# Set colors from Xresources |
|||
# Change 'color7' and 'color2' to whatever colors you want i3 to use |
|||
# from the generated scheme. |
|||
# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if |
|||
# it fails to get colors from Xresources. |
|||
set_from_resource $bg i3wm.background |
|||
set_from_resource $fg i3wm.foreground |
|||
set_from_resource $c1 i3wm.color1 |
|||
set_from_resource $c2 i3wm.color2 |
|||
set_from_resource $c3 i3wm.color3 |
|||
set_from_resource $c4 i3wm.color4 |
|||
set_from_resource $c5 i3wm.color5 |
|||
set_from_resource $c6 i3wm.color6 |
|||
set_from_resource $c7 i3wm.color7 |
|||
set_from_resource $c8 i3wm.color8 |
|||
set_from_resource $c9 i3wm.color9 |
|||
set_from_resource $c10 i3wm.color10 |
|||
set_from_resource $c11 i3wm.color11 |
|||
set_from_resource $c12 i3wm.color12 |
|||
set_from_resource $c13 i3wm.color13 |
|||
set_from_resource $c14 i3wm.color14 |
|||
set_from_resource $c15 i3wm.color15 |
|||
|
|||
# class border backgr. text indicator child_border |
|||
client.focused $c3 $bg $fg $bg $c3 |
|||
client.focused_inactive $c7 $bg $fg $bg $bg |
|||
client.unfocused $c5 $bg $fg $bg $bg |
|||
client.urgent $c1 $bg $fg $bg $bg |
|||
client.placeholder $bg $bg $fg $bg $bg |
|||
|
|||
client.background $bg |
|||
|
|||
# #---Basic Definitions---# # |
|||
set $inner_gaps 15 |
|||
set $outer_gaps 15 |
|||
set $term --no-startup-id $TERMINAL |
|||
set $mod Mod4 |
|||
set $stoprec --no-startup-id dmenurecord kill |
|||
set $shutdown sudo -A shutdown -h now |
|||
set $reboot sudo -A reboot |
|||
set $netrefresh --no-startup-id sudo -A systemctl restart NetworkManager |
|||
set $hibernate sudo -A systemctl suspend |
|||
|
|||
# #---Gaps---# # |
|||
for_window [class="^.*"] border pixel 2 |
|||
gaps inner $inner_gaps |
|||
gaps outer $outer_gaps |
|||
|
|||
# #---Dropdown Windows---# # |
|||
# General dropdown window traits. The order can matter. |
|||
for_window [instance="dropdown_*"] floating enable |
|||
for_window [instance="dropdown_*"] move scratchpad |
|||
for_window [instance="dropdown_*"] sticky enable |
|||
for_window [instance="dropdown_*"] scratchpad show |
|||
for_window [instance="dropdown_tmuxdd"] resize set 625 450 |
|||
for_window [instance="dropdown_dropdowncalc"] resize set 800 300 |
|||
for_window [instance="dropdown_tmuxdd"] border pixel 3 |
|||
for_window [instance="dropdown_dropdowncalc"] border pixel 2 |
|||
for_window [instance="dropdown_*"] move position center |
|||
|
|||
bar { |
|||
font pango:Inconsolata LGC Nerd Font bold 10 |
|||
status_command i3blocks |
|||
position top |
|||
mode dock |
|||
modifier None |
|||
colors { |
|||
separator $fg |
|||
background $bg |
|||
statusline $fg |
|||
focused_workspace $fg $fg $bg |
|||
active_workspace $fg $fg $bg |
|||
inactive_workspace $bg $bg $fg |
|||
urgent_workspace $c1 $c1 $bg |
|||
} |
|||
} |
|||
|
|||
# #---Basic Bindings---# # |
|||
bindsym $mod+Return exec $term |
|||
bindsym $mod+Shift+Return exec --no-startup-id samedir |
|||
|
|||
bindsym $mod+Shift+space floating toggle |
|||
bindsym $mod+space focus mode_toggle |
|||
|
|||
bindsym $mod+Escape workspace prev |
|||
bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3 exit" |
|||
|
|||
# bindsym $mod+BackSpace |
|||
bindsym $mod+Shift+BackSpace exec --no-startup-id prompt "Reboot computer?" "$reboot" |
|||
|
|||
bindsym $mod+ccedilla exec --no-startup-id dmenuunicode |
|||
bindsym $mod+shift+ccedilla exec --no-startup-id dmenucpick |
|||
|
|||
##bindsym $mod+grave |
|||
|
|||
#STOP/HIDE EVERYTHING: |
|||
bindsym $mod+Shift+Delete exec --no-startup-id lmc mute ; exec --no-startup-id mpc pause && pkill -RTMIN+10 i3blocks ; exec --no-startup-id pauseallmpv; workspace 0; exec $term -e htop ; exec $term -e lf |
|||
|
|||
# Show selection: |
|||
bindsym $mod+Insert exec --no-startup-id showclip |
|||
##bindsym $mod+Pause |
|||
|
|||
# #---Letter Key Bindings---# # |
|||
bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill |
|||
bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 `xdotool getwindowfocus getwindowpid` |
|||
|
|||
bindsym $mod+Shift+w exec --no-startup-id $BROWSER |
|||
bindsym $mod+w exec $term -e nmtui |
|||
|
|||
bindsym $mod+e exec $term -e neomutt && pkill -RTMIN+12 i3blocks |
|||
bindsym $mod+Shift+e exec --no-startup-id tutorialvids |
|||
|
|||
bindsym $mod+r exec $term -e vifm |
|||
bindsym $mod+Shift+r exec --no-startup-id winresize |
|||
|
|||
bindsym $mod+t split toggle |
|||
bindsym $mod+Shift+t gaps inner current set $inner_gaps; gaps outer current set $outer_gaps |
|||
|
|||
bindsym $mod+y exec $term -e calcurse -C "$XDG_CONFIG_HOME/calcurse" -D "$XDG_DATA_HOME/calcurse" |
|||
bindsym $mod+Shift+y exec --no-startup-id i3resize left |
|||
|
|||
bindsym $mod+u exec --no-startup-id ddspawn tmuxdd |
|||
bindsym $mod+Shift+u exec --no-startup-id i3resize down |
|||
|
|||
bindsym $mod+i exec $term -e htop |
|||
bindsym $mod+Shift+i exec --no-startup-id i3resize up |
|||
|
|||
bindsym $mod+o sticky toggle |
|||
bindsym $mod+Shift+o exec --no-startup-id i3resize right |
|||
|
|||
bindsym $mod+p exec --no-startup-id mpc toggle && pkill -RTMIN+11 i3blocks |
|||
bindsym $mod+Shift+p exec --no-startup-id mpc pause && pkill -RTMIN+11 i3blocks |
|||
bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24 |
|||
bindsym $mod+Shift+a exec $term -e pulsemixer |
|||
|
|||
bindsym $mod+s gaps inner current plus 5 |
|||
bindsym $mod+Shift+s gaps inner current minus 5 |
|||
|
|||
bindsym $mod+d exec --no-startup-id dmenu_run |
|||
bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0 |
|||
|
|||
set $freeze Distraction-free mode (super+shift+f to reactivate bindings) |
|||
mode "$freeze" { bindsym $mod+Shift+f mode "default" |
|||
} |
|||
|
|||
bindsym $mod+f fullscreen toggle |
|||
bindsym $mod+Shift+f mode "$freeze" ;; exec --no-startup-id notify-send "Distraction-free mode activated." "Press Super+Shift+f to return." |
|||
|
|||
bindsym $mod+g workspace prev |
|||
bindsym $mod+Shift+g exec --no-startup-id gimp; workspace $ws5 |
|||
|
|||
bindsym $mod+h focus left |
|||
bindsym $mod+Shift+h move left 30 |
|||
bindsym $mod+Ctrl+h move workspace to output left |
|||
|
|||
bindsym $mod+j focus down |
|||
bindsym $mod+Shift+j move down 30 |
|||
bindsym $mod+Ctrl+j move workspace to output down |
|||
|
|||
bindsym $mod+k focus up |
|||
bindsym $mod+Shift+k move up 30 |
|||
bindsym $mod+Ctrl+k move workspace to output up |
|||
|
|||
bindsym $mod+l focus right |
|||
bindsym $mod+Shift+l move right 30 |
|||
bindsym $mod+Ctrl+l move workspace to output right |
|||
|
|||
bindsym $mod+z gaps outer current plus 5 |
|||
bindsym $mod+Shift+z gaps outer current minus 5 |
|||
|
|||
bindsym $mod+x exec --no-startup-id mpc pause; exec --no-startup-id pauseallmpv ; exec --no-startup-id i3lock -e -f -c 1d2021 ; exec --no-startup-id xset dpms force off |
|||
bindsym $mod+Shift+x exec --no-startup-id prompt "Shutdown computer?" "$shutdown" |
|||
|
|||
bindsym $mod+c exec --no-startup-id cabl |
|||
bindsym $mod+Shift+c exec --no-startup-id camtoggle |
|||
|
|||
bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex" |
|||
#bindsym $mod+Shift+v |
|||
|
|||
bindsym $mod+b bar mode toggle |
|||
bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id hover left |
|||
|
|||
bindsym $mod+n exec $term -e newsboat && pkill -RTMIN+6 i3blocks |
|||
bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right |
|||
|
|||
bindsym $mod+m exec --no-startup-id $term -e ncmpcpp |
|||
bindsym $mod+Shift+m exec --no-startup-id lmc toggle |
|||
|
|||
# #---Workspace Bindings---# # |
|||
bindsym $mod+Home workspace $ws1 |
|||
bindsym $mod+Shift+Home move container to workspace $ws1 |
|||
bindsym $mod+End workspace $ws10 |
|||
bindsym $mod+Shift+End move container to workspace $ws10 |
|||
bindsym $mod+Prior workspace prev |
|||
bindsym $mod+Shift+Prior move container to workspace prev |
|||
bindsym $mod+Next workspace next |
|||
bindsym $mod+Shift+Next move container to workspace next |
|||
bindsym $mod+Tab workspace back_and_forth |
|||
bindsym $mod+XF86Back workspace prev |
|||
bindsym $mod+Shift+XF86Back move container to workspace prev |
|||
bindsym $mod+XF86Forward workspace next |
|||
bindsym $mod+Shift+XF86Forward move container to workspace next |
|||
bindsym $mod+semicolon workspace next |
|||
bindsym $mod+apostrophe split horizontal ;; exec $term |
|||
bindsym $mod+slash split vertical ;; exec $term |
|||
bindsym $mod+Shift+slash kill |
|||
bindsym $mod+backslash workspace back_and_forth |
|||
|
|||
set $ws1 "1" |
|||
set $ws2 "2" |
|||
set $ws3 "3" |
|||
set $ws4 "4" |
|||
set $ws5 "5" |
|||
set $ws6 "6" |
|||
set $ws7 "7" |
|||
set $ws8 "8" |
|||
set $ws9 "9" |
|||
set $ws10 "10" |
|||
|
|||
# switch to workspace |
|||
bindsym $mod+1 workspace $ws1 |
|||
bindsym $mod+2 workspace $ws2 |
|||
bindsym $mod+3 workspace $ws3 |
|||
bindsym $mod+4 workspace $ws4 |
|||
bindsym $mod+5 workspace $ws5 |
|||
bindsym $mod+6 workspace $ws6 |
|||
bindsym $mod+7 workspace $ws7 |
|||
bindsym $mod+8 workspace $ws8 |
|||
bindsym $mod+9 workspace $ws9 |
|||
bindsym $mod+0 workspace $ws10 |
|||
|
|||
# move focused container to workspace |
|||
bindsym $mod+Shift+1 move container to workspace $ws1 |
|||
bindsym $mod+Shift+2 move container to workspace $ws2 |
|||
bindsym $mod+Shift+3 move container to workspace $ws3 |
|||
bindsym $mod+Shift+4 move container to workspace $ws4 |
|||
bindsym $mod+Shift+5 move container to workspace $ws5 |
|||
bindsym $mod+Shift+6 move container to workspace $ws6 |
|||
bindsym $mod+Shift+7 move container to workspace $ws7 |
|||
bindsym $mod+Shift+8 move container to workspace $ws8 |
|||
bindsym $mod+Shift+9 move container to workspace $ws9 |
|||
bindsym $mod+Shift+0 move container to workspace $ws10 |
|||
|
|||
for_window [class="Pinentry"] sticky enable |
|||
for_window [class="sent"] border pixel 0px |
|||
for_window [title="GIMP Startup"] move workspace $ws5 |
|||
for_window [class="Gimp"] move workspace $ws5 |
|||
for_window [window_role="GtkFileChooserDialog"] resize set 800 600 |
|||
for_window [window_role="GtkFileChooserDialog"] move position center |
|||
for_window [title="Default - Wine desktop"] floating enable |
|||
|
|||
# Bindings to make the webcam float and stick. |
|||
for_window [title="mpvfloat"] floating enable |
|||
for_window [title="mpvfloat"] sticky enable |
|||
for_window [title="mpvfloat"] border pixel 0 |
|||
no_focus [title="mpvfloat"] |
|||
|
|||
# #---Function Buttons---# # |
|||
bindsym $mod+F1 exec --no-startup-id groff -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura - |
|||
bindsym $mod+F2 restart |
|||
bindsym $mod+F3 exec --no-startup-id displayselect |
|||
bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate" |
|||
bindsym $mod+F5 exec --no-startup-id $netrefresh |
|||
bindsym $mod+F6 exec --no-startup-id torwrap |
|||
bindsym $mod+F7 exec --no-startup-id td-toggle |
|||
bindsym $mod+F8 exec --no-startup-id mailsync |
|||
bindsym $mod+F9 exec --no-startup-id dmenumount |
|||
bindsym $mod+F10 exec --no-startup-id dmenuumount |
|||
bindsym $mod+F11 exec --no-startup-id ducksearch |
|||
bindsym $mod+F12 exec $term -e nmtui |
|||
bindsym $mod+Shift+F1 exec --no-startup-id toggle-welcome |
|||
|
|||
# #---Arrow Keys---# # |
|||
bindsym $mod+Left focus left |
|||
bindsym $mod+Shift+Left move left |
|||
bindsym $mod+Ctrl+Left move workspace to output left |
|||
bindsym $mod+Down focus down |
|||
bindsym $mod+Shift+Down move down |
|||
bindsym $mod+Ctrl+Down move workspace to output down |
|||
bindsym $mod+Up focus up |
|||
bindsym $mod+Shift+Up move up |
|||
bindsym $mod+Ctrl+Up move workspace to output up |
|||
bindsym $mod+Right focus right |
|||
bindsym $mod+Shift+Right move right |
|||
bindsym $mod+Ctrl+Right move workspace to output right |
|||
|
|||
# #---Media Keys---# # |
|||
# Volume keys |
|||
bindsym $mod+plus exec --no-startup-id lmc up |
|||
bindsym $mod+Shift+plus exec --no-startup-id lmc up 15 |
|||
bindsym $mod+minus exec --no-startup-id lmc down |
|||
bindsym $mod+Shift+minus exec --no-startup-id lmc down 15 |
|||
bindsym $mod+less exec --no-startup-id mpc prev && pkill -RTMIN+11 i3blocks |
|||
bindsym $mod+Shift+less exec --no-startup-id mpc seek 0% |
|||
bindsym $mod+greater exec --no-startup-id mpc next && pkill -RTMIN+11 i3blocks |
|||
bindsym $mod+Shift+greater exec --no-startup-id mpc next && pkill -RTMIN+11 i3blocks |
|||
|
|||
# For advancing forward/backward in an mpd song |
|||
bindsym $mod+bracketleft exec --no-startup-id mpc seek -10 |
|||
bindsym $mod+Shift+bracketleft exec --no-startup-id mpc seek -120 |
|||
bindsym $mod+bracketright exec --no-startup-id mpc seek +10 |
|||
bindsym $mod+Shift+bracketright exec --no-startup-id mpc seek +120 |
|||
|
|||
# For screenshots and recording |
|||
bindsym Print exec --no-startup-id maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" |
|||
bindsym Shift+Print exec --no-startup-id maimpick |
|||
bindsym $mod+Print exec --no-startup-id dmenurecord |
|||
bindsym $mod+Scroll_Lock exec --no-startup-id "killall screenkey || screenkey" |
|||
bindsym $mod+Delete exec $stoprec |
|||
bindsym XF86Launch1 exec --no-startup-id xset dpms force off |
|||
|
|||
# #---Extra XF86 Keys---# # |
|||
bindsym XF86AudioMute exec --no-startup-id lmc toggle |
|||
bindsym XF86AudioLowerVolume exec --no-startup-id lmc down |
|||
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id lmc down 10 |
|||
bindsym Control+XF86AudioLowerVolume exec --no-startup-id lmc down 1 |
|||
bindsym XF86AudioRaiseVolume exec --no-startup-id lmc up |
|||
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id lmc up 10 |
|||
bindsym Control+XF86AudioRaiseVolume exec --no-startup-id lmc up 1 |
|||
bindsym XF86PowerOff exec --no-startup-id prompt "Shutdown computer?" "$shutdown" |
|||
##bindsym XF86Copy exec |
|||
##bindsym XF86Open exec |
|||
##bindsym XF86Paste exec |
|||
##bindsym XF86Cut exec |
|||
##bindsym XF86MenuKB exec |
|||
bindsym XF86Calculator exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24 |
|||
##bindsym XF86Sleep This binding is typically mapped by systemd automatically. |
|||
##bindsym XF86WakeUp exec |
|||
bindsym XF86Explorer exec $term -e lf |
|||
##bindsym XF86Send exec |
|||
##bindsym XF86Xfer exec |
|||
bindsym XF86WWW exec --no-startup-id $BROWSER |
|||
##bindsym XF86DOS exec |
|||
bindsym XF86ScreenSaver exec exec --no-startup-id lockscreen |
|||
##bindsym XF86RotateWindows exec |
|||
##bindsym XF86TaskPane exec |
|||
##bindsym XF86Favorites exec |
|||
bindsym XF86MyComputer exec $term -e lf |
|||
##bindsym XF86Back exec |
|||
##bindsym XF86Forward exec |
|||
bindsym XF86Eject exec --no-startup-id dmenuumount |
|||
bindsym XF86AudioNext exec --no-startup-id mpc next && pkill -RTMIN+11 i3blocks |
|||
bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+11 i3blocks |
|||
bindsym XF86AudioPrev exec --no-startup-id mpc prev && pkill -RTMIN+11 i3blocks |
|||
bindsym XF86AudioStop exec --no-startup-id mpc toggle && pkill -RTMIN+11 i3blocks |
|||
##bindsym XF86AudioRecord |
|||
bindsym XF86AudioRewind exec --no-startup-id mpc seek -10 |
|||
bindsym XF86AudioForward exec --no-startup-id mpc seek +10 |
|||
##bindsym XF86Phone exec |
|||
##bindsym XF86Tools exec |
|||
bindsym XF86HomePage exec $BROWSER https://lukesmith.xyz |
|||
bindsym XF86Reload restart |
|||
##bindsym XF86ScrollUp exec |
|||
##bindsym XF86ScrollDown exec |
|||
##bindsym XF86New exec |
|||
##bindsym XF86LaunchA exec |
|||
##bindsym XF86LaunchB exec |
|||
##bindsym XF86Launch2 exec |
|||
##bindsym XF86Launch3 exec |
|||
##bindsym XF86Launch4 exec |
|||
##bindsym XF86Launch5 exec |
|||
##bindsym XF86Launch6 exec |
|||
##bindsym XF86Launch7 exec |
|||
##bindsym XF86Launch8 exec |
|||
##bindsym XF86Launch9 exec |
|||
#bindsym XF86AudioMicMute exec $micmute |
|||
bindsym XF86TouchpadToggle exec --no-startup-id toggletouchpad |
|||
bindsym XF86TouchpadOn exec --no-startup-id synclient TouchpadOff=0 |
|||
bindsym XF86TouchpadOff exec --no-startup-id synclient TouchpadOff=1 |
|||
bindsym XF86Suspend exec --no-startup-id lockscreen |
|||
bindsym XF86Close kill |
|||
bindsym XF86WebCam exec --no-startup-id camtoggle |
|||
bindsym XF86Mail exec $term -e neomutt && pkill -RTMIN+12 i3blocks |
|||
bindsym XF86Messenger exec $term -e weechat |
|||
bindsym XF86Search exec $BROWSER https://duckduckgo.com |
|||
##bindsym XF86Go exec |
|||
##bindsym XF86Finance exec |
|||
##bindsym XF86Game exec |
|||
bindsym XF86Shop exec $BROWSER https://ebay.com |
|||
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 15 |
|||
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 15 |
|||
bindsym XF86AudioMedia exec --no-startup-id $term -e ncmpcpp |
|||
bindsym XF86Display exec --no-startup-id displayselect |
|||
#bindsym XF86KbdLightOnOff exec |
|||
#bindsym XF86KbdBrightnessDown exec |
|||
#bindsym XF86KbdBrightnessUp exec |
|||
##bindsym XF86Reply exec |
|||
##bindsym XF86MailForward exec |
|||
##bindsym XF86Save exec |
|||
bindsym XF86Documents exec $term -e lf ~/Documents |
|||
##bindsym XF86Battery exec |
|||
##bindsym XF86Bluetooth exec |
|||
bindsym XF86WLAN exec $netrefresh |
|||
##exec_always --no-startup-id notify-send -i ~/.local/share/larbs/larbs.png 'Welcome to LARBS:' 'Press Super+F1 for the manual.' -t 10000 |
@ -0,0 +1,70 @@ |
|||
command=~/.local/bin/statusbar/$BLOCK_NAME |
|||
separator_block_width=15 |
|||
markup=pango |
|||
|
|||
[record] |
|||
command=cat /tmp/recordingicon |
|||
interval=once |
|||
signal=9 |
|||
|
|||
[music] |
|||
label= |
|||
interval=once |
|||
signal=11 |
|||
|
|||
[news] |
|||
interval=once |
|||
signal=6 |
|||
|
|||
#[iplocate] |
|||
#interval=30 |
|||
|
|||
#[pacpackages] |
|||
#interval=once |
|||
#signal=8 |
|||
|
|||
#[torrent] |
|||
#interval=20 |
|||
#signal=7 |
|||
|
|||
[weather] |
|||
interval=18000 |
|||
signal=5 |
|||
|
|||
#[mailbox] |
|||
#interval=180 |
|||
#signal=12 |
|||
|
|||
#[memory] |
|||
#interval=30 |
|||
#label= |
|||
|
|||
#[cpu] |
|||
#interval=15 |
|||
#label= |
|||
|
|||
[volume] |
|||
interval=once |
|||
signal=10 |
|||
|
|||
#[disk] |
|||
#interval=60 |
|||
#command=disk / |
|||
|
|||
#[disk] |
|||
#interval=60 |
|||
#command=disk /home |
|||
|
|||
[battery] |
|||
command=battery BAT0 |
|||
interval=5 |
|||
|
|||
[clock] |
|||
label= |
|||
interval=30 |
|||
|
|||
[internet] |
|||
interval=10 |
|||
|
|||
#[help] |
|||
#interval=once |
@ -0,0 +1,80 @@ |
|||
[Default Applications] |
|||
text/x-shellscript=text.desktop; |
|||
x-scheme-handler/magnet=torrent.desktop; |
|||
application/x-bittorrent=torrent.desktop; |
|||
x-scheme-handler/mailto=mail.desktop; |
|||
text/plain=text.desktop; |
|||
application/postscript=pdf.desktop; |
|||
application/pdf=pdf.desktop; |
|||
image/png=img.desktop; |
|||
image/jpeg=img.desktop; |
|||
image/gif=img.desktop; |
|||
application/rss+xml=rss.desktop |
|||
video/3gpp2=mpv.desktop |
|||
video/3gpp=mpv.desktop |
|||
video/annodex=mpv.desktop |
|||
video/dv=mpv.desktop |
|||
video/isivideo=mpv.desktop |
|||
video/mj2=mpv.desktop |
|||
video/mlt-playlist=mpv.desktop |
|||
video/mp2t=mpv.desktop |
|||
video/mp4=mpv.desktop |
|||
video/mpeg=mpv.desktop |
|||
video/ogg=mpv.desktop |
|||
video/quicktime=mpv.desktop |
|||
video/vnd.mpegurl=mpv.desktop |
|||
video/vnd.rn-realvideo=mpv.desktop |
|||
video/vnd.vivo=mpv.desktop |
|||
video/wavelet=mpv.desktop |
|||
video/webm=mpv.desktop |
|||
video/x-anim=mpv.desktop |
|||
video/x-flic=mpv.desktop |
|||
video/x-flv=mpv.desktop |
|||
video/x-javafx=mpv.desktop |
|||
video/x-matroska-3d=mpv.desktop |
|||
video/x-matroska=mpv.desktop |
|||
video/x-mjpeg=mpv.desktop |
|||
video/x-mng=mpv.desktop |
|||
video/x-msvideo=mpv.desktop |
|||
video/x-ms-wmp=mpv.desktop |
|||
video/x-ms-wmv=mpv.desktop |
|||
video/x-nsv=mpv.desktop |
|||
video/x-ogm+ogg=mpv.desktop |
|||
video/x-sgi-movie=mpv.desktop |
|||
video/x-theora+ogg=mpv.desktop |
|||
x-scheme-handler/lbry=lbry.desktop |
|||
inode/directory=file.desktop |
|||
x-scheme-handler/tg=org.telegram.desktop.desktop |
|||
x-scheme-handler/discord-378347429537251328=discord-378347429537251328.desktop |
|||
x-scheme-handler/discord-455712169795780630=discord-455712169795780630.desktop |
|||
x-scheme-handler/http=firefox.desktop |
|||
x-scheme-handler/https=firefox.desktop |
|||
x-scheme-handler/ftp=firefox.desktop |
|||
x-scheme-handler/chrome=firefox.desktop |
|||
text/html=firefox.desktop |
|||
application/x-extension-htm=firefox.desktop |
|||
application/x-extension-html=firefox.desktop |
|||
application/x-extension-shtml=firefox.desktop |
|||
application/xhtml+xml=firefox.desktop |
|||
application/x-extension-xhtml=firefox.desktop |
|||
application/x-extension-xht=firefox.desktop |
|||
|
|||
[Added Associations] |
|||
application/pdf=org.pwmt.zathura-pdf-mupdf.desktop;firefox.desktop; |
|||
application/x-bittorrent=org.qbittorrent.qBittorrent.desktop; |
|||
x-scheme-handler/http=firefox.desktop; |
|||
x-scheme-handler/https=firefox.desktop; |
|||
x-scheme-handler/ftp=firefox.desktop; |
|||
x-scheme-handler/chrome=firefox.desktop; |
|||
text/html=firefox.desktop; |
|||
application/x-extension-htm=firefox.desktop; |
|||
application/x-extension-html=firefox.desktop; |
|||
application/x-extension-shtml=firefox.desktop; |
|||
application/xhtml+xml=firefox.desktop; |
|||
application/x-extension-xhtml=firefox.desktop; |
|||
application/x-extension-xht=firefox.desktop; |
|||
application/x-bibtex=nvim.desktop; |
|||
audio/wav=mpv.desktop; |
|||
x-scheme-handler/tg=userapp-Telegram Desktop-M0UFZ0.desktop;userapp-Telegram Desktop-X5WQ30.desktop;userapp-Telegram Desktop-V3L7V1.desktop;org.telegram.desktop.desktop; |
|||
application/msword=libreoffice-writer.desktop; |
|||
image/jpeg=sxiv.desktop; |
@ -0,0 +1,5 @@ |
|||
l seek 5 |
|||
h seek -5 |
|||
j seek -60 |
|||
k seek 60 |
|||
S cycle sub |
@ -0,0 +1,5 @@ |
|||
# Youtube-dl |
|||
ytdl-format=bestvideo[height<=?480]+bestaudio/best |
|||
|
|||
# yt-dlp |
|||
script-opts-append=ytdl_hook-ytdl_path=yt-dlp |
@ -0,0 +1,503 @@ |
|||
--redefine keybindings here if needed; multiple bindings are possible |
|||
keybinds = { |
|||
activate = {'G', 'MOUSE_BTN2'}, |
|||
plsup = {'UP', 'MOUSE_BTN3'}, |
|||
plsdown = {'DOWN', 'MOUSE_BTN4'}, |
|||
plsenter = {'ENTER', 'MOUSE_BTN0'} |
|||
} |
|||
--hide playlist after specified number of seconds |
|||
osd_time=10 |
|||
--show only specified number of playlist entries |
|||
window=7 |
|||
--fade video when showing playlist |
|||
fade=false |
|||
--if fade=true; -100 — black, 0 — normal |
|||
plsbrightness=-70 |
|||
--favorites get promotion to the top of the pls |
|||
favorites = {} |
|||
-- END OF CONFIGURABLE VARIABLES |
|||
|
|||
local timer |
|||
--local plscount |
|||
local pattern="" |
|||
local is_active |
|||
local is_playlist_loaded |
|||
|
|||
-- UTF-8 lower/upper conversion |
|||
local utf8_lc_uc = { |
|||
["a"] = "A", |
|||
["b"] = "B", |
|||
["c"] = "C", |
|||
["d"] = "D", |
|||
["e"] = "E", |
|||
["f"] = "F", |
|||
["g"] = "G", |
|||
["h"] = "H", |
|||
["i"] = "I", |
|||
["j"] = "J", |
|||
["k"] = "K", |
|||
["l"] = "L", |
|||
["m"] = "M", |
|||
["n"] = "N", |
|||
["o"] = "O", |
|||
["p"] = "P", |
|||
["q"] = "Q", |
|||
["r"] = "R", |
|||
["s"] = "S", |
|||
["t"] = "T", |
|||
["u"] = "U", |
|||
["v"] = "V", |
|||
["w"] = "W", |
|||
["x"] = "X", |
|||
["y"] = "Y", |
|||
["z"] = "Z", |
|||
["а"] = "А", |
|||
["б"] = "Б", |
|||
["в"] = "В", |
|||
["г"] = "Г", |
|||
["д"] = "Д", |
|||
["е"] = "Е", |
|||
["ж"] = "Ж", |
|||
["з"] = "З", |
|||
["и"] = "И", |
|||
["й"] = "Й", |
|||
["к"] = "К", |
|||
["л"] = "Л", |
|||
["м"] = "М", |
|||
["н"] = "Н", |
|||
["о"] = "О", |
|||
["п"] = "П", |
|||
["р"] = "Р", |
|||
["с"] = "С", |
|||
["т"] = "Т", |
|||
["у"] = "У", |
|||
["ф"] = "Ф", |
|||
["х"] = "Х", |
|||
["ц"] = "Ц", |
|||
["ч"] = "Ч", |
|||
["ш"] = "Ш", |
|||
["щ"] = "Щ", |
|||
["ъ"] = "Ъ", |
|||
["ы"] = "Ы", |
|||
["ь"] = "Ь", |
|||
["э"] = "Э", |
|||
["ю"] = "Ю", |
|||
["я"] = "Я", |
|||
["ё"] = "Ё" |
|||
} |
|||
|
|||
local utf8_uc_lc = { |
|||
["A"] = "a", |
|||
["B"] = "b", |
|||
["C"] = "c", |
|||
["D"] = "d", |
|||
["E"] = "e", |
|||
["F"] = "f", |
|||
["G"] = "g", |
|||
["H"] = "h", |
|||
["I"] = "i", |
|||
["J"] = "j", |
|||
["K"] = "k", |
|||
["L"] = "l", |
|||
["M"] = "m", |
|||
["N"] = "n", |
|||
["O"] = "o", |
|||
["P"] = "p", |
|||
["Q"] = "q", |
|||
["R"] = "r", |
|||
["S"] = "s", |
|||
["T"] = "t", |
|||
["U"] = "u", |
|||
["V"] = "v", |
|||
["W"] = "w", |
|||
["X"] = "x", |
|||
["Y"] = "y", |
|||
["Z"] = "z", |
|||
["А"] = "а", |
|||
["Б"] = "б", |
|||
["В"] = "в", |
|||
["Г"] = "г", |
|||
["Д"] = "д", |
|||
["Е"] = "е", |
|||
["Ж"] = "ж", |
|||
["З"] = "з", |
|||
["И"] = "и", |
|||
["Й"] = "й", |
|||
["К"] = "к", |
|||
["Л"] = "л", |
|||
["М"] = "м", |
|||
["Н"] = "н", |
|||
["О"] = "о", |
|||
["П"] = "п", |
|||
["Р"] = "р", |
|||
["С"] = "с", |
|||
["Т"] = "т", |
|||
["У"] = "у", |
|||
["Ф"] = "ф", |
|||
["Х"] = "х", |
|||
["Ц"] = "ц", |
|||
["Ч"] = "ч", |
|||
["Ш"] = "ш", |
|||
["Щ"] = "щ", |
|||
["Ъ"] = "ъ", |
|||
["Ы"] = "ы", |
|||
["Ь"] = "ь", |
|||
["Э"] = "э", |
|||
["Ю"] = "ю", |
|||
["Я"] = "я", |
|||
["Ё"] = "ё" |
|||
} |
|||
|
|||
--utf8 char pattern |
|||
local utf8_char="[\1-\127\192-\223][\128-\191]*" |
|||
|
|||
local cyr_chars={'а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я'} |
|||
|
|||
-- символы, которые возможно вводить для поиска |
|||
local chars={} |
|||
for i=string.byte('a'),string.byte('z') do |
|||
table.insert(chars,i) |
|||
end |
|||
for i=string.byte('A'),string.byte('Z') do |
|||
table.insert(chars,i) |
|||
end |
|||
for i=string.byte('0'),string.byte('9') do |
|||
table.insert(chars,i) |
|||
end |
|||
for _,v in ipairs({',','^','$','(',')','%','.','[',']','*','+','-','?','`',"'",";"}) do |
|||
table.insert(chars,string.byte(v)) |
|||
end |
|||
|
|||
local keybinder = { |
|||
remove = function(action) |
|||
for i,_ in ipairs(keybinds[action]) do |
|||
mp.remove_key_binding(action..tostring(i)) |
|||
end |
|||
end, |
|||
add = function(action, func, repeatable) |
|||
for i,key in ipairs(keybinds[action]) do |
|||
assert(type(func)=="function", "not a function") |
|||
if repeatable then |
|||
mp.add_forced_key_binding(key, action..tostring(i), func, "repeatable") |
|||
else |
|||
mp.add_forced_key_binding(key, action..tostring(i), func) |
|||
end |
|||
end |
|||
end |
|||
} |
|||
|
|||
local fader = { |
|||
saved_brtns, |
|||
on = function(self) |
|||
if fade and not self.saved_brtns then |
|||
self.saved_brtns = mp.get_property("brightness") |
|||
mp.set_property("brightness", plsbrightness) |
|||
end |
|||
end, |
|||
off = function(self) |
|||
if fade and self.saved_brtns then |
|||
mp.set_property("brightness", self.saved_brtns) |
|||
self.saved_brtns=nil |
|||
end |
|||
end |
|||
} |
|||
|
|||
local playlister = { |
|||
-- pls — список элементов плейлиста |
|||
pls, |
|||
-- plsfiltered — список индексов выбранных фильтром элементов плейлиста |
|||
plsfiltered, |
|||
plspos, |
|||
wndstart, |
|||
wndend, |
|||
cursor, |
|||
|
|||
init = function(self) |
|||
if not self.pls then |
|||
self.pls = mp.get_property_native("playlist") |
|||
end |
|||
mp.commandv("stop") |
|||
--need to mark first entry non-current (mpv bug?) |
|||
if self.pls[1] then |
|||
self.pls[1].current = false |
|||
end |
|||
if favorites and #favorites>0 then |
|||
self:sortfavs() |
|||
end |
|||
pattern = "" |
|||
self.plsfiltered = tablekeys(self.pls) |
|||
end, |
|||
|
|||
show = function(self) |
|||
local i |
|||
local newpos |
|||
local msg |
|||
--media-title |
|||
--playlist t[2].title |
|||
|
|||
if not self.plsfiltered then |
|||
return |
|||
end |
|||
if not self.wndstart or not self.cursor then |
|||
self.wndstart=1 |
|||
self.cursor=0 |
|||
end |
|||
|
|||
msg="" |
|||
i = self.wndstart |
|||
local prefix |
|||
while self.plsfiltered[i] and i<=self.wndstart+window-1 do |
|||
if self.pls[self.plsfiltered[i]].current then |
|||
prefix="*" |
|||
elseif i==self.wndstart+self.cursor then |
|||
prefix=">" |
|||
else |
|||
prefix=" " |
|||
end |
|||
msg = msg..prefix..(self.pls[self.plsfiltered[i]].title or "").."\n" |
|||
i=i+1 |
|||
end |
|||
if self.wndstart>1 then |
|||
msg = "...\n"..msg |
|||
else |
|||
msg = " \n"..msg |
|||
end |
|||
if self.wndstart+window-1<#self.plsfiltered then |
|||
msg = msg.."..." |
|||
end |
|||
msg="/"..pattern.."\n"..msg |
|||
mp.osd_message(msg, osd_time) |
|||
end, |
|||
|
|||
sortfavs = function(self) |
|||
--favorites bubbles to the top |
|||
local favs={} |
|||
local nonfavs={} |
|||
for _,v in ipairs(self.pls) do |
|||
if in_array(favorites,v.title) then |
|||
favs[#favs+1] = v |
|||
else |
|||
nonfavs[#nonfavs+1] = v |
|||
end |
|||
end |
|||
for i=1,#nonfavs do |
|||
favs[#favs+1] = nonfavs[i] |
|||
end |
|||
self.pls = favs |
|||
end, |
|||
|
|||
filter = function(self) |
|||
self.plsfiltered={} |
|||
for i,v in ipairs(self.pls) do |
|||
if string.match(mylower(v.title),'.*'..prepat(pattern)..'.*') then |
|||
table.insert(self.plsfiltered,i) |
|||
end |
|||
end |
|||
self.wndstart=1 |
|||
self.cursor=0 |
|||
end, |
|||
|
|||
down = function(self) |
|||
if self.cursor >= #self.plsfiltered-1 then return end |
|||
if self.cursor<window-1 then |
|||
self.cursor=self.cursor+1 |
|||
else |
|||
if self.wndstart<#self.plsfiltered-window+1 then |
|||
self.wndstart=self.wndstart+1 |
|||
end |
|||
end |
|||
self.show(self) |
|||
end, |
|||
up = function(self) |
|||
if self.cursor>0 then |
|||
self.cursor=self.cursor-1 |
|||
self.show(self) |
|||
else |
|||
if self.wndstart>1 then |
|||
self.wndstart=self.wndstart-1 |
|||
self.show(self) |
|||
end |
|||
end |
|||
end, |
|||
|
|||
play = function(self) |
|||
mp.commandv("loadfile",self.pls[self.plsfiltered[self.wndstart+self.cursor]].filename) |
|||
if self.plspos then |
|||
self.pls[self.plspos].current=false |
|||
end |
|||
self.plspos=self.plsfiltered[self.wndstart+self.cursor] |
|||
self.pls[self.plspos].current=true |
|||
end |
|||
} |
|||
|
|||
function add_bindings() |
|||
keybinder.add("plsup", up, true) |
|||
keybinder.add("plsdown", down, true) |
|||
for i,v in ipairs(chars) do |
|||
c=string.char(v) |
|||
mp.add_forced_key_binding(c, 'search'..v, typing(c),"repeatable") |
|||
end |
|||
mp.add_forced_key_binding('SPACE', 'search32', typing(' '),"repeatable") |
|||
|
|||
--[[ mp.add_key_binding('а', 'search1000', typing('а'),"repeatable") |
|||
mp.add_key_binding('с', 'search1001', typing('с'),"repeatable")]] |
|||
|
|||
mp.add_forced_key_binding('BS', 'searchbs', backspace,"repeatable") |
|||
keybinder.add("plsenter", play) |
|||
for i,v in ipairs(cyr_chars) do |
|||
mp.add_forced_key_binding(v, 'search'..i+1000, typing(v),"repeatable") |
|||
end |
|||
end |
|||
|
|||
function remove_bindings() |
|||
keybinder.remove('plsup') |
|||
keybinder.remove('plsdown') |
|||
keybinder.remove('plsenter') |
|||
for i,v in ipairs(chars) do |
|||
c=string.char(v) |
|||
mp.remove_key_binding('search'..v) |
|||
end |
|||
mp.remove_key_binding('search32') |
|||
mp.remove_key_binding('searchbs') |
|||
for i,v in ipairs(cyr_chars) do |
|||
mp.remove_key_binding('search'..i+1000) |
|||
end |
|||
end |
|||
|
|||
function activate() |
|||
if is_active then |
|||
shutdown() |
|||
return |
|||
else |
|||
is_active=true |
|||
fader:on() |
|||
playlister:show() |
|||
add_bindings() |
|||
if not timer then |
|||
timer=mp.add_periodic_timer(osd_time, shutdown) |
|||
timer.oneshot=true |
|||
else |
|||
resumetimer() |
|||
end |
|||
end |
|||
end |
|||
|
|||
function tablekeys(t) |
|||
local result={} |
|||
for i,v in ipairs(t) do |
|||
table.insert(result,i) |
|||
end |
|||
return result |
|||
end |
|||
|
|||
function in_array(array, value) |
|||
for _,v in ipairs(array) do |
|||
if v==value then |
|||
return true |
|||
end |
|||
end |
|||
return false |
|||
end |
|||
|
|||
function mylower(s) |
|||
local res,n = string.gsub(s,utf8_char,function (c) |
|||
return utf8_uc_lc[c] |
|||
end) |
|||
return res |
|||
end |
|||
|
|||
function myupper(s) |
|||
local res,n = string.gsub(s,utf8_char,function (c) |
|||
return utf8_lc_uc[c] |
|||
end) |
|||
return res |
|||
end |
|||
|
|||
function prepat(s) |
|||
--prepare nocase and magic chars |
|||
s = string.gsub(s, "[%^%$%(%)%%%.%[%]%*%+%-%?]",function (c) |
|||
return '%'..c |
|||
end) |
|||
--[[ s = string.gsub(s, utf8_char, function (c) |
|||
return string.format("[%s%s]", utf8_uc_lc[c] or c, utf8_lc_uc[c] or c) |
|||
end)]] |
|||
return s |
|||
end |
|||
|
|||
function resumetimer() |
|||
timer:kill() |
|||
timer:resume() |
|||
end |
|||
|
|||
function typing(char) |
|||
return function() |
|||
local c=string.lower(char) |
|||
pattern = pattern..c |
|||
playlister:filter() |
|||
playlister:show() |
|||
resumetimer() |
|||
end |
|||
end |
|||
|
|||
function backspace() |
|||
if string.len(pattern)>0 then |
|||
-- pattern = string.sub(pattern,1,-2) |
|||
-- for unicode |
|||
pattern = string.match(pattern,"(.*)"..utf8_char.."$") |
|||
playlister:filter() |
|||
playlister:show() |
|||
resumetimer() |
|||
end |
|||
end |
|||
|
|||
function play() |
|||
-- mp.commandv("playlist-move", wndstart+cursor, 1) |
|||
-- mp.commandv("playlist-clear") |
|||
-- mp.commandv("playlist-next") |
|||
fader:off() |
|||
playlister:play() |
|||
playlister:show() |
|||
resumetimer() |
|||
end |
|||
|
|||
function shutdown() |
|||
fader:off() |
|||
remove_bindings() |
|||
is_active=false |
|||
mp.osd_message("", 1) |
|||
end |
|||
|
|||
function down() |
|||
fader:on() |
|||
playlister:down() |
|||
resumetimer() |
|||
end |
|||
|
|||
function up() |
|||
fader:on() |
|||
playlister:up() |
|||
resumetimer() |
|||
end |
|||
|
|||
function on_start_file() |
|||
if is_playlist_loaded then |
|||
playlister:init() |
|||
mp.unregister_event(on_start_file) |
|||
activate() |
|||
else |
|||
is_playlist_loaded = true |
|||
end |
|||
end |
|||
|
|||
--~ function on_shutdown() |
|||
--~ fader:off() |
|||
--~ end |
|||
|
|||
if mp.get_opt("iptv") then |
|||
mp.set_property_bool("idle", true) |
|||
mp.set_property_bool("force-window", true) |
|||
mp.register_event("start-file", on_start_file) |
|||
--~ mp.register_event("end-file", on_shutdown) |
|||
keybinder.add("activate", activate) |
|||
end |
|||
|
@ -0,0 +1,36 @@ |
|||
-- mpvSockets, one socket per instance, removes socket on exit |
|||
|
|||
local utils = require 'mp.utils' |
|||
|
|||
local function get_temp_path() |
|||
local directory_seperator = package.config:match("([^\n]*)\n?") |
|||
local example_temp_file_path = os.tmpname() |
|||
|
|||
-- remove generated temp file |
|||
pcall(os.remove, example_temp_file_path) |
|||
|
|||
local seperator_idx = example_temp_file_path:reverse():find(directory_seperator) |
|||
local temp_path_length = #example_temp_file_path - seperator_idx |
|||
|
|||
return example_temp_file_path:sub(1, temp_path_length) |
|||
end |
|||
|
|||
tempDir = get_temp_path() |
|||
|
|||
function join_paths(...) |
|||
local arg={...} |
|||
path = "" |
|||
for i,v in ipairs(arg) do |
|||
path = utils.join_path(path, tostring(v)) |
|||
end |
|||
return path; |
|||
end |
|||
|
|||
ppid = utils.getpid() |
|||
os.execute("mkdir " .. join_paths(tempDir, "mpvSockets") .. " 2>/dev/null") |
|||
mp.set_property("options/input-ipc-server", join_paths(tempDir, "mpvSockets", ppid)) |
|||
|
|||
function shutdown_handler() |
|||
os.remove(join_paths(tempDir, "mpvSockets", ppid)) |
|||
end |
|||
mp.register_event("shutdown", shutdown_handler) |
@ -0,0 +1,136 @@ |
|||
-- TODO prefetch if next in playlist? |
|||
-- TODO handle torrent with multiple video files (if webtorrent can print json) |
|||
-- - don't close kill webtorrent while still videos unplayed? or in playlist? |
|||
-- - store titles/info when starting webtorrent and check stream-open-filename |
|||
-- for any item in playlist to see if it matches stored entry |
|||
|
|||
local settings = { |
|||
close_webtorrent = true, |
|||
remove_files = true, |
|||
download_directory = "/tmp/webtorrent", |
|||
webtorrent_flags = "", |
|||
webtorrent_verbosity = "speed" |
|||
} |
|||
|
|||
(require "mp.options").read_options(settings, "webtorrent-hook") |
|||
|
|||
local open_videos = {} |
|||
|
|||
-- http://lua-users.org/wiki/StringRecipes |
|||
local function ends_with(str, ending) |
|||
return ending == "" or str:sub(-#ending) == ending |
|||
end |
|||
|
|||
-- https://stackoverflow.com/questions/132397/get-back-the-output-of-os-execute-in-lua |
|||
function os.capture(cmd, decolorize, raw) |
|||
if decolorize then |
|||
-- https://github.com/webtorrent/webtorrent-cli/issues/132 |
|||
-- TODO webtorrent should have a way to just print json information with |
|||
-- no colors |
|||
-- https://stackoverflow.com/questions/19296667/remove-ansi-color-codes-from-a-text-file-using-bash/30938702#30938702 |
|||
cmd = cmd .. " | sed -r 's/\\x1B\\[(([0-9]{1,2})?(;)?([0-9]{1,2})?)?[m,K,H,f,J]//g'" |
|||
end |
|||
local f = assert(io.popen(cmd, 'r')) |
|||
local s = assert(f:read('*a')) |
|||
f:close() |
|||
if raw then return s end |
|||
s = string.gsub(s, '^%s+', '') |
|||
s = string.gsub(s, '%s+$', '') |
|||
-- s = string.gsub(s, '[\n\r]+', ' ') |
|||
return s |
|||
end |
|||
|
|||
function read_file(file) |
|||
local fh = assert(io.open(file, "rb")) |
|||
local contents = fh:read("*all") |
|||
fh:close() |
|||
return contents |
|||
end |
|||
|
|||
function play_torrent() |
|||
local url = mp.get_property("stream-open-filename") |
|||
if (url:find("magnet:") == 1 or url:find("peerflix://") == 1 |
|||
or url:find("webtorrent://") == 1 or ends_with(url, "torrent")) then |
|||
if url:find("webtorrent://") == 1 then |
|||
url = url:sub(14) |
|||
end |
|||
if url:find("peerflix://") == 1 then |
|||
url = url:sub(12) |
|||
end |
|||
|
|||
os.execute("mkdir -p " .. settings.download_directory) |
|||
-- don't reuse files (so multiple mpvs works) |
|||
local output_file = settings.download_directory |
|||
.. "/webtorrent-output-" .. mp.get_time() .. ".log" |
|||
-- --keep-seeding is to prevent webtorrent from quitting once the download |
|||
-- is done |
|||
local webtorrent_command = "webtorrent " |
|||
.. settings.webtorrent_flags |
|||
.. " --out '" .. settings.download_directory .. "' --keep-seeding '" |
|||
.. url .. "' &> " .. output_file .. " & echo $!" |
|||
local pid = os.capture(webtorrent_command) |
|||
mp.msg.info("Waiting for webtorrent server") |
|||
|
|||
local url_command = "tail -f " .. output_file |
|||
.. " | awk '/Server running at:/ {print $4; exit}'" |
|||
local url = os.capture(url_command, true) |
|||
mp.msg.info("Webtorrent server is up") |
|||
|
|||
local title_command = "awk '/(Seeding|Downloading): / " |
|||
.. "{gsub(/(Seeding|Downloading): /, \"\"); print; exit}' " |
|||
.. output_file |
|||
local title = os.capture(title_command, true) |
|||
mp.msg.verbose("Setting media title to: " .. title) |
|||
mp.set_property("force-media-title", title) |
|||
|
|||
local path |
|||
if title then |
|||
path = settings.download_directory .. "/" .. title |
|||
end |
|||
open_videos[url] = {title=title,path=path,pid=pid} |
|||
|
|||
mp.set_property("stream-open-filename", url) |
|||
|
|||
if settings.webtorrent_verbosity == "speed" then |
|||
local printer_pid |
|||
local printer_pid_file = settings.download_directory |
|||
.. "/webtorrent-printer-" .. mp.get_time() .. ".pid" |
|||
os.execute("tail -f " .. output_file |
|||
.. " | awk '/Speed:/' ORS='\r' & echo -n $! > " |
|||
.. printer_pid_file) |
|||
printer_pid = read_file(printer_pid_file) |
|||
mp.register_event("file-loaded", |
|||
function() |
|||
os.execute("kill " .. printer_pid) |
|||
end |
|||
) |
|||
end |
|||
end |
|||
end |
|||
|
|||
function webtorrent_cleanup() |
|||
local url = mp.get_property("stream-open-filename") |
|||
if settings.close_webtorrent and open_videos[url] then |
|||
local title = open_videos[url].title |
|||
local path = open_videos[url].path |
|||
local pid = open_videos[url].pid |
|||
|
|||
if pid then |
|||
mp.msg.verbose("Closing webtorrent for " .. title) |
|||
os.execute("kill " .. pid) |
|||
end |
|||
|
|||
if settings.remove_files then |
|||
if path then |
|||
mp.msg.verbose("Removing media file for " .. title) |
|||
os.execute("rm -r '" .. path .. "'") |
|||
end |
|||
end |
|||
|
|||
open_videos[url] = {} |
|||
end |
|||
end |
|||
|
|||
mp.add_hook("on_load", 50, play_torrent) |
|||
|
|||
mp.add_hook("on_unload", 10, webtorrent_cleanup) |
@ -0,0 +1,479 @@ |
|||
############################################################## |
|||
## This is the example bindings file. Copy it to ## |
|||
## ~/.ncmpcpp/bindings or $XDG_CONFIG_HOME/ncmpcpp/bindings ## |
|||
## and set up your preferences ## |
|||
############################################################## |
|||
# |
|||
#def_key "mouse" |
|||
# mouse_event |
|||
# |
|||
#def_key "up" |
|||
# scroll_up |
|||
# |
|||
#def_key "shift-up" |
|||
# select_item |
|||
# scroll_up |
|||
# |
|||
#def_key "down" |
|||
# scroll_down |
|||
# |
|||
#def_key "shift-down" |
|||
# select_item |
|||
# scroll_down |
|||
# |
|||
#def_key "[" |
|||
# scroll_up_album |
|||
# |
|||
#def_key "]" |
|||
# scroll_down_album |
|||
# |
|||
#def_key "{" |
|||
# scroll_up_artist |
|||
# |
|||
#def_key "}" |
|||
# scroll_down_artist |
|||
# |
|||
#def_key "page_up" |
|||
# page_up |
|||
# |
|||
#def_key "page_down" |
|||
# page_down |
|||
# |
|||
#def_key "home" |
|||
# move_home |
|||
# |
|||
#def_key "end" |
|||
# move_end |
|||
# |
|||
#def_key "insert" |
|||
# select_item |
|||
# |
|||
#def_key "enter" |
|||
# enter_directory |
|||
# |
|||
#def_key "enter" |
|||
# toggle_output |
|||
# |
|||
#def_key "enter" |
|||
# run_action |
|||
# |
|||
#def_key "enter" |
|||
# play_item |
|||
# |
|||
#def_key "space" |
|||
# add_item_to_playlist |
|||
# |
|||
#def_key "space" |
|||
# toggle_lyrics_update_on_song_change |
|||
# |
|||
#def_key "space" |
|||
# toggle_visualization_type |
|||
# |
|||
#def_key "delete" |
|||
# delete_playlist_items |
|||
# |
|||
#def_key "delete" |
|||
# delete_browser_items |
|||
# |
|||
#def_key "delete" |
|||
# delete_stored_playlist |
|||
# |
|||
#def_key "right" |
|||
# next_column |
|||
# |
|||
#def_key "right" |
|||
# slave_screen |
|||
# |
|||
#def_key "right" |
|||
# volume_up |
|||
# |
|||
#def_key "+" |
|||
# volume_up |
|||
# |
|||
#def_key "left" |
|||
# previous_column |
|||
# |
|||
#def_key "left" |
|||
# master_screen |
|||
# |
|||
#def_key "left" |
|||
# volume_down |
|||
# |
|||
#def_key "-" |
|||
# volume_down |
|||
# |
|||
#def_key ":" |
|||
# execute_command |
|||
# |
|||
#def_key "tab" |
|||
# next_screen |
|||
# |
|||
#def_key "shift-tab" |
|||
# previous_screen |
|||
# |
|||
#def_key "f1" |
|||
# show_help |
|||
# |
|||
#def_key "1" |
|||
# show_playlist |
|||
# |
|||
#def_key "2" |
|||
# show_browser |
|||
# |
|||
#def_key "2" |
|||
# change_browse_mode |
|||
# |
|||
#def_key "3" |
|||
# show_search_engine |
|||
# |
|||
#def_key "3" |
|||
# reset_search_engine |
|||
# |
|||
#def_key "4" |
|||
# show_media_library |
|||
# |
|||
#def_key "4" |
|||
# toggle_media_library_columns_mode |
|||
# |
|||
#def_key "5" |
|||
# show_playlist_editor |
|||
# |
|||
#def_key "6" |
|||
# show_tag_editor |
|||
# |
|||
#def_key "7" |
|||
# show_outputs |
|||
# |
|||
#def_key "8" |
|||
# show_visualizer |
|||
# |
|||
#def_key "=" |
|||
# show_clock |
|||
# |
|||
#def_key "@" |
|||
# show_server_info |
|||
# |
|||
#def_key "s" |
|||
# stop |
|||
# |
|||
#def_key "p" |
|||
# pause |
|||
# |
|||
#def_key ">" |
|||
# next |
|||
# |
|||
#def_key "<" |
|||
# previous |
|||
# |
|||
#def_key "ctrl-h" |
|||
# jump_to_parent_directory |
|||
# |
|||
#def_key "ctrl-h" |
|||
# replay_song |
|||
# |
|||
#def_key "backspace" |
|||
# jump_to_parent_directory |
|||
# |
|||
#def_key "backspace" |
|||
# replay_song |
|||
# |
|||
#def_key "f" |
|||
# seek_forward |
|||
# |
|||
#def_key "b" |
|||
# seek_backward |
|||
# |
|||
#def_key "r" |
|||
# toggle_repeat |
|||
# |
|||
#def_key "z" |
|||
# toggle_random |
|||
# |
|||
#def_key "y" |
|||
# save_tag_changes |
|||
# |
|||
#def_key "y" |
|||
# start_searching |
|||
# |
|||
#def_key "y" |
|||
# toggle_single |
|||
# |
|||
#def_key "R" |
|||
# toggle_consume |
|||
# |
|||
#def_key "Y" |
|||
# toggle_replay_gain_mode |
|||
# |
|||
#def_key "T" |
|||
# toggle_add_mode |
|||
# |
|||
#def_key "|" |
|||
# toggle_mouse |
|||
# |
|||
#def_key "#" |
|||
# toggle_bitrate_visibility |
|||
# |
|||
#def_key "Z" |
|||
# shuffle |
|||
# |
|||
#def_key "x" |
|||
# toggle_crossfade |
|||
# |
|||
#def_key "X" |
|||
# set_crossfade |
|||
# |
|||
#def_key "u" |
|||
# update_database |
|||
# |
|||
#def_key "ctrl-s" |
|||
# sort_playlist |
|||
# |
|||
#def_key "ctrl-s" |
|||
# toggle_browser_sort_mode |
|||
# |
|||
#def_key "ctrl-s" |
|||
# toggle_media_library_sort_mode |
|||
# |
|||
#def_key "ctrl-r" |
|||
# reverse_playlist |
|||
# |
|||
#def_key "ctrl-f" |
|||
# apply_filter |
|||
# |
|||
#def_key "ctrl-_" |
|||
# select_found_items |
|||
# |
|||
#def_key "/" |
|||
# find |
|||
# |
|||
#def_key "/" |
|||
# find_item_forward |
|||
# |
|||
#def_key "?" |
|||
# find |
|||
# |
|||
#def_key "?" |
|||
# find_item_backward |
|||
# |
|||
#def_key "." |
|||
# next_found_item |
|||
# |
|||
#def_key "," |
|||
# previous_found_item |
|||
# |
|||
#def_key "w" |
|||
# toggle_find_mode |
|||
# |
|||
#def_key "e" |
|||
# edit_song |
|||
# |
|||
#def_key "e" |
|||
# edit_library_tag |
|||
# |
|||
#def_key "e" |
|||
# edit_library_album |
|||
# |
|||
#def_key "e" |
|||
# edit_directory_name |
|||
# |
|||
#def_key "e" |
|||
# edit_playlist_name |
|||
# |
|||
#def_key "e" |
|||
# edit_lyrics |
|||
# |
|||
#def_key "i" |
|||
# show_song_info |
|||
# |
|||
#def_key "I" |
|||
# show_artist_info |
|||
# |
|||
#def_key "g" |
|||
# jump_to_position_in_song |
|||
# |
|||
#def_key "l" |
|||
# show_lyrics |
|||
# |
|||
#def_key "ctrl-v" |
|||
# select_range |
|||
# |
|||
#def_key "v" |
|||
# reverse_selection |
|||
# |
|||
#def_key "V" |
|||
# remove_selection |
|||
# |
|||
#def_key "B" |
|||
# select_album |
|||
# |
|||
#def_key "a" |
|||
# add_selected_items |
|||
# |
|||
#def_key "c" |
|||
# clear_playlist |
|||
# |
|||
#def_key "c" |
|||
# clear_main_playlist |
|||
# |
|||
#def_key "C" |
|||
# crop_playlist |
|||
# |
|||
#def_key "C" |
|||
# crop_main_playlist |
|||
# |
|||
#def_key "m" |
|||
# move_sort_order_up |
|||
# |
|||
#def_key "m" |
|||
# move_selected_items_up |
|||
# |
|||
#def_key "n" |
|||
# move_sort_order_down |
|||
# |
|||
#def_key "n" |
|||
# move_selected_items_down |
|||
# |
|||
#def_key "M" |
|||
# move_selected_items_to |
|||
# |
|||
#def_key "A" |
|||
# add |
|||
# |
|||
#def_key "S" |
|||
# save_playlist |
|||
# |
|||
#def_key "o" |
|||
# jump_to_playing_song |
|||
# |
|||
#def_key "G" |
|||
# jump_to_browser |
|||
# |
|||
#def_key "G" |
|||
# jump_to_playlist_editor |
|||
# |
|||
#def_key "~" |
|||
# jump_to_media_library |
|||
# |
|||
#def_key "E" |
|||
# jump_to_tag_editor |
|||
# |
|||
#def_key "U" |
|||
# toggle_playing_song_centering |
|||
# |
|||
#def_key "P" |
|||
# toggle_display_mode |
|||
# |
|||
#def_key "\\" |
|||
# toggle_interface |
|||
# |
|||
#def_key "!" |
|||
# toggle_separators_between_albums |
|||
# |
|||
#def_key "L" |
|||
# toggle_lyrics_fetcher |
|||
# |
|||
#def_key "F" |
|||
# fetch_lyrics_in_background |
|||
# |
|||
#def_key "alt-l" |
|||
# toggle_fetching_lyrics_in_background |
|||
# |
|||
#def_key "ctrl-l" |
|||
# toggle_screen_lock |
|||
# |
|||
#def_key "`" |
|||
# toggle_library_tag_type |
|||
# |
|||
#def_key "`" |
|||
# refetch_lyrics |
|||
# |
|||
#def_key "`" |
|||
# add_random_items |
|||
# |
|||
#def_key "ctrl-p" |
|||
# set_selected_items_priority |
|||
# |
|||
#def_key "q" |
|||
# quit |
|||
# |
|||
# |
|||
#def_key "f" |
|||
# find |
|||
#def_key "f" |
|||
# find_item_forward |
|||
|
|||
def_key "+" |
|||
show_clock |
|||
def_key "=" |
|||
volume_up |
|||
|
|||
def_key "j" |
|||
scroll_down |
|||
def_key "k" |
|||
scroll_up |
|||
|
|||
def_key "ctrl-u" |
|||
page_up |
|||
#push_characters "kkkkkkkkkkkkkkk" |
|||
def_key "ctrl-d" |
|||
page_down |
|||
#push_characters "jjjjjjjjjjjjjjj" |
|||
def_key "u" |
|||
page_up |
|||
#push_characters "kkkkkkkkkkkkkkk" |
|||
def_key "d" |
|||
page_down |
|||
#push_characters "jjjjjjjjjjjjjjj" |
|||
def_key "h" |
|||
previous_column |
|||
def_key "l" |
|||
next_column |
|||
|
|||
def_key "." |
|||
show_lyrics |
|||
|
|||
def_key "n" |
|||
next_found_item |
|||
def_key "N" |
|||
previous_found_item |
|||
|
|||
# not used but bound |
|||
def_key "J" |
|||
move_sort_order_down |
|||
def_key "K" |
|||
move_sort_order_up |
|||
def_key "h" |
|||
jump_to_parent_directory |
|||
def_key "l" |
|||
enter_directory |
|||
def_key "l" |
|||
run_action |
|||
def_key "l" |
|||
play_item |
|||
def_key "m" |
|||
show_media_library |
|||
def_key "m" |
|||
toggle_media_library_columns_mode |
|||
def_key "t" |
|||
show_tag_editor |
|||
def_key "v" |
|||
show_visualizer |
|||
def_key "G" |
|||
move_end |
|||
def_key "g" |
|||
move_home |
|||
#jump_to_position_in_song |
|||
def_key "U" |
|||
update_database |
|||
def_key "s" |
|||
reset_search_engine |
|||
def_key "s" |
|||
show_search_engine |
|||
def_key "f" |
|||
show_browser |
|||
def_key "f" |
|||
change_browse_mode |
|||
def_key "x" |
|||
delete_playlist_items |
|||
def_key "P" |
|||
show_playlist |
@ -0,0 +1,537 @@ |
|||
############################################################################## |
|||
## This is the example configuration file. Copy it to $HOME/.ncmpcpp/config ## |
|||
## or $XDG_CONFIG_HOME/ncmpcpp/config and set up your preferences. ## |
|||
############################################################################## |
|||
# |
|||
ncmpcpp_directory = ~/.config/ncmpcpp |
|||
# |
|||
## |
|||
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other |
|||
## MPD clients (eg. ncmpc) also use that location. |
|||
## |
|||
# |
|||
lyrics_directory = ~/.local/share/lyrics |
|||
# |
|||
##### connection settings ##### |
|||
# |
|||
#mpd_host = localhost |
|||
# |
|||
#mpd_port = 6600 |
|||
# |
|||
#mpd_connection_timeout = 5 |
|||
# |
|||
## Needed for tag editor and file operations to work. |
|||
## |
|||
mpd_music_dir = "~/Music" |
|||
# |
|||
#mpd_crossfade_time = 5 |
|||
# |
|||
##### music visualizer ##### |
|||
## |
|||
## Note: In order to make music visualizer work you'll need to use mpd fifo |
|||
## output, whose format parameter has to be set to 44100:16:1 for mono |
|||
## visualization or 44100:16:2 for stereo visualization. Example configuration |
|||
## (it has to be put into mpd.conf): |
|||
## |
|||
audio_output { |
|||
type "fifo" |
|||
name "Visualizer feed" |
|||
path "/tmp/mpd.fifo" |
|||
format "44100:16:2" |
|||
} |
|||
## |
|||
# |
|||
## visualizer_fifo_path = /tmp/mpd.fifo |
|||
# |
|||
## |
|||
## Note: Below parameter is needed for ncmpcpp to determine which output |
|||
## provides data for visualizer and thus allow syncing between visualization and |
|||
## sound as currently there are some problems with it. |
|||
## |
|||
# |
|||
visualizer_output_name = Visualizer feed |
|||
# |
|||
## |
|||
## If you set format to 44100:16:2, make it 'yes'. |
|||
## |
|||
visualizer_in_stereo = yes |
|||
# |
|||
## |
|||
## Note: Below parameter defines how often ncmpcpp has to "synchronize" |
|||
## visualizer and audio outputs. 30 seconds is optimal value, but if you |
|||
## experience synchronization problems, set it to lower value. Keep in mind |
|||
## that sane values start with >=10. |
|||
## |
|||
# |
|||
# visualizer_sync_interval = 30 |
|||
# |
|||
## |
|||
## Note: To enable spectrum frequency visualization you need to compile ncmpcpp |
|||
## with fftw3 support. |
|||
## |
|||
# |
|||
## Available values: spectrum, wave, wave_filled, ellipse. |
|||
## |
|||
visualizer_type = spectrum |
|||
# |
|||
#visualizer_look = ●卐 |
|||
#visualizer_look = 卐 |
|||
# |
|||
#visualizer_color = blue, cyan, green, yellow, magenta, red |
|||
# |
|||
## Alternative subset of 256 colors for terminals that support it. |
|||
## |
|||
#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 |
|||
# |
|||
##### system encoding ##### |
|||
## |
|||
## ncmpcpp should detect your charset encoding but if it failed to do so, you |
|||
## can specify charset encoding you are using here. |
|||
## |
|||
## Note: You can see whether your ncmpcpp build supports charset detection by |
|||
## checking output of `ncmpcpp --version`. |
|||
## |
|||
## Note: Since MPD uses UTF-8 by default, setting this option makes sense only |
|||
## if your encoding is different. |
|||
## |
|||
# |
|||
#system_encoding = "" |
|||
# |
|||
##### delays ##### |
|||
# |
|||
## Time of inactivity (in seconds) after playlist highlighting will be disabled |
|||
## (0 = always on). |
|||
## |
|||
#playlist_disable_highlight_delay = 5 |
|||
# |
|||
## Defines how long messages are supposed to be visible. |
|||
## |
|||
message_delay_time = 1 |
|||
# |
|||
##### song format ##### |
|||
## |
|||
## For a song format you can use: |
|||
## |
|||
## %l - length |
|||
## %f - filename |
|||
## %D - directory |
|||
## %a - artist |
|||
## %A - album artist |
|||
## %t - title |
|||
## %b - album |
|||
## %y - date |
|||
## %n - track number (01/12 -> 01) |
|||
## %N - full track info (01/12 -> 01/12) |
|||
## %g - genre |
|||
## %c - composer |
|||
## %p - performer |
|||
## %d - disc |
|||
## %C - comment |
|||
## %P - priority |
|||
## $R - begin right alignment |
|||
## |
|||
## If you want to make sure that a part of the format is displayed only when |
|||
## certain tags are present, you can archieve it by grouping them with brackets, |
|||
## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are |
|||
## present or '' otherwise. It is also possible to define a list of |
|||
## alternatives by providing several groups and separating them with '|', |
|||
## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is |
|||
## not present. |
|||
## |
|||
## Note: If you want to set limit on maximal length of a tag, just put the |
|||
## appropriate number between % and character that defines tag type, e.g. to |
|||
## make album take max. 20 terminal cells, use '%20b'. |
|||
## |
|||
## In addition, formats support markers used for text attributes. They are |
|||
## followed by character '$'. After that you can put: |
|||
## |
|||
## - 0 - default window color (discards all other colors) |
|||
## - 1 - black |
|||
## - 2 - red |
|||
## - 3 - green |
|||
## - 4 - yellow |
|||
## - 5 - blue |
|||
## - 6 - magenta |
|||
## - 7 - cyan |
|||
## - 8 - white |
|||
## - 9 - end of current color |
|||
## - b - bold text |
|||
## - u - underline text |
|||
## - r - reverse colors |
|||
## - a - use alternative character set |
|||
## |
|||
## If you don't want to use a non-color attribute anymore, just put it again, |
|||
## but this time insert character '/' between '$' and attribute character, |
|||
## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with |
|||
## reversed colors. |
|||
## |
|||
## If you want to use 256 colors and/or background colors in formats (the naming |
|||
## scheme is described below in section about color definitions), it can be done |
|||
## with the syntax $(COLOR), e.g. to set the artist tag to one of the |
|||
## non-standard colors and make it have yellow background, you need to write |
|||
## $(197_yellow)%a$(end). Note that for standard colors this is interchangable |
|||
## with attributes listed above. |
|||
## |
|||
## Note: colors can be nested. |
|||
## |
|||
# |
|||
song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9} |
|||
# |
|||
song_status_format = $b{{$8"%t"}} $3by {$4%a{ $3in $7%b{ (%y)}} $3}|{$8%f} |
|||
# |
|||
song_library_format = {%n - }{%t}|{%f} |
|||
# |
|||
alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b |
|||
# |
|||
alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} |
|||
# |
|||
current_item_prefix = $(cyan)$r$b |
|||
# |
|||
current_item_suffix = $/r$(end)$/b |
|||
# |
|||
current_item_inactive_column_prefix = $(magenta)$r |
|||
# |
|||
current_item_inactive_column_suffix = $/r$(end) |
|||
# |
|||
#now_playing_prefix = $b |
|||
# |
|||
#now_playing_suffix = $/b |
|||
# |
|||
#browser_playlist_prefix = "$2playlist$9 " |
|||
# |
|||
#selected_item_prefix = $6 |
|||
# |
|||
#selected_item_suffix = $9 |
|||
# |
|||
#modified_item_prefix = $3> $9 |
|||
# |
|||
## |
|||
## Note: attributes are not supported for the following variables. |
|||
## |
|||
#song_window_title_format = {%a - }{%t}|{%f} |
|||
## |
|||
## Note: Below variables are used for sorting songs in browser. The sort mode |
|||
## determines how songs are sorted, and can be used in combination with a sort |
|||
## format to specify a custom sorting format. Available values for |
|||
## browser_sort_mode are "name", "mtime", "format" and "noop". |
|||
## |
|||
# |
|||
#browser_sort_mode = name |
|||
# |
|||
#browser_sort_format = {%a - }{%t}|{%f} {(%l)} |
|||
# |
|||
##### columns settings ##### |
|||
## |
|||
## syntax of song columns list format is "column column etc." |
|||
## |
|||
## - syntax for each column is: |
|||
## |
|||
## (width of the column)[color of the column]{displayed tag} |
|||
## |
|||
## Note: Width is by default in %, if you want a column to have fixed size, add |
|||
## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of |
|||
## screen (so the real width will depend on actual screen size), whereas |
|||
## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen |
|||
## is. |
|||
## |
|||
## - color is optional (if you want the default one, leave the field empty). |
|||
## |
|||
## Note: You can give a column additional attributes by putting appropriate |
|||
## character after displayed tag character. Available attributes are: |
|||
## |
|||
## - r - column will be right aligned |
|||
## - E - if tag is empty, empty tag marker won't be displayed |
|||
## |
|||
## You can also: |
|||
## |
|||
## - give a column custom name by putting it after attributes, separated with |
|||
## character ':', e.g. {lr:Length} gives you right aligned column of lengths |
|||
## named "Length". |
|||
## |
|||
## - define sequence of tags, that have to be displayed in case predecessor is |
|||
## empty in a way similar to the one in classic song format, i.e. using '|' |
|||
## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to |
|||
## display artist tag and then composer and performer if previous ones are not |
|||
## available. |
|||
## |
|||
# |
|||
#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} |
|||
# |
|||
##### various settings ##### |
|||
# |
|||
## |
|||
## Note: Custom command that will be executed each time song changes. Useful for |
|||
## notifications etc. |
|||
## |
|||
execute_on_song_change = pkill -RTMIN+11 i3blocks |
|||
# |
|||
## |
|||
## Note: Custom command that will be executed each time player state |
|||
## changes. The environment variable MPD_PLAYER_STATE is set to the current |
|||
## state (either unknown, play, pause, or stop) for its duration. |
|||
## |
|||
# |
|||
#execute_on_player_state_change = "" |
|||
# |
|||
#playlist_show_mpd_host = no |
|||
# |
|||
#playlist_show_remaining_time = no |
|||
# |
|||
#playlist_shorten_total_times = no |
|||
# |
|||
#playlist_separate_albums = no |
|||
# |
|||
## |
|||
## Note: Possible display modes: classic, columns. |
|||
## |
|||
playlist_display_mode = columns |
|||
# |
|||
browser_display_mode = columns |
|||
# |
|||
#search_engine_display_mode = classic |
|||
# |
|||
#playlist_editor_display_mode = classic |
|||
# |
|||
#discard_colors_if_item_is_selected = yes |
|||
# |
|||
#show_duplicate_tags = true |
|||
# |
|||
#incremental_seeking = yes |
|||
# |
|||
#seek_time = 1 |
|||
# |
|||
#volume_change_step = 2 |
|||
# |
|||
#autocenter_mode = no |
|||
# |
|||
#centered_cursor = no |
|||
# |
|||
## |
|||
## Note: You can specify third character which will be used to build 'empty' |
|||
## part of progressbar. |
|||
## |
|||
progressbar_look = -> |
|||
# |
|||
## Available values: database, playlist. |
|||
## |
|||
#default_place_to_search_in = database |
|||
# |
|||
## Available values: classic, alternative. |
|||
## |
|||
#user_interface = classic |
|||
# |
|||
#data_fetching_delay = yes |
|||
# |
|||
## Available values: artist, album_artist, date, genre, composer, performer. |
|||
## |
|||
media_library_primary_tag = album_artist |
|||
# |
|||
media_library_albums_split_by_date = no |
|||
# |
|||
## Available values: wrapped, normal. |
|||
## |
|||
#default_find_mode = wrapped |
|||
# |
|||
#default_tag_editor_pattern = %n - %t |
|||
# |
|||
#header_visibility = yes |
|||
# |
|||
#statusbar_visibility = yes |
|||
# |
|||
#titles_visibility = yes |
|||
# |
|||
#header_text_scrolling = yes |
|||
# |
|||
#cyclic_scrolling = no |
|||
# |
|||
#lines_scrolled = 2 |
|||
# |
|||
lyrics_fetchers = azlyrics, genius, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, internet |
|||
# |
|||
#follow_now_playing_lyrics = no |
|||
# |
|||
#fetch_lyrics_for_current_song_in_background = no |
|||
# |
|||
#store_lyrics_in_song_dir = no |
|||
# |
|||
#generate_win32_compatible_filenames = yes |
|||
# |
|||
#allow_for_physical_item_deletion = no |
|||
# |
|||
## |
|||
## Note: If you set this variable, ncmpcpp will try to get info from last.fm in |
|||
## language you set and if it fails, it will fall back to english. Otherwise it |
|||
## will use english the first time. |
|||
## |
|||
## Note: Language has to be expressed as an ISO 639 alpha-2 code. |
|||
## |
|||
#lastfm_preferred_language = en |
|||
# |
|||
#space_add_mode = add_remove |
|||
# |
|||
#show_hidden_files_in_local_browser = no |
|||
# |
|||
## |
|||
## How shall screen switcher work? |
|||
## |
|||
## - "previous" - switch between the current and previous screen. |
|||
## - "screen1,...,screenN" - switch between given sequence of screens. |
|||
## |
|||
## Screens available for use: help, playlist, browser, search_engine, |
|||
## media_library, playlist_editor, tag_editor, outputs, visualizer, clock, |
|||
## lyrics, last_fm. |
|||
## |
|||
#screen_switcher_mode = playlist, browser |
|||
# |
|||
## |
|||
## Note: You can define startup screen by choosing screen from the list above. |
|||
## |
|||
startup_screen = media_library |
|||
# |
|||
## |
|||
## Note: You can define startup slave screen by choosing screen from the list |
|||
## above or an empty value for no slave screen. |
|||
## |
|||
#startup_slave_screen = "" |
|||
# |
|||
#startup_slave_screen_focus = no |
|||
# |
|||
## |
|||
## Default width of locked screen (in %). Acceptable values are from 20 to 80. |
|||
## |
|||
# |
|||
#locked_screen_width_part = 50 |
|||
# |
|||
#ask_for_locked_screen_width_part = yes |
|||
# |
|||
#jump_to_now_playing_song_at_start = yes |
|||
# |
|||
#ask_before_clearing_playlists = yes |
|||
# |
|||
#clock_display_seconds = no |
|||
# |
|||
display_volume_level = no |
|||
# |
|||
#display_bitrate = no |
|||
# |
|||
#display_remaining_time = no |
|||
# |
|||
## Available values: none, basic, extended, perl. |
|||
## |
|||
#regular_expressions = perl |
|||
# |
|||
## |
|||
## Note: if below is enabled, ncmpcpp will ignore leading "The" word while |
|||
## sorting items in browser, tags in media library, etc. |
|||
## |
|||
ignore_leading_the = yes |
|||
# |
|||
## |
|||
## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and |
|||
## filtering lists. This takes an effect only if boost was compiled with ICU |
|||
## support. |
|||
## |
|||
#ignore_diacritics = no |
|||
# |
|||
#block_search_constraints_change_if_items_found = yes |
|||
# |
|||
#mouse_support = yes |
|||
# |
|||
#mouse_list_scroll_whole_page = yes |
|||
# |
|||
#empty_tag_marker = <empty> |
|||
# |
|||
#tags_separator = " | " |
|||
# |
|||
#tag_editor_extended_numeration = no |
|||
# |
|||
#media_library_sort_by_mtime = no |
|||
# |
|||
#enable_window_title = yes |
|||
# |
|||
## |
|||
## Note: You can choose default search mode for search engine. Available modes |
|||
## are: |
|||
## |
|||
## - 1 - use mpd built-in searching (no regexes, pattern matching) |
|||
## |
|||
## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but |
|||
## if your mpd is on a remote machine, downloading big database to process |
|||
## it can take a while |
|||
## |
|||
## - 3 - match only exact values (this mode uses mpd function for searching in |
|||
## database and local one for searching in current playlist) |
|||
## |
|||
# |
|||
#search_engine_default_search_mode = 1 |
|||
# |
|||
external_editor = nvim |
|||
# |
|||
## Note: set to yes if external editor is a console application. |
|||
## |
|||
use_console_editor = yes |
|||
# |
|||
##### colors definitions ##### |
|||
## |
|||
## It is possible to set a background color by setting a color value |
|||
## "<foreground>_<background>", e.g. red_black will set foregound color to red |
|||
## and background color to black. |
|||
## |
|||
## In addition, for terminals that support 256 colors it is possible to set one |
|||
## of them by using a number in range [1, 256] instead of color name, |
|||
## e.g. numerical value corresponding to red_black is 2_1. To find out if the |
|||
## terminal supports 256 colors, run ncmpcpp and check out the bottom of the |
|||
## help screen for list of available colors and their numerical values. |
|||
## |
|||
## What is more, there are two special values for the background color: |
|||
## "transparent" and "current". The first one explicitly sets the background to |
|||
## be transparent, while the second one allows you to preserve current |
|||
## background color and change only the foreground one. It's used implicitly |
|||
## when background color is not specified. |
|||
## |
|||
## Moreover, it is possible to attach format information to selected color |
|||
## variables by appending to their end a colon followed by one or more format |
|||
## flags, e.g. black:b or red:ur. The following variables support this syntax: |
|||
## visualizer_color, color1, color2, empty_tag_color, volume_color, |
|||
## state_line_color, state_flags_color, progressbar_color, |
|||
## progressbar_elapsed_color, player_state_color, statusbar_time_color, |
|||
## alternative_ui_separator_color. |
|||
## |
|||
## Note: due to technical limitations of older ncurses version, if 256 colors |
|||
## are used there is a possibility that you'll be able to use only colors with |
|||
## transparent background. |
|||
# |
|||
#colors_enabled = yes |
|||
# |
|||
empty_tag_color = magenta |
|||
# |
|||
#header_window_color = magenta |
|||
# |
|||
#volume_color = default |
|||
# |
|||
#state_line_color = default |
|||
# |
|||
#state_flags_color = default:b |
|||
# |
|||
main_window_color = white |
|||
# |
|||
#color1 = white |
|||
# |
|||
#color2 = green |
|||
# |
|||
progressbar_color = black:b |
|||
# |
|||
progressbar_elapsed_color = blue:b |
|||
# |
|||
statusbar_color = red |
|||
# |
|||
statusbar_time_color = cyan:b |
|||
# |
|||
#player_state_color = default:b |
|||
# |
|||
#alternative_ui_separator_color = black:b |
|||
# |
|||
#window_border_color = green |
|||
# |
|||
#active_window_border = red |
|||
# |
@ -0,0 +1,13 @@ |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/01 真夜中のドア.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/02 都会.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/03 マイピュアレディ.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/04 ミッドナイトラブコール.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/05 雨音はショパンの調べ.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/06 月下美人.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/07 みずいろの雨.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/08 シンプルラブ.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/09 私のハートはストップモーション.m4a' as it's not a positive integer |
|||
writeCommonTags: couldn't write 'year' tag to 'BLU-SWING/CITY LIGHTS/10 バイブレイション.m4a' as it's not a positive integer |
|||
TagLib: Could not open file /home/tomato/Music/Ono Lisa/[1989.10.21] Catupiry (Lossless)/CATUPIRY.cue/track0001 |
|||
TagLib: Could not open file /home/tomato/Music/Rogério Skylab/1999 - Skylab/Skylab.cue/track0001 |
|||
TagLib: Could not open file /home/tomato/Music/Rogério Skylab/1999 - Skylab/Skylab.cue/track0001 |
@ -0,0 +1,39 @@ |
|||
#show-read-feeds no |
|||
auto-reload yes |
|||
|
|||
external-url-viewer "urlscan -dc -r 'linkhandler {}'" |
|||
|
|||
bind-key j down |
|||
bind-key k up |
|||
bind-key j next articlelist |
|||
bind-key k prev articlelist |
|||
bind-key J next-feed articlelist |
|||
bind-key K prev-feed articlelist |
|||
bind-key G end |
|||
bind-key g home |
|||
bind-key d pagedown |
|||
bind-key u pageup |
|||
bind-key l open |
|||
bind-key h quit |
|||
bind-key a toggle-article-read |
|||
bind-key n next-unread |
|||
bind-key N prev-unread |
|||
bind-key D pb-download |
|||
bind-key U show-urls |
|||
bind-key x pb-delete |
|||
|
|||
color listnormal cyan default |
|||
color listfocus black yellow standout bold |
|||
color listnormal_unread blue default |
|||
color listfocus_unread yellow default bold |
|||
color info red black bold |
|||
color article cyan default |
|||
|
|||
browser linkhandler |
|||
macro , open-in-browser |
|||
macro t set browser "tsp youtube-dl --add-metadata -ic"; open-in-browser ; set browser linkhandler |
|||
macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best"; open-in-browser ; set browser linkhandler |
|||
macro v set browser "setsid nohup mpv"; open-in-browser ; set browser linkhandler |
|||
macro w set browser "w3m"; open-in-browser ; set browser linkhandler |
|||
macro p set browser "dmenuhandler"; open-in-browser ; set browser linkhandler |
|||
macro c set browser "xsel -b <<<" ; open-in-browser ; set browser linkhandler |
@ -0,0 +1,5 @@ |
|||
http://lukesmith.xyz/rss.xml |
|||
https://notrelated.libsyn.com/rss |
|||
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)" |
|||
https://www.archlinux.org/feeds/news/ "tech" |
|||
https://videos.lukesmith.xyz/feeds/videos.xml?videoChannelId=2 |
@ -0,0 +1,12 @@ |
|||
let g:netrw_dirhistmax =10 |
|||
let g:netrw_dirhistcnt =2 |
|||
let g:netrw_dirhist_2='/home/tomato/Documents/CEDERJ/2020.1' |
|||
let g:netrw_dirhist_1='/home/tomato/Documents/CEDERJ' |
|||
let g:netrw_dirhist_0='/home/tomato/Documents/CEDERJ/2020.2' |
|||
let g:netrw_dirhist_9='/home/tomato/Documents/CEDERJ/2020.2/Algoritmos' |
|||
let g:netrw_dirhist_8='/home/tomato/Documents/curriculum/outro' |
|||
let g:netrw_dirhist_7='/home/tomato/Documents/curriculum' |
|||
let g:netrw_dirhist_6='/home/tomato/Documents' |
|||
let g:netrw_dirhist_5='/home/tomato' |
|||
let g:netrw_dirhist_4='/home/tomato/Documents/curriculum/outro' |
|||
let g:netrw_dirhist_3='/home/tomato/Documents/curriculum' |
File diff suppressed because it is too large
@ -0,0 +1,265 @@ |
|||
let mapleader ="," |
|||
|
|||
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) |
|||
echo "Downloading junegunn/vim-plug to manage plugins..." |
|||
silent !mkdir -p ~/.config/nvim/autoload/ |
|||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim |
|||
autocmd VimEnter * PlugInstall |
|||
endif |
|||
|
|||
call plug#begin('~/.config/nvim/plugged') |
|||
Plug 'tpope/vim-surround' |
|||
Plug 'scrooloose/nerdtree' |
|||
Plug 'junegunn/goyo.vim' |
|||
Plug 'PotatoesMaster/i3-vim-syntax' |
|||
Plug 'jreybert/vimagit' |
|||
Plug 'lukesmithxyz/vimling' |
|||
Plug 'vimwiki/vimwiki' |
|||
Plug 'bling/vim-airline' |
|||
Plug 'tpope/vim-commentary' |
|||
Plug 'kovetskiy/sxhkd-vim' |
|||
Plug 'chrisbra/Colorizer' |
|||
Plug 'tpope/vim-repeat' |
|||
Plug 'ryanoasis/vim-devicons' |
|||
call plug#end() |
|||
|
|||
set bg=light |
|||
set go=a |
|||
set mouse=a |
|||
set nohlsearch |
|||
set clipboard+=unnamedplus |
|||
filetype indent on |
|||
set expandtab |
|||
set tabstop=2 |
|||
set softtabstop=2 |
|||
set shiftwidth=2 |
|||
|
|||
" Some basics: |
|||
nnoremap c "_c |
|||
set nocompatible |
|||
filetype plugin on |
|||
syntax on |
|||
set encoding=utf-8 |
|||
set number relativenumber |
|||
" Enable autocompletion: |
|||
set wildmode=longest,list,full |
|||
" Sets zathura as preview viewer |
|||
let g:livepreview_engine = 'xelatex' |
|||
let g:livepreview_previewer = 'zathura' |
|||
" Disables automatic commenting on newline: |
|||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
|||
|
|||
" Goyo plugin makes text more readable when writing prose: |
|||
map <leader>f :Goyo \| set bg=light \| set linebreak<CR> |
|||
|
|||
" Spell-check set to <leader>o, 'o' for 'orthography': |
|||
map <leader>o :setlocal spell! spelllang=en_us<CR> |
|||
|
|||
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults. |
|||
set splitbelow splitright |
|||
|
|||
" Nerd tree |
|||
map <leader>n :NERDTreeToggle<CR> |
|||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif |
|||
|
|||
" vimling: |
|||
nm <leader>d :call ToggleDeadKeys()<CR> |
|||
imap <leader>d <esc>:call ToggleDeadKeys()<CR>a |
|||
nm <leader>i :call ToggleIPA()<CR> |
|||
imap <leader>i <esc>:call ToggleIPA()<CR>a |
|||
nm <leader>q :call ToggleProse()<CR> |
|||
|
|||
" Shortcutting split navigation, saving a keypress: |
|||
map <C-h> <C-w>h |
|||
map <C-j> <C-w>j |
|||
map <C-k> <C-w>k |
|||
map <C-l> <C-w>l |
|||
|
|||
" Replace ex mode with gq |
|||
map Q gq |
|||
|
|||
" Check file in shellcheck: |
|||
map <leader>s :!clear && shellcheck %<CR> |
|||
|
|||
" Open my bibliography file in split |
|||
map <leader>b :vsp<space>$BIB<CR> |
|||
map <leader>r :vsp<space>$REFER<CR> |
|||
|
|||
" Replace all is aliased to S. |
|||
nnoremap S :%s//g<Left><Left> |
|||
|
|||
" Compile document, be it groff/LaTeX/markdown/etc. |
|||
map <leader>c :w! \| !compiler <c-r>%<CR> |
|||
|
|||
" Open corresponding .pdf/.html or preview |
|||
map <leader>p :!opout <c-r>%<CR><CR> |
|||
|
|||
" Runs a script that cleans out tex build files whenever I close out of a .tex file. |
|||
autocmd VimLeave *.tex !texclear % |
|||
|
|||
" Ensure files are read as what I want: |
|||
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} |
|||
map <leader>v :VimwikiIndex |
|||
let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] |
|||
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown |
|||
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff |
|||
autocmd BufRead,BufNewFile *.tex set filetype=tex |
|||
autocmd BufRead,BufNewFile *.php set filetype=html |
|||
|
|||
" Save file as sudo on files that require root permission |
|||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! |
|||
|
|||
" Enable Goyo by default for mutt writting |
|||
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80 |
|||
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light |
|||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR> |
|||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR> |
|||
|
|||
" Automatically deletes all trailing whitespace on save. |
|||
autocmd BufWritePre * %s/\s\+$//e |
|||
|
|||
" When shortcut files are updated, renew bash and ranger configs with new material: |
|||
autocmd BufWritePost files,directories !shortcuts |
|||
" Run xrdb whenever Xdefaults or Xresources are updated. |
|||
autocmd BufWritePost *Xresources,*Xdefaults !xrdb % |
|||
" Update binds when sxhkdrc is updated. |
|||
autocmd BufWritePost *sxhkdrc !pkill -USR1 sxhkd |
|||
|
|||
" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable. |
|||
if &diff |
|||
highlight! link DiffText MatchParen |
|||
endif |
|||
|
|||
" Save file as sudo on files that require root permission |
|||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! |
|||
|
|||
" Navigating with guides |
|||
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l |
|||
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l |
|||
map <leader><leader> <Esc>/<++><Enter>"_c4l |
|||
|
|||
"""LATEX |
|||
" Disable auto indent |
|||
autocmd FileType tex filetype indent off |
|||
" Word count: |
|||
autocmd FileType tex map <leader>w :w !detex \| wc -w<CR> |
|||
" Code snippets |
|||
autocmd FileType tex inoremap ,fr \begin{frame}<Enter>\frametitle{}<Enter><Enter><++><Enter><Enter>\end{frame}<Enter><Enter><++><Esc>6kf}i |
|||
autocmd FileType tex inoremap ,fi \begin{fitch}<Enter><Enter>\end{fitch}<Enter><Enter><++><Esc>3kA |
|||
autocmd FileType tex inoremap ,exe \begin{exe}<Enter>\ex<Space><Enter>\end{exe}<Enter><Enter><++><Esc>3kA |
|||
autocmd FileType tex inoremap ,em \emph{}<++><Esc>T{i |
|||
autocmd FileType tex inoremap ,bf \textbf{}<++><Esc>T{i |
|||
autocmd FileType tex vnoremap , <ESC>`<i\{<ESC>`>2la}<ESC>?\\{<Enter>a |
|||
autocmd FileType tex inoremap ,it \textit{}<++><Esc>T{i |
|||
autocmd FileType tex inoremap ,ct \textcite{}<++><Esc>T{i |
|||
autocmd FileType tex inoremap ,cp \parencite{}<++><Esc>T{i |
|||
autocmd FileType tex inoremap ,glos {\gll<Space><++><Space>\\<Enter><++><Space>\\<Enter>\trans{``<++>''}}<Esc>2k2bcw |
|||
autocmd FileType tex inoremap ,x \begin{xlist}<Enter>\ex<Space><Enter>\end{xlist}<Esc>kA<Space> |
|||
autocmd FileType tex inoremap ,ol \begin{enumerate}<Enter><Enter>\end{enumerate}<Enter><Enter><++><Esc>3kA\item<Space> |
|||
autocmd FileType tex inoremap ,ul \begin{itemize}<Enter><Enter>\end{itemize}<Enter><Enter><++><Esc>3kA\item<Space> |
|||
autocmd FileType tex inoremap ,li <Enter>\item<Space> |
|||
autocmd FileType tex inoremap ,ref \ref{}<Space><++><Esc>T{i |
|||
autocmd FileType tex inoremap ,tab \begin{tabular}<Enter><++><Enter>\end{tabular}<Enter><Enter><++><Esc>4kA{}<Esc>i |
|||
autocmd FileType tex inoremap ,ot \begin{tableau}<Enter>\inp{<++>}<Tab>\const{<++>}<Tab><++><Enter><++><Enter>\end{tableau}<Enter><Enter><++><Esc>5kA{}<Esc>i |
|||
autocmd FileType tex inoremap ,can \cand{}<Tab><++><Esc>T{i |
|||
autocmd FileType tex inoremap ,con \const{}<Tab><++><Esc>T{i |
|||
autocmd FileType tex inoremap ,v \vio{}<Tab><++><Esc>T{i |
|||
autocmd FileType tex inoremap ,a \href{}{<++>}<Space><++><Esc>2T{i |
|||
autocmd FileType tex inoremap ,sc \textsc{}<Space><++><Esc>T{i |
|||
autocmd FileType tex inoremap ,chap \chapter{}<Enter><Enter><++><Esc>2kf}i |
|||
autocmd FileType tex inoremap ,sec \section{}<Enter><Enter><++><Esc>2kf}i |
|||
autocmd FileType tex inoremap ,ssec \subsection{}<Enter><Enter><++><Esc>2kf}i |
|||
autocmd FileType tex inoremap ,sssec \subsubsection{}<Enter><Enter><++><Esc>2kf}i |
|||
autocmd FileType tex inoremap ,st <Esc>F{i*<Esc>f}i |
|||
autocmd FileType tex inoremap ,beg \begin{DELRN}<Enter><++><Enter>\end{DELRN}<Enter><Enter><++><Esc>4k0fR:MultipleCursorsFind<Space>DELRN<Enter>c |
|||
autocmd FileType tex inoremap ,up <Esc>/usepackage<Enter>o\usepackage{}<Esc>i |
|||
autocmd FileType tex nnoremap ,up /usepackage<Enter>o\usepackage{}<Esc>i |
|||
autocmd FileType tex inoremap ,tt \texttt{}<Space><++><Esc>T{i |
|||
autocmd FileType tex inoremap ,bt {\blindtext} |
|||
autocmd FileType tex inoremap ,nu $\varnothing$ |
|||
autocmd FileType tex inoremap ,col \begin{columns}[T]<Enter>\begin{column}{.5\textwidth}<Enter><Enter>\end{column}<Enter>\begin{column}{.5\textwidth}<Enter><++><Enter>\end{column}<Enter>\end{columns}<Esc>5kA |
|||
autocmd FileType tex inoremap ,rn (\ref{})<++><Esc>F}i |
|||
|
|||
"""HTML |
|||
autocmd FileType html inoremap ,b <b></b><Space><++><Esc>FbT>i |
|||
autocmd FileType html inoremap ,it <em></em><Space><++><Esc>FeT>i |
|||
autocmd FileType html inoremap ,1 <h1></h1><Enter><Enter><++><Esc>2kf<i |
|||
autocmd FileType html inoremap ,2 <h2></h2><Enter><Enter><++><Esc>2kf<i |
|||
autocmd FileType html inoremap ,3 <h3></h3><Enter><Enter><++><Esc>2kf<i |
|||
autocmd FileType html inoremap ,p <p></p><Enter><Enter><++><Esc>02kf>a |
|||
autocmd FileType html inoremap ,a <a<Space>href=""><++></a><Space><++><Esc>14hi |
|||
autocmd FileType html inoremap ,e <a<Space>target="_blank"<Space>href=""><++></a><Space><++><Esc>14hi |
|||
autocmd FileType html inoremap ,ul <ul><Enter><li></li><Enter></ul><Enter><Enter><++><Esc>03kf<i |
|||
autocmd FileType html inoremap ,li <Esc>o<li></li><Esc>F>a |
|||
autocmd FileType html inoremap ,ol <ol><Enter><li></li><Enter></ol><Enter><Enter><++><Esc>03kf<i |
|||
autocmd FileType html inoremap ,im <img src="" alt="<++>"><++><esc>Fcf"a |
|||
autocmd FileType html inoremap ,td <td></td><++><Esc>Fdcit |
|||
autocmd FileType html inoremap ,tr <tr></tr><Enter><++><Esc>kf<i |
|||
autocmd FileType html inoremap ,th <th></th><++><Esc>Fhcit |
|||
autocmd FileType html inoremap ,tab <table><Enter></table><Esc>O |
|||
autocmd FileType html inoremap ,gr <font color="green"></font><Esc>F>a |
|||
autocmd FileType html inoremap ,rd <font color="red"></font><Esc>F>a |
|||
autocmd FileType html inoremap ,yl <font color="yellow"></font><Esc>F>a |
|||
autocmd FileType html inoremap ,dt <dt></dt><Enter><dd><++></dd><Enter><++><esc>2kcit |
|||
autocmd FileType html inoremap ,dl <dl><Enter><Enter></dl><enter><enter><++><esc>3kcc |
|||
autocmd FileType html inoremap &<space> &<space> |
|||
autocmd FileType html inoremap á á |
|||
autocmd FileType html inoremap é é |
|||
autocmd FileType html inoremap í í |
|||
autocmd FileType html inoremap ó ó |
|||
autocmd FileType html inoremap ú ú |
|||
autocmd FileType html inoremap ä ä |
|||
autocmd FileType html inoremap ë ë |
|||
autocmd FileType html inoremap ï ï |
|||
autocmd FileType html inoremap ö ö |
|||
autocmd FileType html inoremap ü ü |
|||
autocmd FileType html inoremap ã ã |
|||
autocmd FileType html inoremap ẽ &etilde; |
|||
autocmd FileType html inoremap ĩ ĩ |
|||
autocmd FileType html inoremap õ õ |
|||
autocmd FileType html inoremap ũ ũ |
|||
autocmd FileType html inoremap ñ ñ |
|||
autocmd FileType html inoremap à à |
|||
autocmd FileType html inoremap è è |
|||
autocmd FileType html inoremap ì ì |
|||
autocmd FileType html inoremap ò ò |
|||
autocmd FileType html inoremap ù ù |
|||
|
|||
" PHP |
|||
autocmd FileType html inoremap ,q <?php<Space><Space>?><Space><++><Esc>7hi |
|||
autocmd FileType html inoremap ,w <?php<Space>echo<Space>bloginfo('template_url');<Space>?><Esc>a |
|||
|
|||
""".bib |
|||
autocmd FileType bib inoremap ,a @article{<Enter>author<Space>=<Space>{<++>},<Enter>year<Space>=<Space>{<++>},<Enter>title<Space>=<Space>{<++>},<Enter>journal<Space>=<Space>{<++>},<Enter>volume<Space>=<Space>{<++>},<Enter>pages<Space>=<Space>{<++>},<Enter>}<Enter><++><Esc>8kA,<Esc>i |
|||
autocmd FileType bib inoremap ,b @book{<Enter>author<Space>=<Space>{<++>},<Enter>year<Space>=<Space>{<++>},<Enter>title<Space>=<Space>{<++>},<Enter>publisher<Space>=<Space>{<++>},<Enter>}<Enter><++><Esc>6kA,<Esc>i |
|||
autocmd FileType bib inoremap ,c @incollection{<Enter>author<Space>=<Space>{<++>},<Enter>title<Space>=<Space>{<++>},<Enter>booktitle<Space>=<Space>{<++>},<Enter>editor<Space>=<Space>{<++>},<Enter>year<Space>=<Space>{<++>},<Enter>publisher<Space>=<Space>{<++>},<Enter>}<Enter><++><Esc>8kA,<Esc>i |
|||
|
|||
"MARKDOWN |
|||
autocmd Filetype markdown,rmd map <leader>w yiWi[<esc>Ea](<esc>pa) |
|||
autocmd Filetype markdown,rmd inoremap ,n ---<Enter><Enter> |
|||
autocmd Filetype markdown,rmd inoremap ,b ****<++><Esc>F*hi |
|||
autocmd Filetype markdown,rmd inoremap ,s ~~~~<++><Esc>F~hi |
|||
autocmd Filetype markdown,rmd inoremap ,e **<++><Esc>F*i |
|||
autocmd Filetype markdown,rmd inoremap ,h ====<Space><++><Esc>F=hi |
|||
autocmd Filetype markdown,rmd inoremap ,i ![](<++>)<++><Esc>F[a |
|||
autocmd Filetype markdown,rmd inoremap ,a [](<++>)<++><Esc>F[a |
|||
autocmd Filetype markdown,rmd inoremap ,1 #<Space><Enter><++><Esc>kA |
|||
autocmd Filetype markdown,rmd inoremap ,2 ##<Space><Enter><++><Esc>kA |
|||
autocmd Filetype markdown,rmd inoremap ,3 ###<Space><Enter><++><Esc>kA |
|||
autocmd Filetype markdown,rmd inoremap ,l --------<Enter> |
|||
autocmd Filetype rmd inoremap ,r ```{r}<CR>```<CR><CR><esc>2kO |
|||
autocmd Filetype rmd inoremap ,p ```{python}<CR>```<CR><CR><esc>2kO |
|||
autocmd Filetype rmd inoremap ,c ```<cr>```<cr><cr><esc>2kO |
|||
|
|||
""".xml |
|||
autocmd FileType xml inoremap ,e <item><Enter><title><++></title><Enter><guid<space>isPermaLink="false"><++></guid><Enter><pubDate><Esc>:put<Space>=strftime('%a, %d %b %Y %H:%M:%S %z')<Enter>kJA</pubDate><Enter><link><++></link><Enter><description><![CDATA[<++>]]></description><Enter></item><Esc>?<title><enter>cit |
|||
autocmd FileType xml inoremap ,a <a href="<++>"><++></a><++><Esc>F"ci" |
|||
|
|||
""" Copy Matches |
|||
function! CopyMatches(reg) |
|||
let hits = [] |
|||
%s//\=len(add(hits, submatch(0))) ? submatch(0) : ''/gne |
|||
let reg = empty(a:reg) ? '+' : a:reg |
|||
execute 'let @'.reg.' = join(hits, "\n") . "\n"' |
|||
endfunction |
|||
command! -register CopyMatches call CopyMatches(<q-reg>) |
@ -0,0 +1,438 @@ |
|||
################################# |
|||
# Animations # |
|||
################################# |
|||
# requires https://github.com/jonaburg/picom |
|||
# (These are also the default values) |
|||
transition-length = 350 |
|||
transition-pow-x = 0.35 |
|||
transition-pow-y = 0.35 |
|||
transition-pow-w = 0.35 |
|||
transition-pow-h = 0.35 |
|||
size-transition = true |
|||
|
|||
################################# |
|||
# 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 = true; |
|||
|
|||
# The blur radius for shadows, in pixels. (defaults to 12) |
|||
# shadow-radius = 12 |
|||
shadow-radius = 7; |
|||
|
|||
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) |
|||
# shadow-opacity = .75 |
|||
|
|||
# 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; |
|||
|
|||
# Avoid drawing shadows on dock/panel windows. This option is deprecated, |
|||
# you should use the *wintypes* option in your config file instead. |
|||
# |
|||
# no-dock-shadow = false |
|||
|
|||
# Don't draw shadows on drag-and-drop windows. This option is deprecated, |
|||
# you should use the *wintypes* option in your config file instead. |
|||
# |
|||
# no-dnd-shadow = false |
|||
|
|||
# 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 |
|||
|
|||
# Do not paint shadows on shaped windows. Note shaped windows |
|||
# here means windows setting its shape through X Shape extension. |
|||
# Those using ARGB background is beyond our control. |
|||
# Deprecated, use |
|||
# shadow-exclude = 'bounding_shaped' |
|||
# or |
|||
# shadow-exclude = 'bounding_shaped && !rounded_corners' |
|||
# instead. |
|||
# |
|||
# shadow-ignore-shaped = '' |
|||
|
|||
# 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", |
|||
"class_g = 'slop'" |
|||
]; |
|||
|
|||
# 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 |
|||
|
|||
# Specify a list of conditions of windows that should not be faded. |
|||
fade-exclude = [ |
|||
"class_g = 'sloop'" # maim |
|||
] |
|||
|
|||
# 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 = 1; |
|||
|
|||
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) |
|||
# frame-opacity = 1.0 |
|||
frame-opacity = 1.0; |
|||
|
|||
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) |
|||
# menu-opacity = 1.0 |
|||
|
|||
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. |
|||
# inactive-opacity-override = true |
|||
inactive-opacity-override = false; |
|||
|
|||
# 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 always 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 = [] |
|||
|
|||
|
|||
################################# |
|||
# Background-Blurring # |
|||
################################# |
|||
|
|||
|
|||
# Parameters for background blurring, see the *BLUR* section for more information. |
|||
# blur-method = |
|||
# blur-size = 12 |
|||
# |
|||
# blur-deviation = false |
|||
|
|||
# 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 = "xr_glx_hybrid"; |
|||
|
|||
# Enable/disable VSync. |
|||
# vsync = false |
|||
vsync = true; |
|||
|
|||
# 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_OPACITY' on client windows, useful for window managers |
|||
# not passing '_NET_WM_OPACITY' of client windows to frame windows. |
|||
# |
|||
# detect-client-opacity = false |
|||
detect-client-opacity = true; |
|||
|
|||
# Specify refresh rate of the screen. If not specified or 0, picom will |
|||
# try detecting this with X RandR extension. |
|||
# |
|||
# refresh-rate = 60 |
|||
refresh-rate = 60 |
|||
|
|||
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to |
|||
# boost performance. This should not be used with |
|||
# vsync drm/opengl/opengl-oml |
|||
# as they essentially does sw-opti's job already, |
|||
# unless you wish to specify a lower refresh rate than the actual value. |
|||
# |
|||
# sw-opti = |
|||
|
|||
# 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 = true |
|||
|
|||
# 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. 'WM_TRANSIENT_FOR' has higher priority if |
|||
# detect-transient is enabled, too. |
|||
# |
|||
# detect-client-leader = false |
|||
detect-client-leader = true |
|||
|
|||
# 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. |
|||
# |
|||
# 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.75; focus = true; full-shadow = false; }; |
|||
dock = { shadow = false; } |
|||
dnd = { shadow = false; } |
|||
popup_menu = { opacity = 0.8; } |
|||
dropdown_menu = { opacity = 0.8; } |
|||
}; |
@ -0,0 +1,57 @@ |
|||
#!/bin/sh |
|||
|
|||
# Use neovim for vim if present. |
|||
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d" |
|||
|
|||
# Use $XINITRC variable if file exists. |
|||
[ -f "$XINITRC" ] && alias startx="startx $XINITRC" |
|||
|
|||
# sudo not required for some system commands |
|||
for x in mount umount sv pacman updatedb su ; do |
|||
alias $x="sudo $x" |
|||
done |
|||
|
|||
# Verbosity and settings that you pretty much just always are going to want. |
|||
alias \ |
|||
cp="cp -iv" \ |
|||
mv="mv -iv" \ |
|||
rm="rm -vI" \ |
|||
bc="bc -ql" \ |
|||
mkd="mkdir -pv" \ |
|||
yt="yt-dlp --add-metadata -i" \ |
|||
yta="yt -x -f bestaudio/best" \ |
|||
ffmpeg="ffmpeg -hide_banner" \ |
|||
ytfzfa="ytfzf -l -m" |
|||
|
|||
# Helpful things |
|||
alias \ |
|||
# vifm="vicd" \ |
|||
mpv="devour mpv" \ |
|||
zathura="devour zathura" |
|||
|
|||
# Colorize commands when possible. |
|||
alias \ |
|||
ls="ls -hN --color=auto --group-directories-first" \ |
|||
grep="grep --color=auto" \ |
|||
diff="diff --color=auto" \ |
|||
ccat="highlight --out-format=ansi" |
|||
|
|||
# These common commands are just too long! Abbreviate them. |
|||
alias \ |
|||
ka="killall" \ |
|||
g="git" \ |
|||
trem="transmission-remote" \ |
|||
YT="youtube-viewer" \ |
|||
sdn="sudo shutdown -h now" \ |
|||
e="$EDITOR" \ |
|||
v="$EDITOR" \ |
|||
p="sudo pacman" \ |
|||
xi="sudo xbps-install" \ |
|||
xr="sudo xbps-remove -R" \ |
|||
xq="xbps-query" \ |
|||
z="zathura" |
|||
|
|||
alias \ |
|||
magit="nvim -c MagitOnly" \ |
|||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" \ |
|||
# weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" |
@ -0,0 +1,13 @@ |
|||
# You can add comments to these files with # |
|||
cac ${XDG_CACHE_HOME:-$HOME/.cache} |
|||
cf ${XDG_CONFIG_HOME:-$HOME/.config} |
|||
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} |
|||
d ${XDG_DOCUMENTS_DIR:-$HOME/Documents} |
|||
dt ${XDG_DATA_HOME:-$HOME/.local/share} |
|||
h $HOME |
|||
m ${XDG_MUSIC_DIR:-$HOME/Music} |
|||
mn /mnt |
|||
pp ${XDG_PICTURES_DIR:-$HOME/Pictures} |
|||
sc $HOME/.local/bin |
|||
src $HOME/.local/src |
|||
vv ${XDG_VIDEOS_DIR:-$HOME/Videos} |
@ -0,0 +1,23 @@ |
|||
# These files automatically update when edited/saved in vim: |
|||
|
|||
# keys filename description |
|||
bf ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files # This file, a list of bookmarked files |
|||
bd ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs # A list of bookmarked directories similar to this file |
|||
cfx ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources # Colors, themes and variables for X11 |
|||
cfb ~/.local/src/dwmblocks/config.h # dwmblocks: the status bar for dwm |
|||
|
|||
|
|||
# These do not update automatically, but on the next new instance of a program: |
|||
|
|||
cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim # vim/neovim config |
|||
cfz $ZDOTDIR/.zshrc # zsh (shell) config |
|||
cfa ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc # aliases used by zsh (and potentially other shells) |
|||
cfp ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile # profile file for login settings for zsh |
|||
cfm ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc # mutt (email client) config |
|||
cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config # newsboat (RSS reader) |
|||
cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls # RSS urls for newsboat |
|||
cfmb ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings # ncmpcpp (music player) keybinds file |
|||
cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config # ncmpcpp (music player) config |
|||
cfl ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc # lf (file browser) config |
|||
cfL ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope # lf's scope/preview file |
|||
cfX ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler # sxiv (image viewer) key/script handler |
@ -0,0 +1,19 @@ |
|||
$include /etc/inputrc |
|||
set editing-mode vi |
|||
$if mode=vi |
|||
|
|||
set show-mode-in-prompt on |
|||
set vi-ins-mode-string \1\e[6 q\2 |
|||
set vi-cmd-mode-string \1\e[2 q\2 |
|||
|
|||
set keymap vi-command |
|||
# these are for vi-command mode |
|||
Control-l: clear-screen |
|||
Control-a: beginning-of-line |
|||
|
|||
set keymap vi-insert |
|||
# these are for vi-insert mode |
|||
Control-l: clear-screen |
|||
Control-a: beginning-of-line |
|||
|
|||
$endif |
@ -0,0 +1,166 @@ |
|||
#!/bin/zsh |
|||
|
|||
# profile file. Runs on login. Environmental variables are set here. |
|||
|
|||
# If you don't plan on reverting to bash, you can remove the link in ~/.profile |
|||
# to clean up. |
|||
|
|||
# Adds `~/.local/bin` to $PATH |
|||
export LARBSWM="i3" |
|||
# "$(cat ~/.local/share/larbs/wm 2>/dev/null)" && |
|||
# [ "$LARBSWM" = "dwm" ] || export LARBSWM="i3" |
|||
export STATUSBAR="${LARBSWM}blocks" |
|||
|
|||
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}:~/.local/share/gem/ruby/3.0.0/bin:~/.local/share/go/bin" |
|||
export IDF_PATH="~/Software/ESP8266_RTOS_SDK" |
|||
export LIBVA_DRIVER_NAME="i965" |
|||
|
|||
unsetopt PROMPT_SP |
|||
|
|||
# Pandoc |
|||
export PANDOC_DIR="~/.local/share/pandoc" |
|||
|
|||
# Default programs: |
|||
export EDITOR="nvim" |
|||
export TERMINAL="st" |
|||
export BROWSER="firefox" |
|||
|
|||
# ~/ Clean-up: |
|||
export XDG_CONFIG_HOME="$HOME/.config" |
|||
export XDG_DATA_HOME="$HOME/.local/share" |
|||
export XDG_CACHE_HOME="$HOME/.cache" |
|||
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc" |
|||
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. |
|||
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config" |
|||
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" |
|||
export LESSHISTFILE="-" |
|||
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc" |
|||
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc" |
|||
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh" |
|||
#export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc" |
|||
#export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" |
|||
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default" |
|||
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi" |
|||
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store" |
|||
export TMUX_TMPDIR="$XDG_RUNTIME_DIR" |
|||
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" |
|||
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" |
|||
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" |
|||
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg" |
|||
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison" |
|||
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history" |
|||
export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat" |
|||
export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config" |
|||
export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum" |
|||
|
|||
# Other program settings: |
|||
export DICS="/usr/share/stardict/dic/" |
|||
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass" |
|||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%" |
|||
export LESS=-R |
|||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')" |
|||
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')" |
|||
export LESS_TERMCAP_me="$(printf '%b' '[0m')" |
|||
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')" |
|||
export LESS_TERMCAP_se="$(printf '%b' '[0m')" |
|||
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')" |
|||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')" |
|||
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null" |
|||
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme. |
|||
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads. |
|||
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname |
|||
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm |
|||
|
|||
# This is the list for lf icons: |
|||
export LF_ICONS="di=📁:\ |
|||
fi=📃:\ |
|||
tw=🤝:\ |
|||
ow=📂:\ |
|||
ln=⛓:\ |
|||
or=❌:\ |
|||
ex=🎯:\ |
|||
*.txt=✍:\ |
|||
*.mom=✍:\ |
|||
*.me=✍:\ |
|||
*.ms=✍:\ |
|||
*.png=🖼:\ |
|||
*.webp=🖼:\ |
|||
*.ico=🖼:\ |
|||
*.jpg=📸:\ |
|||
*.jpe=📸:\ |
|||
*.jpeg=📸:\ |
|||
*.gif=🖼:\ |
|||
*.svg=🗺:\ |
|||
*.tif=🖼:\ |
|||
*.tiff=🖼:\ |
|||
*.xcf=🖌:\ |
|||
*.html=🌎:\ |
|||
*.xml=📰:\ |
|||
*.gpg=🔒:\ |
|||
*.css=🎨:\ |
|||
*.pdf=📚:\ |
|||
*.djvu=📚:\ |
|||
*.epub=📚:\ |
|||
*.csv=📓:\ |
|||
*.xlsx=📓:\ |
|||
*.tex=📜:\ |
|||
*.md=📘:\ |
|||
*.r=📊:\ |
|||
*.R=📊:\ |
|||
*.rmd=📊:\ |
|||
*.Rmd=📊:\ |
|||
*.m=📊:\ |
|||
*.mp3=🎵:\ |
|||
*.opus=🎵:\ |
|||
*.ogg=🎵:\ |
|||
*.m4a=🎵:\ |
|||
*.flac=🎼:\ |
|||
*.wav=🎼:\ |
|||
*.mkv=🎥:\ |
|||
*.mp4=🎥:\ |
|||
*.webm=🎥:\ |
|||
*.mpeg=🎥:\ |
|||
*.avi=🎥:\ |
|||
*.mov=🎥:\ |
|||
*.mpg=🎥:\ |
|||
*.wmv=🎥:\ |
|||
*.m4b=🎥:\ |
|||
*.flv=🎥:\ |
|||
*.zip=📦:\ |
|||
*.rar=📦:\ |
|||
*.7z=📦:\ |
|||
*.tar.gz=📦:\ |
|||
*.z64=🎮:\ |
|||
*.v64=🎮:\ |
|||
*.n64=🎮:\ |
|||
*.gba=🎮:\ |
|||
*.nes=🎮:\ |
|||
*.gdi=🎮:\ |
|||
*.1=ℹ:\ |
|||
*.nfo=ℹ:\ |
|||
*.info=ℹ:\ |
|||
*.log=📙:\ |
|||
*.iso=📀:\ |
|||
*.img=📀:\ |
|||
*.bib=🎓:\ |
|||
*.ged=👪:\ |
|||
*.part=💔:\ |
|||
*.torrent=🔽:\ |
|||
*.jar=♨:\ |
|||
*.java=♨:\ |
|||
" |
|||
|
|||
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 & |
|||
|
|||
if pacman -Qs libxft-bgra >/dev/null 2>&1; then |
|||
# Start graphical server on user's current tty if not already running. |
|||
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" |
|||
else |
|||
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm. |
|||
Please run: |
|||
\033[32myay -S libxft-bgra-git\033[0m |
|||
and replace \`libxft\`. Afterwards, you may start the graphical server by running \`startx\`." |
|||
fi |
|||
|
|||
# Switch escape and caps if tty and no passwd required: |
|||
sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null |
@ -0,0 +1,29 @@ |
|||
# vim: filetype=sh |
|||
alias cac="cd /home/tomato/.cache && ls -a" \ |
|||
cf="cd /home/tomato/.config && ls -a" \ |
|||
D="cd /home/tomato/Downloads && ls -a" \ |
|||
d="cd /home/tomato/Documents && ls -a" \ |
|||
dt="cd /home/tomato/.local/share && ls -a" \ |
|||
h="cd /home/tomato && ls -a" \ |
|||
m="cd /home/tomato/Music && ls -a" \ |
|||
mn="cd /mnt && ls -a" \ |
|||
pp="cd /home/tomato/Pictures && ls -a" \ |
|||
sc="cd /home/tomato/.local/bin && ls -a" \ |
|||
src="cd /home/tomato/.local/src && ls -a" \ |
|||
vv="cd /home/tomato/Videos && ls -a" \ |
|||
bf="$EDITOR /home/tomato/.config/shell/bm-files" \ |
|||
bd="$EDITOR /home/tomato/.config/shell/bm-dirs" \ |
|||
cfx="$EDITOR /home/tomato/.config/x11/xresources" \ |
|||
cfb="$EDITOR ~/.local/src/dwmblocks/config.h" \ |
|||
cfv="$EDITOR /home/tomato/.config/nvim/init.vim" \ |
|||
cfz="$EDITOR /home/tomato/.config/zsh/.zshrc" \ |
|||
cfa="$EDITOR /home/tomato/.config/shell/aliasrc" \ |
|||
cfp="$EDITOR /home/tomato/.config/shell/profile" \ |
|||
cfm="$EDITOR /home/tomato/.config/mutt/muttrc" \ |
|||
cfn="$EDITOR /home/tomato/.config/newsboat/config" \ |
|||
cfu="$EDITOR /home/tomato/.config/newsboat/urls" \ |
|||
cfmb="$EDITOR /home/tomato/.config/ncmpcpp/bindings" \ |
|||
cfmc="$EDITOR /home/tomato/.config/ncmpcpp/config" \ |
|||
cfl="$EDITOR /home/tomato/.config/lf/lfrc" \ |
|||
cfL="$EDITOR /home/tomato/.config/lf/scope" \ |
|||
cfX="$EDITOR /home/tomato/.config/sxiv/exec/key-handler" \ |
@ -0,0 +1,28 @@ |
|||
hash -d cac=/home/tomato/.cache |
|||
hash -d cf=/home/tomato/.config |
|||
hash -d D=/home/tomato/Downloads |
|||
hash -d d=/home/tomato/Documents |
|||
hash -d dt=/home/tomato/.local/share |
|||
hash -d h=/home/tomato |
|||
hash -d m=/home/tomato/Music |
|||
hash -d mn=/mnt |
|||
hash -d pp=/home/tomato/Pictures |
|||
hash -d sc=/home/tomato/.local/bin |
|||
hash -d src=/home/tomato/.local/src |
|||
hash -d vv=/home/tomato/Videos |
|||
hash -d bf=/home/tomato/.config/shell/bm-files |
|||
hash -d bd=/home/tomato/.config/shell/bm-dirs |
|||
hash -d cfx=/home/tomato/.config/x11/xresources |
|||
hash -d cfb=~/.local/src/dwmblocks/config.h |
|||
hash -d cfv=/home/tomato/.config/nvim/init.vim |
|||
hash -d cfz=/home/tomato/.config/zsh/.zshrc |
|||
hash -d cfa=/home/tomato/.config/shell/aliasrc |
|||
hash -d cfp=/home/tomato/.config/shell/profile |
|||
hash -d cfm=/home/tomato/.config/mutt/muttrc |
|||
hash -d cfn=/home/tomato/.config/newsboat/config |
|||
hash -d cfu=/home/tomato/.config/newsboat/urls |
|||
hash -d cfmb=/home/tomato/.config/ncmpcpp/bindings |
|||
hash -d cfmc=/home/tomato/.config/ncmpcpp/config |
|||
hash -d cfl=/home/tomato/.config/lf/lfrc |
|||
hash -d cfL=/home/tomato/.config/lf/scope |
|||
hash -d cfX=/home/tomato/.config/sxiv/exec/key-handler |
@ -0,0 +1,35 @@ |
|||
#!/usr/bin/sh |
|||
while read file |
|||
do |
|||
case "$1" in |
|||
"w") setbg "$file" & ;; |
|||
"c") |
|||
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" |
|||
[ -z "$destdir" ] && exit |
|||
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & |
|||
;; |
|||
"C-c") |
|||
xclip -sel clipboard -t image/$(echo -n "$file" | sed -e "s/^.*\.//") "$file" |
|||
notify-send "$file copied to clipboard";; |
|||
"m") |
|||
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" |
|||
[ -z "$destdir" ] && exit |
|||
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & |
|||
;; |
|||
"r") |
|||
convert -rotate 90 "$file" "$file" ;; |
|||
"R") |
|||
convert -rotate -90 "$file" "$file" ;; |
|||
"f") |
|||
convert -flop "$file" "$file" ;; |
|||
"y") |
|||
echo -n "$file" | xclip -selection clipboard && |
|||
notify-send "$file copied to clipboard" & ;; |
|||
"Y") |
|||
readlink -f "$file" | xclip -selection clipboard && |
|||
notify-send "$(readlink -f "$file") copied to clipboard" & ;; |
|||
"d") |
|||
[ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; |
|||
"g") ifinstalled gimp && gimp "$file" & ;; |
|||
esac |
|||
done |
@ -0,0 +1 @@ |
|||
XDG_DESKTOP_DIR="$HOME/" |
@ -0,0 +1,87 @@ |
|||
" You can edit this file by hand. |
|||
" The " character at the beginning of a line comments out the line. |
|||
" Blank lines are ignored. |
|||
|
|||
" The Default color scheme is used for any directory that does not have |
|||
" a specified scheme and for parts of user interface like menus. A |
|||
" color scheme set for a base directory will also |
|||
" be used for the sub directories. |
|||
|
|||
" The standard ncurses colors are: |
|||
" Default = -1 = None, can be used for transparency or default color |
|||
" Black = 0 |
|||
" Red = 1 |
|||
" Green = 2 |
|||
" Yellow = 3 |
|||
" Blue = 4 |
|||
" Magenta = 5 |
|||
" Cyan = 6 |
|||
" White = 7 |
|||
|
|||
" Light versions of colors are also available (they set bold |
|||
" attribute in terminals with less than 16 colors): |
|||
" LightBlack |
|||
" LightRed |
|||
" LightGreen |
|||
" LightYellow |
|||
" LightBlue |
|||
" LightMagenta |
|||
" LightCyan |
|||
" LightWhite |
|||
|
|||
" Available attributes (some of them can be combined): |
|||
" bold |
|||
" underline |
|||
" reverse or inverse |
|||
" standout |
|||
" italic (on unsupported systems becomes reverse) |
|||
" combine |
|||
" none |
|||
|
|||
" Vifm supports 256 colors you can use color numbers 0-255 |
|||
" (requires properly set up terminal: set your TERM environment variable |
|||
" (directly or using resources) to some color terminal name (e.g. |
|||
" xterm-256color) from /usr/lib/terminfo/; you can check current number |
|||
" of colors in your terminal with tput colors command) |
|||
|
|||
" highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color |
|||
|
|||
highlight clear |
|||
|
|||
highlight Win cterm=none ctermfg=white ctermbg=black |
|||
highlight Directory cterm=bold ctermfg=cyan ctermbg=default |
|||
highlight Link cterm=bold ctermfg=yellow ctermbg=default |
|||
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default |
|||
highlight HardLink cterm=none ctermfg=yellow ctermbg=default |
|||
highlight Socket cterm=bold ctermfg=magenta ctermbg=default |
|||
highlight Device cterm=bold ctermfg=red ctermbg=default |
|||
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default |
|||
highlight Executable cterm=bold ctermfg=green ctermbg=default |
|||
highlight Selected cterm=bold ctermfg=magenta ctermbg=default |
|||
highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default |
|||
highlight TopLine cterm=none ctermfg=black ctermbg=white |
|||
highlight TopLineSel cterm=bold ctermfg=black ctermbg=default |
|||
highlight StatusLine cterm=bold ctermfg=black ctermbg=white |
|||
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black |
|||
highlight CmdLine cterm=none ctermfg=white ctermbg=black |
|||
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black |
|||
highlight Border cterm=none ctermfg=black ctermbg=white |
|||
highlight OtherLine ctermfg=default ctermbg=default |
|||
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white |
|||
highlight SuggestBox cterm=bold ctermfg=default ctermbg=default |
|||
highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red |
|||
highlight AuxWin ctermfg=default ctermbg=default |
|||
highlight TabLine cterm=none ctermfg=white ctermbg=black |
|||
highlight TabLineSel cterm=bold,reverse ctermfg=default ctermbg=default |
|||
highlight User1 ctermfg=default ctermbg=default |
|||
highlight User2 ctermfg=default ctermbg=default |
|||
highlight User3 ctermfg=default ctermbg=default |
|||
highlight User4 ctermfg=default ctermbg=default |
|||
highlight User5 ctermfg=default ctermbg=default |
|||
highlight User6 ctermfg=default ctermbg=default |
|||
highlight User7 ctermfg=default ctermbg=default |
|||
highlight User8 ctermfg=default ctermbg=default |
|||
highlight User9 ctermfg=default ctermbg=default |
|||
highlight OtherWin ctermfg=default ctermbg=default |
|||
highlight LineNr ctermfg=default ctermbg=default |
|||
highlight OddLine ctermfg=default ctermbg=default |
@ -0,0 +1,33 @@ |
|||
highlight clear |
|||
highlight Win cterm=none ctermfg=white ctermbg=black |
|||
highlight Directory cterm=bold ctermfg=cyan ctermbg=default |
|||
highlight Link cterm=bold ctermfg=yellow ctermbg=default |
|||
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default |
|||
highlight Socket cterm=bold ctermfg=magenta ctermbg=default |
|||
highlight Device cterm=bold ctermfg=red ctermbg=default |
|||
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default |
|||
highlight Executable cterm=bold ctermfg=green ctermbg=default |
|||
highlight Selected cterm=bold ctermfg=magenta ctermbg=default |
|||
highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default |
|||
highlight TopLine cterm=none ctermfg=black ctermbg=white |
|||
highlight TopLineSel cterm=bold ctermfg=black ctermbg=default |
|||
highlight StatusLine cterm=bold ctermfg=black ctermbg=yellow |
|||
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black |
|||
highlight CmdLine cterm=none ctermfg=white ctermbg=black |
|||
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black |
|||
highlight Border cterm=none ctermfg=white ctermbg=black |
|||
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white |
|||
highlight SuggestBox cterm=bold ctermfg=default ctermbg=default |
|||
highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red |
|||
highlight AuxWin cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight TabLine cterm=none ctermfg=white ctermbg=black |
|||
highlight TabLineSel cterm=bold,reverse ctermfg=default ctermbg=default |
|||
highlight User1 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User2 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User3 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User4 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User5 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User6 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User7 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User8 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
|||
highlight User9 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default |
@ -0,0 +1,71 @@ |
|||
" Ranger devicons for ViFM |
|||
" https://github.com/cirala/vifm_devicons |
|||
" |
|||
" Filetypes/directories |
|||
set classify=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../::' |
|||
|
|||
" Specific files |
|||
set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,config::' |
|||
set classify+=' ::dropbox::' |
|||
set classify+=' ::favicon.*,,README,,readme::' |
|||
set classify+=' ::.vim,,.vimrc,,.gvimrc,,.vifm::' |
|||
set classify+=' ::gruntfile.coffee,,gruntfile.js,,gruntfile.ls::' |
|||
set classify+=' ::gulpfile.coffee,,gulpfile.js,,gulpfile.ls::' |
|||
set classify+=' ::ledger::' |
|||
set classify+=' ::license,,copyright,,copying,,LICENSE,,COPYRIGHT,,COPYING::' |
|||
set classify+=' ::node_modules::' |
|||
set classify+=' ::react.jsx::' |
|||
|
|||
" File extensions |
|||
set classify+='λ ::*.ml,,*.mli::' |
|||
set classify+=' ::*.styl::' |
|||
set classify+=' ::*.scss::' |
|||
set classify+=' ::*.py,,*.pyc,,*.pyd,,*.pyo::' |
|||
set classify+=' ::*.php::' |
|||
set classify+=' ::*.markdown,,*.md::' |
|||
set classify+=' ::*.json::' |
|||
set classify+=' ::*.js::' |
|||
set classify+=' ::*.bmp,,*.gif,,*.ico,,*.jpeg,,*.jpg,,*.png,,*.svg,,*.svgz,,*.tga,,*.tiff,,*.xmb,,*.xcf,,*.xpm,,*.xspf,,*.xwd,,*.cr2,,*.dng,,*.3fr,,*.ari,,*.arw,,*.bay,,*.crw,,*.cr3,,*.cap,,*.data,,*.dcs,,*.dcr,,*.drf,,*.eip,,*.erf,,*.fff,,*.gpr,,*.iiq,,*.k25,,*.kdc,,*.mdc,,*.mef,,*.mos,,*.mrw,,*.obm,,*.orf,,*.pef,,*.ptx,,*.pxn,,*.r3d,,*.raf,,*.raw,,*.rwl,,*.rw2,,*.rwz,,*.sr2,,*.srf,,*.srw,,*.tif,,*.x3f,,*.webp,,*.avif,,*.jxl::' |
|||
set classify+=' ::*.ejs,,*.htm,,*.html,,*.slim,,*.xml::' |
|||
set classify+=' ::*.mustasche::' |
|||
set classify+=' ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.cfg::' |
|||
set classify+=' ::*.rss::' |
|||
set classify+=' ::*.coffee::' |
|||
set classify+=' ::*.twig::' |
|||
set classify+=' ::*.c++,,*.cpp,,*.cxx,,*.h::' |
|||
set classify+=' ::*.cc,,*.c::' |
|||
set classify+=' ::*.hs,,*.lhs::' |
|||
set classify+=' ::*.lua::' |
|||
set classify+=' ::*.jl::' |
|||
set classify+=' ::*.go::' |
|||
set classify+=' ::*.ts::' |
|||
set classify+=' ::*.db,,*.dump,,*.sql::' |
|||
set classify+=' ::*.sln,,*.suo::' |
|||
set classify+=' ::*.exe::' |
|||
set classify+=' ::*.diff,,*.sum,,*.md5,,*.sha512::' |
|||
set classify+=' ::*.scala::' |
|||
set classify+=' ::*.java,,*.jar::' |
|||
set classify+=' ::*.xul::' |
|||
set classify+=' ::*.clj,,*.cljc::' |
|||
set classify+=' ::*.pl,,*.pm,,*.t::' |
|||
set classify+=' ::*.cljs,,*.edn::' |
|||
set classify+=' ::*.rb::' |
|||
set classify+=' ::*.fish,,*.sh,,*.bash::' |
|||
set classify+=' ::*.dart::' |
|||
set classify+=' ::*.f#,,*.fs,,*.fsi,,*.fsscript,,*.fsx::' |
|||
set classify+=' ::*.rlib,,*.rs::' |
|||
set classify+=' ::*.d::' |
|||
set classify+=' ::*.erl,,*.hrl::' |
|||
set classify+=' ::*.ai::' |
|||
set classify+=' ::*.psb,,*.psd::' |
|||
set classify+=' ::*.jsx::' |
|||
set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::' |
|||
set classify+=' ::*.avi,,*.flv,,*.mkv,,*.mov,,*.mp4,,*.mpeg,,*.mpg,,*.webm,,*.av1::' |
|||
set classify+=' ::*.epub,,*.pdf,,*.fb2,,*.djvu::' |
|||
set classify+=' ::*.7z,,*.apk,,*.bz2,,*.cab,,*.cpio,,*.deb,,*.gem,,*.gz,,*.gzip,,*.lh,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.tar,,*.tgz,,*.xz,,*.zip,,*.zst::' |
|||
set classify+=' ::*.cbr,,*.cbz::' |
|||
set classify+=' ::*.log::' |
|||
set classify+=' ::*.doc,,*.docx,,*.adoc::' |
|||
set classify+=' ::*.xls,,*.xlsmx::' |
|||
set classify+=' ::*.pptx,,*.ppt::' |
|||
|
@ -0,0 +1,6 @@ |
|||
This directory is dedicated for user-supplied scripts/executables. |
|||
vifm modifies its PATH environment variable to let user run those |
|||
scripts without specifying full path. All subdirectories are added |
|||
as well. File in a subdirectory overrules file with the same name |
|||
in parent directories. Restart might be needed to recognize files |
|||
in newly created or renamed subdirectories. |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,78 @@ |
|||
" vim: filetype=vifm |
|||
source ~/.config/vifm/vifmshortcuts |
|||
source ~/.config/vifm/favicons.vifm |
|||
|
|||
set vicmd=$EDITOR |
|||
set syscalls |
|||
set nofollowlinks |
|||
set sortnumbers |
|||
set undolevels=100 |
|||
set wildmenu |
|||
set wildstyle=popup |
|||
set scrolloff=4 |
|||
set ignorecase |
|||
set smartcase |
|||
set nohlsearch |
|||
set incsearch |
|||
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers |
|||
colorscheme luke |
|||
|
|||
map <C-h> <C-w>h |
|||
map <C-j> <C-w>j |
|||
map <C-k> <C-w>k |
|||
map <C-l> <C-w>l |
|||
map <C-o> <C-w>o |
|||
map <C-s> <C-w>s |
|||
map <C-v> <C-w>v |
|||
|
|||
map R :restart<CR> |
|||
map x :!sxiv -ft * 2>/dev/null &<CR> |
|||
nnoremap o :file &<cr> |
|||
map E :!$EDITOR %f<CR> |
|||
map mkd :mkdir<space> |
|||
map bg :!setbg %f &<CR> |
|||
map X :!ext %f &<CR> |
|||
nnoremap s :shell<cr> |
|||
nnoremap w :view<cr> |
|||
vnoremap w :view<cr>gv |
|||
nnoremap yd :!echo %d | xclip %i<cr> |
|||
nnoremap yf :!echo %c:p | xclip %i<cr> |
|||
nnoremap I cw<c-a> |
|||
nnoremap cc cw<c-u> |
|||
nnoremap A cw |
|||
nnoremap ,w :set wrap!<cr> |
|||
nmap <space> tj |
|||
nmap q ZQ |
|||
|
|||
fileview */ tree %c -L 1 --dirsfirst |
|||
fileview ../ tree %c -L 1 --dirsfirst |
|||
fileviewer *.html w3m -dump %c |
|||
|
|||
fileviewer *.docx docx2txt %c - |
|||
fileviewer *.odt odt2txt %c - |
|||
|
|||
filetype *.csv,*.xlsx sc-im %c |
|||
fileviewer *.csv sed "s/,,,,/,,-,,/g;s/,,/ /g" %c | column -t | sed "s/ - / /g" | cut -c -%pw |
|||
|
|||
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus mpv --no-audio-display --input-ipc-server=/tmp/mpvsoc$(date +%%s) %c |
|||
filextype *.pdf,*.ps,*.eps,*.ps.gz,*.djvu,*.epub,*.cbz,*.cbr,*.cb7,*.xps zathura %f 2>/dev/null &, |
|||
fileviewer *.pdf pdftotext -l 1 -nopgbrk %c - |
|||
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.qt,*.divx,*.as[fx],*mp3,*.flac file |
|||
filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,*.as[fx] mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) %f 2>/dev/null &, |
|||
|
|||
fileview *.tar.gz atool -l --format=tar %f 2>/dev/null | awk '{$1=$2=$3=$4=$5=""; print $0}' |
|||
fileview *.zip,*.cbz atool -l --format=zip %f 2>/dev/null | tail +4 | awk '{$1=$2=$3=""; print $0}' |
|||
fileview *.rar,*.cbr atool -l --format=rar %f 2>/dev/null | tail +9 | awk '{$1=$2=$3=$4=""; print $0}' |
|||
fileview *.7z,*.cb7 atool -l --format=7z %f 2>/dev/null | tail +20 | awk '{$1=$2=$3=$4=$5=""; print $0}' |
|||
filetype *.zip,*.7z,*.rar,*.tar.gz,*.tar.xz ext %f |
|||
|
|||
fileviewer *.[1-8] man ./%c | col -b |
|||
filetype *.[1-8] man ./%c |
|||
|
|||
fileviewer *.jpg,*.jpeg,*.png,*.ico,*.gif vifmimg draw %px %py %pw %ph %c %pc vifmimg clear |
|||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.ico,*.gif,*.xpm rotdir %f 2>/dev/null | sxiv -ia 2>/dev/null & |
|||
|
|||
filextype *.svg inkscape %f 2>/dev/null & |
|||
filextype *.xcf gimp %f 2>/dev/null & |
|||
|
|||
set vifminfo=dhistory,chistory,tui,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks |
@ -0,0 +1,52 @@ |
|||
" vim: filetype=vim |
|||
map gh :cd ~/<CR> |
|||
map th <tab>:cd ~/<CR><tab> |
|||
map Mh <tab>:cd ~/<CR><tab>:mo<CR> |
|||
map Yh <tab>:cd ~/<CR><tab>:co<CR> |
|||
map gd :cd ~/Documents<CR> |
|||
map td <tab>:cd ~/Documents<CR><tab> |
|||
map Md <tab>:cd ~/Documents<CR><tab>:mo<CR> |
|||
map Yd <tab>:cd ~/Documents<CR><tab>:co<CR> |
|||
map gD :cd ~/Downloads<CR> |
|||
map tD <tab>:cd ~/Downloads<CR><tab> |
|||
map MD <tab>:cd ~/Downloads<CR><tab>:mo<CR> |
|||
map YD <tab>:cd ~/Downloads<CR><tab>:co<CR> |
|||
map gm :cd ~/Music<CR> |
|||
map tm <tab>:cd ~/Music<CR><tab> |
|||
map Mm <tab>:cd ~/Music<CR><tab>:mo<CR> |
|||
map Ym <tab>:cd ~/Music<CR><tab>:co<CR> |
|||
map gpp :cd ~/Pictures<CR> |
|||
map tpp <tab>:cd ~/Pictures<CR><tab> |
|||
map Mpp <tab>:cd ~/Pictures<CR><tab>:mo<CR> |
|||
map Ypp <tab>:cd ~/Pictures<CR><tab>:co<CR> |
|||
map gvv :cd ~/Videos<CR> |
|||
map tvv <tab>:cd ~/Videos<CR><tab> |
|||
map Mvv <tab>:cd ~/Videos<CR><tab>:mo<CR> |
|||
map Yvv <tab>:cd ~/Videos<CR><tab>:co<CR> |
|||
map gcf :cd ~/.config<CR> |
|||
map tcf <tab>:cd ~/.config<CR><tab> |
|||
map Mcf <tab>:cd ~/.config<CR><tab>:mo<CR> |
|||
map Ycf <tab>:cd ~/.config<CR><tab>:co<CR> |
|||
map gsc :cd ~/.local/bin<CR> |
|||
map tsc <tab>:cd ~/.local/bin<CR><tab> |
|||
map Msc <tab>:cd ~/.local/bin<CR><tab>:mo<CR> |
|||
map Ysc <tab>:cd ~/.local/bin<CR><tab>:co<CR> |
|||
map gmn :cd /mnt<CR> |
|||
map tmn <tab>:cd /mnt<CR><tab> |
|||
map Mmn <tab>:cd /mnt<CR><tab>:mo<CR> |
|||
map Ymn <tab>:cd /mnt<CR><tab>:co<CR> |
|||
map bf :e ~/.config/files<CR> |
|||
map bd :e ~/.config/directories<CR> |
|||
map bw :e ~/.config/bookmarks<CR> |
|||
map cfa :e ~/.config/aliasrc<CR> |
|||
map cfz :e $ZDOTDIR/.zshrc<CR> |
|||
map cfv :e ~/.config/nvim/init.vim<CR> |
|||
map cfm :e ~/.config/mutt/muttrc<CR> |
|||
map cfd :e ~/.Xdefaults<CR> |
|||
map cfu :e ~/.config/newsboat/urls<CR> |
|||
map cfn :e ~/.config/newsboat/config<CR> |
|||
map cfmb :e ~/.config/ncmpcpp/bindings<CR> |
|||
map cfmc :e ~/.config/ncmpcpp/config<CR> |
|||
map cfk :e ~/.config/sxhkd/sxhkdrc<CR> |
|||
map cfi :e ~/.config/i3/config<CR> |
|||
map cfb :e ~/.config/i3blocks/config<CR> |
@ -0,0 +1,27 @@ |
|||
#!/bin/bash |
|||
|
|||
source "${HOME}/.cache/wal/colors.sh" |
|||
|
|||
mkdir -p "${HOME}/.config/dunst" |
|||
mkdir -p "${HOME}/.config/zathura" |
|||
ln -sf "${HOME}/.cache/wal/dunstrc" "${HOME}/.config/dunst/dunstrc" |
|||
ln -sf "${HOME}/.cache/wal/zathurarc" "${HOME}/.config/zathura/zathurarc" |
|||
|
|||
fix_sequences() { |
|||
e=$'\e' |
|||
sequences=$(cat) |
|||
foreground_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]10[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" |
|||
background_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]11[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" |
|||
cursor_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]12[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" |
|||
|
|||
for term in /dev/pts/{0..9}* |
|||
do |
|||
echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null |
|||
echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null |
|||
echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null |
|||
done |
|||
} |
|||
|
|||
fix_sequences <"${HOME}/.cache/wal/sequences" |
|||
|
|||
pkill dunst; dunst & |
@ -0,0 +1,152 @@ |
|||
[global] |
|||
monitor = 0 |
|||
follow = keyboard |
|||
geometry = "350x5-0+24" |
|||
indicate_hidden = yes |
|||
shrink = yes |
|||
transparency = 20 |
|||
notification_height = 0 |
|||
separator_height = 2 |
|||
padding = 0 |
|||
horizontal_padding = 8 |
|||
frame_width = 3 |
|||
frame_color = "{color4}" |
|||
|
|||
# Define a color for the separator. |
|||
# possible values are: |
|||
# * auto: dunst tries to find a color fitting to the background; |
|||
# * foreground: use the same color as the foreground; |
|||
# * frame: use the same color as the frame; |
|||
# * anything else will be interpreted as a X color. |
|||
separator_color = frame |
|||
|
|||
# Sort messages by urgency. |
|||
sort = yes |
|||
|
|||
idle_threshold = 120 |
|||
font = Monospace 14 |
|||
line_height = 0 |
|||
markup = full |
|||
|
|||
# The format of the message. Possible variables are: |
|||
# %a appname |
|||
# %s summary |
|||
# %b body |
|||
# %i iconname (including its path) |
|||
# %I iconname (without its path) |
|||
# %p progress value if set ([ 0%] to [100%]) or nothing |
|||
# %n progress value if set without any extra characters |
|||
# %% Literal % |
|||
# Markup is allowed |
|||
format = "<b>%s</b>\n%b" |
|||
|
|||
alignment = left |
|||
show_age_threshold = 60 |
|||
word_wrap = yes |
|||
ellipsize = middle |
|||
ignore_newline = no |
|||
stack_duplicates = true |
|||
hide_duplicate_count = true |
|||
show_indicators = yes |
|||
icon_position = left |
|||
max_icon_size = 40 |
|||
#icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/ |
|||
sticky_history = yes |
|||
history_length = 20 |
|||
dmenu = /usr/bin/dmenu -p dunst: |
|||
browser = /usr/bin/firefox -new-tab |
|||
|
|||
# Always run rule-defined scripts, even if the notification is suppressed |
|||
always_run_script = true |
|||
|
|||
title = Dunst |
|||
class = Dunst |
|||
startup_notification = false |
|||
force_xinerama = false |
|||
[experimental] |
|||
per_monitor_dpi = false |
|||
|
|||
[shortcuts] |
|||
close = ctrl+space |
|||
close_all = ctrl+shift+space |
|||
history = ctrl+grave |
|||
context = ctrl+shift+period |
|||
|
|||
[urgency_low] |
|||
# IMPORTANT: colors have to be defined in quotation marks. |
|||
# Otherwise the "#" and following would be interpreted as a comment. |
|||
background = "{background}" |
|||
foreground = "{foreground}" |
|||
timeout = 5 |
|||
# Icon for notifications with low urgency, uncomment to enable |
|||
#icon = /path/to/icon |
|||
|
|||
[urgency_normal] |
|||
background = "{background}" |
|||
foreground = "{foreground}" |
|||
timeout = 5 |
|||
|
|||
[urgency_critical] |
|||
background = "{background}" |
|||
foreground = "{foreground}" |
|||
frame_color = "#fabd2f" |
|||
timeout = 0 |
|||
|
|||
# Every section that isn't one of the above is interpreted as a rules to |
|||
# override settings for certain messages. |
|||
# Messages can be matched by "appname", "summary", "body", "icon", "category", |
|||
# "msg_urgency" and you can override the "timeout", "urgency", "foreground", |
|||
# "background", "new_icon" and "format". |
|||
# Shell-like globbing will get expanded. |
|||
# |
|||
# SCRIPTING |
|||
# You can specify a script that gets run when the rule matches by |
|||
# setting the "script" option. |
|||
# The script will be called as follows: |
|||
# script appname summary body icon urgency |
|||
# where urgency can be "LOW", "NORMAL" or "CRITICAL". |
|||
# |
|||
# NOTE: if you don't want a notification to be displayed, set the format |
|||
# to "". |
|||
# NOTE: It might be helpful to run dunst -print in a terminal in order |
|||
# to find fitting options for rules. |
|||
|
|||
#[espeak] |
|||
# summary = "*" |
|||
# script = dunst_espeak.sh |
|||
|
|||
#[script-test] |
|||
# summary = "*script*" |
|||
# script = dunst_test.sh |
|||
|
|||
#[ignore] |
|||
# # This notification will not be displayed |
|||
# summary = "foobar" |
|||
# format = "" |
|||
|
|||
#[history-ignore] |
|||
# # This notification will not be saved in history |
|||
# summary = "foobar" |
|||
# history_ignore = yes |
|||
|
|||
#[signed_on] |
|||
# appname = Pidgin |
|||
# summary = "*signed on*" |
|||
# urgency = low |
|||
# |
|||
#[signed_off] |
|||
# appname = Pidgin |
|||
# summary = *signed off* |
|||
# urgency = low |
|||
# |
|||
#[says] |
|||
# appname = Pidgin |
|||
# summary = *says* |
|||
# urgency = critical |
|||
# |
|||
#[twitter] |
|||
# appname = Pidgin |
|||
# summary = *twitter.com* |
|||
# urgency = normal |
|||
# |
|||
# vim: ft=cfg |
@ -0,0 +1,35 @@ |
|||
set sandbox none |
|||
set statusbar-h-padding 0 |
|||
set statusbar-v-padding 0 |
|||
set page-padding 1 |
|||
set selection-clipboard clipboard |
|||
map u scroll half-up |
|||
map d scroll half-down |
|||
map D toggle_page_mode |
|||
map r reload |
|||
map R rotate |
|||
map K zoom in |
|||
map J zoom out |
|||
map i recolor |
|||
map p print |
|||
|
|||
set default-bg "{background}" |
|||
set default-fg "{foreground}" |
|||
set statusbar-bg "{background}" |
|||
set statusbar-fg "{foreground}" |
|||
set inputbar-bg "{background}" |
|||
set inputbar-fg "{foreground}" |
|||
set notification-bg "{background}" |
|||
set notification-fg "{foreground}" |
|||
set notification-error-bg "{background}" |
|||
set notification-error-fg "{foreground}" |
|||
set notification-warning-bg "{background}" |
|||
set notification-warning-fg "{foreground}" |
|||
set highlight-color "{color3}" |
|||
set highlight-active-color "{color4}" |
|||
set completion-bg "{color3}" |
|||
set completion-fg "{color4}" |
|||
set completion-highlight-bg "{color3}" |
|||
set completion-highlight-fg "{color4}" |
|||
set recolor-lightcolor "{background}" |
|||
set recolor-darkcolor "{foreground}" |
@ -0,0 +1 @@ |
|||
hsts-file=~/.cache/wget-hsts |
@ -0,0 +1,17 @@ |
|||
#!/bin/sh |
|||
|
|||
# xinitrc runs automatically when you run startx. |
|||
|
|||
# There are some small but important commands that need to be run when we start |
|||
# the graphical environment. There is a link to this file in ~/.xprofile |
|||
# because that file is run automatically if someone uses a display manager |
|||
# (login screen) and so they are needed there. To prevent doubling up commands, |
|||
# I source them here with the line below. |
|||
|
|||
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then |
|||
. "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" |
|||
else |
|||
. "$HOME/.xprofile" |
|||
fi |
|||
|
|||
ssh-agent i3 |
@ -0,0 +1,25 @@ |
|||
#!/bin/sh |
|||
|
|||
# This file runs when a DM logs you into a graphical session. |
|||
# If you use startx/xinit like a Chad, this file will also be sourced. |
|||
|
|||
xrandr --dpi 80 # Set DPI. User may want to use a larger number for larger screens. |
|||
setbg & # set the background with the `setbg` script |
|||
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & # Uncomment to use Xresources colors/settings on startup |
|||
# dbus-launch --sh-syntax --exit-with-session; pulseaudio --kill; pipewire& |
|||
mpd & # music player daemon-you might prefer it as a service though |
|||
nohup mpd-update & |
|||
mpdscribble & # scribble to last.fm and libre.fm |
|||
remaps & # run the remaps script, switching caps/esc and more; check it for more info |
|||
# xcompmgr & # xcompmgr for transparency |
|||
picom --experimental-backends & # picom for transparency, fade and vsync |
|||
dunst & # dunst for notifications |
|||
xset r rate 300 50 & # Speed xrate up |
|||
unclutter & # Remove mouse when idle |
|||
|
|||
# This line autostarts an instance of Pulseaudio that does not exit on idle. |
|||
# This is "necessary" on Artix due to a current bug between PA and |
|||
# Chromium-based browsers where they fail to start PA and use dummy output. |
|||
pidof -s runit && |
|||
! pidof -s pulseaudio >/dev/null 2>&1 && |
|||
setsid -f pulseaudio --start --exit-idle-time=-1 >/dev/null 2>&1 |
@ -0,0 +1,182 @@ |
|||
!! Transparency (0-1): |
|||
*.alpha: 1 |
|||
|
|||
!! Set a default font and font size as below: |
|||
*.font: monospace:size=10 |
|||
|
|||
!! Cursor theme |
|||
Xcursor.theme: Numix-Cursor-Light |
|||
|
|||
/* name dark light */ |
|||
/* black 0 8 */ |
|||
/* red 1 9 */ |
|||
/* green 2 10 */ |
|||
/* yellow 3 11 */ |
|||
/* blue 4 12 */ |
|||
/* purple 5 13 */ |
|||
/* cyan 6 14 */ |
|||
/* white 7 15 */ |
|||
|
|||
/* !! katrielle */ |
|||
|
|||
/* *background: #251200 */ |
|||
/* *foreground: #ffeaa3 */ |
|||
/* *color0: #251200 */ |
|||
/* *color1: #d6262b */ |
|||
/* *color2: #bfc65a */ |
|||
/* *color3: #ffcb1b */ |
|||
/* *color4: #7cc9cf */ |
|||
/* *color5: #d26349 */ |
|||
/* *color6: #e6a96b */ |
|||
/* *color7: #ffeaa3 */ |
|||
/* *color8: #7f6a55 */ |
|||
/* *color9: #b60200 */ |
|||
/* *color10: #919c00 */ |
|||
/* *color11: #be8a13 */ |
|||
/* *color12: #4699a3 */ |
|||
/* *color13: #8d4331 */ |
|||
/* *color14: #da8213 */ |
|||
/* *color15: #ddc265 */ |
|||
|
|||
/* !! gruvbox: */ |
|||
*.background: #1d2021 |
|||
*.foreground: #ebdbb2 |
|||
*.color0: #1d2021 |
|||
*.color1: #cc241d |
|||
*.color2: #98971a |
|||
*.color3: #d79921 |
|||
*.color4: #458588 |
|||
*.color5: #b16286 |
|||
*.color6: #689d6a |
|||
*.color7: #a89984 |
|||
*.color8: #928374 |
|||
*.color9: #fb4934 |
|||
*.color10: #b8bb26 |
|||
*.color11: #fabd2f |
|||
*.color12: #83a598 |
|||
*.color13: #d3869b |
|||
*.color14: #8ec07c |
|||
*.color15: #ebdbb2 |
|||
*.color256: #1d2021 |
|||
*.color257: #ebdbb2 |
|||
|
|||
/* !! gruvbox light: */ |
|||
/* *.color0: #fbf1c7 */ |
|||
/* *.color1: #cc241d */ |
|||
/* *.color2: #98971a */ |
|||
/* *.color3: #d79921 */ |
|||
/* *.color4: #458588 */ |
|||
/* *.color5: #b16286 */ |
|||
/* *.color6: #689d6a */ |
|||
/* *.color7: #7c6f64 */ |
|||
/* *.color8: #928374 */ |
|||
/* *.color9: #9d0006 */ |
|||
/* *.color10: #79740e */ |
|||
/* *.color11: #b57614 */ |
|||
/* *.color12: #076678 */ |
|||
/* *.color13: #8f3f71 */ |
|||
/* *.color14: #427b58 */ |
|||
/* *.color15: #3c3836 */ |
|||
/* *.background: #fbf1c7 */ |
|||
/* *.foreground: #282828 */ |
|||
/* st.alpha: 0.9 */ |
|||
|
|||
/* !! brogrammer: */ |
|||
/* *.foreground: #d6dbe5 */ |
|||
/* *.background: #131313 */ |
|||
/* *.color0: #1f1f1f */ |
|||
/* *.color8: #d6dbe5 */ |
|||
/* *.color1: #f81118 */ |
|||
/* *.color9: #de352e */ |
|||
/* *.color2: #2dc55e */ |
|||
/* *.color10: #1dd361 */ |
|||
/* *.color3: #ecba0f */ |
|||
/* *.color11: #f3bd09 */ |
|||
/* *.color4: #2a84d2 */ |
|||
/* *.color12: #1081d6 */ |
|||
/* *.color5: #4e5ab7 */ |
|||
/* *.color13: #5350b9 */ |
|||
/* *.color6: #1081d6 */ |
|||
/* *.color14: #0f7ddb */ |
|||
/* *.color7: #d6dbe5 */ |
|||
/* *.color15: #ffffff */ |
|||
/* *.colorBD: #d6dbe5 */ |
|||
|
|||
/* ! base16 */ |
|||
/* *.color0: #181818 */ |
|||
/* *.color1: #ab4642 */ |
|||
/* *.color2: #a1b56c */ |
|||
/* *.color3: #f7ca88 */ |
|||
/* *.color4: #7cafc2 */ |
|||
/* *.color5: #ba8baf */ |
|||
/* *.color6: #86c1b9 */ |
|||
/* *.color7: #d8d8d8 */ |
|||
/* *.color8: #585858 */ |
|||
/* *.color9: #ab4642 */ |
|||
/* *.color10: #a1b56c */ |
|||
/* *.color11: #f7ca88 */ |
|||
/* *.color12: #7cafc2 */ |
|||
/* *.color13: #ba8baf */ |
|||
/* *.color14: #86c1b9 */ |
|||
/* *.color15: #f8f8f8 */ |
|||
|
|||
/* !! solarized */ |
|||
/* *.color0: #073642 */ |
|||
/* *.color1: #dc322f */ |
|||
/* *.color2: #859900 */ |
|||
/* *.color3: #b58900 */ |
|||
/* *.color4: #268bd2 */ |
|||
/* *.color5: #d33682 */ |
|||
/* *.color6: #2aa198 */ |
|||
/* *.color7: #eee8d5 */ |
|||
/* *.color9: #cb4b16 */ |
|||
/* *.color8: #fdf6e3 */ |
|||
/* *.color10: #586e75 */ |
|||
/* *.color11: #657b83 */ |
|||
/* *.color12: #839496 */ |
|||
/* *.color13: #6c71c4 */ |
|||
/* *.color14: #93a1a1 */ |
|||
/* *.color15: #fdf6e3 */ |
|||
|
|||
/* !! xterm */ |
|||
/* *.color0: #000000 */ |
|||
/* *.color1: #cd0000 */ |
|||
/* *.color2: #00cd00 */ |
|||
/* *.color3: #cdcd00 */ |
|||
/* *.color4: #0000cd */ |
|||
/* *.color5: #cd00cd */ |
|||
/* *.color6: #00cdcd */ |
|||
/* *.color7: #e5e5e5 */ |
|||
/* *.color8: #4d4d4d */ |
|||
/* *.color9: #ff0000 */ |
|||
/* *.color10: #00ff00 */ |
|||
/* *.color11: #ffff00 */ |
|||
/* *.color12: #0000ff */ |
|||
/* *.color13: #ff00ff */ |
|||
/* *.color14: #00ffff */ |
|||
/* *.color15: #aabac8 */ |
|||
/* *.background: #000000 */ |
|||
|
|||
/* ! Dracula Xresources palette */ |
|||
/* *.foreground: #F8F8F2 */ |
|||
/* *.background: #282A36 */ |
|||
/* *.color0: #000000 */ |
|||
/* *.color8: #4D4D4D */ |
|||
/* *.color1: #FF5555 */ |
|||
/* *.color9: #FF6E67 */ |
|||
/* *.color2: #50FA7B */ |
|||
/* *.color10: #5AF78E */ |
|||
/* *.color3: #F1FA8C */ |
|||
/* *.color11: #F4F99D */ |
|||
/* *.color4: #BD93F9 */ |
|||
/* *.color12: #CAA9FA */ |
|||
/* *.color5: #FF79C6 */ |
|||
/* *.color13: #FF92D0 */ |
|||
/* *.color6: #8BE9FD */ |
|||
/* *.color14: #9AEDFE */ |
|||
/* *.color7: #BFBFBF */ |
|||
/* *.color15: #E6E6E6 */ |
|||
|
|||
/* *.background: .color0 */ |
|||
/* *.color256: 0#1d2021 */ |
|||
/* *.color257: 15#ebdbb2 */ |
@ -0,0 +1,15 @@ |
|||
set sandbox none |
|||
set statusbar-h-padding 0 |
|||
set statusbar-v-padding 0 |
|||
set page-padding 1 |
|||
set selection-clipboard clipboard |
|||
map u scroll half-up |
|||
map d scroll half-down |
|||
map D toggle_page_mode |
|||
map r reload |
|||
map R rotate |
|||
map K zoom in |
|||
map J zoom out |
|||
map i recolor |
|||
map p print |
|||
map g goto top |
File diff suppressed because it is too large
@ -0,0 +1,88 @@ |
|||
# Luke's config for the Zoomer Shell |
|||
|
|||
# Enable colors and change prompt: |
|||
autoload -U colors && colors # Load colors |
|||
PS1="%B%{$fg[yellow]%}%n%{$reset_color%}%b at %B%{$fg[red]%}%m%{$reset_color%}%b in %B%{$fg[magenta]%}%~%b%{$reset_color%} %B→ %b " |
|||
setopt autocd # Automatically cd into typed directory. |
|||
stty stop undef # Disable ctrl-s to freeze terminal. |
|||
setopt interactive_comments |
|||
|
|||
# History in cache directory: |
|||
HISTSIZE=10000000 |
|||
SAVEHIST=10000000 |
|||
HISTFILE=~/.cache/zsh/history |
|||
|
|||
# Load aliases and shortcuts if existent. |
|||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" |
|||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" > /dev/null |
|||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" |
|||
|
|||
# Basic auto/tab complete: |
|||
autoload -U compinit |
|||
zstyle ':completion:*' menu select |
|||
zmodload zsh/complist |
|||
compinit |
|||
_comp_options+=(globdots) # Include hidden files. |
|||
|
|||
# vi mode |
|||
bindkey -v |
|||
export KEYTIMEOUT=1 |
|||
|
|||
# Use vim keys in tab complete menu: |
|||
bindkey -M menuselect 'h' vi-backward-char |
|||
bindkey -M menuselect 'k' vi-up-line-or-history |
|||
bindkey -M menuselect 'l' vi-forward-char |
|||
bindkey -M menuselect 'j' vi-down-line-or-history |
|||
bindkey -v '^?' backward-delete-char |
|||
|
|||
# Change cursor shape for different vi modes. |
|||
function zle-keymap-select () { |
|||
case $KEYMAP in |
|||
vicmd) echo -ne '\e[1 q';; # block |
|||
viins|main) echo -ne '\e[5 q';; # beam |
|||
esac |
|||
} |
|||
zle -N zle-keymap-select |
|||
zle-line-init() { |
|||
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) |
|||
echo -ne "\e[5 q" |
|||
} |
|||
zle -N zle-line-init |
|||
echo -ne '\e[5 q' # Use beam shape cursor on startup. |
|||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. |
|||
|
|||
## Use lf to switch directories and bind it to ctrl-o |
|||
#lfcd () { |
|||
# tmp="$(mktemp)" |
|||
# lf -last-dir-path="$tmp" "$@" |
|||
# if [ -f "$tmp" ]; then |
|||
# dir="$(cat "$tmp")" |
|||
# rm -f "$tmp" >/dev/null |
|||
# [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" |
|||
# fi |
|||
#} |
|||
#bindkey -s '^o' 'lfcd\n' |
|||
|
|||
# Use vifm to switch directories and bind |
|||
vicd() |
|||
{ |
|||
local dst="$(command vifm --choose-dir - "$@")" |
|||
if [ -z "$dst" ]; then |
|||
echo 'Directory picking cancelled/failed' |
|||
return 1 |
|||
fi |
|||
cd "$dst" |
|||
} |
|||
|
|||
bindkey -s '^a' 'bc -lq\n' |
|||
|
|||
bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n' |
|||
|
|||
bindkey '^[[P' delete-char |
|||
|
|||
# Edit line in vim with ctrl-e: |
|||
autoload edit-command-line; zle -N edit-command-line |
|||
bindkey '^e' edit-command-line |
|||
|
|||
# Load syntax highlighting; should be last. |
|||
# source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null |
@ -0,0 +1,46 @@ |
|||
#!/bin/sh |
|||
|
|||
# Requires ffmpeg (audio splitting) and my `tag` wrapper script. |
|||
|
|||
[ ! -f "$2" ] && printf "The first file should be the audio, the second should be the timecodes.\\n" && exit |
|||
|
|||
echo "Enter the album/book title:"; read -r booktitle |
|||
|
|||
echo "Enter the artist/author:"; read -r author |
|||
|
|||
echo "Enter the publication year:"; read -r year |
|||
|
|||
inputaudio="$1" |
|||
|
|||
# Get a safe file name from the book. |
|||
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" |
|||
|
|||
! mkdir -p "$escbook" && echo "Do you have write access in this directory?" && exit 1 |
|||
|
|||
# As long as the extension is in the tag script, it'll work. |
|||
ext="opus" |
|||
#ext="${1#*.}" |
|||
|
|||
# Get the total number of tracks from the number of lines. |
|||
total="$(wc -l < "$2")" |
|||
|
|||
while read -r x; |
|||
do |
|||
end="$(echo "$x" | cut -d' ' -f1)" |
|||
|
|||
[ -n "$start" ] && |
|||
echo "From $start to $end; $track $title" |
|||
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext" |
|||
[ -n "$start" ] && echo "Splitting \"$title\"..." && |
|||
ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -to "$end" -vn -c copy "$file" && |
|||
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file" |
|||
title="$(echo "$x" | cut -d' ' -f 2-)" |
|||
esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" |
|||
track="$((track+1))" |
|||
start="$end" |
|||
done < "$2" |
|||
# The last track must be done outside the loop. |
|||
echo "From $start to the end: $title" |
|||
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext" |
|||
echo "Splitting \"$title\"..." && ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -vn -c copy "$file" && |
|||
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file" |
Binary file not shown.
@ -0,0 +1,58 @@ |
|||
#!/bin/sh |
|||
|
|||
# This script will compile or run another finishing operation on a document. I |
|||
# have this script run via vim. |
|||
# |
|||
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent |
|||
# presentations. Runs scripts based on extention or shebang. |
|||
# |
|||
# Note that .tex files which you wish to compile with XeLaTeX should have the |
|||
# string "xelatex" somewhere in a comment/command in the first 5 lines. |
|||
|
|||
file=$(readlink -f "$1") |
|||
dir=${file%/*} |
|||
base="${file%.*}" |
|||
ext="${file##*.}" |
|||
|
|||
cd "$dir" || exit 1 |
|||
|
|||
textype() { \ |
|||
command="pdflatex" |
|||
( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex" |
|||
$command --output-directory="$dir" "$base" && |
|||
grep -qi addbibresource "$file" && |
|||
biber --input-directory "$dir" "$base" && |
|||
$command --output-directory="$dir" "$base" && |
|||
$command --output-directory="$dir" "$base" |
|||
} |
|||
|
|||
case "$ext" in |
|||
# Try to keep these cases in alphabetical order. |
|||
[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; |
|||
c) cc "$file" -o "$base" && "$base" ;; |
|||
cpp) g++ "$file" -o "$base" && "$base" ;; |
|||
cs) mcs "$file" && mono "$base".exe ;; |
|||
go) go run "$file" ;; |
|||
h) sudo make install ;; |
|||
java) javac -d classes "$file" && java -cp classes "${1%.*}" ;; |
|||
m) octave "$file" ;; |
|||
md) if [ -x "$(command -v lowdown)" ]; then |
|||
lowdown "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf |
|||
elif [ -x "$(command -v groffdown)" ]; then |
|||
groffdown -i "$file" | groff > "$base.pdf" |
|||
else |
|||
pandoc -L pagebreak.lua -t ms --highlight-style=kate -s -o "$base".pdf "$file" |
|||
fi ; ;; |
|||
mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;; |
|||
ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;; |
|||
org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;; |
|||
py) python "$file" ;; |
|||
[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; |
|||
rs) cargo build ;; |
|||
sass) sassc -a "$file" "$base.css" ;; |
|||
scad) openscad -o "$base".stl "$file" ;; |
|||
scss) sass "$file" "$base.css" ;; |
|||
sent) setsid -f sent "$file" 2>/dev/null ;; |
|||
tex) textype "$file" ;; |
|||
*) head -n1 "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; |
|||
esac |
@ -0,0 +1,11 @@ |
|||
# Important Note |
|||
|
|||
These cronjobs have components that require information about your current display to display notifications correctly. |
|||
|
|||
When you add them as cronjobs, I recommend you precede the command with commands as those below: |
|||
|
|||
``` |
|||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u $USER)/bus; export DISPLAY=:0; . $HOME/.zprofile; then_command_goes_here |
|||
``` |
|||
|
|||
This ensures that notifications will display, xdotool commands will function and environmental variables will work as well. |
@ -0,0 +1,19 @@ |
|||
#!/bin/sh |
|||
|
|||
# Syncs repositories and downloads updates, meant to be run as a cronjob. |
|||
|
|||
ping -q -c 1 example.org > /dev/null || exit |
|||
|
|||
notify-send "📦 Repository Sync" "Checking for package updates..." |
|||
|
|||
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates. |
|||
|
|||
Check your internet connection, if pacman is already running, or run update manually to see errors." |
|||
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" |
|||
|
|||
if pacman -Qu | grep -v "\[ignored\]" |
|||
then |
|||
notify-send "🎁 Repository Sync" "Updates available. Click statusbar icon (📦) for update." |
|||
else |
|||
notify-send "📦 Repository Sync" "Sync complete. No new packages for update." |
|||
fi |
@ -0,0 +1,6 @@ |
|||
#!/bin/sh |
|||
|
|||
# Toggles all cronjobs off/on. |
|||
# Stores disabled crontabs in ~/.consaved until restored. |
|||
|
|||
([ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved ] && crontab - < "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && rm "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && notify-send "🕓 Cronjobs re-enabled.") || ( crontab -l > "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && crontab -r && notify-send "🕓 Cronjobs saved and disabled.") |
@ -0,0 +1,17 @@ |
|||
#!/bin/sh |
|||
|
|||
# Set as a cron job to check for new RSS entries for newsboat. |
|||
# If newsboat is open, sends it an "R" key to refresh. |
|||
|
|||
ping -q -c 1 example.org > /dev/null || exit |
|||
|
|||
/usr/bin/notify-send "📰 Updating RSS feeds..." |
|||
|
|||
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit |
|||
|
|||
echo 🔃 > /tmp/newsupdate |
|||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" |
|||
/usr/bin/newsboat -x reload |
|||
rm -f /tmp/newsupdate |
|||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" |
|||
/usr/bin/notify-send "📰 RSS feed update complete." |
@ -0,0 +1,83 @@ |
|||
#!/bin/sh |
|||
|
|||
# A UI for detecting and selecting all displays. Probes xrandr for connected |
|||
# displays and lets user select one to use. User may also select "manual |
|||
# selection" which opens arandr. |
|||
|
|||
twoscreen() { # If multi-monitor is selected and there are two screens. |
|||
|
|||
mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?") |
|||
# Mirror displays using native resolution of external display and a scaled |
|||
# version for the internal display |
|||
if [ "$mirror" = "yes" ]; then |
|||
external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:") |
|||
internal=$(echo "$screens" | grep -v "$external") |
|||
|
|||
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \ |
|||
tail -n 1 | awk '{print $1}') |
|||
res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \ |
|||
tail -n 1 | awk '{print $1}') |
|||
|
|||
res_ext_x=$(echo "$res_external" | sed 's/x.*//') |
|||
res_ext_y=$(echo "$res_external" | sed 's/.*x//') |
|||
res_int_x=$(echo "$res_internal" | sed 's/x.*//') |
|||
res_int_y=$(echo "$res_internal" | sed 's/.*x//') |
|||
|
|||
scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l) |
|||
scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l) |
|||
|
|||
xrandr --output "$external" --auto --scale 1.0x1.0 \ |
|||
--output "$internal" --auto --same-as "$external" \ |
|||
--scale "$scale_x"x"$scale_y" |
|||
else |
|||
|
|||
primary=$(echo "$screens" | dmenu -i -p "Select primary display:") |
|||
secondary=$(echo "$screens" | grep -v "$primary") |
|||
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") |
|||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0 |
|||
fi |
|||
} |
|||
|
|||
morescreen() { # If multi-monitor is selected and there are more than two screens. |
|||
primary=$(echo "$screens" | dmenu -i -p "Select primary display:") |
|||
secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:") |
|||
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") |
|||
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:") |
|||
xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto |
|||
} |
|||
|
|||
multimon() { # Multi-monitor handler. |
|||
case "$(echo "$screens" | wc -l)" in |
|||
2) twoscreen ;; |
|||
*) morescreen ;; |
|||
esac ;} |
|||
|
|||
onescreen() { # If only one output available or chosen. |
|||
xrandr --output "$1" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "\b$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ' -) |
|||
} |
|||
|
|||
postrun() { # Stuff to run to clean up. |
|||
setbg # Fix background if screen size/arangement has changed. |
|||
remaps # Re-remap keys if keyboard added (for laptop bases) |
|||
{ killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen |
|||
} |
|||
|
|||
# Get all possible displays |
|||
allposs=$(xrandr -q | grep "connected") |
|||
|
|||
# Get all connected screens. |
|||
screens=$(echo "$allposs" | awk '/ connected/ {print $1}') |
|||
|
|||
# If there's only one screen |
|||
[ "$(echo "$screens" | wc -l)" -lt 2 ] && |
|||
{ onescreen "$screens"; postrun; notify-send "💻 Only one screen detected." "Using it in its optimal settings..."; exit ;} |
|||
|
|||
# Get user choice including multi-monitor and manual selection: |
|||
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") && |
|||
case "$chosen" in |
|||
"manual selection") arandr ; exit ;; |
|||
"multi-monitor") multimon ;; |
|||
*) onescreen "$chosen" ;; |
|||
esac |
|||
|
|||
postrun |
@ -0,0 +1,21 @@ |
|||
#!/bin/sh |
|||
|
|||
# Feed this script a link and it will give dmenu |
|||
# some choice programs to use to open it. |
|||
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}" |
|||
|
|||
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in |
|||
"copy url") echo "$feed" | xclip -selection clipboard ;; |
|||
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;; |
|||
"mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;; |
|||
"mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;; |
|||
"queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;; |
|||
"queue yt-dl audio") qndl "$feed" 'youtube-dl --add-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;; |
|||
"queue download") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;; |
|||
PDF) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; |
|||
sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; |
|||
vim) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && setsid -f "$TERMINAL" -e "$EDITOR" "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; |
|||
setbg) curl -L "$feed" > $XDG_CACHE_HOME/pic ; xwallpaper --zoom $XDG_CACHE_HOME/pic >/dev/null 2>&1 ;; |
|||
browser) setsid -f "$BROWSER" "$feed" >/dev/null 2>&1 ;; |
|||
lynx) lynx "$feed" >/dev/null 2>&1 ;; |
|||
esac |
@ -0,0 +1,67 @@ |
|||
#!/bin/sh |
|||
|
|||
# Gives a dmenu prompt to mount unmounted drives and Android phones. If |
|||
# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll |
|||
# be prompted to give a mountpoint from already existsing directories. If you |
|||
# input a novel directory, it will prompt you to create that directory. |
|||
|
|||
getmount() { \ |
|||
[ -z "$chosen" ] && exit 1 |
|||
# shellcheck disable=SC2086 |
|||
mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1 |
|||
[ "$mp" = "" ] && exit 1 |
|||
if [ ! -d "$mp" ]; then |
|||
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1 |
|||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp") |
|||
fi |
|||
} |
|||
|
|||
mountusb() { \ |
|||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1 |
|||
chosen="$(echo "$chosen" | awk '{print $1}')" |
|||
sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0 |
|||
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}') |
|||
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted" |
|||
partitiontype="$(lsblk -no "fstype" "$chosen")" |
|||
case "$partitiontype" in |
|||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; |
|||
"exfat") sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)";; |
|||
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";; |
|||
esac |
|||
notify-send "💻 USB mounting" "$chosen mounted to $mp." |
|||
} |
|||
|
|||
mountandroid() { \ |
|||
chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1 |
|||
chosen="$(echo "$chosen" | cut -d : -f 1)" |
|||
getmount "$HOME -maxdepth 3 -type d" |
|||
simple-mtpfs --device "$chosen" "$mp" |
|||
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1 |
|||
simple-mtpfs --device "$chosen" "$mp" |
|||
notify-send "🤖 Android Mounting" "Android device mounted to $mp." |
|||
} |
|||
|
|||
asktype() { \ |
|||
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1 |
|||
case $choice in |
|||
USB) mountusb ;; |
|||
Android) mountandroid ;; |
|||
esac |
|||
} |
|||
|
|||
anddrives=$(simple-mtpfs -l 2>/dev/null) |
|||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | grep 'part\|rom' | awk '$4==""{printf "%s (%s)\n",$1,$3}')" |
|||
|
|||
if [ -z "$usbdrives" ]; then |
|||
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit |
|||
echo "Android device(s) detected." |
|||
mountandroid |
|||
else |
|||
if [ -z "$anddrives" ]; then |
|||
echo "USB drive(s) detected." |
|||
mountusb |
|||
else |
|||
echo "Mountable USB drive(s) and Android device(s) detected." |
|||
asktype |
|||
fi |
|||
fi |
@ -0,0 +1,19 @@ |
|||
#!/bin/sh |
|||
# Gives a dmenu prompt to mount unmounted local NAS shares for read/write. |
|||
# Requirements - "%wheel ALL=(ALL) NOPASSWD: ALL" |
|||
# |
|||
# Browse for mDNS/DNS-SD services using the Avahi daemon... |
|||
srvname=$(avahi-browse _smb._tcp -t | awk '{print $4}' | dmenu -i -p "Which NAS?") || exit 1 |
|||
notify-send "Searching for network shares..." "Please wait..." |
|||
# Choose share disk... |
|||
share=$(smbclient -L "$srvname" -N | grep Disk | awk '{print $1}' | dmenu -i -p "Mount which share?") || exit 1 |
|||
# Format URL... |
|||
share2mnt=//"$srvname".local/"$share" |
|||
|
|||
sharemount() { |
|||
mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && sudo mkdir /mnt/"$share") |
|||
[ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="",noperm /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0 |
|||
notify-send "Netshare $share already mounted"; exit 1 |
|||
} |
|||
|
|||
sharemount |
@ -0,0 +1,6 @@ |
|||
#!/bin/sh |
|||
|
|||
# This script is the SUDO_ASKPASS variable, meaning that it will be used as a |
|||
# password prompt if needed. |
|||
|
|||
dmenu -fn Monospace-18 -P -p "$1" <&- && echo |
@ -0,0 +1,123 @@ |
|||
#!/bin/sh |
|||
|
|||
# Usage: |
|||
# `$0`: Ask for recording type via dmenu |
|||
# `$0 screencast`: Record both audio and screen |
|||
# `$0 video`: Record only screen |
|||
# `$0 audio`: Record only audio |
|||
# `$0 kill`: Kill existing recording |
|||
# |
|||
# If there is already a running instance, user will be prompted to end it. |
|||
|
|||
updateicon() { \ |
|||
echo "$1" > /tmp/recordingicon |
|||
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" |
|||
} |
|||
|
|||
killrecording() { |
|||
recpid="$(cat /tmp/recordingpid)" |
|||
# kill with SIGTERM, allowing finishing touches. |
|||
kill -15 "$recpid" |
|||
rm -f /tmp/recordingpid |
|||
updateicon "" |
|||
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" |
|||
# even after SIGTERM, ffmpeg may still run, so SIGKILL it. |
|||
sleep 3 |
|||
kill -9 "$recpid" |
|||
exit |
|||
} |
|||
|
|||
screencast() { \ |
|||
ffmpeg -y \ |
|||
-f x11grab \ |
|||
-framerate 60 \ |
|||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ |
|||
-i "$DISPLAY" \ |
|||
-f alsa -i default \ |
|||
-r 30 \ |
|||
-c:v h264 -crf 0 -preset ultrafast -c:a aac \ |
|||
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & |
|||
echo $! > /tmp/recordingpid |
|||
updateicon "⏺️🎙️" |
|||
} |
|||
|
|||
video() { ffmpeg \ |
|||
-f x11grab \ |
|||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ |
|||
-i "$DISPLAY" \ |
|||
-c:v libx264 -qp 0 -r 30 \ |
|||
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" & |
|||
echo $! > /tmp/recordingpid |
|||
updateicon "⏺️" |
|||
} |
|||
|
|||
webcamhidef() { ffmpeg \ |
|||
-f v4l2 \ |
|||
-i /dev/video0 \ |
|||
-video_size 1920x1080 \ |
|||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & |
|||
echo $! > /tmp/recordingpid |
|||
updateicon "🎥" |
|||
} |
|||
|
|||
webcam() { ffmpeg \ |
|||
-f v4l2 \ |
|||
-i /dev/video0 \ |
|||
-video_size 640x480 \ |
|||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & |
|||
echo $! > /tmp/recordingpid |
|||
updateicon "🎥" |
|||
} |
|||
|
|||
|
|||
audio() { \ |
|||
ffmpeg \ |
|||
-f alsa -i default \ |
|||
-c:a flac \ |
|||
"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & |
|||
echo $! > /tmp/recordingpid |
|||
updateicon "🎙️" |
|||
} |
|||
|
|||
askrecording() { \ |
|||
choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:") |
|||
case "$choice" in |
|||
screencast) screencast;; |
|||
audio) audio;; |
|||
video) video;; |
|||
*selected) videoselected;; |
|||
webcam) webcam;; |
|||
"webcam (hi-def)") webcamhidef;; |
|||
esac |
|||
} |
|||
|
|||
asktoend() { \ |
|||
response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") && |
|||
[ "$response" = "Yes" ] && killrecording |
|||
} |
|||
|
|||
videoselected() |
|||
{ |
|||
slop -f "%x %y %w %h" > /tmp/slop |
|||
read -r X Y W H < /tmp/slop |
|||
rm /tmp/slop |
|||
|
|||
ffmpeg \ |
|||
-f x11grab \ |
|||
-framerate 60 \ |
|||
-video_size "$W"x"$H" \ |
|||
-i :0.0+"$X,$Y" \ |
|||
-c:v libx264 -qp 0 -r 30 \ |
|||
"$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" & |
|||
echo $! > /tmp/recordingpid |
|||
updateicon "⏺️" |
|||
} |
|||
|
|||
case "$1" in |
|||
screencast) screencast;; |
|||
audio) audio;; |
|||
video) video;; |
|||
*selected) videoselected;; |
|||
kill) killrecording;; |
|||
*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;; |
|||
esac |
@ -0,0 +1,44 @@ |
|||
#!/bin/sh |
|||
|
|||
# A dmenu prompt to unmount drives. |
|||
# Provides you with mounted partitions, select one to unmount. |
|||
# Drives mounted at /, /boot and /home will not be options to unmount. |
|||
|
|||
unmountusb() { |
|||
[ -z "$drives" ] && exit |
|||
chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1 |
|||
chosen="$(echo "$chosen" | awk '{print $1}')" |
|||
[ -z "$chosen" ] && exit |
|||
sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted." |
|||
} |
|||
|
|||
unmountandroid() { \ |
|||
chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1 |
|||
[ -z "$chosen" ] && exit |
|||
sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted." |
|||
} |
|||
|
|||
asktype() { \ |
|||
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1 |
|||
case "$choice" in |
|||
USB) unmountusb ;; |
|||
Android) unmountandroid ;; |
|||
esac |
|||
} |
|||
|
|||
drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') |
|||
|
|||
if ! grep simple-mtpfs /etc/mtab; then |
|||
[ -z "$drives" ] && echo "No drives to unmount." && exit |
|||
echo "Unmountable USB drive detected." |
|||
unmountusb |
|||
else |
|||
if [ -z "$drives" ] |
|||
then |
|||
echo "Unmountable Android device detected." |
|||
unmountandroid |
|||
else |
|||
echo "Unmountable USB drive(s) and Android device(s) detected." |
|||
asktype |
|||
fi |
|||
fi |
@ -0,0 +1,18 @@ |
|||
#!/bin/sh |
|||
|
|||
# The famous "get a menu of emojis to copy" script. |
|||
|
|||
# Get user selection via dmenu from emoji file. |
|||
chosen=$(cut -d ';' -f1 ~/.local/share/larbs/emoji | dmenu -i -l 30 | sed "s/ .*//") |
|||
|
|||
# Exit if none chosen. |
|||
[ -z "$chosen" ] && exit |
|||
|
|||
# If you run this command with an argument, it will automatically insert the |
|||
# character. Otherwise, show a message that the emoji has been copied. |
|||
if [ -n "$1" ]; then |
|||
xdotool type "$chosen" |
|||
else |
|||
printf "$chosen" | xclip -selection clipboard |
|||
notify-send "'$chosen' copied to clipboard." & |
|||
fi |
@ -0,0 +1,45 @@ |
|||
#!/bin/sh |
|||
|
|||
# A general, all-purpose extraction script. Not all extraction programs here |
|||
# are installed by LARBS automatically. |
|||
# |
|||
# Default behavior: Extract archive into new directory |
|||
# Behavior with `-c` option: Extract contents into current directory |
|||
|
|||
while getopts "hc" o; do case "${o}" in |
|||
c) extracthere="True" ;; |
|||
*) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit 1 ;; |
|||
esac done |
|||
|
|||
if [ -z "$extracthere" ]; then |
|||
archive="$(readlink -f "$*")" && |
|||
directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" && |
|||
mkdir -p "$directory" && |
|||
cd "$directory" || exit 1 |
|||
else |
|||
archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)" |
|||
fi |
|||
|
|||
[ -z "$archive" ] && printf "Give archive to extract as argument.\\n" && exit 1 |
|||
|
|||
if [ -f "$archive" ] ; then |
|||
case "$archive" in |
|||
*.tar.bz2|*.tbz2) tar xvjf "$archive" ;; |
|||
*.tar.xz) tar -xf "$archive" ;; |
|||
*.tar.gz|*.tgz) tar xvzf "$archive" ;; |
|||
*.tar.zst) tar -I zstd -xf "$archive" ;; |
|||
*.lzma) unlzma "$archive" ;; |
|||
*.bz2) bunzip2 "$archive" ;; |
|||
*.rar) unrar x -ad "$archive" ;; |
|||
*.gz) gunzip "$archive" ;; |
|||
*.tar) tar xvf "$archive" ;; |
|||
*.zip) unzip "$archive" ;; |
|||
*.Z) uncompress "$archive" ;; |
|||
*.7z) 7z x "$archive" ;; |
|||
*.xz) unxz "$archive" ;; |
|||
*.exe) cabextract "$archive" ;; |
|||
*) printf "extract: '%s' - unknown archive method\\n" "$archive" ;; |
|||
esac |
|||
else |
|||
printf "File \"%s\" not found.\\n" "$archive" |
|||
fi |
@ -0,0 +1,14 @@ |
|||
#!/bin/sh |
|||
[ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit |
|||
|
|||
if [ -f "$1" ]; then |
|||
# Try to get DOI from pdfinfo or pdftotext output. |
|||
doi=$(pdfinfo "$1" | grep -io "doi:.*") || |
|||
doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) || |
|||
exit 1 |
|||
else |
|||
doi="$1" |
|||
fi |
|||
|
|||
# Check crossref.org for the bib citation. |
|||
curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n" |
@ -0,0 +1,5 @@ |
|||
#!/bin/sh |
|||
|
|||
cat "${XDG_DATA_HOME:-$HOME/.local/share}"/larbs/getkeys/"$1" 2>/dev/null && exit |
|||
echo "Run command with one of the following arguments for info about that program:" |
|||
ls "${XDG_DATA_HOME:-$HOME/.local/share}"/larbs/getkeys |
@ -0,0 +1,19 @@ |
|||
#!/bin/sh |
|||
|
|||
# Toggle floating dropdown terminal in i3, or start if non-existing. |
|||
# $1 is the script run in the terminal. |
|||
# All other args are terminal settings. |
|||
# Terminal names are in dropdown_* to allow easily setting i3 settings. |
|||
|
|||
[ -z "$1" ] && exit |
|||
|
|||
script=$1 |
|||
shift |
|||
if xwininfo -tree -root | grep "(\"dropdown_$script\" "; |
|||
then |
|||
echo "Window detected." |
|||
i3 "[instance=\"dropdown_$script\"] scratchpad show; [instance=\"dropdown_$script\"] move position center" |
|||
else |
|||
echo "Window not detected... spawning." |
|||
i3 "exec --no-startup-id $TERMINAL -n dropdown_$script $@ -e $script" |
|||
fi |
@ -0,0 +1,25 @@ |
|||
#!/bin/sh |
|||
|
|||
# This script simplifies dropdown windows in i3. |
|||
# Shows/hides a scratchpad of a given name, if it doesn't exist, creates it. |
|||
# Usage: |
|||
# argument 1: script to run in dropdown window |
|||
# all other args are interpreted as options for your terminal |
|||
# My usage: |
|||
# ddpawn |
|||
# bindsym $mod+u exec --no-startup-id ddspawn tmuxdd |
|||
# Will hide/show window running the `tmuxdd` script when I press mod+u in i3 |
|||
# bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24 |
|||
# Similar to above but with `dropdowncalc` and the other args are interpretated as for my terminal emulator (to increase font) |
|||
|
|||
[ -z "$1" ] && exit |
|||
|
|||
if xwininfo -tree -root | grep "(\"$1\" "; |
|||
then |
|||
echo "Window detected." |
|||
else |
|||
echo "Window not detected... spawning." |
|||
i3 "exec --no-startup-id $TERMINAL -n $1 $(echo "$@" | cut -d ' ' -f2-) -e $1" && i3 "[instance=\"$1\"] scratchpad show; [instance=\"$1\"] move position center" |
|||
sleep .25 # This sleep is my laziness, will fix later (needed for immediate appearance after spawn). |
|||
fi |
|||
i3 "[instance=\"$1\"] scratchpad show; [instance=\"$1\"] move position center" |
@ -0,0 +1,3 @@ |
|||
#!/bin/sh |
|||
|
|||
ifinstalled bc && echo "Welcome to the Calculator." && bc -lq |
@ -0,0 +1,15 @@ |
|||
#!/bin/sh |
|||
|
|||
[ -z "$1" ] && exit # If $1 is left, hovers in the bottom left, if right, the bottom right |
|||
current=$(xdotool getwindowfocus) |
|||
newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3)) |
|||
newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3)) |
|||
xdotool windowsize "$current" $newheight $newwidth |
|||
newsize=$(xdotool getwindowgeometry "$current" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') |
|||
newwidth=$(xdotool getwindowgeometry "$current" | grep Geometry | grep -o " [0-9]*") |
|||
|
|||
case "$1" in |
|||
left) horizontal=0; vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) ;; |
|||
right) horizontal=$(($(xdotool getdisplaygeometry | awk '{print $1}') - newwidth)) ; vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) ;; |
|||
esac |
|||
xdotool windowmove "$current" $horizontal $vertical |
@ -0,0 +1,28 @@ |
|||
#!/bin/sh |
|||
|
|||
# This script was made by `goferito` on Github. |
|||
# Some cleanup by Luke. |
|||
|
|||
[ -z "$1" ] && echo "No direction provided" && exit 1 |
|||
distanceStr="2 px or 2 ppt" |
|||
|
|||
moveChoice() { |
|||
i3-msg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \ |
|||
i3-msg resize "$3" "$4" "$distanceStr" |
|||
} |
|||
|
|||
case $1 in |
|||
up) |
|||
moveChoice grow up shrink down |
|||
;; |
|||
down) |
|||
moveChoice shrink up grow down |
|||
;; |
|||
left) |
|||
moveChoice shrink right grow left |
|||
;; |
|||
right) |
|||
moveChoice grow right shrink left |
|||
;; |
|||
esac |
|||
|
@ -0,0 +1,5 @@ |
|||
#!/bin/sh |
|||
|
|||
# This is the script that i3 runs to either start tmux in |
|||
# the dropdown terminal or log into a previous session. |
|||
tmux a || tmux |
@ -0,0 +1,10 @@ |
|||
#!/bin/sh |
|||
|
|||
# Toggles the LARBS welcome message. |
|||
|
|||
PIC="$HOME/.local/share/larbs/larbs.png" |
|||
|
|||
grep LARBSWELCOME "$HOME/.xprofile" && |
|||
( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send -i "$PIC" "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || |
|||
( echo "notify-send -i \"$PIC\" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && |
|||
notify-send -i "$PIC" "LARBS welcome message" "Welcome message re-enabled." ) |
@ -0,0 +1,11 @@ |
|||
#!/bin/sh |
|||
|
|||
# Some optional functions in LARBS require programs not installed by default. I |
|||
# use this little script to check to see if a command exists and if it doesn't |
|||
# it informs the user that they need that command to continue. This is used in |
|||
# various other scripts for clarity's sake. |
|||
|
|||
for x in "$@";do |
|||
pacman -Qq "$x" >/dev/null 2>&1 || |
|||
{ notify-send " $x" "must be installed for this function." && exit 1 ;} |
|||
done |
@ -0,0 +1,23 @@ |
|||
#!/bin/sh |
|||
|
|||
# Feed script a url or file location. |
|||
# If an image, it will view in sxiv, |
|||
# if a video or gif, it will view in mpv |
|||
# if a music file or pdf, it will download, |
|||
# otherwise it opens link in browser. |
|||
|
|||
# If no url given. Opens browser. For using script as $BROWSER. |
|||
[ -z "$1" ] && { "$BROWSER"; exit; } |
|||
|
|||
case "$1" in |
|||
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*) |
|||
setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;; |
|||
*png|*jpg|*jpe|*jpeg|*gif) |
|||
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; |
|||
*pdf|*cbz|*cbr) |
|||
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; |
|||
*mp3|*flac|*opus|*mp3?source*) |
|||
qndl "$1" 'curl -LO' >/dev/null 2>&1 ;; |
|||
*) |
|||
[ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1 |
|||
esac |
@ -0,0 +1,14 @@ |
|||
#!/bin/sh |
|||
|
|||
# This is bound to Shift+PrintScreen by default, requires maim. It lets you |
|||
# choose the kind of screenshot to take, including copying the image or even |
|||
# highlighting an area to copy. scrotcucks on suicidewatch right now. |
|||
|
|||
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in |
|||
"a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;; |
|||
"current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;; |
|||
"full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;; |
|||
"a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;; |
|||
"current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;; |
|||
"full screen (copy)") maim | xclip -selection clipboard -t image/png ;; |
|||
esac |
@ -0,0 +1,3 @@ |
|||
while : ; do |
|||
mpc idle >/dev/null && pkill -RTMIN+11 ${STATUSBAR} || break |
|||
done |
@ -0,0 +1,13 @@ |
|||
#!/bin/sh |
|||
|
|||
# opout: "open output": A general handler for opening a file's intended output, |
|||
# usually the pdf of a compiled document. I find this useful especially |
|||
# running from vim. |
|||
|
|||
basename="$(echo "${*}" | sed 's/\.[^\/.]*$//')" |
|||
|
|||
case "${*}" in |
|||
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;; |
|||
*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;; |
|||
*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;; |
|||
esac |
@ -0,0 +1,10 @@ |
|||
#!/bin/sh |
|||
|
|||
# You might notice all mpv commands are aliased to have this input-ipc-server |
|||
# thing. That's just for this particular command, which allows us to pause |
|||
# every single one of them with one command! This is bound to super + shift + p |
|||
# (with other things) by default and is used in some other places. |
|||
|
|||
for i in $(ls /tmp/mpvSockets/*); do |
|||
echo '{ "command": ["set_property", "pause", true] }' | socat - "$i"; |
|||
done |
@ -0,0 +1,7 @@ |
|||
#!/bin/sh |
|||
# torrent peertube videos, requires the transadd script |
|||
# first argument is the video link, second is the quality (480 or 1080) |
|||
# 13/07/20 - Arthur Bais |
|||
|
|||
link="$(echo "$1" | sed "s/videos\/watch/download\/torrents/")""-$2.torrent" |
|||
transadd "$link" |
@ -0,0 +1,7 @@ |
|||
#!/bin/sh |
|||
|
|||
# entr command to run `queueandnotify` when newsboat queue is changed |
|||
|
|||
[ "$(pgrep -x "$(basename "$0")" | wc -l)" -gt 2 ] && exit |
|||
|
|||
echo "${XDG_DATA_HOME:-$HOME/.local/share}"/newsboat/queue | entr -p queueandnotify 2>/dev/null |
@ -0,0 +1,12 @@ |
|||
#!/bin/sh |
|||
|
|||
# $1 is a url; $2 is a command |
|||
[ -z "$1" ] && exit |
|||
base="$(basename "$1")" |
|||
notify-send "⏳ Queuing $base..." |
|||
cmd="$2" |
|||
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata -ic" |
|||
idnum="$(tsp $cmd "$1")" |
|||
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")" |
|||
tsp -D "$idnum" mv "$base" "$realname" |
|||
tsp -D "$idnum" notify-send "👍 $realname done." |
@ -0,0 +1,14 @@ |
|||
#!/bin/sh |
|||
|
|||
# Podboat sucks. This script replaces it. |
|||
# It reads the newsboat queue, queuing downloads with taskspooler. |
|||
# It also removes the junk from extentions. |
|||
queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue" |
|||
|
|||
while read -r line; do |
|||
[ -z "$line" ] && continue |
|||
url="$(echo "$line" | awk '{print $1}')" |
|||
qndl "$url" "curl -LO" |
|||
done < "$queuefile" |
|||
|
|||
echo > "$queuefile" |
@ -0,0 +1,13 @@ |
|||
#!/bin/sh |
|||
|
|||
# This script is called on startup to remap keys. |
|||
# Increase key speed via a rate change |
|||
xset r rate 300 50 |
|||
# Map the caps lock key to super... |
|||
setxkbmap -model thinkpad60 -layout br -variant thinkpad -option caps:super |
|||
# But when it is pressed only once, treat it as escape. |
|||
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape' |
|||
# Map the menu button to right super as well. |
|||
xmodmap -e 'keycode 135 = Super_R' |
|||
# Turn off the caps lock if on since there is no longer a key for it. |
|||
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock |
@ -0,0 +1,12 @@ |
|||
#!/bin/sh |
|||
|
|||
# When I open an image from the file manager in sxiv (the image viewer), I want |
|||
# to be able to press the next/previous keys to key through the rest of the |
|||
# images in the same directory. This script "rotates" the content of a |
|||
# directory based on the first chosen file, so that if I open the 15th image, |
|||
# if I press next, it will go to the 16th etc. Autistic, I know, but this is |
|||
# one of the reasons that sxiv is great for being able to read standard input. |
|||
|
|||
[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 |
|||
base="$(basename "$1")" |
|||
ls "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }' |
@ -0,0 +1,10 @@ |
|||
#!/bin/sh |
|||
|
|||
! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null && |
|||
notify-send "That doesn't look like a full URL." && exit |
|||
RSSFILE="${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls" |
|||
if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then |
|||
notify-send "You already have this RSS feed." |
|||
else |
|||
echo "$1" >> "$RSSFILE" && notify-send "RSS feed added." |
|||
fi |
@ -0,0 +1,8 @@ |
|||
#!/bin/sh |
|||
|
|||
# Open a terminal window in the same directory as the currently active window. |
|||
|
|||
PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3) |
|||
PID="$(pstree -lpA "$PID" | tail -n 1 | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')" |
|||
cd "$(readlink /proc/"$PID"/cwd)" || return 1 |
|||
"$TERMINAL" |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue