mirror of
https://gitlab.com/linuxstuff/dotfiles.git
synced 2026-03-25 07:22:54 +01:00
Added class and os alternates
This commit is contained in:
5
.Xmodmap##hostname.yoga
Normal file
5
.Xmodmap##hostname.yoga
Normal file
@@ -0,0 +1,5 @@
|
||||
keycode 66 = Mode_switch Multi_key
|
||||
keycode 39 = s S ssharp
|
||||
keycode 38 = a A adiaeresis Adiaeresis
|
||||
keycode 30 = u U udiaeresis Udiaeresis
|
||||
keycode 32 = o O odiaeresis Odiaeresis
|
||||
@@ -2,7 +2,7 @@ Xft.antialias: true
|
||||
Xft.hinting: true
|
||||
Xft.rgba: rgb
|
||||
Xft.hintstyle: hintfull
|
||||
Xft.dpi: 120
|
||||
Xft.dpi: 96
|
||||
Xft.autohint: true
|
||||
Xft.lcdfilter: lcddefault
|
||||
|
||||
95
.Xresources##class.red
Normal file
95
.Xresources##class.red
Normal file
@@ -0,0 +1,95 @@
|
||||
Xft.antialias: true
|
||||
Xft.hinting: true
|
||||
Xft.rgba: rgb
|
||||
Xft.hintstyle: hintfull
|
||||
Xft.dpi: 96
|
||||
Xft.autohint: true
|
||||
Xft.lcdfilter: lcddefault
|
||||
|
||||
! Remove me
|
||||
!XTerm*background: #000000
|
||||
!XTerm*foreground: #fafafa
|
||||
!XTerm*pointerColor: #1ABB9B
|
||||
!XTerm*faceName: Fixed
|
||||
!XTerm*faceSize: 11
|
||||
!XTerm*reverseVideo: on
|
||||
!XTerm*selectToClipboard: true
|
||||
|
||||
*fading: 8
|
||||
*fadeColor: black
|
||||
*pointerColorBackground: #2B2C2B
|
||||
*pointerColorForeground: #16A085
|
||||
|
||||
! Thinkpad Red
|
||||
|
||||
! special
|
||||
*.foreground: #ffffff
|
||||
*.background: #171717
|
||||
*.cursorColor: #ffffff
|
||||
|
||||
! black
|
||||
*.color0: #000000
|
||||
*.color8: #090909
|
||||
|
||||
! red
|
||||
*.color1: #cc2929
|
||||
*.color9: #e60012
|
||||
|
||||
! green
|
||||
*.color2: #cc2929
|
||||
*.color10: #e60012
|
||||
|
||||
! yellow
|
||||
*.color3: #cc2929
|
||||
*.color11: #e60012
|
||||
|
||||
! blue
|
||||
*.color4: #cc2929
|
||||
*.color12: #e60012
|
||||
|
||||
! magenta
|
||||
*.color5: #cc2929
|
||||
*.color13: #e60012
|
||||
|
||||
! cyan
|
||||
*.color6: #cc2929
|
||||
*.color14: #e60012
|
||||
|
||||
! white
|
||||
*.color7: #777777
|
||||
*.color15: #707070
|
||||
|
||||
Xcursor.theme: xcursor-breeze-snow
|
||||
Xcursor.size: 0
|
||||
|
||||
! for 'fake' transparency (without Compton) use the following three lines
|
||||
! URxvt*inheritPixmap: true
|
||||
! URxvt*transparent: true
|
||||
! URxvt*shading: 125
|
||||
|
||||
URxvt*foreground: grey
|
||||
|
||||
URxvt*depth: 32
|
||||
URxvt*background: [90]#171717
|
||||
URxvt*scrollBar: false
|
||||
URxvt*mouseWheelScrollPage: false
|
||||
URxvt*cursorBlink: false
|
||||
URxvt*saveLines: 5000
|
||||
|
||||
! Normal copy-paste keybindings without perls
|
||||
URxvt.iso14755: false
|
||||
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||
!Xterm escape codes, word by word movement
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Shift-Control-Left: \033[1;6D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
||||
URxvt.keysym.Shift-Control-Right: \033[1;6C
|
||||
URxvt.keysym.Control-Up: \033[1;5A
|
||||
URxvt.keysym.Shift-Control-Up: \033[1;6A
|
||||
URxvt.keysym.Control-Down: \033[1;5B
|
||||
URxvt.keysym.Shift-Control-Down: \033[1;6B
|
||||
|
||||
! Find Font with cmd: fc-list -v | grep "Roboto"
|
||||
URxvt*font: xft:Hack Nerd Font Mono:antialias=true
|
||||
URxvt*boldFont: xft:Hack Nerd Font Mono:style=bold:antialias=true
|
||||
95
.Xresources##default
Normal file
95
.Xresources##default
Normal file
@@ -0,0 +1,95 @@
|
||||
Xft.antialias: true
|
||||
Xft.hinting: true
|
||||
Xft.rgba: rgb
|
||||
Xft.hintstyle: hintfull
|
||||
Xft.dpi: 96
|
||||
Xft.autohint: true
|
||||
Xft.lcdfilter: lcddefault
|
||||
|
||||
! Remove me
|
||||
!XTerm*background: #000000
|
||||
!XTerm*foreground: #fafafa
|
||||
!XTerm*pointerColor: #1ABB9B
|
||||
!XTerm*faceName: Fixed
|
||||
!XTerm*faceSize: 11
|
||||
!XTerm*reverseVideo: on
|
||||
!XTerm*selectToClipboard: true
|
||||
|
||||
*fading: 8
|
||||
*fadeColor: black
|
||||
*pointerColorBackground: #2B2C2B
|
||||
*pointerColorForeground: #16A085
|
||||
|
||||
! Thinkpad Red
|
||||
|
||||
! special
|
||||
*.foreground: #ffffff
|
||||
*.background: #171717
|
||||
*.cursorColor: #ffffff
|
||||
|
||||
! black
|
||||
*.color0: #000000
|
||||
*.color8: #090909
|
||||
|
||||
! red
|
||||
*.color1: #cc2929
|
||||
*.color9: #e60012
|
||||
|
||||
! green
|
||||
*.color2: #cc2929
|
||||
*.color10: #e60012
|
||||
|
||||
! yellow
|
||||
*.color3: #cc2929
|
||||
*.color11: #e60012
|
||||
|
||||
! blue
|
||||
*.color4: #cc2929
|
||||
*.color12: #e60012
|
||||
|
||||
! magenta
|
||||
*.color5: #cc2929
|
||||
*.color13: #e60012
|
||||
|
||||
! cyan
|
||||
*.color6: #cc2929
|
||||
*.color14: #e60012
|
||||
|
||||
! white
|
||||
*.color7: #777777
|
||||
*.color15: #707070
|
||||
|
||||
Xcursor.theme: xcursor-breeze-snow
|
||||
Xcursor.size: 0
|
||||
|
||||
! for 'fake' transparency (without Compton) use the following three lines
|
||||
! URxvt*inheritPixmap: true
|
||||
! URxvt*transparent: true
|
||||
! URxvt*shading: 125
|
||||
|
||||
URxvt*foreground: grey
|
||||
|
||||
URxvt*depth: 32
|
||||
URxvt*background: [90]#171717
|
||||
URxvt*scrollBar: false
|
||||
URxvt*mouseWheelScrollPage: false
|
||||
URxvt*cursorBlink: false
|
||||
URxvt*saveLines: 5000
|
||||
|
||||
! Normal copy-paste keybindings without perls
|
||||
URxvt.iso14755: false
|
||||
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||
!Xterm escape codes, word by word movement
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Shift-Control-Left: \033[1;6D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
||||
URxvt.keysym.Shift-Control-Right: \033[1;6C
|
||||
URxvt.keysym.Control-Up: \033[1;5A
|
||||
URxvt.keysym.Shift-Control-Up: \033[1;6A
|
||||
URxvt.keysym.Control-Down: \033[1;5B
|
||||
URxvt.keysym.Shift-Control-Down: \033[1;6B
|
||||
|
||||
! Find Font with cmd: fc-list -v | grep "Roboto"
|
||||
URxvt*font: xft:Hack Nerd Font Mono:antialias=true
|
||||
URxvt*boldFont: xft:Hack Nerd Font Mono:style=bold:antialias=true
|
||||
70
.config/alacritty/alacritty.yml##class.blue
Normal file
70
.config/alacritty/alacritty.yml##class.blue
Normal file
@@ -0,0 +1,70 @@
|
||||
title: Terminal
|
||||
background_opacity: 0.8
|
||||
|
||||
env:
|
||||
TERM: xterm-256color
|
||||
|
||||
window:
|
||||
dynamic_padding: true
|
||||
padding:
|
||||
x: 30
|
||||
y: 30
|
||||
|
||||
cursor:
|
||||
hide_when_typing: true
|
||||
|
||||
font:
|
||||
normal:
|
||||
family: Hack Nerd Font
|
||||
style: Regular
|
||||
|
||||
bold:
|
||||
family: Hack Nerd Font
|
||||
style: Bold
|
||||
|
||||
italic:
|
||||
family: Hack Nerd Font
|
||||
style: Italic
|
||||
|
||||
bold_italic:
|
||||
family: Hack Nerd Font
|
||||
style: Bold Italic
|
||||
|
||||
size: 11.0
|
||||
|
||||
offset:
|
||||
x: 0
|
||||
y: -1
|
||||
|
||||
key_bindings:
|
||||
- { key: Return, mods: Control|Shift, action: SpawnNewInstance } # Spawn new instance in same directory
|
||||
|
||||
# Thinkpad Colors
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '#171717'
|
||||
foreground: '#eeeeee'
|
||||
|
||||
# Normal colors 205 grad hue
|
||||
normal:
|
||||
black: '#000000'
|
||||
blue: '#2d6791'
|
||||
magenta: '#256da1'
|
||||
red: '#2988cc' # thinkpad red
|
||||
green: '#127dc9'
|
||||
cyan: '#177bc2'
|
||||
yellow: '#0988e3'
|
||||
white: '#777777'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '#000000'
|
||||
blue: '#3c8ec9'
|
||||
magenta: '#2d8ccf'
|
||||
red: '#2e9be8' # thinkpad red
|
||||
green: '#158fe6'
|
||||
cyan: '#1991e6'
|
||||
yellow: '#0792f5'
|
||||
white: '#777777'
|
||||
|
||||
@@ -30,7 +30,7 @@ font:
|
||||
family: Hack Nerd Font
|
||||
style: Bold Italic
|
||||
|
||||
size: 12.5
|
||||
size: 11.0
|
||||
|
||||
offset:
|
||||
x: 0
|
||||
48
.config/alacritty/alacritty.yml##default
Normal file
48
.config/alacritty/alacritty.yml##default
Normal file
@@ -0,0 +1,48 @@
|
||||
title: Terminal
|
||||
background_opacity: 0.8
|
||||
|
||||
env:
|
||||
TERM: xterm-256color
|
||||
|
||||
window:
|
||||
dynamic_padding: true
|
||||
padding:
|
||||
x: 30
|
||||
y: 30
|
||||
|
||||
cursor:
|
||||
hide_when_typing: true
|
||||
|
||||
font:
|
||||
normal:
|
||||
family: Hack Nerd Font
|
||||
style: Regular
|
||||
|
||||
bold:
|
||||
family: Hack Nerd Font
|
||||
style: Bold
|
||||
|
||||
italic:
|
||||
family: Hack Nerd Font
|
||||
style: Italic
|
||||
|
||||
bold_italic:
|
||||
family: Hack Nerd Font
|
||||
style: Bold Italic
|
||||
|
||||
size: 11.0
|
||||
|
||||
offset:
|
||||
x: 0
|
||||
y: -1
|
||||
|
||||
key_bindings:
|
||||
- { key: Return, mods: Control|Shift, action: SpawnNewInstance } # Spawn new instance in same directory
|
||||
|
||||
# Thinkpad Colors
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '#171717'
|
||||
foreground: '#eeeeee'
|
||||
|
||||
26
.config/htop/htoprc
Normal file
26
.config/htop/htoprc
Normal file
@@ -0,0 +1,26 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=46
|
||||
sort_direction=1
|
||||
hide_threads=0
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=0
|
||||
shadow_other_users=0
|
||||
show_thread_names=0
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
tree_view=0
|
||||
header_margin=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=6
|
||||
delay=15
|
||||
left_meters=CPU Blank LeftCPUs2 Blank Memory
|
||||
left_meter_modes=1 2 1 2 1
|
||||
right_meters=Uptime Blank RightCPUs2 Blank Swap
|
||||
right_meter_modes=1 2 1 2 1
|
||||
385
.config/i3/config##class.red
Normal file
385
.config/i3/config##class.red
Normal file
@@ -0,0 +1,385 @@
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
# Autostart w/ i3 #######################################################################
|
||||
|
||||
# General
|
||||
exec_always --no-startup-id fix_xcursor
|
||||
|
||||
# display
|
||||
exec --no-startup-id "nvidia-settings --load-config-only"
|
||||
exec --no-startup-id "picom -b --blur-background"
|
||||
exec --no-startup-id zsh ~/.config/polybar/launch_polybar.sh
|
||||
exec --no-startup-id "nitrogen --restore"
|
||||
exec --no-startup-id "unclutter --timeout 5 --jitter 5 --ignore-scrolling"
|
||||
|
||||
# audio
|
||||
#exec --no-startup-id zsh ~/Userdata/Scripts/Launchers/restart_pulseaudio.sh
|
||||
exec --no-startup-id zsh -c "pactl unload-module module-role-cork"
|
||||
|
||||
# extra
|
||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec --no-startup-id "rfkill unblock bluetooth"
|
||||
exec --no-startup-id blueberry-tray
|
||||
#exec --no-startup-id onboard
|
||||
exec --no-startup-id nm-applet
|
||||
#exec --no-startup-id zsh ~/Userdata/Scripts/Launchers/launch_insync.sh
|
||||
exec --no-startup-id "nextcloud"
|
||||
|
||||
|
||||
################################################################################################
|
||||
# General Hotkeys
|
||||
|
||||
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
|
||||
set $mod Mod4
|
||||
|
||||
# set default desktop layout (default is tiling)
|
||||
# workspace_layout tabbed <stacking|tabbed>
|
||||
|
||||
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||||
new_window none
|
||||
new_float none
|
||||
default_border none
|
||||
|
||||
# Hide borders
|
||||
#hide_edge_borders none
|
||||
|
||||
# Change Borders
|
||||
bindsym $mod+u border none
|
||||
bindsym $mod+y border pixel 2
|
||||
bindsym $mod+n border normal
|
||||
|
||||
# Font for window titles
|
||||
font xft:Roboto Mono 11
|
||||
|
||||
# Use Mouse+$mod to drag floating windows
|
||||
floating_modifier $mod
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Terminal
|
||||
bindsym $mod+Return exec --no-startup-id alacritty
|
||||
|
||||
# System Monitor
|
||||
bindsym Control+Shift+Escape exec --no-startup-id "alacritty -e sh -c 'htop'"
|
||||
|
||||
# Type Clipboad
|
||||
bindsym $mod+Shift+v exec --no-startup-id sh ~/Userdata/Scripts/Misc/xclip_type.sh
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Program Launchers
|
||||
|
||||
# rofi
|
||||
bindsym $mod+d exec --no-startup-id "rofi -show drun -show-icons -icon-theme Adwaita -drun-display-format {name} -sort -sort-method fzf"
|
||||
bindsym $mod+Tab exec --no-startup-id "rofi -show window -show-icons -icon-theme Adwaita -drun-display-format {name} -sort -sort-method fzf"
|
||||
|
||||
# dmenu
|
||||
#bindsym $mod+d exec --no-startup-id dmenu_recency
|
||||
|
||||
################################################################################################
|
||||
# Music
|
||||
|
||||
bindsym $mod+slash exec --no-startup-id "playerctl play-pause"
|
||||
bindsym $mod+period exec --no-startup-id "playerctl next"
|
||||
bindsym $mod+comma exec --no-startup-id "playerctl previous"
|
||||
|
||||
exec --no-startup-id pulseaudio
|
||||
#exec --no-startup-id pa-applet
|
||||
bindsym $mod+Ctrl+m exec --no-startup-id pavucontrol
|
||||
|
||||
# Pulse Audio controls
|
||||
# run amixer sset Master on
|
||||
bindsym XF86AudioMute exec "amixer sset 'Master' toggle;"
|
||||
bindsym XF86AudioLowerVolume exec "amixer sset 'Master' 5%-;"
|
||||
bindsym XF86AudioRaiseVolume exec "amixer sset 'Master' 5%+;"
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Screen
|
||||
|
||||
# Hide / Unhide statusbar
|
||||
bindsym $mod+m exec --no-startup-id polybar-msg cmd toggle
|
||||
|
||||
bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
|
||||
bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Applications
|
||||
|
||||
# Screenshot [fullscreen, select area, select area with 3 second delay]
|
||||
bindsym Print exec --no-startup-id "flameshot gui"
|
||||
bindsym $mod+Print exec --no-startup-id "flameshot full"
|
||||
#bindsym $mod+Shift+Print exec --no-startup-id deepin-screenshot -d 3 -s /home/sim/Pictures/Screenshots
|
||||
|
||||
# Firefox
|
||||
bindsym $mod+F2 exec --no-startup-id firefox
|
||||
bindsym $mod+Shift+F2 exec --no-startup-id "firefox google.com"
|
||||
bindsym $mod+Shift+F4 exec --no-startup-id "firefox -new-window web.whatsapp.com"
|
||||
|
||||
# Nautilus
|
||||
bindsym $mod+F3 exec --no-startup-id nautilus
|
||||
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
|
||||
|
||||
# Telegram
|
||||
bindsym $mod+F4 exec telegram-desktop
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Window Management
|
||||
|
||||
focus_follows_mouse yes
|
||||
|
||||
# move focus arrow keys
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Right focus right
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Down focus down
|
||||
|
||||
# move focused window arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# workspace back and forth (with/without active container)
|
||||
workspace_auto_back_and_forth yes
|
||||
bindsym $mod+b workspace back_and_forth
|
||||
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
|
||||
|
||||
# split orientation
|
||||
bindsym $mod+h split h;exec notify-send 'tile horizontally'
|
||||
bindsym $mod+v split v;exec notify-send 'tile vertically'
|
||||
bindsym $mod+q split toggle
|
||||
|
||||
# toggle fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+i layout stacking
|
||||
bindsym $mod+o layout tabbed
|
||||
bindsym $mod+p layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# toggle sticky
|
||||
bindsym $mod+Shift+s sticky toggle
|
||||
|
||||
#navigate workspaces next / previous
|
||||
bindsym $mod+Ctrl+Right workspace next
|
||||
bindsym $mod+Ctrl+Left workspace prev
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Workspaces
|
||||
|
||||
# Workspace names
|
||||
# to display names or symbols instead of plain workspace numbers you can use
|
||||
# something like: set $ws1 1:mail
|
||||
# set $ws2 2:
|
||||
set $ws1 1
|
||||
set $ws2 2
|
||||
set $ws3 3
|
||||
set $ws4 4
|
||||
set $ws5 5
|
||||
set $ws6 6
|
||||
set $ws7 7
|
||||
set $ws8 8
|
||||
#set $ws9 9
|
||||
#set $ws10 10
|
||||
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+Ctrl+1 move container to workspace $ws1
|
||||
bindsym $mod+Ctrl+2 move container to workspace $ws2
|
||||
bindsym $mod+Ctrl+3 move container to workspace $ws3
|
||||
bindsym $mod+Ctrl+4 move container to workspace $ws4
|
||||
bindsym $mod+Ctrl+5 move container to workspace $ws5
|
||||
bindsym $mod+Ctrl+6 move container to workspace $ws6
|
||||
bindsym $mod+Ctrl+7 move container to workspace $ws7
|
||||
bindsym $mod+Ctrl+8 move container to workspace $ws8
|
||||
bindsym $mod+Ctrl+9 move container to workspace $ws9
|
||||
bindsym $mod+Ctrl+0 move container to workspace $ws10
|
||||
|
||||
# Move to workspace with focused container
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
|
||||
|
||||
|
||||
################################################################################################
|
||||
# App / Window specific settings
|
||||
|
||||
# Open applications on specific workspaces
|
||||
assign [class="(?i)virtualbox"] $ws10
|
||||
|
||||
# Open specific applications in floating mode
|
||||
for_window [class="Lightdm-settings"] floating enable
|
||||
for_window [class="Lxappearance"] floating enable sticky enable border normal
|
||||
for_window [class="^.*"] none
|
||||
|
||||
for_window [title="Qalculate!"] floating enable border normal
|
||||
for_window [title="Insync"] floating enable
|
||||
for_window [title="Volume Control"] floating enable
|
||||
for_window [title="xopp 2 pdf"] floating enable
|
||||
for_window [title="Microsoft Teams Notification"] floating enable
|
||||
|
||||
# switch to workspace with urgent window automatically
|
||||
for_window [urgent=latest] focus
|
||||
|
||||
# reload the configuration file
|
||||
#bindsym $mod+Shift+o reload
|
||||
bindsym $mod+Shift+o exec --no-startup-id "sh ~/.config/i3/reload_w_polybar.sh"
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+i reload
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Shutdown / Resize Menu
|
||||
|
||||
# Set shut down, restart and locking features
|
||||
bindsym $mod+Escape mode "$mode_system"
|
||||
set $mode_system | [s]hutdown , [r]eboot , [p]owersave , [h]ibernate , [l]ock , [e]xit
|
||||
mode "$mode_system" {
|
||||
bindsym s exec --no-startup-id bash ~/Userdata/Scripts/Display/glitchlock/glitchlock.sh shutdown, mode "default"
|
||||
bindsym r exec --no-startup-id bash ~/Userdata/Scripts/Display/glitchlock/glitchlock.sh reboot, mode "default"
|
||||
bindsym p exec --no-startup-id bash ~/Userdata/Scripts/Display/glitchlock/glitchlock.sh suspend, mode "default"
|
||||
bindsym h exec --no-startup-id bash ~/Userdata/Scripts/Display/glitchlock/glitchlock.sh hibernate, mode "default"
|
||||
bindsym l exec --no-startup-id bash ~/Userdata/Scripts/Display/glitchlock/glitchlock.sh lock, mode "default"
|
||||
bindsym e exec --no-startup-id bash ~/Userdata/Scripts/Display/glitchlock/glitchlock.sh logout, mode "default"
|
||||
|
||||
# exit system mode: "Enter" or "Escape"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+Escape mode "default"
|
||||
}
|
||||
|
||||
# Resize window (you can also use the mouse for that)
|
||||
bindsym $mod+r mode "| Resize "
|
||||
mode "| Resize " {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
# for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
bindsym Shift+Left resize shrink width 50 px or 50 ppt
|
||||
bindsym Shift+Down resize grow height 50 px or 50 ppt
|
||||
bindsym Shift+Up resize shrink height 50 px or 50 ppt
|
||||
bindsym Shift+Right resize grow width 50 px or 50 ppt
|
||||
|
||||
# exit resize mode: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Themes / Colors / Design / Look and Feel
|
||||
|
||||
# Colors
|
||||
# class border backgr. text indic. child_border
|
||||
client.focused #e60012 #e60012 #ffffff #e60012
|
||||
client.focused_inactive #e60012 #691f1f #ffffff #691f1f
|
||||
client.unfocused #e60012 #691f1f #ffffff #691f1f
|
||||
client.urgent #f1a800 #f1a800 #ffffff #f1a800
|
||||
client.placeholder #000000 #000000 #ffffff #000000
|
||||
|
||||
client.background #2B2C2B
|
||||
|
||||
################################################
|
||||
# i3-gaps
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 25
|
||||
gaps outer 5
|
||||
|
||||
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
|
||||
# gaps inner|outer current|all set|plus|minus <px>
|
||||
# gaps inner all set 10
|
||||
# gaps outer all plus 5
|
||||
|
||||
# Smart gaps (gaps used if only more than one container on the workspace)
|
||||
smart_gaps on
|
||||
|
||||
# Smart borders (draw borders around container only if it is not the only container on this workspace)
|
||||
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
|
||||
smart_borders on
|
||||
|
||||
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
|
||||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
bindsym $mod+Shift+g mode "$mode_gaps"
|
||||
|
||||
set $toggle_gaps Toggle gaps: (0) off / (1) on
|
||||
bindsym $mod+g mode "$toggle_gaps"
|
||||
mode "$toggle_gaps" {
|
||||
bindsym 1 mode "default", gaps inner all set 25, gaps outer all set 5
|
||||
bindsym 0 mode "default", gaps inner all set 0, gaps outer all set 0
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym plus gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
|
||||
bindsym Shift+plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym plus gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
|
||||
bindsym Shift+plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
################################################
|
||||
# i3-gaps-rounded
|
||||
|
||||
#border_radius 10
|
||||
@@ -1,22 +1,34 @@
|
||||
# i3 config file (v4)
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
# Autostart w/ i3
|
||||
#exec --no-startup-id onboard
|
||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec --no-startup-id "unclutter --timeout 5 --jitter 5 --ignore-scrolling"
|
||||
# Autostart w/ i3 #######################################################################
|
||||
|
||||
# General
|
||||
exec_always --no-startup-id fix_xcursor
|
||||
|
||||
# display
|
||||
exec --no-startup-id "nvidia-settings --load-config-only"
|
||||
exec --no-startup-id picom
|
||||
exec --no-startup-id zsh ~/.screenlayout/layout_2mon.sh
|
||||
exec --no-startup-id zsh ~/.config/polybar/launch_polybar.sh
|
||||
exec --no-startup-id zsh ~/Userdata/Scripts/restart_pulseaudio.sh
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id "rfkill unblock bluetooth"
|
||||
exec --no-startup-id blueberry-tray
|
||||
exec --no-startup-id "nitrogen --restore"
|
||||
exec --no-startup-id "fluxgui"
|
||||
#exec --no-startup-id zsh ~/Userdata/Scripts/launch_insync.sh
|
||||
exec --no-startup-id "unclutter --timeout 5 --jitter 5 --ignore-scrolling"
|
||||
|
||||
# audio
|
||||
exec --no-startup-id zsh ~/Userdata/Scripts/restart_pulseaudio.sh
|
||||
exec --no-startup-id zsh -c "pactl unload-module module-role-cork"
|
||||
|
||||
# Autostart applications
|
||||
exec_always --no-startup-id fix_xcursor
|
||||
# extra
|
||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec --no-startup-id "rfkill unblock bluetooth"
|
||||
exec --no-startup-id blueberry-tray
|
||||
#exec --no-startup-id onboard
|
||||
#exec --no-startup-id nm-applet
|
||||
#exec --no-startup-id zsh ~/Userdata/Scripts/launch_insync.sh
|
||||
exec --no-startup-id "nextcloud"
|
||||
|
||||
|
||||
################################################################################################
|
||||
# General Hotkeys
|
||||
|
||||
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
|
||||
set $mod Mod4
|
||||
@@ -25,82 +37,103 @@ set $mod Mod4
|
||||
# workspace_layout tabbed <stacking|tabbed>
|
||||
|
||||
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||||
new_window pixel 2
|
||||
new_float normal
|
||||
default_border pixel 2
|
||||
for_window [class="^.*"] border pixel 2
|
||||
new_window none
|
||||
new_float none
|
||||
default_border none
|
||||
|
||||
# Hide borders
|
||||
#hide_edge_borders none
|
||||
|
||||
# Screenshot
|
||||
bindsym Print exec --no-startup-id gnome-screenshot
|
||||
bindsym $mod+Print exec --no-startup-id gnome-screenshot -a
|
||||
bindsym $mod+Shift+Print exec --no-startup-id gnome-screenshot -i
|
||||
|
||||
# change borders
|
||||
# Change Borders
|
||||
bindsym $mod+u border none
|
||||
bindsym $mod+y border pixel 2
|
||||
bindsym $mod+n border normal
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
# Font for window titles
|
||||
font xft:Roboto Mono 11
|
||||
|
||||
# Use Mouse+$mod to drag floating windows
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
|
||||
# kill focused window
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start program launcher
|
||||
#bindsym $mod+d exec --no-startup-id dmenu_recency
|
||||
bindsym Control+Shift+Escape exec --no-startup-id "urxvt -e sh -c 'htop'"
|
||||
bindsym Control+Mod1+Tab exec --no-startup-id "rofi -show drun -show-icons -icon-theme Adwaita -drun-display-format {name} -sort -sort-method fzf"
|
||||
bindsym $mod+d exec --no-startup-id "rofi -show drun -show-icons -icon-theme Adwaita -drun-display-format {name} -sort -sort-method fzf"
|
||||
bindsym $mod+Shift+d exec --no-startup-id "quicklaunch"
|
||||
#bindsym Super_L exec --no-startup-id "quicklaunch"
|
||||
# Terminal
|
||||
bindsym $mod+Return exec --no-startup-id alacritty
|
||||
|
||||
# System Monitor
|
||||
bindsym Control+Shift+Escape exec --no-startup-id "alacritty -e sh -c 'htop'"
|
||||
|
||||
|
||||
################################################################################################
|
||||
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
|
||||
# Program Launchers
|
||||
|
||||
# rofi
|
||||
bindsym $mod+d exec --no-startup-id "rofi -show drun -show-icons -icon-theme Adwaita -drun-display-format {name} -sort -sort-method fzf"
|
||||
bindsym $mod+Tab exec --no-startup-id "rofi -show window -show-icons -icon-theme Adwaita -drun-display-format {name} -sort -sort-method fzf"
|
||||
|
||||
# dmenu
|
||||
#bindsym $mod+d exec --no-startup-id dmenu_recency
|
||||
|
||||
################################################################################################
|
||||
# Music
|
||||
|
||||
bindsym $mod+slash exec --no-startup-id "playerctl play-pause"
|
||||
bindsym $mod+period exec --no-startup-id "playerctl next"
|
||||
bindsym $mod+comma exec --no-startup-id "playerctl previous"
|
||||
|
||||
exec --no-startup-id pulseaudio
|
||||
#exec --no-startup-id pa-applet
|
||||
bindsym $mod+Ctrl+m exec pavucontrol
|
||||
|
||||
################################################################################################
|
||||
bindsym $mod+Ctrl+m exec --no-startup-id pavucontrol
|
||||
|
||||
# Pulse Audio controls
|
||||
# run amixer sset Master on
|
||||
# https://askubuntu.com/questions/823669/volume-sound-and-screen-brightness-controls-not-working
|
||||
bindsym XF86AudioMute exec "amixer sset 'Master' toggle;"
|
||||
bindsym XF86AudioLowerVolume exec "amixer sset 'Master' 5%-;"
|
||||
bindsym XF86AudioRaiseVolume exec "amixer sset 'Master' 5%+;"
|
||||
|
||||
# Screen brightness controls
|
||||
|
||||
################################################################################################
|
||||
# Screen
|
||||
|
||||
# Hide / Unhide statusbar
|
||||
bindsym $mod+m exec --no-startup-id polybar-msg cmd toggle
|
||||
|
||||
bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
|
||||
bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
|
||||
|
||||
# Start Applications
|
||||
bindsym $mod+F2 exec firefox
|
||||
bindsym $mod+Shift+F2 exec "firefox google.com"
|
||||
bindsym $mod+F3 exec nautilus
|
||||
|
||||
################################################################################################
|
||||
# Applications
|
||||
|
||||
# Screenshot [fullscreen, select area, select area with 3 second delay]
|
||||
bindsym Print exec --no-startup-id "flameshot gui"
|
||||
bindsym $mod+Print exec --no-startup-id "flameshot full"
|
||||
#bindsym $mod+Shift+Print exec --no-startup-id deepin-screenshot -d 3 -s /home/sim/Pictures/Screenshots
|
||||
|
||||
# Firefox
|
||||
bindsym $mod+F2 exec --no-startup-id firefox
|
||||
bindsym $mod+Shift+F2 exec --no-startup-id "firefox google.com"
|
||||
bindsym $mod+Shift+F4 exec --no-startup-id "firefox -new-window web.whatsapp.com"
|
||||
|
||||
# Nautilus
|
||||
bindsym $mod+F3 exec --no-startup-id nautilus
|
||||
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
|
||||
bindsym $mod+F4 exec telegram-desktop
|
||||
bindsym $mod+Shift+F4 exec "firefox -new-window web.whatsapp.com"
|
||||
bindsym $mod+F5 exec "firefox -new-window borys.webuntis.com/WebUntis/?school=htl-salzburg#/basic/timetable"
|
||||
|
||||
# Telegram
|
||||
bindsym $mod+F4 exec --no-startup-id telegram-desktop
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Window Management
|
||||
|
||||
focus_follows_mouse yes
|
||||
|
||||
# move focus arrow keys
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Down focus down
|
||||
|
||||
# move focused window arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
@@ -139,6 +172,10 @@ bindsym $mod+Shift+s sticky toggle
|
||||
bindsym $mod+Ctrl+Right workspace next
|
||||
bindsym $mod+Ctrl+Left workspace prev
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Workspaces
|
||||
|
||||
# Workspace names
|
||||
# to display names or symbols instead of plain workspace numbers you can use
|
||||
# something like: set $ws1 1:mail
|
||||
@@ -151,7 +188,9 @@ set $ws5 5
|
||||
set $ws6 6
|
||||
set $ws7 7
|
||||
set $ws8 8
|
||||
set $ws9 9
|
||||
#set $ws9 9
|
||||
#set $ws10 10
|
||||
set $ws9 9:
|
||||
set $ws10 10:
|
||||
|
||||
# switch to workspace
|
||||
@@ -190,26 +229,43 @@ bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
|
||||
|
||||
|
||||
################################################################################################
|
||||
# App / Window specific settings
|
||||
|
||||
# Open applications on specific workspaces
|
||||
assign [class="(?i)virtualbox"] $ws10
|
||||
for_window [class="Spotify"] move --no-auto-back-and-forth to workspace $ws9
|
||||
|
||||
assign [class="Virt-manager"] $ws10
|
||||
assign [title="WhatsApp*"] $ws9
|
||||
assign [title="Telegram*"] $ws9
|
||||
assign [title="TeamSpeak*"] $ws9
|
||||
|
||||
|
||||
# Open specific applications in floating mode
|
||||
for_window [class="Lightdm-settings"] floating enable
|
||||
for_window [class="Lxappearance"] floating enable sticky enable border normal
|
||||
for_window [title="h45_Quicklaunch"] floating enable border normal
|
||||
for_window [class="^.*"] none
|
||||
|
||||
for_window [title="Qalculate!"] floating enable border normal
|
||||
for_window [title="Insync"] floating enable
|
||||
for_window [title="Volume Control"] floating enable
|
||||
for_window [title="xopp 2 pdf"] floating enable
|
||||
for_window [title="Microsoft Teams Notification"] floating enable
|
||||
|
||||
# switch to workspace with urgent window automatically
|
||||
for_window [urgent=latest] focus
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+o reload
|
||||
#bindsym $mod+Shift+o reload
|
||||
bindsym $mod+Shift+o exec --no-startup-id "sh ~/.config/i3/reload_i3_w_polybar.sh"
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+i restart
|
||||
bindsym $mod+Shift+i reload
|
||||
|
||||
|
||||
################################################################################################
|
||||
# Shutdown / Resize Menu
|
||||
|
||||
# Set shut down, restart and locking features
|
||||
bindsym $mod+Escape mode "$mode_system"
|
||||
@@ -248,26 +304,26 @@ mode "| Resize " {
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
# hide/unhide i3status bar
|
||||
bindsym $mod+m exec --no-startup-id polybar-msg cmd toggle
|
||||
|
||||
# Theme colors
|
||||
# class border backgr. text indic. child_border
|
||||
client.focused #005c96 #005c96 #80FFF9 #FDF6E3
|
||||
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
|
||||
client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948
|
||||
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||
################################################################################################
|
||||
# Themes / Colors / Design / Look and Feel
|
||||
|
||||
# Colors
|
||||
# class border backgr. text indic. child_border
|
||||
client.focused #0086e6 #0086e6 #ffffff #0086e6
|
||||
client.focused_inactive #0086e6 #1f4a69 #ffffff #1f4a69
|
||||
client.unfocused #0086e6 #1f4a69 #ffffff #1f4a69
|
||||
client.urgent #32cdf0 #32cdf0 #ffffff #32cdf0
|
||||
client.placeholder #000000 #000000 #ffffff #000000
|
||||
|
||||
client.background #2B2C2B
|
||||
|
||||
#############################
|
||||
### settings for i3-gaps: ###
|
||||
#############################
|
||||
################################################
|
||||
# i3-gaps
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 5
|
||||
gaps outer 0
|
||||
gaps inner 25
|
||||
gaps outer 5
|
||||
|
||||
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
|
||||
# gaps inner|outer current|all set|plus|minus <px>
|
||||
@@ -287,6 +343,15 @@ set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
bindsym $mod+Shift+g mode "$mode_gaps"
|
||||
|
||||
set $toggle_gaps Toggle gaps: (0) off / (1) on
|
||||
bindsym $mod+g mode "$toggle_gaps"
|
||||
mode "$toggle_gaps" {
|
||||
bindsym 1 mode "default", gaps inner all set 25, gaps outer all set 5
|
||||
bindsym 0 mode "default", gaps inner all set 0, gaps outer all set 0
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
@@ -317,3 +382,8 @@ mode "$mode_gaps_outer" {
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
################################################
|
||||
# i3-gaps-rounded
|
||||
|
||||
#border_radius 10
|
||||
@@ -26,7 +26,7 @@ print_info() {
|
||||
# info "CPU Usage" cpu_usage
|
||||
# info "Disk" disk
|
||||
# info "Battery" battery
|
||||
info "Font" font
|
||||
# info "Font" font
|
||||
# info "Song" song
|
||||
# [[ "$player" ]] && prin "Music Player" "$player"
|
||||
# info "Local IP" local_ip
|
||||
@@ -37,6 +37,16 @@ print_info() {
|
||||
info cols
|
||||
}
|
||||
|
||||
# Title
|
||||
|
||||
|
||||
# Hide/Show Fully qualified domain name.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --title_fqdn
|
||||
title_fqdn="off"
|
||||
|
||||
|
||||
# Kernel
|
||||
|
||||
@@ -291,7 +301,7 @@ refresh_rate="off"
|
||||
# Example:
|
||||
# on: 'Numix, Adwaita'
|
||||
# off: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
gtk_shorthand="on"
|
||||
gtk_shorthand="off"
|
||||
|
||||
|
||||
# Enable/Disable gtk2 Theme / Icons / Font
|
||||
@@ -335,6 +345,17 @@ public_ip_host="http://ident.me"
|
||||
public_ip_timeout=2
|
||||
|
||||
|
||||
# Desktop Environment
|
||||
|
||||
|
||||
# Show Desktop Environment version
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --de_version
|
||||
de_version="off"
|
||||
|
||||
|
||||
# Disk
|
||||
|
||||
|
||||
@@ -360,7 +381,7 @@ disk_show=('/')
|
||||
# What to append to the Disk subtitle.
|
||||
#
|
||||
# Default: 'mount'
|
||||
# Values: 'mount', 'name', 'dir'
|
||||
# Values: 'mount', 'name', 'dir', 'none'
|
||||
# Flag: --disk_subtitle
|
||||
#
|
||||
# Example:
|
||||
@@ -374,8 +395,24 @@ disk_show=('/')
|
||||
# dir: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (Videos): 74G / 118G (66%)'
|
||||
#
|
||||
# none: 'Disk: 74G / 118G (66%)'
|
||||
# 'Disk: 74G / 118G (66%)'
|
||||
# 'Disk: 74G / 118G (66%)'
|
||||
disk_subtitle="mount"
|
||||
|
||||
# Disk percent.
|
||||
# Show/Hide disk percent.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --disk_percent
|
||||
#
|
||||
# Example:
|
||||
# on: 'Disk (/): 74G / 118G (66%)'
|
||||
# off: 'Disk (/): 74G / 118G'
|
||||
disk_percent="on"
|
||||
|
||||
|
||||
# Song
|
||||
|
||||
@@ -403,12 +440,14 @@ disk_subtitle="mount"
|
||||
# gmusicbrowser
|
||||
# gogglesmm
|
||||
# guayadeque
|
||||
# io.elementary.music
|
||||
# iTunes
|
||||
# juk
|
||||
# lollypop
|
||||
# mocp
|
||||
# mopidy
|
||||
# mpd
|
||||
# muine
|
||||
# netease-cloud-music
|
||||
# pogo
|
||||
# pragha
|
||||
@@ -552,6 +591,19 @@ block_width=3
|
||||
# Flag: --block_height
|
||||
block_height=1
|
||||
|
||||
# Color Alignment
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'num'
|
||||
# Flag: --col_offset
|
||||
#
|
||||
# Number specifies how far from the left side of the terminal (in spaces) to
|
||||
# begin printing the columns, in case you want to e.g. center them under your
|
||||
# text.
|
||||
# Example:
|
||||
# col_offset="auto" - Default behavior of neofetch
|
||||
# col_offset=7 - Leave 7 spaces then print the colors
|
||||
col_offset="auto"
|
||||
|
||||
# Progress Bars
|
||||
|
||||
@@ -653,13 +705,46 @@ image_source="auto"
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'distro_name'
|
||||
# Flag: --ascii_distro
|
||||
#
|
||||
# NOTE: Arch and Ubuntu have 'old' logo variants.
|
||||
# Change this to 'arch_old' or 'ubuntu_old' to use the old logos.
|
||||
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, AOSC,
|
||||
# Apricity, ArcoLinux, ArchBox, ARCHlabs, ArchStrike,
|
||||
# XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, Bitrig,
|
||||
# BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
|
||||
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
|
||||
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
|
||||
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
|
||||
# DesaOS, Devuan, DracOS, DragonFly, Drauger, Elementary,
|
||||
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
|
||||
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Gentoo, Pentoo,
|
||||
# gNewSense, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
|
||||
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
|
||||
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
|
||||
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
|
||||
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
|
||||
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
|
||||
# NuTyX, OBRevenge, OpenBSD, OpenIndiana, OpenMandriva,
|
||||
# OpenWrt, osmc, Oracle, PacBSD, Parabola, Pardus, Parrot,
|
||||
# Parsix, TrueOS, PCLinuxOS, Peppermint, popos, Porteus,
|
||||
# PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, Raspbian,
|
||||
# Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, Regata,
|
||||
# Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor,
|
||||
# SharkLinux, Siduction, Slackware, SliTaz, SmartOS, Solus,
|
||||
# Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap,
|
||||
# openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel,
|
||||
# Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, Ubuntu,
|
||||
# Void, Obarun, windows10, Windows7, Xubuntu, Zorin, and IRIX
|
||||
# have ascii logos
|
||||
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
|
||||
# Use '{distro name}_old' to use the old logos.
|
||||
# NOTE: Ubuntu has flavor variants.
|
||||
# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
|
||||
# NOTE: Arch, Crux and Gentoo have a smaller logo variant.
|
||||
# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos.
|
||||
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
|
||||
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
|
||||
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
|
||||
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
|
||||
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
|
||||
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
|
||||
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
|
||||
# postmarketOS, and Void have a smaller logo variant.
|
||||
# Use '{distro name}_small' to use the small variants.
|
||||
ascii_distro="auto"
|
||||
|
||||
# Ascii Colors
|
||||
|
||||
228
.config/picom.conf##class.blue
Normal file
228
.config/picom.conf##class.blue
Normal file
@@ -0,0 +1,228 @@
|
||||
# Thank you code_nomad: http://9m.no/ꪯ鵞
|
||||
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
|
||||
|
||||
#################################
|
||||
#
|
||||
# Backend
|
||||
#
|
||||
#################################
|
||||
|
||||
# Backend to use: "xrender" or "glx".
|
||||
# GLX backend is typically much faster but depends on a sane driver.
|
||||
backend = "glx";
|
||||
|
||||
#################################
|
||||
#
|
||||
# GLX backend
|
||||
#
|
||||
#################################
|
||||
|
||||
glx-no-stencil = true;
|
||||
|
||||
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
|
||||
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
|
||||
# but a 20% increase when only 1/4 is.
|
||||
# My tests on nouveau show terrible slowdown.
|
||||
glx-copy-from-front = false;
|
||||
|
||||
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
|
||||
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
|
||||
# May break VSync and is not available on some drivers.
|
||||
# Overrides --glx-copy-from-front.
|
||||
# glx-use-copysubbuffermesa = true;
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
|
||||
# Recommended if it works.
|
||||
# glx-no-rebind-pixmap = true;
|
||||
|
||||
# GLX backend: GLX buffer swap method we assume.
|
||||
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
|
||||
# undefined is the slowest and the safest, and the default value.
|
||||
# copy is fastest, but may fail on some drivers,
|
||||
# 2-6 are gradually slower but safer (6 is still faster than 0).
|
||||
# Usually, double buffer means 2, triple buffer means 3.
|
||||
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
|
||||
# Useless with --glx-use-copysubbuffermesa.
|
||||
# Partially breaks --resize-damage.
|
||||
# Defaults to undefined.
|
||||
#glx-swap-method = "undefined";
|
||||
|
||||
#################################
|
||||
#
|
||||
# Shadows
|
||||
#
|
||||
#################################
|
||||
|
||||
# Enabled client-side shadows on windows.
|
||||
shadow = true;
|
||||
# The blur radius for shadows. (default 12)
|
||||
shadow-radius = 5;
|
||||
# The left offset for shadows. (default -15)
|
||||
shadow-offset-x = -5;
|
||||
# The top offset for shadows. (default -15)
|
||||
shadow-offset-y = -5;
|
||||
# The translucency for shadows. (default .75)
|
||||
shadow-opacity = 0.5;
|
||||
|
||||
# Set if you want different colour shadows
|
||||
shadow-red = 0.1;
|
||||
shadow-green = 0.1;
|
||||
shadow-blue = 0.3;
|
||||
|
||||
# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
|
||||
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
|
||||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
|
||||
shadow-exclude = [
|
||||
"! name~=''",
|
||||
"name *= 'polybar'",
|
||||
"name = 'Notification'",
|
||||
"name = 'Plank'",
|
||||
"name = 'Docky'",
|
||||
"name = 'Kupfer'",
|
||||
"name = 'xfce4-notifyd'",
|
||||
"name *= 'VLC'",
|
||||
"name *= 'compton'",
|
||||
"name *= 'picom'",
|
||||
"name *= 'Chromium'",
|
||||
"name *= 'Chrome'",
|
||||
"class_g = 'Firefox' && argb",
|
||||
"class_g = 'Conky'",
|
||||
"class_g = 'Kupfer'",
|
||||
"class_g = 'Synapse'",
|
||||
"name = 'notify-osd'",
|
||||
"class_g ?= 'Cairo-dock'",
|
||||
"class_g ?= 'Xfce4-notifyd'",
|
||||
"class_g ?= 'Xfce4-power-manager'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
];
|
||||
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
|
||||
shadow-ignore-shaped = false;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Opacity
|
||||
#
|
||||
#################################
|
||||
|
||||
inactive-opacity = 1;
|
||||
active-opacity = 1;
|
||||
frame-opacity = 1;
|
||||
inactive-opacity-override = false;
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0)
|
||||
inactive-dim = 0.1;
|
||||
# Do not let dimness adjust based on window opacity.
|
||||
# inactive-dim-fixed = true;
|
||||
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
||||
blur-background = true;
|
||||
# Blur background of opaque windows with transparent frames as well.
|
||||
# blur-background-frame = true;
|
||||
# Do not let blur radius adjust based on window opacity.
|
||||
blur-background-fixed = false;
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'"
|
||||
];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Fading
|
||||
#
|
||||
#################################
|
||||
|
||||
# Fade windows during opacity changes.
|
||||
fading = true;
|
||||
# The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-delta = 4;
|
||||
# Opacity change between steps while fading in. (default 0.028).
|
||||
fade-in-step = 0.03;
|
||||
# Opacity change between steps while fading out. (default 0.03).
|
||||
fade-out-step = 0.03;
|
||||
# Fade windows in/out when opening/closing
|
||||
# no-fading-openclose = true;
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
fade-exclude = [ ];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Other
|
||||
#
|
||||
#################################
|
||||
|
||||
# Try to detect WM windows and mark them as active.
|
||||
mark-wmwin-focused = true;
|
||||
# Mark all non-WM but override-redirect windows active (e.g. menus).
|
||||
mark-ovredir-focused = true;
|
||||
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
|
||||
# Usually more reliable but depends on a EWMH-compliant WM.
|
||||
use-ewmh-active-win = true;
|
||||
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
|
||||
# This prevents opacity being ignored for some apps.
|
||||
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Specify refresh rate of the screen.
|
||||
# If not specified or 0, picom will try detecting this with X RandR extension.
|
||||
refresh-rate = 0;
|
||||
|
||||
# Vertical synchronization: match the refresh rate of the monitor
|
||||
vsync = false;
|
||||
|
||||
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
|
||||
# Reported to have no effect, though.
|
||||
dbe = false;
|
||||
|
||||
# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
|
||||
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
|
||||
# unless you wish to specify a lower refresh rate than the actual value.
|
||||
#sw-opti = true;
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
|
||||
# Known to cause flickering when redirecting/unredirecting windows.
|
||||
unredir-if-possible = false;
|
||||
|
||||
# Specify a list of conditions of windows that should always be considered focused.
|
||||
focus-exclude = [ ];
|
||||
|
||||
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
|
||||
detect-transient = true;
|
||||
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
|
||||
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
|
||||
detect-client-leader = true;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Window type settings
|
||||
#
|
||||
#################################
|
||||
|
||||
wintypes:
|
||||
{
|
||||
tooltip =
|
||||
{
|
||||
# fade: Fade the particular type of windows.
|
||||
fade = true;
|
||||
# shadow: Give those windows shadow
|
||||
shadow = false;
|
||||
# opacity: Default opacity for the type of windows.
|
||||
opacity = 0.85;
|
||||
# focus: Whether to always consider windows of this type focused.
|
||||
focus = true;
|
||||
};
|
||||
};
|
||||
|
||||
######################
|
||||
#
|
||||
# XSync
|
||||
# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
|
||||
#
|
||||
######################
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
|
||||
xrender-sync-fence = true;
|
||||
228
.config/picom.conf##class.red
Normal file
228
.config/picom.conf##class.red
Normal file
@@ -0,0 +1,228 @@
|
||||
# Thank you code_nomad: http://9m.no/ꪯ鵞
|
||||
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
|
||||
|
||||
#################################
|
||||
#
|
||||
# Backend
|
||||
#
|
||||
#################################
|
||||
|
||||
# Backend to use: "xrender" or "glx".
|
||||
# GLX backend is typically much faster but depends on a sane driver.
|
||||
backend = "glx";
|
||||
|
||||
#################################
|
||||
#
|
||||
# GLX backend
|
||||
#
|
||||
#################################
|
||||
|
||||
glx-no-stencil = true;
|
||||
|
||||
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
|
||||
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
|
||||
# but a 20% increase when only 1/4 is.
|
||||
# My tests on nouveau show terrible slowdown.
|
||||
glx-copy-from-front = false;
|
||||
|
||||
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
|
||||
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
|
||||
# May break VSync and is not available on some drivers.
|
||||
# Overrides --glx-copy-from-front.
|
||||
# glx-use-copysubbuffermesa = true;
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
|
||||
# Recommended if it works.
|
||||
# glx-no-rebind-pixmap = true;
|
||||
|
||||
# GLX backend: GLX buffer swap method we assume.
|
||||
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
|
||||
# undefined is the slowest and the safest, and the default value.
|
||||
# copy is fastest, but may fail on some drivers,
|
||||
# 2-6 are gradually slower but safer (6 is still faster than 0).
|
||||
# Usually, double buffer means 2, triple buffer means 3.
|
||||
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
|
||||
# Useless with --glx-use-copysubbuffermesa.
|
||||
# Partially breaks --resize-damage.
|
||||
# Defaults to undefined.
|
||||
#glx-swap-method = "undefined";
|
||||
|
||||
#################################
|
||||
#
|
||||
# Shadows
|
||||
#
|
||||
#################################
|
||||
|
||||
# Enabled client-side shadows on windows.
|
||||
shadow = true;
|
||||
# The blur radius for shadows. (default 12)
|
||||
shadow-radius = 5;
|
||||
# The left offset for shadows. (default -15)
|
||||
shadow-offset-x = -5;
|
||||
# The top offset for shadows. (default -15)
|
||||
shadow-offset-y = -5;
|
||||
# The translucency for shadows. (default .75)
|
||||
shadow-opacity = 0.5;
|
||||
|
||||
# Set if you want different colour shadows
|
||||
shadow-red = 0.3;
|
||||
shadow-green = 0.1;
|
||||
shadow-blue = 0.1;
|
||||
|
||||
# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
|
||||
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
|
||||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
|
||||
shadow-exclude = [
|
||||
"! name~=''",
|
||||
"name *= 'polybar'",
|
||||
"name = 'Notification'",
|
||||
"name = 'Plank'",
|
||||
"name = 'Docky'",
|
||||
"name = 'Kupfer'",
|
||||
"name = 'xfce4-notifyd'",
|
||||
"name *= 'VLC'",
|
||||
"name *= 'compton'",
|
||||
"name *= 'picom'",
|
||||
"name *= 'Chromium'",
|
||||
"name *= 'Chrome'",
|
||||
"class_g = 'Firefox' && argb",
|
||||
"class_g = 'Conky'",
|
||||
"class_g = 'Kupfer'",
|
||||
"class_g = 'Synapse'",
|
||||
"name = 'notify-osd'",
|
||||
"class_g ?= 'Cairo-dock'",
|
||||
"class_g ?= 'Xfce4-notifyd'",
|
||||
"class_g ?= 'Xfce4-power-manager'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
];
|
||||
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
|
||||
shadow-ignore-shaped = false;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Opacity
|
||||
#
|
||||
#################################
|
||||
|
||||
inactive-opacity = 1;
|
||||
active-opacity = 1;
|
||||
frame-opacity = 1;
|
||||
inactive-opacity-override = false;
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0)
|
||||
inactive-dim = 0.1;
|
||||
# Do not let dimness adjust based on window opacity.
|
||||
# inactive-dim-fixed = true;
|
||||
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
||||
blur-background = true;
|
||||
# Blur background of opaque windows with transparent frames as well.
|
||||
# blur-background-frame = true;
|
||||
# Do not let blur radius adjust based on window opacity.
|
||||
blur-background-fixed = false;
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'"
|
||||
];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Fading
|
||||
#
|
||||
#################################
|
||||
|
||||
# Fade windows during opacity changes.
|
||||
fading = true;
|
||||
# The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-delta = 4;
|
||||
# Opacity change between steps while fading in. (default 0.028).
|
||||
fade-in-step = 0.03;
|
||||
# Opacity change between steps while fading out. (default 0.03).
|
||||
fade-out-step = 0.03;
|
||||
# Fade windows in/out when opening/closing
|
||||
# no-fading-openclose = true;
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
fade-exclude = [ ];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Other
|
||||
#
|
||||
#################################
|
||||
|
||||
# Try to detect WM windows and mark them as active.
|
||||
mark-wmwin-focused = true;
|
||||
# Mark all non-WM but override-redirect windows active (e.g. menus).
|
||||
mark-ovredir-focused = true;
|
||||
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
|
||||
# Usually more reliable but depends on a EWMH-compliant WM.
|
||||
use-ewmh-active-win = true;
|
||||
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
|
||||
# This prevents opacity being ignored for some apps.
|
||||
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Specify refresh rate of the screen.
|
||||
# If not specified or 0, picom will try detecting this with X RandR extension.
|
||||
refresh-rate = 0;
|
||||
|
||||
# Vertical synchronization: match the refresh rate of the monitor
|
||||
vsync = false;
|
||||
|
||||
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
|
||||
# Reported to have no effect, though.
|
||||
dbe = false;
|
||||
|
||||
# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
|
||||
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
|
||||
# unless you wish to specify a lower refresh rate than the actual value.
|
||||
#sw-opti = true;
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
|
||||
# Known to cause flickering when redirecting/unredirecting windows.
|
||||
unredir-if-possible = false;
|
||||
|
||||
# Specify a list of conditions of windows that should always be considered focused.
|
||||
focus-exclude = [ ];
|
||||
|
||||
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
|
||||
detect-transient = true;
|
||||
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
|
||||
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
|
||||
detect-client-leader = true;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Window type settings
|
||||
#
|
||||
#################################
|
||||
|
||||
wintypes:
|
||||
{
|
||||
tooltip =
|
||||
{
|
||||
# fade: Fade the particular type of windows.
|
||||
fade = true;
|
||||
# shadow: Give those windows shadow
|
||||
shadow = false;
|
||||
# opacity: Default opacity for the type of windows.
|
||||
opacity = 0.85;
|
||||
# focus: Whether to always consider windows of this type focused.
|
||||
focus = true;
|
||||
};
|
||||
};
|
||||
|
||||
######################
|
||||
#
|
||||
# XSync
|
||||
# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
|
||||
#
|
||||
######################
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
|
||||
xrender-sync-fence = true;
|
||||
228
.config/picom.conf##default
Normal file
228
.config/picom.conf##default
Normal file
@@ -0,0 +1,228 @@
|
||||
# Thank you code_nomad: http://9m.no/ꪯ鵞
|
||||
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
|
||||
|
||||
#################################
|
||||
#
|
||||
# Backend
|
||||
#
|
||||
#################################
|
||||
|
||||
# Backend to use: "xrender" or "glx".
|
||||
# GLX backend is typically much faster but depends on a sane driver.
|
||||
backend = "glx";
|
||||
|
||||
#################################
|
||||
#
|
||||
# GLX backend
|
||||
#
|
||||
#################################
|
||||
|
||||
glx-no-stencil = true;
|
||||
|
||||
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
|
||||
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
|
||||
# but a 20% increase when only 1/4 is.
|
||||
# My tests on nouveau show terrible slowdown.
|
||||
glx-copy-from-front = false;
|
||||
|
||||
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
|
||||
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
|
||||
# May break VSync and is not available on some drivers.
|
||||
# Overrides --glx-copy-from-front.
|
||||
# glx-use-copysubbuffermesa = true;
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
|
||||
# Recommended if it works.
|
||||
# glx-no-rebind-pixmap = true;
|
||||
|
||||
# GLX backend: GLX buffer swap method we assume.
|
||||
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
|
||||
# undefined is the slowest and the safest, and the default value.
|
||||
# copy is fastest, but may fail on some drivers,
|
||||
# 2-6 are gradually slower but safer (6 is still faster than 0).
|
||||
# Usually, double buffer means 2, triple buffer means 3.
|
||||
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
|
||||
# Useless with --glx-use-copysubbuffermesa.
|
||||
# Partially breaks --resize-damage.
|
||||
# Defaults to undefined.
|
||||
#glx-swap-method = "undefined";
|
||||
|
||||
#################################
|
||||
#
|
||||
# Shadows
|
||||
#
|
||||
#################################
|
||||
|
||||
# Enabled client-side shadows on windows.
|
||||
shadow = true;
|
||||
# The blur radius for shadows. (default 12)
|
||||
shadow-radius = 5;
|
||||
# The left offset for shadows. (default -15)
|
||||
shadow-offset-x = -5;
|
||||
# The top offset for shadows. (default -15)
|
||||
shadow-offset-y = -5;
|
||||
# The translucency for shadows. (default .75)
|
||||
shadow-opacity = 0.5;
|
||||
|
||||
# Set if you want different colour shadows
|
||||
#shadow-red = 0.0;
|
||||
#shadow-green = 0.0;
|
||||
#shadow-blue = 0.0;
|
||||
|
||||
# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
|
||||
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
|
||||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
|
||||
shadow-exclude = [
|
||||
"! name~=''",
|
||||
"name *= 'polybar'",
|
||||
"name = 'Notification'",
|
||||
"name = 'Plank'",
|
||||
"name = 'Docky'",
|
||||
"name = 'Kupfer'",
|
||||
"name = 'xfce4-notifyd'",
|
||||
"name *= 'VLC'",
|
||||
"name *= 'compton'",
|
||||
"name *= 'picom'",
|
||||
"name *= 'Chromium'",
|
||||
"name *= 'Chrome'",
|
||||
"class_g = 'Firefox' && argb",
|
||||
"class_g = 'Conky'",
|
||||
"class_g = 'Kupfer'",
|
||||
"class_g = 'Synapse'",
|
||||
"name = 'notify-osd'",
|
||||
"class_g ?= 'Cairo-dock'",
|
||||
"class_g ?= 'Xfce4-notifyd'",
|
||||
"class_g ?= 'Xfce4-power-manager'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
];
|
||||
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
|
||||
shadow-ignore-shaped = false;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Opacity
|
||||
#
|
||||
#################################
|
||||
|
||||
inactive-opacity = 1;
|
||||
active-opacity = 1;
|
||||
frame-opacity = 1;
|
||||
inactive-opacity-override = false;
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0)
|
||||
inactive-dim = 0.1;
|
||||
# Do not let dimness adjust based on window opacity.
|
||||
# inactive-dim-fixed = true;
|
||||
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
||||
blur-background = true;
|
||||
# Blur background of opaque windows with transparent frames as well.
|
||||
# blur-background-frame = true;
|
||||
# Do not let blur radius adjust based on window opacity.
|
||||
blur-background-fixed = false;
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'"
|
||||
];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Fading
|
||||
#
|
||||
#################################
|
||||
|
||||
# Fade windows during opacity changes.
|
||||
fading = true;
|
||||
# The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-delta = 4;
|
||||
# Opacity change between steps while fading in. (default 0.028).
|
||||
fade-in-step = 0.03;
|
||||
# Opacity change between steps while fading out. (default 0.03).
|
||||
fade-out-step = 0.03;
|
||||
# Fade windows in/out when opening/closing
|
||||
# no-fading-openclose = true;
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
fade-exclude = [ ];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Other
|
||||
#
|
||||
#################################
|
||||
|
||||
# Try to detect WM windows and mark them as active.
|
||||
mark-wmwin-focused = true;
|
||||
# Mark all non-WM but override-redirect windows active (e.g. menus).
|
||||
mark-ovredir-focused = true;
|
||||
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
|
||||
# Usually more reliable but depends on a EWMH-compliant WM.
|
||||
use-ewmh-active-win = true;
|
||||
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
|
||||
# This prevents opacity being ignored for some apps.
|
||||
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Specify refresh rate of the screen.
|
||||
# If not specified or 0, picom will try detecting this with X RandR extension.
|
||||
refresh-rate = 0;
|
||||
|
||||
# Vertical synchronization: match the refresh rate of the monitor
|
||||
vsync = false;
|
||||
|
||||
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
|
||||
# Reported to have no effect, though.
|
||||
dbe = false;
|
||||
|
||||
# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
|
||||
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
|
||||
# unless you wish to specify a lower refresh rate than the actual value.
|
||||
#sw-opti = true;
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
|
||||
# Known to cause flickering when redirecting/unredirecting windows.
|
||||
unredir-if-possible = false;
|
||||
|
||||
# Specify a list of conditions of windows that should always be considered focused.
|
||||
focus-exclude = [ ];
|
||||
|
||||
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
|
||||
detect-transient = true;
|
||||
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
|
||||
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
|
||||
detect-client-leader = true;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Window type settings
|
||||
#
|
||||
#################################
|
||||
|
||||
wintypes:
|
||||
{
|
||||
tooltip =
|
||||
{
|
||||
# fade: Fade the particular type of windows.
|
||||
fade = true;
|
||||
# shadow: Give those windows shadow
|
||||
shadow = false;
|
||||
# opacity: Default opacity for the type of windows.
|
||||
opacity = 0.85;
|
||||
# focus: Whether to always consider windows of this type focused.
|
||||
focus = true;
|
||||
};
|
||||
};
|
||||
|
||||
######################
|
||||
#
|
||||
# XSync
|
||||
# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
|
||||
#
|
||||
######################
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
|
||||
xrender-sync-fence = true;
|
||||
524
.config/polybar/config##default
Normal file
524
.config/polybar/config##default
Normal file
@@ -0,0 +1,524 @@
|
||||
;=====================================================
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/jaagr/polybar
|
||||
;
|
||||
; The README contains alot of information
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[colors]
|
||||
background = #af000000
|
||||
foreground = #fff
|
||||
foreground-alt = #555
|
||||
|
||||
[bar/main]
|
||||
modules-left = disk update ovpn nvpn eth
|
||||
modules-center = i3
|
||||
modules-right = cpu nvgpu memory date
|
||||
|
||||
monitor = ${env:MONITOR:DP-0}
|
||||
width = 100%
|
||||
height = 18
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=10:antialias=true;0
|
||||
tray-position = left
|
||||
tray-padding = 9
|
||||
tray-detached = false
|
||||
tray-maxsize = 15
|
||||
tray-background = ${root.background}
|
||||
tray-scale = 1.0
|
||||
enable-ipc = true
|
||||
|
||||
[bar/second]
|
||||
modules-left =
|
||||
modules-center = i3
|
||||
modules-right = date
|
||||
|
||||
monitor = ${env:MONITOR:HDMI-0}
|
||||
width = 100%
|
||||
height = 18
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=9:antialias=true;0
|
||||
enable-ipc = true
|
||||
|
||||
[bar/third]
|
||||
modules-left =
|
||||
modules-center = i3
|
||||
modules-right = date
|
||||
|
||||
monitor = ${env:MONITOR:HDMI-1}
|
||||
width = 100%
|
||||
height = 18
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=9:antialias=true;0
|
||||
enable-ipc = true
|
||||
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
strip-wsnumbers = true
|
||||
index-sort = true
|
||||
enable-click = true
|
||||
enable-scroll = true
|
||||
wrapping-scroll = true
|
||||
reverse-scroll = true
|
||||
fuzzy-match = false
|
||||
format = <label-state> <label-mode>
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 1
|
||||
label-mode-background = ${colors.background}
|
||||
label-focused =%icon%%name%
|
||||
label-focused-foreground = ${colors.foreground}
|
||||
label-focused-background = ${colors.background}
|
||||
label-focused-underline = #fff
|
||||
label-focused-margin = 2
|
||||
label-unfocused =%icon%%name%
|
||||
label-unfocused-foreground = ${colors.foreground}
|
||||
label-unfocused-background = ${colors.background}
|
||||
label-unfocused-margin = 1
|
||||
label-visible =%icon%%name%
|
||||
label-visible-underline = #fff
|
||||
label-visible-margin = 1
|
||||
label-urgent =%icon%%name%!
|
||||
label-urgent-foreground = ${colors.foreground-alt}
|
||||
label-urgent-background = ${colors.background}
|
||||
label-urgent-padding = 1
|
||||
|
||||
[module/menu-media]
|
||||
type = custom/menu
|
||||
expand-right = true
|
||||
label-open =
|
||||
label-close =
|
||||
label-separator = " "
|
||||
menu-0-0 =
|
||||
menu-0-0-exec = "playerctl previous"
|
||||
menu-0-1 =
|
||||
menu-0-1-exec = "playerctl play-pause"
|
||||
menu-0-2 =
|
||||
menu-0-2-exec = "playerctl next"
|
||||
|
||||
[module/ovpn]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = ovpn: <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(nmcli con show --active | grep vpn | cut -c1-12 | tr -d ' ')
|
||||
|
||||
[module/nvpn]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = nvpn: <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(nordvpn status | grep -oP '(?<=Current server: ).*' | cut -f1 -d'.')
|
||||
|
||||
[module/update]
|
||||
type = custom/script
|
||||
interval = 60
|
||||
format = upd: <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $(yay -Qu 2>/dev/null | wc -l | awk '$1 ~ /^[[:digit:]]+$/')"
|
||||
click-left = "setsid alacritty -e sh -c 'echo ---UPDATE LIST---; echo; yay -Syy; yay -Qu; echo ; read -p ---END---'"
|
||||
click-right = "setsid alacritty -e sh -c 'echo ---UPDATING---; echo ; yay -Syu --sudoloop; echo ; read -p ---END---'"
|
||||
click-middle = "setsid alacritty -e sh -c 'echo ---UPDATING, NOCONFIRM---; echo ; yay -Syu --sudoloop --noconfirm; echo ; read -p ---END---'"
|
||||
|
||||
[module/quicklaunch]
|
||||
type = custom/script
|
||||
format = | <label>
|
||||
interval = 999999999
|
||||
exec = echo quick
|
||||
label = quick
|
||||
label-maxlen=5
|
||||
label-ellipsis=false
|
||||
click-left = "setsid quicklaunch"
|
||||
|
||||
[module/songname]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(printf "%s: %s" "$(playerctl metadata artist 2>&1)" "$(playerctl metadata title 2>&1)" | sed -r 's/No players found//g;' | awk 'length > 2')
|
||||
click-left = "playerctl play-pause"
|
||||
click-right = "playerctl next"
|
||||
click-middle = "playerctl previous"
|
||||
|
||||
[module/xbacklightbuttons]
|
||||
type = custom/menu
|
||||
expand-right = true
|
||||
label-open = blght
|
||||
label-close = x
|
||||
label-separator = " "
|
||||
menu-0-0 = -
|
||||
menu-0-0-exec = "xbacklight -dec 10; notify-send 'brightness down'"
|
||||
menu-0-1 = +
|
||||
menu-0-1-exec = "xbacklight -inc 10; notify-send 'brightness up'"
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
format = <label>
|
||||
label = %percentage%
|
||||
|
||||
[module/nvgpu]
|
||||
type = custom/script
|
||||
interval = 2
|
||||
format = gpu: <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $(nvidia-settings -q GPUUtilization | awk -F'=' '{print $3}' | awk '{print $1}' | sed 's/\,/%/g')"
|
||||
click-left = "setsid alacritty -e sh -c nvtop"
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
label = cpu: %percentage%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
label = ram: %percentage_used%%
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
interval = 3
|
||||
label = tmp: %temperature-c%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %ifname%: %local_ip% [%essid%]
|
||||
|
||||
[module/wlanshort]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %essid%
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = enp5s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = eth: %local_ip%
|
||||
|
||||
[module/usbmodem1]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u1 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/usbmodem2]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u6 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/usbmodem3]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u3 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
date = tme:
|
||||
date-alt = %d.%m.%Y,
|
||||
time = %H:%M
|
||||
time-alt = %H:%M:%S
|
||||
label = %date% %time%
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
master-mixer = IEC958
|
||||
format-volume = <label-volume>
|
||||
label-volume = %percentage%
|
||||
label-volume-foreground = ${root.foreground}
|
||||
format-muted-foreground = ${root.foreground}
|
||||
label-muted = x
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
poll-interval = 3
|
||||
adapter = ADP1
|
||||
full-at = 95
|
||||
label-full = bat: %percentage%%
|
||||
label-charging = bat: %percentage%% (+%consumption%W, %time%)
|
||||
label-discharging = bat: %percentage%% (-%consumption%W, %time%)
|
||||
|
||||
[module/batteryshort]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
poll-interval = 3
|
||||
adapter = ADP1
|
||||
full-at = 95
|
||||
label-full = bat: %percentage%%
|
||||
label-charging = bat: %percentage%%
|
||||
label-discharging = bat: %percentage%%
|
||||
|
||||
[module/disk]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
interval = 10
|
||||
fixed-values = true
|
||||
spacing = 4
|
||||
label-mounted = | dsk: %used% / %total%
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 5
|
||||
|
||||
[module/i3touchmenu]
|
||||
type = custom/menu
|
||||
|
||||
expand-right = true
|
||||
|
||||
format-spacing = 1
|
||||
|
||||
;; Open the menu
|
||||
label-open = "| touch"
|
||||
label-open-foreground = #FFF
|
||||
|
||||
;; Close the menu
|
||||
label-close = "| x"
|
||||
label-separator = "'"
|
||||
|
||||
;; Launcher
|
||||
menu-0-0 =
|
||||
menu-0-0-exec = menu-open-1
|
||||
|
||||
;; Move
|
||||
menu-0-1 =
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
;; Layout
|
||||
menu-0-2 =
|
||||
menu-0-2-exec = menu-open-3
|
||||
|
||||
;; Split
|
||||
menu-0-3 =
|
||||
menu-0-3-exec = menu-open-4
|
||||
|
||||
;; Resize
|
||||
menu-0-4 =
|
||||
menu-0-4-exec = menu-open-5
|
||||
|
||||
;; Move to workspace
|
||||
menu-0-5 =
|
||||
menu-0-5-exec = menu-open-6
|
||||
|
||||
;; Kill
|
||||
menu-0-6 =
|
||||
menu-0-6-exec = menu-open-7
|
||||
|
||||
|
||||
;; Power
|
||||
menu-0-7 =""
|
||||
menu-0-7-exec = menu-open-8
|
||||
|
||||
;; Launcher: Back to main menu
|
||||
menu-1-0 =
|
||||
menu-1-0-exec = menu-open-0
|
||||
|
||||
;; Launcher
|
||||
menu-1-1="quick"
|
||||
menu-1-1-exec= setsid quicklaunch
|
||||
|
||||
:: Launcher
|
||||
menu-1-2="xournal"
|
||||
menu-1-2-exec = "setsid xournalpp"
|
||||
|
||||
:: Launcher
|
||||
menu-1-3="sync"
|
||||
menu-1-3-exec = "setsid python Sync/o_school/5AHEL/Notebooks/pdfconvert.py"
|
||||
|
||||
:: Launcher
|
||||
menu-1-4=""
|
||||
menu-1-4-exec = urxvt &
|
||||
|
||||
;; Move: Back to main menu
|
||||
menu-2-0 =
|
||||
menu-2-0-exec = menu-open-0
|
||||
|
||||
;; Move: Left
|
||||
menu-2-1 =
|
||||
menu-2-1-exec = i3-msg 'move left'
|
||||
|
||||
;; Move: Right
|
||||
menu-2-2 =
|
||||
menu-2-2-exec = i3-msg 'move right'
|
||||
|
||||
;; Move: Up
|
||||
menu-2-3 =
|
||||
menu-2-3-exec = i3-msg 'move up'
|
||||
|
||||
;; Move: Down
|
||||
menu-2-4 = ""
|
||||
menu-2-4-exec = i3-msg 'move down'
|
||||
|
||||
;; Layout: Back to main menu
|
||||
menu-3-0 =
|
||||
menu-3-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Layout: Split
|
||||
menu-3-1 = split
|
||||
menu-3-1-exec = i3-msg 'layout toggle split'
|
||||
|
||||
;; Layout: Stacking
|
||||
menu-3-2 = stack
|
||||
menu-3-2-exec = i3-msg 'layout stacking'
|
||||
|
||||
;; Layout: Tabbed
|
||||
menu-3-3 = tab
|
||||
menu-3-3-exec = i3-msg 'layout tabbed'
|
||||
|
||||
;; Layout: Toggle floating
|
||||
menu-3-4 = float
|
||||
menu-3-4-exec = i3-msg 'floating toggle'
|
||||
|
||||
;; Split: Back to main menu
|
||||
menu-4-0 =
|
||||
menu-4-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Split: Vertical
|
||||
menu-4-1 = vert
|
||||
menu-4-1-exec = i3-msg 'split v'
|
||||
|
||||
;; Split: Horizontal
|
||||
menu-4-2 = horz
|
||||
menu-4-2-exec = i3-msg 'split h'
|
||||
|
||||
;; Resize: Back to main menu
|
||||
menu-5-0 =
|
||||
menu-5-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Resize: Grow height
|
||||
menu-5-1 = h+
|
||||
menu-5-1-exec = i3-msg 'resize grow height 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Shrink height
|
||||
menu-5-2 = h-
|
||||
menu-5-2-exec = i3-msg 'resize shrink height 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Grow width
|
||||
menu-5-3 = w+
|
||||
menu-5-3-exec = i3-msg 'resize grow width 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Shrink width
|
||||
menu-5-4 = w-
|
||||
menu-5-4-exec = i3-msg 'resize shrink width 5 px or 5 ppt'
|
||||
|
||||
;; Move to workspace: Back to main menu
|
||||
menu-6-0 =
|
||||
menu-6-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Move to workspace: 1
|
||||
menu-6-1 = 1
|
||||
menu-6-1-exec = i3-msg 'move container to workspace 1'
|
||||
|
||||
;; Move to workspace: 2
|
||||
menu-6-2 = 2
|
||||
menu-6-2-exec = i3-msg 'move container to workspace 2'
|
||||
|
||||
;; Move to workspace: 3
|
||||
menu-6-3 = 3
|
||||
menu-6-3-exec = i3-msg 'move container to workspace 3'
|
||||
|
||||
;; Move to workspace: 4
|
||||
menu-6-4 = 4
|
||||
menu-6-4-exec = i3-msg 'move container to workspace 4'
|
||||
|
||||
;; Move to workspace: 5
|
||||
menu-6-5 = 5
|
||||
menu-6-5-exec = i3-msg 'move container to workspace 5'
|
||||
|
||||
;; Move to workspace: 6
|
||||
menu-6-6 = 6
|
||||
menu-6-6-exec = i3-msg 'move container to workspace 6'
|
||||
|
||||
;; Move to workspace: 7
|
||||
menu-6-7 = 7
|
||||
menu-6-7-exec = i3-msg 'move container to workspace 7'
|
||||
|
||||
;; Move to workspace: 8
|
||||
menu-6-8 = 8
|
||||
menu-6-8-exec = i3-msg 'move container to workspace 8'
|
||||
|
||||
;; Move to workspace: 9
|
||||
menu-6-9 = 9
|
||||
menu-6-9-exec = i3-msg 'move container to workspace 9'
|
||||
|
||||
;; Move to workspace: 10
|
||||
menu-6-10 = "10"
|
||||
menu-6-10-exec = i3-msg 'move container to workspace 10'
|
||||
|
||||
;; Kill: Back to main menu
|
||||
menu-7-0 =
|
||||
menu-7-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Kill: Kill
|
||||
menu-7-1 = "confirm"
|
||||
menu-7-1-exec = i3-msg 'kill'
|
||||
|
||||
;; Power: Back to main menu
|
||||
menu-8-0 =
|
||||
menu-8-0-exec = menu-open-0
|
||||
|
||||
;; Power: Screen off
|
||||
menu-8-1 =
|
||||
menu-8-1-exec = xset dpms force off
|
||||
|
||||
;; Power: Lock
|
||||
menu-8-2 =
|
||||
menu-8-2-exec = i3lock
|
||||
|
||||
;; Power: Reboot
|
||||
menu-8-3 =
|
||||
menu-8-3-exec = shutdown -r now
|
||||
|
||||
;; Power: Shutdown
|
||||
menu-8-4 = ""
|
||||
menu-8-4-exec = shutdown -h now
|
||||
524
.config/polybar/config##hostname.pc
Normal file
524
.config/polybar/config##hostname.pc
Normal file
@@ -0,0 +1,524 @@
|
||||
;=====================================================
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/jaagr/polybar
|
||||
;
|
||||
; The README contains alot of information
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[colors]
|
||||
background = #af000000
|
||||
foreground = #fff
|
||||
foreground-alt = #555
|
||||
|
||||
[bar/main]
|
||||
modules-left = disk update ovpn nvpn eth
|
||||
modules-center = i3
|
||||
modules-right = cpu nvgpu memory date
|
||||
|
||||
monitor = ${env:MONITOR:DP-0}
|
||||
width = 100%
|
||||
height = 18
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=10:antialias=true;0
|
||||
tray-position = left
|
||||
tray-padding = 9
|
||||
tray-detached = false
|
||||
tray-maxsize = 15
|
||||
tray-background = ${root.background}
|
||||
tray-scale = 1.0
|
||||
enable-ipc = true
|
||||
|
||||
[bar/second]
|
||||
modules-left =
|
||||
modules-center = i3
|
||||
modules-right = date
|
||||
|
||||
monitor = ${env:MONITOR:HDMI-0}
|
||||
width = 100%
|
||||
height = 18
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=9:antialias=true;0
|
||||
enable-ipc = true
|
||||
|
||||
[bar/third]
|
||||
modules-left =
|
||||
modules-center = i3
|
||||
modules-right = date
|
||||
|
||||
monitor = ${env:MONITOR:HDMI-1}
|
||||
width = 100%
|
||||
height = 18
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=9:antialias=true;0
|
||||
enable-ipc = true
|
||||
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
strip-wsnumbers = true
|
||||
index-sort = true
|
||||
enable-click = true
|
||||
enable-scroll = true
|
||||
wrapping-scroll = true
|
||||
reverse-scroll = true
|
||||
fuzzy-match = false
|
||||
format = <label-state> <label-mode>
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 1
|
||||
label-mode-background = ${colors.background}
|
||||
label-focused =%icon%%name%
|
||||
label-focused-foreground = ${colors.foreground}
|
||||
label-focused-background = ${colors.background}
|
||||
label-focused-underline = #fff
|
||||
label-focused-margin = 2
|
||||
label-unfocused =%icon%%name%
|
||||
label-unfocused-foreground = ${colors.foreground}
|
||||
label-unfocused-background = ${colors.background}
|
||||
label-unfocused-margin = 1
|
||||
label-visible =%icon%%name%
|
||||
label-visible-underline = #fff
|
||||
label-visible-margin = 1
|
||||
label-urgent =%icon%%name%!
|
||||
label-urgent-foreground = ${colors.foreground-alt}
|
||||
label-urgent-background = ${colors.background}
|
||||
label-urgent-padding = 1
|
||||
|
||||
[module/menu-media]
|
||||
type = custom/menu
|
||||
expand-right = true
|
||||
label-open =
|
||||
label-close =
|
||||
label-separator = " "
|
||||
menu-0-0 =
|
||||
menu-0-0-exec = "playerctl previous"
|
||||
menu-0-1 =
|
||||
menu-0-1-exec = "playerctl play-pause"
|
||||
menu-0-2 =
|
||||
menu-0-2-exec = "playerctl next"
|
||||
|
||||
[module/ovpn]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = ovpn: <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(nmcli con show --active | grep vpn | cut -c1-12 | tr -d ' ')
|
||||
|
||||
[module/nvpn]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = nvpn: <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(nordvpn status | grep -oP '(?<=Current server: ).*' | cut -f1 -d'.')
|
||||
|
||||
[module/update]
|
||||
type = custom/script
|
||||
interval = 60
|
||||
format = upd: <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $(yay -Qu 2>/dev/null | wc -l | awk '$1 ~ /^[[:digit:]]+$/')"
|
||||
click-left = "setsid alacritty -e sh -c 'echo ---UPDATE LIST---; echo; yay -Syy; yay -Qu; echo ; read -p ---END---'"
|
||||
click-right = "setsid alacritty -e sh -c 'echo ---UPDATING---; echo ; yay -Syu --sudoloop; echo ; read -p ---END---'"
|
||||
click-middle = "setsid alacritty -e sh -c 'echo ---UPDATING, NOCONFIRM---; echo ; yay -Syu --sudoloop --noconfirm; echo ; read -p ---END---'"
|
||||
|
||||
[module/quicklaunch]
|
||||
type = custom/script
|
||||
format = | <label>
|
||||
interval = 999999999
|
||||
exec = echo quick
|
||||
label = quick
|
||||
label-maxlen=5
|
||||
label-ellipsis=false
|
||||
click-left = "setsid quicklaunch"
|
||||
|
||||
[module/songname]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(printf "%s: %s" "$(playerctl metadata artist 2>&1)" "$(playerctl metadata title 2>&1)" | sed -r 's/No players found//g;' | awk 'length > 2')
|
||||
click-left = "playerctl play-pause"
|
||||
click-right = "playerctl next"
|
||||
click-middle = "playerctl previous"
|
||||
|
||||
[module/xbacklightbuttons]
|
||||
type = custom/menu
|
||||
expand-right = true
|
||||
label-open = blght
|
||||
label-close = x
|
||||
label-separator = " "
|
||||
menu-0-0 = -
|
||||
menu-0-0-exec = "xbacklight -dec 10; notify-send 'brightness down'"
|
||||
menu-0-1 = +
|
||||
menu-0-1-exec = "xbacklight -inc 10; notify-send 'brightness up'"
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
format = <label>
|
||||
label = %percentage%
|
||||
|
||||
[module/nvgpu]
|
||||
type = custom/script
|
||||
interval = 2
|
||||
format = gpu: <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $(nvidia-settings -q GPUUtilization | awk -F'=' '{print $3}' | awk '{print $1}' | sed 's/\,/%/g')"
|
||||
click-left = "setsid alacritty -e sh -c nvtop"
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
label = cpu: %percentage%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
label = ram: %percentage_used%%
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
interval = 3
|
||||
label = tmp: %temperature-c%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %ifname%: %local_ip% [%essid%]
|
||||
|
||||
[module/wlanshort]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %essid%
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = enp5s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = eth: %local_ip%
|
||||
|
||||
[module/usbmodem1]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u1 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/usbmodem2]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u6 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/usbmodem3]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u3 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
date = tme:
|
||||
date-alt = %d.%m.%Y,
|
||||
time = %H:%M
|
||||
time-alt = %H:%M:%S
|
||||
label = %date% %time%
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
master-mixer = IEC958
|
||||
format-volume = <label-volume>
|
||||
label-volume = %percentage%
|
||||
label-volume-foreground = ${root.foreground}
|
||||
format-muted-foreground = ${root.foreground}
|
||||
label-muted = x
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
poll-interval = 3
|
||||
adapter = ADP1
|
||||
full-at = 95
|
||||
label-full = bat: %percentage%%
|
||||
label-charging = bat: %percentage%% (+%consumption%W, %time%)
|
||||
label-discharging = bat: %percentage%% (-%consumption%W, %time%)
|
||||
|
||||
[module/batteryshort]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
poll-interval = 3
|
||||
adapter = ADP1
|
||||
full-at = 95
|
||||
label-full = bat: %percentage%%
|
||||
label-charging = bat: %percentage%%
|
||||
label-discharging = bat: %percentage%%
|
||||
|
||||
[module/disk]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
interval = 10
|
||||
fixed-values = true
|
||||
spacing = 4
|
||||
label-mounted = | dsk: %used% / %total%
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 5
|
||||
|
||||
[module/i3touchmenu]
|
||||
type = custom/menu
|
||||
|
||||
expand-right = true
|
||||
|
||||
format-spacing = 1
|
||||
|
||||
;; Open the menu
|
||||
label-open = "| touch"
|
||||
label-open-foreground = #FFF
|
||||
|
||||
;; Close the menu
|
||||
label-close = "| x"
|
||||
label-separator = "'"
|
||||
|
||||
;; Launcher
|
||||
menu-0-0 =
|
||||
menu-0-0-exec = menu-open-1
|
||||
|
||||
;; Move
|
||||
menu-0-1 =
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
;; Layout
|
||||
menu-0-2 =
|
||||
menu-0-2-exec = menu-open-3
|
||||
|
||||
;; Split
|
||||
menu-0-3 =
|
||||
menu-0-3-exec = menu-open-4
|
||||
|
||||
;; Resize
|
||||
menu-0-4 =
|
||||
menu-0-4-exec = menu-open-5
|
||||
|
||||
;; Move to workspace
|
||||
menu-0-5 =
|
||||
menu-0-5-exec = menu-open-6
|
||||
|
||||
;; Kill
|
||||
menu-0-6 =
|
||||
menu-0-6-exec = menu-open-7
|
||||
|
||||
|
||||
;; Power
|
||||
menu-0-7 =""
|
||||
menu-0-7-exec = menu-open-8
|
||||
|
||||
;; Launcher: Back to main menu
|
||||
menu-1-0 =
|
||||
menu-1-0-exec = menu-open-0
|
||||
|
||||
;; Launcher
|
||||
menu-1-1="quick"
|
||||
menu-1-1-exec= setsid quicklaunch
|
||||
|
||||
:: Launcher
|
||||
menu-1-2="xournal"
|
||||
menu-1-2-exec = "setsid xournalpp"
|
||||
|
||||
:: Launcher
|
||||
menu-1-3="sync"
|
||||
menu-1-3-exec = "setsid python Sync/o_school/5AHEL/Notebooks/pdfconvert.py"
|
||||
|
||||
:: Launcher
|
||||
menu-1-4=""
|
||||
menu-1-4-exec = urxvt &
|
||||
|
||||
;; Move: Back to main menu
|
||||
menu-2-0 =
|
||||
menu-2-0-exec = menu-open-0
|
||||
|
||||
;; Move: Left
|
||||
menu-2-1 =
|
||||
menu-2-1-exec = i3-msg 'move left'
|
||||
|
||||
;; Move: Right
|
||||
menu-2-2 =
|
||||
menu-2-2-exec = i3-msg 'move right'
|
||||
|
||||
;; Move: Up
|
||||
menu-2-3 =
|
||||
menu-2-3-exec = i3-msg 'move up'
|
||||
|
||||
;; Move: Down
|
||||
menu-2-4 = ""
|
||||
menu-2-4-exec = i3-msg 'move down'
|
||||
|
||||
;; Layout: Back to main menu
|
||||
menu-3-0 =
|
||||
menu-3-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Layout: Split
|
||||
menu-3-1 = split
|
||||
menu-3-1-exec = i3-msg 'layout toggle split'
|
||||
|
||||
;; Layout: Stacking
|
||||
menu-3-2 = stack
|
||||
menu-3-2-exec = i3-msg 'layout stacking'
|
||||
|
||||
;; Layout: Tabbed
|
||||
menu-3-3 = tab
|
||||
menu-3-3-exec = i3-msg 'layout tabbed'
|
||||
|
||||
;; Layout: Toggle floating
|
||||
menu-3-4 = float
|
||||
menu-3-4-exec = i3-msg 'floating toggle'
|
||||
|
||||
;; Split: Back to main menu
|
||||
menu-4-0 =
|
||||
menu-4-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Split: Vertical
|
||||
menu-4-1 = vert
|
||||
menu-4-1-exec = i3-msg 'split v'
|
||||
|
||||
;; Split: Horizontal
|
||||
menu-4-2 = horz
|
||||
menu-4-2-exec = i3-msg 'split h'
|
||||
|
||||
;; Resize: Back to main menu
|
||||
menu-5-0 =
|
||||
menu-5-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Resize: Grow height
|
||||
menu-5-1 = h+
|
||||
menu-5-1-exec = i3-msg 'resize grow height 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Shrink height
|
||||
menu-5-2 = h-
|
||||
menu-5-2-exec = i3-msg 'resize shrink height 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Grow width
|
||||
menu-5-3 = w+
|
||||
menu-5-3-exec = i3-msg 'resize grow width 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Shrink width
|
||||
menu-5-4 = w-
|
||||
menu-5-4-exec = i3-msg 'resize shrink width 5 px or 5 ppt'
|
||||
|
||||
;; Move to workspace: Back to main menu
|
||||
menu-6-0 =
|
||||
menu-6-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Move to workspace: 1
|
||||
menu-6-1 = 1
|
||||
menu-6-1-exec = i3-msg 'move container to workspace 1'
|
||||
|
||||
;; Move to workspace: 2
|
||||
menu-6-2 = 2
|
||||
menu-6-2-exec = i3-msg 'move container to workspace 2'
|
||||
|
||||
;; Move to workspace: 3
|
||||
menu-6-3 = 3
|
||||
menu-6-3-exec = i3-msg 'move container to workspace 3'
|
||||
|
||||
;; Move to workspace: 4
|
||||
menu-6-4 = 4
|
||||
menu-6-4-exec = i3-msg 'move container to workspace 4'
|
||||
|
||||
;; Move to workspace: 5
|
||||
menu-6-5 = 5
|
||||
menu-6-5-exec = i3-msg 'move container to workspace 5'
|
||||
|
||||
;; Move to workspace: 6
|
||||
menu-6-6 = 6
|
||||
menu-6-6-exec = i3-msg 'move container to workspace 6'
|
||||
|
||||
;; Move to workspace: 7
|
||||
menu-6-7 = 7
|
||||
menu-6-7-exec = i3-msg 'move container to workspace 7'
|
||||
|
||||
;; Move to workspace: 8
|
||||
menu-6-8 = 8
|
||||
menu-6-8-exec = i3-msg 'move container to workspace 8'
|
||||
|
||||
;; Move to workspace: 9
|
||||
menu-6-9 = 9
|
||||
menu-6-9-exec = i3-msg 'move container to workspace 9'
|
||||
|
||||
;; Move to workspace: 10
|
||||
menu-6-10 = "10"
|
||||
menu-6-10-exec = i3-msg 'move container to workspace 10'
|
||||
|
||||
;; Kill: Back to main menu
|
||||
menu-7-0 =
|
||||
menu-7-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Kill: Kill
|
||||
menu-7-1 = "confirm"
|
||||
menu-7-1-exec = i3-msg 'kill'
|
||||
|
||||
;; Power: Back to main menu
|
||||
menu-8-0 =
|
||||
menu-8-0-exec = menu-open-0
|
||||
|
||||
;; Power: Screen off
|
||||
menu-8-1 =
|
||||
menu-8-1-exec = xset dpms force off
|
||||
|
||||
;; Power: Lock
|
||||
menu-8-2 =
|
||||
menu-8-2-exec = i3lock
|
||||
|
||||
;; Power: Reboot
|
||||
menu-8-3 =
|
||||
menu-8-3-exec = shutdown -r now
|
||||
|
||||
;; Power: Shutdown
|
||||
menu-8-4 = ""
|
||||
menu-8-4-exec = shutdown -h now
|
||||
503
.config/polybar/config##hostname.yoga3
Normal file
503
.config/polybar/config##hostname.yoga3
Normal file
@@ -0,0 +1,503 @@
|
||||
;=====================================================
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/jaagr/polybar
|
||||
;
|
||||
; The README contains alot of information
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[colors]
|
||||
background = #000
|
||||
foreground = #fff
|
||||
foreground-alt = #555
|
||||
|
||||
[bar/landscape]
|
||||
|
||||
; not used: songname menu-media xbacklightbuttons
|
||||
modules-left = i3touchmenu update ovpn nvpn usbmodem1 usbmodem2 usbmodem3 eth wlan
|
||||
modules-center = xbacklight i3 volume
|
||||
modules-right = cpu memory temperature disk battery date
|
||||
|
||||
monitor = ${env:MONITOR:eDP1}
|
||||
width = 100%
|
||||
height = 20
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=10:antialias=true;0
|
||||
tray-position = left
|
||||
tray-padding = 9
|
||||
tray-detached = false
|
||||
tray-maxsize = 15
|
||||
tray-background = ${root.background}
|
||||
tray-scale = 1.0
|
||||
enable-ipc = true
|
||||
|
||||
[bar/portrait]
|
||||
; not used: songname menu-media update disk eth
|
||||
modules-left = i3touchmenu xbacklightbuttons ovpn nvpn usbmodem1 usbmodem2 usbmodem3 wlanshort
|
||||
modules-center = xbacklight i3 volume
|
||||
modules-right = cpu memory temperature batteryshort date
|
||||
|
||||
monitor = ${env:MONITOR:eDP1}
|
||||
width = 100%
|
||||
height = 20
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
line-color = #000
|
||||
separator =|
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding-right= 2
|
||||
font-0 = Hack Nerd Font:fontformat=truetype:pixelsize=10;1
|
||||
font-1 = Font Awesome 5 Free:fontformat=truetype:pixelsize=10:antialias=true;0
|
||||
tray-position = left
|
||||
tray-padding = 9
|
||||
tray-detached = false
|
||||
tray-maxsize = 15
|
||||
tray-background = ${root.background}
|
||||
tray-scale = 1.0
|
||||
enable-ipc = true
|
||||
|
||||
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
pin-workspaces = false
|
||||
strip-wsnumbers = true
|
||||
index-sort = true
|
||||
enable-click = true
|
||||
enable-scroll = true
|
||||
wrapping-scroll = true
|
||||
reverse-scroll = true
|
||||
fuzzy-match = false
|
||||
format = <label-state> <label-mode>
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 1
|
||||
label-mode-background = ${colors.background}
|
||||
label-focused =%icon%%name%
|
||||
label-focused-foreground = ${colors.foreground}
|
||||
label-focused-background = ${colors.background}
|
||||
label-focused-underline = #fff
|
||||
label-focused-margin = 2
|
||||
label-unfocused =%icon%%name%
|
||||
label-unfocused-foreground = ${colors.foreground}
|
||||
label-unfocused-background = ${colors.background}
|
||||
label-unfocused-margin = 1
|
||||
label-visible =%icon%%name%
|
||||
label-visible-underline = #fff
|
||||
label-visible-margin = 1
|
||||
label-urgent =%icon%%name%!
|
||||
label-urgent-foreground = ${colors.foreground-alt}
|
||||
label-urgent-background = ${colors.background}
|
||||
label-urgent-padding = 1
|
||||
|
||||
[module/menu-media]
|
||||
type = custom/menu
|
||||
expand-right = true
|
||||
label-open =
|
||||
label-close =
|
||||
label-separator = " "
|
||||
menu-0-0 =
|
||||
menu-0-0-exec = "playerctl previous"
|
||||
menu-0-1 =
|
||||
menu-0-1-exec = "playerctl play-pause"
|
||||
menu-0-2 =
|
||||
menu-0-2-exec = "playerctl next"
|
||||
|
||||
[module/ovpn]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = ovpn: <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(nmcli con show --active | grep vpn | cut -c1-12 | tr -d ' ')
|
||||
|
||||
[module/nvpn]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = nvpn: <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(nordvpn status | grep -oP '(?<=Current server: ).*' | cut -f1 -d'.')
|
||||
|
||||
[module/update]
|
||||
type = custom/script
|
||||
interval = 60
|
||||
format = upd: <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $(yay -Qu 2>/dev/null | wc -l | awk '$1 ~ /^[[:digit:]]+$/')"
|
||||
click-left = "setsid urxvt -e sh -c 'echo ---UPDATE LIST---; echo; yay -Qu; echo ; read -p ---END---'"
|
||||
click-right = "setsid urxvt -e sh -c 'echo ---UPDATING---; echo ; yay -Syu --sudoloop; echo ; read -p ---END---'"
|
||||
click-middle = "setsid urxvt -e sh -c 'echo ---UPDATING, NOCONFIRM---; echo ; yay -Syu --sudoloop --noconfirm; echo ; read -p ---END---'"
|
||||
|
||||
[module/quicklaunch]
|
||||
type = custom/script
|
||||
format = | <label>
|
||||
interval = 999999999
|
||||
exec = echo quick
|
||||
label = quick
|
||||
label-maxlen=5
|
||||
label-ellipsis=false
|
||||
click-left = "setsid quicklaunch"
|
||||
|
||||
[module/songname]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format = <label>
|
||||
label-maxlen=50
|
||||
label-ellipsis=true
|
||||
exec = echo $(printf "%s: %s" "$(playerctl metadata artist 2>&1)" "$(playerctl metadata title 2>&1)" | sed -r 's/No players found//g;' | awk 'length > 2')
|
||||
click-left = "playerctl play-pause"
|
||||
click-right = "playerctl next"
|
||||
click-middle = "playerctl previous"
|
||||
|
||||
[module/xbacklightbuttons]
|
||||
type = custom/menu
|
||||
expand-right = true
|
||||
label-open = blght
|
||||
label-close = x
|
||||
label-separator = " "
|
||||
menu-0-0 = -
|
||||
menu-0-0-exec = "xbacklight -dec 10; notify-send 'brightness down'"
|
||||
menu-0-1 = +
|
||||
menu-0-1-exec = "xbacklight -inc 10; notify-send 'brightness up'"
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
format = <label>
|
||||
label = %percentage%
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
label = cpu: %percentage%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
label = ram: %percentage_used%%
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
interval = 3
|
||||
label = tmp: %temperature-c%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %ifname%: %local_ip% [%essid%]
|
||||
|
||||
[module/wlanshort]
|
||||
type = internal/network
|
||||
interface = wlp2s0
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %essid%
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = enp60s0u1u4
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %ifname%: %local_ip%
|
||||
|
||||
[module/usbmodem1]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u1 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/usbmodem2]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u6 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/usbmodem3]
|
||||
type = custom/script
|
||||
format = usb: <label>
|
||||
interval = 3
|
||||
exec = echo $(ip -4 addr show enp0s20f0u3 2>&1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
date = tme:
|
||||
date-alt = %d.%m.%Y,
|
||||
time = %H:%M
|
||||
time-alt = %H:%M:%S
|
||||
label = %date% %time%
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
format-volume = <label-volume>
|
||||
label-volume = %percentage%
|
||||
label-volume-foreground = ${root.foreground}
|
||||
format-muted-foreground = ${root.foreground}
|
||||
label-muted = x
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
poll-interval = 3
|
||||
adapter = ADP1
|
||||
full-at = 95
|
||||
label-full = bat: %percentage%%
|
||||
label-charging = bat: %percentage%% (+%consumption%W, %time%)
|
||||
label-discharging = bat: %percentage%% (-%consumption%W, %time%)
|
||||
|
||||
[module/batteryshort]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
poll-interval = 3
|
||||
adapter = ADP1
|
||||
full-at = 95
|
||||
label-full = bat: %percentage%%
|
||||
label-charging = bat: %percentage%%
|
||||
label-discharging = bat: %percentage%%
|
||||
|
||||
[module/disk]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
interval = 10
|
||||
fixed-values = true
|
||||
spacing = 4
|
||||
label-mounted = dsk: %used% / %total%
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 5
|
||||
|
||||
[module/i3touchmenu]
|
||||
type = custom/menu
|
||||
|
||||
expand-right = true
|
||||
|
||||
format-spacing = 1
|
||||
|
||||
;; Open the menu
|
||||
label-open = "| touch"
|
||||
label-open-foreground = #FFF
|
||||
|
||||
;; Close the menu
|
||||
label-close = "| x"
|
||||
label-separator = "'"
|
||||
|
||||
;; Launcher
|
||||
menu-0-0 =
|
||||
menu-0-0-exec = menu-open-1
|
||||
|
||||
;; Move
|
||||
menu-0-1 =
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
;; Layout
|
||||
menu-0-2 =
|
||||
menu-0-2-exec = menu-open-3
|
||||
|
||||
;; Split
|
||||
menu-0-3 =
|
||||
menu-0-3-exec = menu-open-4
|
||||
|
||||
;; Resize
|
||||
menu-0-4 =
|
||||
menu-0-4-exec = menu-open-5
|
||||
|
||||
;; Move to workspace
|
||||
menu-0-5 =
|
||||
menu-0-5-exec = menu-open-6
|
||||
|
||||
;; Kill
|
||||
menu-0-6 =
|
||||
menu-0-6-exec = menu-open-7
|
||||
|
||||
|
||||
;; Power
|
||||
menu-0-7 =""
|
||||
menu-0-7-exec = menu-open-8
|
||||
|
||||
;; Launcher: Back to main menu
|
||||
menu-1-0 =
|
||||
menu-1-0-exec = menu-open-0
|
||||
|
||||
;; Launcher
|
||||
menu-1-1="quick"
|
||||
menu-1-1-exec= setsid quicklaunch
|
||||
|
||||
:: Launcher
|
||||
menu-1-2="xournal"
|
||||
menu-1-2-exec = "setsid xournalpp"
|
||||
|
||||
:: Launcher
|
||||
menu-1-3="sync"
|
||||
menu-1-3-exec = "setsid python Sync/o_school/5AHEL/Notebooks/pdfconvert.py"
|
||||
|
||||
:: Launcher
|
||||
menu-1-4=""
|
||||
menu-1-4-exec = urxvt &
|
||||
|
||||
;; Move: Back to main menu
|
||||
menu-2-0 =
|
||||
menu-2-0-exec = menu-open-0
|
||||
|
||||
;; Move: Left
|
||||
menu-2-1 =
|
||||
menu-2-1-exec = i3-msg 'move left'
|
||||
|
||||
;; Move: Right
|
||||
menu-2-2 =
|
||||
menu-2-2-exec = i3-msg 'move right'
|
||||
|
||||
;; Move: Up
|
||||
menu-2-3 =
|
||||
menu-2-3-exec = i3-msg 'move up'
|
||||
|
||||
;; Move: Down
|
||||
menu-2-4 = ""
|
||||
menu-2-4-exec = i3-msg 'move down'
|
||||
|
||||
;; Layout: Back to main menu
|
||||
menu-3-0 =
|
||||
menu-3-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Layout: Split
|
||||
menu-3-1 = split
|
||||
menu-3-1-exec = i3-msg 'layout toggle split'
|
||||
|
||||
;; Layout: Stacking
|
||||
menu-3-2 = stack
|
||||
menu-3-2-exec = i3-msg 'layout stacking'
|
||||
|
||||
;; Layout: Tabbed
|
||||
menu-3-3 = tab
|
||||
menu-3-3-exec = i3-msg 'layout tabbed'
|
||||
|
||||
;; Layout: Toggle floating
|
||||
menu-3-4 = float
|
||||
menu-3-4-exec = i3-msg 'floating toggle'
|
||||
|
||||
;; Split: Back to main menu
|
||||
menu-4-0 =
|
||||
menu-4-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Split: Vertical
|
||||
menu-4-1 = vert
|
||||
menu-4-1-exec = i3-msg 'split v'
|
||||
|
||||
;; Split: Horizontal
|
||||
menu-4-2 = horz
|
||||
menu-4-2-exec = i3-msg 'split h'
|
||||
|
||||
;; Resize: Back to main menu
|
||||
menu-5-0 =
|
||||
menu-5-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Resize: Grow height
|
||||
menu-5-1 = h+
|
||||
menu-5-1-exec = i3-msg 'resize grow height 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Shrink height
|
||||
menu-5-2 = h-
|
||||
menu-5-2-exec = i3-msg 'resize shrink height 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Grow width
|
||||
menu-5-3 = w+
|
||||
menu-5-3-exec = i3-msg 'resize grow width 5 px or 5 ppt'
|
||||
|
||||
;; Resize: Shrink width
|
||||
menu-5-4 = w-
|
||||
menu-5-4-exec = i3-msg 'resize shrink width 5 px or 5 ppt'
|
||||
|
||||
;; Move to workspace: Back to main menu
|
||||
menu-6-0 =
|
||||
menu-6-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Move to workspace: 1
|
||||
menu-6-1 = 1
|
||||
menu-6-1-exec = i3-msg 'move container to workspace 1'
|
||||
|
||||
;; Move to workspace: 2
|
||||
menu-6-2 = 2
|
||||
menu-6-2-exec = i3-msg 'move container to workspace 2'
|
||||
|
||||
;; Move to workspace: 3
|
||||
menu-6-3 = 3
|
||||
menu-6-3-exec = i3-msg 'move container to workspace 3'
|
||||
|
||||
;; Move to workspace: 4
|
||||
menu-6-4 = 4
|
||||
menu-6-4-exec = i3-msg 'move container to workspace 4'
|
||||
|
||||
;; Move to workspace: 5
|
||||
menu-6-5 = 5
|
||||
menu-6-5-exec = i3-msg 'move container to workspace 5'
|
||||
|
||||
;; Move to workspace: 6
|
||||
menu-6-6 = 6
|
||||
menu-6-6-exec = i3-msg 'move container to workspace 6'
|
||||
|
||||
;; Move to workspace: 7
|
||||
menu-6-7 = 7
|
||||
menu-6-7-exec = i3-msg 'move container to workspace 7'
|
||||
|
||||
;; Move to workspace: 8
|
||||
menu-6-8 = 8
|
||||
menu-6-8-exec = i3-msg 'move container to workspace 8'
|
||||
|
||||
;; Move to workspace: 9
|
||||
menu-6-9 = 9
|
||||
menu-6-9-exec = i3-msg 'move container to workspace 9'
|
||||
|
||||
;; Move to workspace: 10
|
||||
menu-6-10 = "10"
|
||||
menu-6-10-exec = i3-msg 'move container to workspace 10'
|
||||
|
||||
;; Kill: Back to main menu
|
||||
menu-7-0 =
|
||||
menu-7-0-exec = menu-open-0
|
||||
|
||||
|
||||
;; Kill: Kill
|
||||
menu-7-1 = "confirm"
|
||||
menu-7-1-exec = i3-msg 'kill'
|
||||
|
||||
;; Power: Back to main menu
|
||||
menu-8-0 =
|
||||
menu-8-0-exec = menu-open-0
|
||||
|
||||
;; Power: Screen off
|
||||
menu-8-1 =
|
||||
menu-8-1-exec = xset dpms force off
|
||||
|
||||
;; Power: Lock
|
||||
menu-8-2 =
|
||||
menu-8-2-exec = i3lock
|
||||
|
||||
;; Power: Reboot
|
||||
menu-8-3 =
|
||||
menu-8-3-exec = shutdown -r now
|
||||
|
||||
;; Power: Shutdown
|
||||
menu-8-4 = ""
|
||||
menu-8-4-exec = shutdown -h now
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch
|
||||
polybar main -r &
|
||||
polybar second -r &
|
||||
|
||||
#insync
|
||||
echo "Bar launched..."
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch
|
||||
polybar portrait -r &
|
||||
|
||||
insync
|
||||
|
||||
echo "Bar launched..."
|
||||
@@ -1,122 +0,0 @@
|
||||
#!/bin/python
|
||||
|
||||
import sys
|
||||
import dbus
|
||||
import argparse
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'-t',
|
||||
'--trunclen',
|
||||
type=int,
|
||||
metavar='trunclen'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-f',
|
||||
'--format',
|
||||
type=str,
|
||||
metavar='custom format',
|
||||
dest='custom_format'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-p',
|
||||
'--playpause',
|
||||
type=str,
|
||||
metavar='play-pause indicator',
|
||||
dest='play_pause'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--font',
|
||||
type=str,
|
||||
metavar='the index of the font to use for the main label',
|
||||
dest='font'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--playpause-font',
|
||||
type=str,
|
||||
metavar='the index of the font to use to display the playpause indicator',
|
||||
dest='play_pause_font'
|
||||
)
|
||||
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
def fix_string(string):
|
||||
# corrects encoding for the python version used
|
||||
if sys.version_info.major == 3:
|
||||
return string
|
||||
else:
|
||||
return string.encode('utf-8')
|
||||
|
||||
# Default parameters
|
||||
output = fix_string(u'{play_pause} {artist}: {song}')
|
||||
trunclen = 25
|
||||
play_pause = fix_string(u'\u25B6,\u23F8') # first character is play, second is paused
|
||||
|
||||
label_with_font = '%{{T{font}}}{label}%{{T-}}'
|
||||
font = args.font
|
||||
play_pause_font = args.play_pause_font
|
||||
|
||||
# parameters can be overwritten by args
|
||||
if args.trunclen is not None:
|
||||
trunclen = args.trunclen
|
||||
if args.custom_format is not None:
|
||||
output = args.custom_format
|
||||
if args.play_pause is not None:
|
||||
play_pause = args.play_pause
|
||||
|
||||
try:
|
||||
session_bus = dbus.SessionBus()
|
||||
spotify_bus = session_bus.get_object(
|
||||
'org.mpris.MediaPlayer2.spotify',
|
||||
'/org/mpris/MediaPlayer2'
|
||||
)
|
||||
|
||||
spotify_properties = dbus.Interface(
|
||||
spotify_bus,
|
||||
'org.freedesktop.DBus.Properties'
|
||||
)
|
||||
|
||||
metadata = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'Metadata')
|
||||
status = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'PlaybackStatus')
|
||||
|
||||
# Handle play/pause label
|
||||
|
||||
play_pause = play_pause.split(',')
|
||||
|
||||
if status == 'Playing':
|
||||
play_pause = play_pause[0]
|
||||
elif status == 'Paused':
|
||||
play_pause = play_pause[1]
|
||||
else:
|
||||
play_pause = str()
|
||||
|
||||
if play_pause_font:
|
||||
play_pause = label_with_font.format(font=play_pause_font, label=play_pause)
|
||||
|
||||
# Handle main label
|
||||
|
||||
artist = fix_string(metadata['xesam:artist'][0]) if metadata['xesam:artist'] else ''
|
||||
song = fix_string(metadata['xesam:title']) if metadata['xesam:title'] else ''
|
||||
|
||||
if not artist and not song:
|
||||
print('')
|
||||
else:
|
||||
if len(song) > trunclen:
|
||||
song = song[0:trunclen]
|
||||
song += '...'
|
||||
if ('(' in song) and (')' not in song):
|
||||
song += ')'
|
||||
|
||||
if font:
|
||||
artist = label_with_font.format(font=font, label=artist)
|
||||
song = label_with_font.format(font=font, label=song)
|
||||
|
||||
print(output.format(artist=artist, song=song, play_pause=play_pause))
|
||||
|
||||
except Exception as e:
|
||||
if isinstance(e, dbus.exceptions.DBusException):
|
||||
print('')
|
||||
else:
|
||||
print(e)
|
||||
137
.config/rofi/h45_theme.rasi##class.blue
Normal file
137
.config/rofi/h45_theme.rasi##class.blue
Normal file
@@ -0,0 +1,137 @@
|
||||
* {
|
||||
selected-normal-foreground: rgba ( 255, 255, 255, 100 % );
|
||||
foreground: rgba ( 193, 193, 193, 100 % );
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: rgba ( 39, 50, 56, 100 % );
|
||||
red: rgba ( 220, 50, 47, 100 % );
|
||||
selected-urgent-foreground: rgba ( 255, 24, 68, 100 % );
|
||||
blue: rgba ( 38, 139, 210, 100 % );
|
||||
urgent-foreground: rgba ( 255, 24, 68, 100 % );
|
||||
alternate-urgent-background: rgba ( 39, 50, 56, 100 % );
|
||||
active-foreground: rgba ( 128, 203, 196, 100 % );
|
||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||
selected-active-foreground: rgba ( 128, 203, 196, 100 % );
|
||||
alternate-active-background: rgba ( 39, 50, 56, 100 % );
|
||||
background: rgba ( 39, 50, 56, 100 % );
|
||||
bordercolor: rgba ( 39, 50, 56, 100 % );
|
||||
alternate-normal-foreground: @foreground;
|
||||
normal-background: rgba ( 39, 50, 56, 100 % );
|
||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||
selected-normal-background: rgba ( 57, 66, 73, 100 % );
|
||||
border-color: @foreground;
|
||||
spacing: 2;
|
||||
separatorcolor: rgba ( 30, 37, 41, 100 % );
|
||||
urgent-background: rgba ( 39, 50, 56, 100 % );
|
||||
selected-urgent-background: rgba ( 57, 66, 73, 100 % );
|
||||
alternate-urgent-foreground: @urgent-foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
alternate-active-foreground: @active-foreground;
|
||||
active-background: rgba ( 39, 50, 56, 100 % );
|
||||
selected-active-background: rgba ( 57, 66, 73, 100 % );
|
||||
}
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 1;
|
||||
padding: 5;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#message {
|
||||
border: 1px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: true;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#element {
|
||||
border: 0;
|
||||
padding: 1px ;
|
||||
}
|
||||
#element.normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#element.normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
#element.normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
#element.selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#element.selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
#element.selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
#element.alternate.normal {
|
||||
background-color: @alternate-normal-background;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
#element.alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
#element.alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
#scrollbar {
|
||||
width: 4px ;
|
||||
border: 0;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
#sidebar {
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button.selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
padding: 1px ;
|
||||
}
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
137
.config/rofi/h45_theme.rasi##class.red
Normal file
137
.config/rofi/h45_theme.rasi##class.red
Normal file
@@ -0,0 +1,137 @@
|
||||
* {
|
||||
selected-normal-foreground: rgba ( 255, 255, 255, 100 % );
|
||||
foreground: rgba ( 193, 193, 193, 100 % );
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: rgba ( 65, 39, 39, 100%);
|
||||
red: rgba ( 220, 50, 47, 100 % );
|
||||
selected-urgent-foreground: rgba ( 255, 24, 68, 100 % );
|
||||
blue: rgba ( 38, 139, 210, 100 % );
|
||||
urgent-foreground: rgba ( 255, 24, 68, 100 % );
|
||||
alternate-urgent-background: rgba ( 65, 39, 39, 100%);
|
||||
active-foreground: rgba ( 128, 203, 196, 100 % );
|
||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||
selected-active-foreground: rgba ( 128, 203, 196, 100 % );
|
||||
alternate-active-background: rgba ( 65, 39, 39, 100%);
|
||||
background: rgba ( 65, 39, 39, 100%);
|
||||
bordercolor: rgba ( 65, 39, 39, 100%);
|
||||
alternate-normal-foreground: @foreground;
|
||||
normal-background: rgba ( 65, 39, 39, 100%);
|
||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||
selected-normal-background: rgba ( 73, 57, 57, 100 % );
|
||||
border-color: @foreground;
|
||||
spacing: 2;
|
||||
separatorcolor: rgba ( 41, 30, 30, 100 % );
|
||||
urgent-background: rgba ( 65, 39, 39, 100%);
|
||||
selected-urgent-background: rgba ( 57, 66, 73, 100 % );
|
||||
alternate-urgent-foreground: @urgent-foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
alternate-active-foreground: @active-foreground;
|
||||
active-background: rgba ( 65, 39, 39, 100%);
|
||||
selected-active-background: rgba ( 57, 66, 73, 100 % );
|
||||
}
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 1;
|
||||
padding: 5;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#message {
|
||||
border: 1px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: true;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#element {
|
||||
border: 0;
|
||||
padding: 1px ;
|
||||
}
|
||||
#element.normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#element.normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
#element.normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
#element.selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#element.selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
#element.selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
#element.alternate.normal {
|
||||
background-color: @alternate-normal-background;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
#element.alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
#element.alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
#scrollbar {
|
||||
width: 4px ;
|
||||
border: 0;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
#sidebar {
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button.selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
padding: 1px ;
|
||||
}
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
137
.config/rofi/h45_theme.rasi##default
Normal file
137
.config/rofi/h45_theme.rasi##default
Normal file
@@ -0,0 +1,137 @@
|
||||
* {
|
||||
selected-normal-foreground: rgba ( 255, 255, 255, 100 % );
|
||||
foreground: rgba ( 193, 193, 193, 100 % );
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: rgba ( 39, 50, 56, 100 % );
|
||||
red: rgba ( 220, 50, 47, 100 % );
|
||||
selected-urgent-foreground: rgba ( 255, 24, 68, 100 % );
|
||||
blue: rgba ( 38, 139, 210, 100 % );
|
||||
urgent-foreground: rgba ( 255, 24, 68, 100 % );
|
||||
alternate-urgent-background: rgba ( 39, 50, 56, 100 % );
|
||||
active-foreground: rgba ( 128, 203, 196, 100 % );
|
||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||
selected-active-foreground: rgba ( 128, 203, 196, 100 % );
|
||||
alternate-active-background: rgba ( 39, 50, 56, 100 % );
|
||||
background: rgba ( 39, 50, 56, 100 % );
|
||||
bordercolor: rgba ( 39, 50, 56, 100 % );
|
||||
alternate-normal-foreground: @foreground;
|
||||
normal-background: rgba ( 39, 50, 56, 100 % );
|
||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||
selected-normal-background: rgba ( 57, 66, 73, 100 % );
|
||||
border-color: @foreground;
|
||||
spacing: 2;
|
||||
separatorcolor: rgba ( 30, 37, 41, 100 % );
|
||||
urgent-background: rgba ( 39, 50, 56, 100 % );
|
||||
selected-urgent-background: rgba ( 57, 66, 73, 100 % );
|
||||
alternate-urgent-foreground: @urgent-foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
alternate-active-foreground: @active-foreground;
|
||||
active-background: rgba ( 39, 50, 56, 100 % );
|
||||
selected-active-background: rgba ( 57, 66, 73, 100 % );
|
||||
}
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 1;
|
||||
padding: 5;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#message {
|
||||
border: 1px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: true;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#element {
|
||||
border: 0;
|
||||
padding: 1px ;
|
||||
}
|
||||
#element.normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#element.normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
#element.normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
#element.selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#element.selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
#element.selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
#element.alternate.normal {
|
||||
background-color: @alternate-normal-background;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
#element.alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
#element.alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
#scrollbar {
|
||||
width: 4px ;
|
||||
border: 0;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
#sidebar {
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button.selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
padding: 1px ;
|
||||
}
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
36
.config/spicetify/config.ini##default
Normal file
36
.config/spicetify/config.ini##default
Normal file
@@ -0,0 +1,36 @@
|
||||
[Setting]
|
||||
spotify_path = /opt/spotify
|
||||
prefs_path = /home/sim/.config/spotify/prefs
|
||||
current_theme = SpicetifyDefault
|
||||
color_scheme =
|
||||
inject_css = 1
|
||||
replace_colors = 1
|
||||
overwrite_assets = 0
|
||||
|
||||
[Preprocesses]
|
||||
disable_sentry = 1
|
||||
disable_ui_logging = 1
|
||||
remove_rtl_rule = 1
|
||||
expose_apis = 1
|
||||
|
||||
[AdditionalOptions]
|
||||
experimental_features = 0
|
||||
song_page = 0
|
||||
visualization_high_framerate = 0
|
||||
minimal_ui = 0
|
||||
radio = 0
|
||||
search_in_sidebar = 0
|
||||
custom_apps =
|
||||
fastUser_switching = 0
|
||||
lyric_force_no_sync = 0
|
||||
made_for_you_hub = 0
|
||||
home = 0
|
||||
lyric_always_show = 0
|
||||
new_feedback_ui = 0
|
||||
tastebuds = 0
|
||||
extensions =
|
||||
|
||||
; DO NOT CHANGE!
|
||||
[Backup]
|
||||
version = 1.1.10.546.ge08ef575
|
||||
|
||||
37
.config/spicetify/config.ini##hostname.yoga3
Normal file
37
.config/spicetify/config.ini##hostname.yoga3
Normal file
@@ -0,0 +1,37 @@
|
||||
[Setting]
|
||||
inject_css = 1
|
||||
replace_colors = 1
|
||||
overwrite_assets = 0
|
||||
spotify_path = /opt/spotify
|
||||
prefs_path = /home/sim/.config/spotify/prefs
|
||||
current_theme = Thinkpad
|
||||
; current_theme = darkblue
|
||||
color_scheme =
|
||||
|
||||
[Preprocesses]
|
||||
disable_sentry = 1
|
||||
disable_ui_logging = 1
|
||||
remove_rtl_rule = 1
|
||||
expose_apis = 1
|
||||
|
||||
[AdditionalOptions]
|
||||
made_for_you_hub = 0
|
||||
new_feedback_ui = 0
|
||||
custom_apps =
|
||||
experimental_features = 0
|
||||
fastUser_switching = 0
|
||||
home = 0
|
||||
lyric_always_show = 1
|
||||
visualization_high_framerate = 0
|
||||
extensions =
|
||||
lyric_force_no_sync = 0
|
||||
radio = 0
|
||||
search_in_sidebar = 0
|
||||
song_page = 0
|
||||
minimal_ui = 0
|
||||
tastebuds = 0
|
||||
|
||||
; DO NOT CHANGE!
|
||||
[Backup]
|
||||
version = 1.1.10.546.ge08ef575
|
||||
|
||||
1
.config/vis/colors/blue
Normal file
1
.config/vis/colors/blue
Normal file
@@ -0,0 +1 @@
|
||||
#3badff
|
||||
@@ -1 +0,0 @@
|
||||
#cc2929
|
||||
@@ -1,5 +1,5 @@
|
||||
#Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
|
||||
visualizer.fps=50
|
||||
visualizer.fps=40
|
||||
|
||||
#Defaults to "/tmp/mpd.fifo"
|
||||
mpd.fifo.path
|
||||
@@ -9,30 +9,35 @@ mpd.fifo.path
|
||||
audio.stereo.enabled=true
|
||||
|
||||
#Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.
|
||||
#visualizer.rotation.secs=10
|
||||
visualizer.rotation.secs=0
|
||||
|
||||
#Configures the samples rate and the cutoff frequencies.
|
||||
audio.sampling.frequency=44100
|
||||
audio.low.cutoff.frequency=30
|
||||
audio.low.cutoff.frequency=1
|
||||
audio.high.cutoff.frequency=22050
|
||||
|
||||
##Applies scaling factor to both lorenz and ellipse visualizers. This is useful when the system audio is set
|
||||
#to a low volume.
|
||||
visualizer.scaling.multiplier=1
|
||||
|
||||
#Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.
|
||||
#Defaults to spectrum,ellipse,lorenz
|
||||
visualizers=spectrum
|
||||
|
||||
|
||||
#Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
#visualizer.spectrum.character=#
|
||||
|
||||
#Spectrum bar width. Defaults to 1.
|
||||
visualizer.spectrum.bar.width=3
|
||||
visualizer.spectrum.bar.width=2
|
||||
|
||||
#The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to
|
||||
#zero to have no space between bars
|
||||
visualizer.spectrum.bar.spacing=1
|
||||
|
||||
#Available smoothing options are monstercat, sgs, none. Defaults to sgs.
|
||||
visualizer.spectrum.smoothing.mode=monstercat
|
||||
#visualizer.spectrum.smoothing.mode=monstercat
|
||||
|
||||
#This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.
|
||||
#Defaults to "fill"
|
||||
@@ -53,21 +58,28 @@ visualizer.spectrum.reversed=false
|
||||
|
||||
#Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
|
||||
#Currently available ones are "mpd", "pulse", and "alsa". Defaults to "mpd".
|
||||
audio.sources=pulse
|
||||
#audio.sources=pulse
|
||||
|
||||
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
|
||||
#If pulse audio is not working with vis try switching the audio source. A list can be found by running the
|
||||
#command pacmd list-sinks | grep -e 'name:' -e 'index'
|
||||
audio.pulse.source=0
|
||||
#audio.pulse.source=0
|
||||
|
||||
#This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing
|
||||
#effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=2.
|
||||
visualizer.sgs.smoothing.points=3
|
||||
visualizer.sgs.smoothing.passes=2
|
||||
|
||||
|
||||
#Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
#visualizer.ellipse.character=#
|
||||
|
||||
#The radius of each color ring in the ellipse visualizer. Defaults to 2.
|
||||
visualizer.ellipse.radius=2
|
||||
|
||||
## Turns off overriding the user's terminal colors
|
||||
colors.override.terminal=false
|
||||
#colors.override.terminal=false
|
||||
|
||||
#Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. Default is "colors"
|
||||
colors.scheme=thinkpad
|
||||
|
||||
colors.scheme=blue
|
||||
85
.config/vis/config##class.red
Normal file
85
.config/vis/config##class.red
Normal file
@@ -0,0 +1,85 @@
|
||||
#Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
|
||||
visualizer.fps=40
|
||||
|
||||
#Defaults to "/tmp/mpd.fifo"
|
||||
mpd.fifo.path
|
||||
|
||||
#If set to false the visualizers will use mono mode instead of stereo. Some visualizers will
|
||||
#behave differently when mono is enabled. For example, spectrum show two sets of bars.
|
||||
audio.stereo.enabled=true
|
||||
|
||||
#Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.
|
||||
visualizer.rotation.secs=0
|
||||
|
||||
#Configures the samples rate and the cutoff frequencies.
|
||||
audio.sampling.frequency=44100
|
||||
audio.low.cutoff.frequency=1
|
||||
audio.high.cutoff.frequency=22050
|
||||
|
||||
##Applies scaling factor to both lorenz and ellipse visualizers. This is useful when the system audio is set
|
||||
#to a low volume.
|
||||
visualizer.scaling.multiplier=1
|
||||
|
||||
#Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.
|
||||
#Defaults to spectrum,ellipse,lorenz
|
||||
visualizers=spectrum
|
||||
|
||||
|
||||
#Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
#visualizer.spectrum.character=#
|
||||
|
||||
#Spectrum bar width. Defaults to 1.
|
||||
visualizer.spectrum.bar.width=2
|
||||
|
||||
#The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to
|
||||
#zero to have no space between bars
|
||||
visualizer.spectrum.bar.spacing=1
|
||||
|
||||
#Available smoothing options are monstercat, sgs, none. Defaults to sgs.
|
||||
#visualizer.spectrum.smoothing.mode=monstercat
|
||||
|
||||
#This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.
|
||||
#Defaults to "fill"
|
||||
visualizer.spectrum.falloff.mode=fill
|
||||
|
||||
#Configures how fast the falloff character falls. This is an exponential falloff so values usually look
|
||||
#best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95
|
||||
visualizer.spectrum.falloff.weight=0.95
|
||||
|
||||
#Margins in percent of total screen for spectrum visualizer. All margins default to 0
|
||||
visualizer.spectrum.top.margin=0.0
|
||||
visualizer.spectrum.bottom.margin=0.0
|
||||
visualizer.spectrum.right.margin=0.0
|
||||
visualizer.spectrum.left.margin=0.0
|
||||
|
||||
#Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false.
|
||||
visualizer.spectrum.reversed=false
|
||||
|
||||
#Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
|
||||
#Currently available ones are "mpd", "pulse", and "alsa". Defaults to "mpd".
|
||||
#audio.sources=pulse
|
||||
|
||||
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
|
||||
#If pulse audio is not working with vis try switching the audio source. A list can be found by running the
|
||||
#command pacmd list-sinks | grep -e 'name:' -e 'index'
|
||||
#audio.pulse.source=0
|
||||
|
||||
#This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing
|
||||
#effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=2.
|
||||
visualizer.sgs.smoothing.points=3
|
||||
visualizer.sgs.smoothing.passes=2
|
||||
|
||||
|
||||
#Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
#visualizer.ellipse.character=#
|
||||
|
||||
#The radius of each color ring in the ellipse visualizer. Defaults to 2.
|
||||
visualizer.ellipse.radius=2
|
||||
|
||||
## Turns off overriding the user's terminal colors
|
||||
#colors.override.terminal=false
|
||||
|
||||
#Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. Default is "colors"
|
||||
colors.scheme=blue
|
||||
15
.extrarc
15
.extrarc
@@ -15,15 +15,12 @@ alias tlpauto="sudo tlp start"
|
||||
##### Global
|
||||
|
||||
# Scripts
|
||||
alias scradj="zsh ~/Scripts/Display/scradjust2.sh"
|
||||
alias scradj="zsh ~/Scripts/scradjust2.sh"
|
||||
|
||||
# help
|
||||
alias hquiet="echo '>/dev/null 2>&1' or use QUIET var"
|
||||
alias hpath="echo use PWD variable"
|
||||
|
||||
# window information
|
||||
alias winfo="xprop |awk '/WM_CLASS/{print $4}'"
|
||||
|
||||
# xdotool
|
||||
alias CAPS="xdotool key Caps_Lock"
|
||||
alias caps="xdotool key Caps_Lock"
|
||||
@@ -31,7 +28,7 @@ alias caps="xdotool key Caps_Lock"
|
||||
# arp-scan
|
||||
alias arps="sudo arp-scan -l"
|
||||
|
||||
# caffeinate
|
||||
# Caffeinate
|
||||
alias coffeeinf="caffeinate sleep infinity"
|
||||
alias coffee="caffeinate sleep"
|
||||
|
||||
@@ -51,8 +48,8 @@ alias bt="sudo blueberry"
|
||||
alias ap="sudo -b create_ap-gui"
|
||||
|
||||
# clock
|
||||
alias clock="setsid urxvt -hold -e zsh -e ~/scripts/Display/clock.sh"
|
||||
alias clockx="setsid urxvt -hold -e zsh -e ~/scripts/Display/clock.sh && exit"
|
||||
alias clock="setsid urxvt -hold -e zsh -e ~/scripts/clock.sh"
|
||||
alias clockx="setsid urxvt -hold -e zsh -e ~/scripts/clock.sh && exit"
|
||||
|
||||
# fun stuff
|
||||
alias pipes="pipes -r 50000"
|
||||
@@ -69,10 +66,6 @@ alias x=exit
|
||||
# use like "fhistory 'cd ..' "
|
||||
alias fhistory="history | grep"
|
||||
|
||||
# yadm
|
||||
alias confu="yadm commit -am"
|
||||
alias confup="yadm push"
|
||||
|
||||
# yay
|
||||
alias yayi="yay -Q | grep"
|
||||
alias yays="yay -S --sudoloop --noconfirm"
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "Userdata/Scripts"]
|
||||
path = Userdata/Scripts
|
||||
[submodule "/home/sim/Userdata/Scripts"]
|
||||
path = /home/sim/Userdata/Scripts
|
||||
url = git@gitlab.com:h45h74x/h45-scripts.git
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
slot-allocation = dynamic
|
||||
bubble-expire-timeout = 10sec
|
||||
bubble-vertical-gap = 15px
|
||||
bubble-expire-timeout = 5sec
|
||||
bubble-vertical-gap = 20px
|
||||
bubble-horizontal-gap = 5px
|
||||
bubble-corner-radius = 37,5%
|
||||
bubble-corner-radius = 25%
|
||||
bubble-icon-size = 30px
|
||||
bubble-gauge-size = 6px
|
||||
bubble-width = 240px
|
||||
bubble-background-color = 131313
|
||||
bubble-background-opacity = 90%
|
||||
bubble-background-color = 171719
|
||||
bubble-background-opacity = 70%
|
||||
text-margin-size = 10px
|
||||
text-title-size = 100%
|
||||
text-title-weight = bold
|
||||
@@ -17,7 +17,7 @@ text-body-size = 90%
|
||||
text-body-weight = normal
|
||||
text-body-color = eaeaea
|
||||
text-body-opacity = 100%
|
||||
text-shadow-opacity = 100%
|
||||
text-shadow-opacity = 80%
|
||||
bubble-prevent-fade = 0
|
||||
bubble-close-on-click = 1
|
||||
bubble-as-desktop-bg = 0
|
||||
23
.notify-osd##default
Normal file
23
.notify-osd##default
Normal file
@@ -0,0 +1,23 @@
|
||||
slot-allocation = dynamic
|
||||
bubble-expire-timeout = 5sec
|
||||
bubble-vertical-gap = 20px
|
||||
bubble-horizontal-gap = 5px
|
||||
bubble-corner-radius = 25%
|
||||
bubble-icon-size = 30px
|
||||
bubble-gauge-size = 6px
|
||||
bubble-width = 240px
|
||||
bubble-background-color = 171717
|
||||
bubble-background-opacity = 70%
|
||||
text-margin-size = 10px
|
||||
text-title-size = 100%
|
||||
text-title-weight = bold
|
||||
text-title-color = ffffff
|
||||
text-title-opacity = 100%
|
||||
text-body-size = 90%
|
||||
text-body-weight = normal
|
||||
text-body-color = eaeaea
|
||||
text-body-opacity = 100%
|
||||
text-shadow-opacity = 80%
|
||||
bubble-prevent-fade = 0
|
||||
bubble-close-on-click = 1
|
||||
bubble-as-desktop-bg = 0
|
||||
10
.oh-my-zsh/.editorconfig
Executable file
10
.oh-my-zsh/.editorconfig
Executable file
@@ -0,0 +1,10 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
|
||||
[*.sh]
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
6
.oh-my-zsh/.gitignore
vendored
Executable file
6
.oh-my-zsh/.gitignore
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
# custom files
|
||||
custom/
|
||||
|
||||
# temp files directories
|
||||
cache/
|
||||
log/
|
||||
76
.oh-my-zsh/CODE_OF_CONDUCT.md
Executable file
76
.oh-my-zsh/CODE_OF_CONDUCT.md
Executable file
@@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all project spaces, and it also applies when
|
||||
an individual is representing the project or its community in public spaces.
|
||||
Examples of representing a project or community include using an official
|
||||
project e-mail address, posting via an official social media account, or acting
|
||||
as an appointed representative at an online or offline event. Representation of
|
||||
a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at ohmyzsh@planetargon.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
125
.oh-my-zsh/CONTRIBUTING.md
Executable file
125
.oh-my-zsh/CONTRIBUTING.md
Executable file
@@ -0,0 +1,125 @@
|
||||
# CONTRIBUTING GUIDELINES
|
||||
|
||||
Oh-My-Zsh is a community-driven project. Contribution is welcome, encouraged, and appreciated.
|
||||
It is also essential for the development of the project.
|
||||
|
||||
First, please take a moment to review our [code of conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
These guidelines are an attempt at better addressing the huge amount of pending
|
||||
issues and pull requests. Please read them closely.
|
||||
|
||||
Foremost, be so kind as to [search](#use-the-search-luke). This ensures any contribution
|
||||
you would make is not already covered.
|
||||
|
||||
* [Issues](#reporting-issues)
|
||||
* [You have a problem](#you-have-a-problem)
|
||||
* [You have a suggestion](#you-have-a-suggestion)
|
||||
* [Pull Requests](#submitting-pull-requests)
|
||||
* [Getting started](#getting-started)
|
||||
* [You have a solution](#you-have-a-solution)
|
||||
* [You have an addition](#you-have-an-addition)
|
||||
* [Information sources (_aka_ search)](#use-the-search-luke)
|
||||
|
||||
**BONUS:** [Volunteering](#you-have-spare-time-to-volunteer)
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
### You have a problem
|
||||
|
||||
Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
|
||||
your problem.
|
||||
|
||||
If you find one, comment on it so we can know there are more people experiencing it.
|
||||
|
||||
If not, look at the [Troubleshooting](https://github.com/robbyrussell/oh-my-zsh/wiki/Troubleshooting)
|
||||
page for instructions on how to gather data to better debug your problem.
|
||||
|
||||
Then, you can go ahead and create an issue with as much detail as you can provide.
|
||||
It should include the data gathered as indicated above, along with:
|
||||
|
||||
1. How to reproduce the problem
|
||||
2. What the correct behavior should be
|
||||
3. What the actual behavior is
|
||||
|
||||
Please copy to anyone relevant (_eg_ plugin maintainers) by mentioning their GitHub handle
|
||||
(starting with `@`) in your message.
|
||||
|
||||
We will do our very best to help you.
|
||||
|
||||
### You have a suggestion
|
||||
|
||||
Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
|
||||
your suggestion.
|
||||
|
||||
If you find one, comment on it so we can know there are more people supporting it.
|
||||
|
||||
If not, you can go ahead and create an issue. Please copy to anyone relevant (_eg_ plugin
|
||||
maintainers) by mentioning their GitHub handle (starting with `@`) in your message.
|
||||
|
||||
## Submitting Pull Requests
|
||||
|
||||
### Getting started
|
||||
|
||||
You should be familiar with the basics of
|
||||
[contributing on GitHub](https://help.github.com/articles/using-pull-requests) and have a fork
|
||||
[properly set up](https://github.com/robbyrussell/oh-my-zsh/wiki/Contribution-Technical-Practices).
|
||||
|
||||
You MUST always create PRs with _a dedicated branch_ based on the latest upstream tree.
|
||||
|
||||
If you create your own PR, please make sure you do it right. Also be so kind as to reference
|
||||
any issue that would be solved in the PR description body,
|
||||
[for instance](https://help.github.com/articles/closing-issues-via-commit-messages/)
|
||||
_"Fixes #XXXX"_ for issue number XXXX.
|
||||
|
||||
### You have a solution
|
||||
|
||||
Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
|
||||
your [problem](#you-have-a-problem), and any pending/merged/rejected PR covering your solution.
|
||||
|
||||
If the solution is already reported, try it out and +1 the pull request if the
|
||||
solution works ok. On the other hand, if you think your solution is better, post
|
||||
it with a reference to the other one so we can have both solutions to compare.
|
||||
|
||||
If not, then go ahead and submit a PR. Please copy to anyone relevant (e.g. plugin
|
||||
maintainers) by mentioning their GitHub handle (starting with `@`) in your message.
|
||||
|
||||
### You have an addition
|
||||
|
||||
Please [do not](https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#dont-send-us-your-theme-for-now)
|
||||
send themes for now.
|
||||
|
||||
Please be so kind as to [search](#use-the-search-luke) for any pending, merged or rejected Pull Requests
|
||||
covering or related to what you want to add.
|
||||
|
||||
If you find one, try it out and work with the author on a common solution.
|
||||
|
||||
If not, then go ahead and submit a PR. Please copy to anyone relevant (_eg_ plugin
|
||||
maintainers) by mentioning their GitHub handle (starting with `@`) in your message.
|
||||
|
||||
For any extensive change, _eg_ a new plugin, you will have to find testers to +1 your PR.
|
||||
|
||||
----
|
||||
|
||||
## Use the Search, Luke
|
||||
|
||||
_May the Force (of past experiences) be with you_
|
||||
|
||||
GitHub offers [many search features](https://help.github.com/articles/searching-github/)
|
||||
to help you check whether a similar contribution to yours already exists. Please search
|
||||
before making any contribution, it avoids duplicates and eases maintenance. Trust me,
|
||||
that works 90% of the time.
|
||||
|
||||
You can also take a look at the [FAQ](https://github.com/robbyrussell/oh-my-zsh/wiki/FAQ)
|
||||
to be sure your contribution has not already come up.
|
||||
|
||||
If all fails, your thing has probably not been reported yet, so you can go ahead
|
||||
and [create an issue](#reporting-issues) or [submit a PR](#submitting-pull-requests).
|
||||
|
||||
----
|
||||
|
||||
### You have spare time to volunteer
|
||||
|
||||
Very nice!! :)
|
||||
|
||||
Please have a look at the [Volunteer](https://github.com/robbyrussell/oh-my-zsh/wiki/Volunteers)
|
||||
page for instructions on where to start and more.
|
||||
22
.oh-my-zsh/LICENSE.txt
Executable file
22
.oh-my-zsh/LICENSE.txt
Executable file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2009-2019 Robby Russell and contributors
|
||||
See the full list at https://github.com/robbyrussell/oh-my-zsh/contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
308
.oh-my-zsh/README.md
Executable file
308
.oh-my-zsh/README.md
Executable file
@@ -0,0 +1,308 @@
|
||||
<p align="center">
|
||||
<img src="https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png" alt="Oh My Zsh">
|
||||
</p>
|
||||
|
||||
Oh My Zsh is an open source, community-driven framework for managing your [zsh](https://www.zsh.org/) configuration.
|
||||
|
||||
Sounds boring. Let's try again.
|
||||
|
||||
__Oh My Zsh will not make you a 10x developer...but you may feel like one.__
|
||||
|
||||
Once installed, your terminal shell will become the talk of the town _or your money back!_ With each keystroke in your command prompt, you'll take advantage of the hundreds of powerful plugins and beautiful themes. Strangers will come up to you in cafés and ask you, _"that is amazing! are you some sort of genius?"_
|
||||
|
||||
Finally, you'll begin to get the sort of attention that you have always felt you deserved. ...or maybe you'll use the time that you're saving to start flossing more often. 😬
|
||||
|
||||
To learn more, visit [ohmyz.sh](https://ohmyz.sh) and follow [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
__Disclaimer:__ _Oh My Zsh works best on macOS and Linux._
|
||||
|
||||
* Unix-like operating system (macOS or Linux)
|
||||
* [Zsh](https://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH)
|
||||
* `curl` or `wget` should be installed
|
||||
* `git` should be installed
|
||||
|
||||
### Basic Installation
|
||||
|
||||
Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl` or `wget`.
|
||||
|
||||
#### via curl
|
||||
|
||||
```shell
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||
```
|
||||
|
||||
#### via wget
|
||||
|
||||
```shell
|
||||
sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||
```
|
||||
|
||||
#### Manual inspection
|
||||
|
||||
It's a good idea to inspect the install script from projects you don't yet know. You can do
|
||||
that by downloading the install script first, looking through it so everything looks normal,
|
||||
then running it:
|
||||
|
||||
```shell
|
||||
curl -Lo install.sh https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
|
||||
sh install.sh
|
||||
```
|
||||
|
||||
## Using Oh My Zsh
|
||||
|
||||
### Plugins
|
||||
|
||||
Oh My Zsh comes with a shitload of plugins to take advantage of. You can take a look in the [plugins](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins) directory and/or the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins) to see what's currently available.
|
||||
|
||||
#### Enabling Plugins
|
||||
|
||||
Once you spot a plugin (or several) that you'd like to use with Oh My Zsh, you'll need to enable them in the `.zshrc` file. You'll find the zshrc file in your `$HOME` directory. Open it with your favorite text editor and you'll see a spot to list all the plugins you want to load.
|
||||
|
||||
```shell
|
||||
vi ~/.zshrc
|
||||
```
|
||||
|
||||
For example, this might begin to look like this:
|
||||
|
||||
```shell
|
||||
plugins=(
|
||||
git
|
||||
bundler
|
||||
dotenv
|
||||
osx
|
||||
rake
|
||||
rbenv
|
||||
ruby
|
||||
)
|
||||
```
|
||||
|
||||
_Note that the plugins are separated by whitespace. **Do not** use commas between them._
|
||||
|
||||
#### Using Plugins
|
||||
|
||||
Most plugins (should! we're working on this) include a __README__, which documents how to use them.
|
||||
|
||||
### Themes
|
||||
|
||||
We'll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://github.com/robbyrussell/oh-my-zsh/wiki/Themes) on the wiki. Check them out!
|
||||
|
||||
#### Selecting a Theme
|
||||
|
||||
_Robby's theme is the default one. It's not the fanciest one. It's not the simplest one. It's just the right one (for him)._
|
||||
|
||||
Once you find a theme that you'd like to use, you will need to edit the `~/.zshrc` file. You'll see an environment variable (all caps) in there that looks like:
|
||||
|
||||
```shell
|
||||
ZSH_THEME="robbyrussell"
|
||||
```
|
||||
|
||||
To use a different theme, simply change the value to match the name of your desired theme. For example:
|
||||
|
||||
```shell
|
||||
ZSH_THEME="agnoster" # (this is one of the fancy ones)
|
||||
# see https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#agnoster
|
||||
```
|
||||
|
||||
_Note: many themes require installing the [Powerline Fonts](https://github.com/powerline/fonts) in order to render properly._
|
||||
|
||||
Open up a new terminal window and your prompt should look something like this:
|
||||
|
||||

|
||||
|
||||
In case you did not find a suitable theme for your needs, please have a look at the wiki for [more of them](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes).
|
||||
|
||||
If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.
|
||||
|
||||
|
||||
```shell
|
||||
ZSH_THEME="random" # (...please let it be pie... please be some pie..)
|
||||
```
|
||||
|
||||
And if you want to pick random theme from a list of your favorite themes:
|
||||
|
||||
```shell
|
||||
ZSH_THEME_RANDOM_CANDIDATES=(
|
||||
"robbyrussell"
|
||||
"agnoster"
|
||||
)
|
||||
```
|
||||
|
||||
## Advanced Topics
|
||||
|
||||
If you're the type that likes to get their hands dirty, these sections might resonate.
|
||||
|
||||
### Advanced Installation
|
||||
|
||||
Some users may want to manually install Oh My Zsh, or change the default path or other settings that
|
||||
the installer accepts (these settings are also documented at the top of the install script).
|
||||
|
||||
#### Custom Directory
|
||||
|
||||
The default location is `~/.oh-my-zsh` (hidden in your home directory)
|
||||
|
||||
If you'd like to change the install directory with the `ZSH` environment variable, either by running
|
||||
`export ZSH=/your/path` before installing, or by setting it before the end of the install pipeline
|
||||
like this:
|
||||
|
||||
```shell
|
||||
ZSH="$HOME/.dotfiles/oh-my-zsh" sh install.sh
|
||||
```
|
||||
|
||||
#### Unattended install
|
||||
|
||||
If you're running the Oh My Zsh install script as part of an automated install, you can pass the
|
||||
flag `--unattended` to the `install.sh` script. This will have the effect of not trying to change
|
||||
the default shell, and also won't run `zsh` when the installation has finished.
|
||||
|
||||
```shell
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended
|
||||
```
|
||||
|
||||
#### Installing from a forked repository
|
||||
|
||||
The install script also accepts these variables to allow installation of a different repository:
|
||||
|
||||
- `REPO` (default: `robbyrussell/oh-my-zsh`): this takes the form of `owner/repository`. If you set
|
||||
this variable, the installer will look for a repository at `https://github.com/{owner}/{repository}`.
|
||||
|
||||
- `REMOTE` (default: `https://github.com/${REPO}.git`): this is the full URL of the git repository
|
||||
clone. You can use this setting if you want to install from a fork that is not on GitHub (GitLab,
|
||||
Bitbucket...) or if you want to clone with SSH instead of HTTPS (`git@github.com:user/project.git`).
|
||||
|
||||
_NOTE: it's incompatible with setting the `REPO` variable. This setting will take precedence._
|
||||
|
||||
- `BRANCH` (default: `master`): you can use this setting if you want to change the default branch to be
|
||||
checked out when cloning the repository. This might be useful for testing a Pull Request, or if you
|
||||
want to use a branch other than `master`.
|
||||
|
||||
For example:
|
||||
|
||||
```shell
|
||||
REPO=apjanke/oh-my-zsh BRANCH=edge sh install.sh
|
||||
```
|
||||
|
||||
#### Manual Installation
|
||||
|
||||
##### 1. Clone the repository:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
|
||||
```
|
||||
|
||||
##### 2. *Optionally*, backup your existing `~/.zshrc` file:
|
||||
|
||||
```shell
|
||||
cp ~/.zshrc ~/.zshrc.orig
|
||||
```
|
||||
|
||||
##### 3. Create a new zsh configuration file
|
||||
|
||||
You can create a new zsh config file by copying the template that we have included for you.
|
||||
|
||||
```shell
|
||||
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
|
||||
```
|
||||
|
||||
##### 4. Change your default shell
|
||||
|
||||
```shell
|
||||
chsh -s $(which zsh)
|
||||
```
|
||||
|
||||
You must log out from your user session and log back in to see this change.
|
||||
|
||||
##### 5. Initialize your new zsh configuration
|
||||
|
||||
Once you open up a new terminal window, it should load zsh with Oh My Zsh's configuration.
|
||||
|
||||
### Installation Problems
|
||||
|
||||
If you have any hiccups installing, here are a few common fixes.
|
||||
|
||||
* You _might_ need to modify your `PATH` in `~/.zshrc` if you're not able to find some commands after
|
||||
switching to `oh-my-zsh`.
|
||||
* If you installed manually or changed the install location, check the `ZSH` environment variable in
|
||||
`~/.zshrc`.
|
||||
|
||||
### Custom Plugins and Themes
|
||||
|
||||
If you want to override any of the default behaviors, just add a new file (ending in `.zsh`) in the `custom/` directory.
|
||||
|
||||
If you have many functions that go well together, you can put them as a `XYZ.plugin.zsh` file in the `custom/plugins/` directory and then enable this plugin.
|
||||
|
||||
If you would like to override the functionality of a plugin distributed with Oh My Zsh, create a plugin of the same name in the `custom/plugins/` directory and it will be loaded instead of the one in `plugins/`.
|
||||
|
||||
## Getting Updates
|
||||
|
||||
By default, you will be prompted to check for upgrades every few weeks. If you would like `oh-my-zsh` to automatically upgrade itself without prompting you, set the following in your `~/.zshrc`:
|
||||
|
||||
```shell
|
||||
DISABLE_UPDATE_PROMPT=true
|
||||
```
|
||||
|
||||
To disable automatic upgrades, set the following in your `~/.zshrc`:
|
||||
|
||||
```shell
|
||||
DISABLE_AUTO_UPDATE=true
|
||||
```
|
||||
|
||||
### Manual Updates
|
||||
|
||||
If you'd like to upgrade at any point in time (maybe someone just released a new plugin and you don't want to wait a week?) you just need to run:
|
||||
|
||||
```shell
|
||||
upgrade_oh_my_zsh
|
||||
```
|
||||
|
||||
Magic! 🎉
|
||||
|
||||
## Uninstalling Oh My Zsh
|
||||
|
||||
Oh My Zsh isn't for everyone. We'll miss you, but we want to make this an easy breakup.
|
||||
|
||||
If you want to uninstall `oh-my-zsh`, just run `uninstall_oh_my_zsh` from the command-line. It will remove itself and revert your previous `bash` or `zsh` configuration.
|
||||
|
||||
## How do I contribute to Oh My Zsh?
|
||||
|
||||
Before you participate in our delightful community, please read the [code of conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
I'm far from being a [Zsh](https://www.zsh.org/) expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!
|
||||
|
||||
We also need people to test out pull-requests. So take a look through [the open issues](https://github.com/robbyrussell/oh-my-zsh/issues) and help where you can.
|
||||
|
||||
See [Contributing](CONTRIBUTING.md) for more details.
|
||||
|
||||
### Do NOT send us themes
|
||||
|
||||
We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) wiki page.
|
||||
|
||||
## Contributors
|
||||
|
||||
Oh My Zsh has a vibrant community of happy users and delightful contributors. Without all the time and help from our contributors, it wouldn't be so awesome.
|
||||
|
||||
Thank you so much!
|
||||
|
||||
## Follow Us
|
||||
|
||||
We're on the social media.
|
||||
|
||||
* [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter. You should follow it.
|
||||
* [Oh My Zsh](https://www.facebook.com/Oh-My-Zsh-296616263819290/) on Facebook.
|
||||
|
||||
## Merchandise
|
||||
|
||||
We have [stickers, shirts, and coffee mugs available](https://shop.planetargon.com/collections/oh-my-zsh?utm_source=github) for you to show off your love of Oh My Zsh. Again, you will become the talk of the town!
|
||||
|
||||
## License
|
||||
|
||||
Oh My Zsh is released under the [MIT license](LICENSE.txt).
|
||||
|
||||
## About Planet Argon
|
||||
|
||||

|
||||
|
||||
Oh My Zsh was started by the team at [Planet Argon](https://www.planetargon.com/?utm_source=github), a [Ruby on Rails development agency](https://www.planetargon.com/skills/ruby-on-rails-development?utm_source=github). Check out our [other open source projects](https://www.planetargon.com/open-source?utm_source=github).
|
||||
10
.oh-my-zsh/lib/bzr.zsh
Executable file
10
.oh-my-zsh/lib/bzr.zsh
Executable file
@@ -0,0 +1,10 @@
|
||||
## Bazaar integration
|
||||
## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT
|
||||
function bzr_prompt_info() {
|
||||
BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'`
|
||||
if [ -n "$BZR_CB" ]; then
|
||||
BZR_DIRTY=""
|
||||
[[ -n `bzr status` ]] && BZR_DIRTY=" %{$fg[red]%} * %{$fg[green]%}"
|
||||
echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
86
.oh-my-zsh/lib/clipboard.zsh
Executable file
86
.oh-my-zsh/lib/clipboard.zsh
Executable file
@@ -0,0 +1,86 @@
|
||||
# System clipboard integration
|
||||
#
|
||||
# This file has support for doing system clipboard copy and paste operations
|
||||
# from the command line in a generic cross-platform fashion.
|
||||
#
|
||||
# On OS X and Windows, the main system clipboard or "pasteboard" is used. On other
|
||||
# Unix-like OSes, this considers the X Windows CLIPBOARD selection to be the
|
||||
# "system clipboard", and the X Windows `xclip` command must be installed.
|
||||
|
||||
# clipcopy - Copy data to clipboard
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# <command> | clipcopy - copies stdin to clipboard
|
||||
#
|
||||
# clipcopy <file> - copies a file's contents to clipboard
|
||||
#
|
||||
function clipcopy() {
|
||||
emulate -L zsh
|
||||
local file=$1
|
||||
if [[ $OSTYPE == darwin* ]]; then
|
||||
if [[ -z $file ]]; then
|
||||
pbcopy
|
||||
else
|
||||
cat $file | pbcopy
|
||||
fi
|
||||
elif [[ $OSTYPE == cygwin* ]]; then
|
||||
if [[ -z $file ]]; then
|
||||
cat > /dev/clipboard
|
||||
else
|
||||
cat $file > /dev/clipboard
|
||||
fi
|
||||
else
|
||||
if (( $+commands[xclip] )); then
|
||||
if [[ -z $file ]]; then
|
||||
xclip -in -selection clipboard
|
||||
else
|
||||
xclip -in -selection clipboard $file
|
||||
fi
|
||||
elif (( $+commands[xsel] )); then
|
||||
if [[ -z $file ]]; then
|
||||
xsel --clipboard --input
|
||||
else
|
||||
cat "$file" | xsel --clipboard --input
|
||||
fi
|
||||
else
|
||||
print "clipcopy: Platform $OSTYPE not supported or xclip/xsel not installed" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# clippaste - "Paste" data from clipboard to stdout
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# clippaste - writes clipboard's contents to stdout
|
||||
#
|
||||
# clippaste | <command> - pastes contents and pipes it to another process
|
||||
#
|
||||
# clippaste > <file> - paste contents to a file
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# # Pipe to another process
|
||||
# clippaste | grep foo
|
||||
#
|
||||
# # Paste to a file
|
||||
# clippaste > file.txt
|
||||
function clippaste() {
|
||||
emulate -L zsh
|
||||
if [[ $OSTYPE == darwin* ]]; then
|
||||
pbpaste
|
||||
elif [[ $OSTYPE == cygwin* ]]; then
|
||||
cat /dev/clipboard
|
||||
else
|
||||
if (( $+commands[xclip] )); then
|
||||
xclip -out -selection clipboard
|
||||
elif (( $+commands[xsel] )); then
|
||||
xsel --clipboard --output
|
||||
else
|
||||
print "clipcopy: Platform $OSTYPE not supported or xclip/xsel not installed" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
44
.oh-my-zsh/lib/compfix.zsh
Executable file
44
.oh-my-zsh/lib/compfix.zsh
Executable file
@@ -0,0 +1,44 @@
|
||||
# Handle completions insecurities (i.e., completion-dependent directories with
|
||||
# insecure ownership or permissions) by:
|
||||
#
|
||||
# * Human-readably notifying the user of these insecurities.
|
||||
function handle_completion_insecurities() {
|
||||
# List of the absolute paths of all unique insecure directories, split on
|
||||
# newline from compaudit()'s output resembling:
|
||||
#
|
||||
# There are insecure directories:
|
||||
# /usr/share/zsh/site-functions
|
||||
# /usr/share/zsh/5.0.6/functions
|
||||
# /usr/share/zsh
|
||||
# /usr/share/zsh/5.0.6
|
||||
#
|
||||
# Since the ignorable first line is printed to stderr and thus not captured,
|
||||
# stderr is squelched to prevent this output from leaking to the user.
|
||||
local -aU insecure_dirs
|
||||
insecure_dirs=( ${(f@):-"$(compaudit 2>/dev/null)"} )
|
||||
|
||||
# If no such directories exist, get us out of here.
|
||||
[[ -z "${insecure_dirs}" ]] && return
|
||||
|
||||
# List ownership and permissions of all insecure directories.
|
||||
print "[oh-my-zsh] Insecure completion-dependent directories detected:"
|
||||
ls -ld "${(@)insecure_dirs}"
|
||||
|
||||
cat <<EOD
|
||||
|
||||
[oh-my-zsh] For safety, we will not load completions from these directories until
|
||||
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
|
||||
[oh-my-zsh] See the above list for directories with group or other writability.
|
||||
|
||||
[oh-my-zsh] To fix your permissions you can do so by disabling
|
||||
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
|
||||
[oh-my-zsh] owner of these directories is either root or your current user.
|
||||
[oh-my-zsh] The following command may help:
|
||||
[oh-my-zsh] compaudit | xargs chmod g-w,o-w
|
||||
|
||||
[oh-my-zsh] If the above didn't help or you want to skip the verification of
|
||||
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
|
||||
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.
|
||||
|
||||
EOD
|
||||
}
|
||||
73
.oh-my-zsh/lib/completion.zsh
Executable file
73
.oh-my-zsh/lib/completion.zsh
Executable file
@@ -0,0 +1,73 @@
|
||||
# fixme - the load process here seems a bit bizarre
|
||||
zmodload -i zsh/complist
|
||||
|
||||
WORDCHARS=''
|
||||
|
||||
unsetopt menu_complete # do not autoselect the first completion entry
|
||||
unsetopt flowcontrol
|
||||
setopt auto_menu # show completion menu on successive tab press
|
||||
setopt complete_in_word
|
||||
setopt always_to_end
|
||||
|
||||
# should this be in keybindings?
|
||||
bindkey -M menuselect '^o' accept-and-infer-next-history
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
|
||||
# case insensitive (all), partial-word and substring completion
|
||||
if [[ "$CASE_SENSITIVE" = true ]]; then
|
||||
zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*'
|
||||
else
|
||||
if [[ "$HYPHEN_INSENSITIVE" = true ]]; then
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*'
|
||||
else
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
|
||||
fi
|
||||
fi
|
||||
unset CASE_SENSITIVE HYPHEN_INSENSITIVE
|
||||
|
||||
# Complete . and .. special directories
|
||||
zstyle ':completion:*' special-dirs true
|
||||
|
||||
zstyle ':completion:*' list-colors ''
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
|
||||
if [[ "$OSTYPE" = solaris* ]]; then
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm"
|
||||
else
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
|
||||
fi
|
||||
|
||||
# disable named-directories autocompletion
|
||||
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||
|
||||
# Use caching so that commands like apt and dpkg complete are useable
|
||||
zstyle ':completion::complete:*' use-cache 1
|
||||
zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR
|
||||
|
||||
# Don't complete uninteresting users
|
||||
zstyle ':completion:*:*:*:users' ignored-patterns \
|
||||
adm amanda apache at avahi avahi-autoipd beaglidx bin cacti canna \
|
||||
clamav daemon dbus distcache dnsmasq dovecot fax ftp games gdm \
|
||||
gkrellmd gopher hacluster haldaemon halt hsqldb ident junkbust kdm \
|
||||
ldap lp mail mailman mailnull man messagebus mldonkey mysql nagios \
|
||||
named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \
|
||||
operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \
|
||||
rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \
|
||||
usbmux uucp vcsa wwwrun xfs '_*'
|
||||
|
||||
# ... unless we really want to.
|
||||
zstyle '*' single-ignored show
|
||||
|
||||
if [[ $COMPLETION_WAITING_DOTS = true ]]; then
|
||||
expand-or-complete-with-dots() {
|
||||
# toggle line-wrapping off and back on again
|
||||
[[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam
|
||||
print -Pn "%{%F{red}......%f%}"
|
||||
[[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti smam
|
||||
|
||||
zle expand-or-complete
|
||||
zle redisplay
|
||||
}
|
||||
zle -N expand-or-complete-with-dots
|
||||
bindkey "^I" expand-or-complete-with-dots
|
||||
fi
|
||||
14
.oh-my-zsh/lib/correction.zsh
Executable file
14
.oh-my-zsh/lib/correction.zsh
Executable file
@@ -0,0 +1,14 @@
|
||||
if [[ "$ENABLE_CORRECTION" == "true" ]]; then
|
||||
alias cp='nocorrect cp'
|
||||
alias ebuild='nocorrect ebuild'
|
||||
alias gist='nocorrect gist'
|
||||
alias heroku='nocorrect heroku'
|
||||
alias hpodder='nocorrect hpodder'
|
||||
alias man='nocorrect man'
|
||||
alias mkdir='nocorrect mkdir'
|
||||
alias mv='nocorrect mv'
|
||||
alias mysql='nocorrect mysql'
|
||||
alias sudo='nocorrect sudo'
|
||||
|
||||
setopt correct_all
|
||||
fi
|
||||
353
.oh-my-zsh/lib/diagnostics.zsh
Executable file
353
.oh-my-zsh/lib/diagnostics.zsh
Executable file
@@ -0,0 +1,353 @@
|
||||
# diagnostics.zsh
|
||||
#
|
||||
# Diagnostic and debugging support for oh-my-zsh
|
||||
|
||||
# omz_diagnostic_dump()
|
||||
#
|
||||
# Author: Andrew Janke <andrew@apjanke.net>
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# omz_diagnostic_dump [-v] [-V] [file]
|
||||
#
|
||||
# NOTE: This is a work in progress. Its interface and behavior are going to change,
|
||||
# and probably in non-back-compatible ways.
|
||||
#
|
||||
# Outputs a bunch of information about the state and configuration of
|
||||
# oh-my-zsh, zsh, and the user's system. This is intended to provide a
|
||||
# bunch of context for diagnosing your own or a third party's problems, and to
|
||||
# be suitable for posting to public bug reports.
|
||||
#
|
||||
# The output is human-readable and its format may change over time. It is not
|
||||
# suitable for parsing. All the output is in one single file so it can be posted
|
||||
# as a gist or bug comment on GitHub. GitHub doesn't support attaching tarballs
|
||||
# or other files to bugs; otherwise, this would probably have an option to produce
|
||||
# tarballs that contain copies of the config and customization files instead of
|
||||
# catting them all in to one file.
|
||||
#
|
||||
# This is intended to be widely portable, and run anywhere that oh-my-zsh does.
|
||||
# Feel free to report any portability issues as bugs.
|
||||
#
|
||||
# This is written in a defensive style so it still works (and can detect) cases when
|
||||
# basic functionality like echo and which have been redefined. In particular, almost
|
||||
# everything is invoked with "builtin" or "command", to work in the face of user
|
||||
# redefinitions.
|
||||
#
|
||||
# OPTIONS
|
||||
#
|
||||
# [file] Specifies the output file. If not given, a file in the current directory
|
||||
# is selected automatically.
|
||||
#
|
||||
# -v Increase the verbosity of the dump output. May be specified multiple times.
|
||||
# Verbosity levels:
|
||||
# 0 - Basic info, shell state, omz configuration, git state
|
||||
# 1 - (default) Adds key binding info and configuration file contents
|
||||
# 2 - Adds zcompdump file contents
|
||||
#
|
||||
# -V Reduce the verbosity of the dump output. May be specified multiple times.
|
||||
#
|
||||
# TODO:
|
||||
# * Multi-file capture
|
||||
# * Add automatic gist uploading
|
||||
# * Consider whether to move default output file location to TMPDIR. More robust
|
||||
# but less user friendly.
|
||||
#
|
||||
|
||||
autoload -Uz is-at-least
|
||||
|
||||
function omz_diagnostic_dump() {
|
||||
emulate -L zsh
|
||||
|
||||
builtin echo "Generating diagnostic dump; please be patient..."
|
||||
|
||||
local thisfcn=omz_diagnostic_dump
|
||||
local -A opts
|
||||
local opt_verbose opt_noverbose opt_outfile
|
||||
local timestamp=$(date +%Y%m%d-%H%M%S)
|
||||
local outfile=omz_diagdump_$timestamp.txt
|
||||
builtin zparseopts -A opts -D -- "v+=opt_verbose" "V+=opt_noverbose"
|
||||
local verbose n_verbose=${#opt_verbose} n_noverbose=${#opt_noverbose}
|
||||
(( verbose = 1 + n_verbose - n_noverbose ))
|
||||
|
||||
if [[ ${#*} > 0 ]]; then
|
||||
opt_outfile=$1
|
||||
fi
|
||||
if [[ ${#*} > 1 ]]; then
|
||||
builtin echo "$thisfcn: error: too many arguments" >&2
|
||||
return 1
|
||||
fi
|
||||
if [[ -n "$opt_outfile" ]]; then
|
||||
outfile="$opt_outfile"
|
||||
fi
|
||||
|
||||
# Always write directly to a file so terminal escape sequences are
|
||||
# captured cleanly
|
||||
_omz_diag_dump_one_big_text &> "$outfile"
|
||||
if [[ $? != 0 ]]; then
|
||||
builtin echo "$thisfcn: error while creating diagnostic dump; see $outfile for details"
|
||||
fi
|
||||
|
||||
builtin echo
|
||||
builtin echo Diagnostic dump file created at: "$outfile"
|
||||
builtin echo
|
||||
builtin echo To share this with OMZ developers, post it as a gist on GitHub
|
||||
builtin echo at "https://gist.github.com" and share the link to the gist.
|
||||
builtin echo
|
||||
builtin echo "WARNING: This dump file contains all your zsh and omz configuration files,"
|
||||
builtin echo "so don't share it publicly if there's sensitive information in them."
|
||||
builtin echo
|
||||
|
||||
}
|
||||
|
||||
function _omz_diag_dump_one_big_text() {
|
||||
local program programs progfile md5
|
||||
|
||||
builtin echo oh-my-zsh diagnostic dump
|
||||
builtin echo
|
||||
builtin echo $outfile
|
||||
builtin echo
|
||||
|
||||
# Basic system and zsh information
|
||||
command date
|
||||
command uname -a
|
||||
builtin echo OSTYPE=$OSTYPE
|
||||
builtin echo ZSH_VERSION=$ZSH_VERSION
|
||||
builtin echo User: $USER
|
||||
builtin echo umask: $(umask)
|
||||
builtin echo
|
||||
_omz_diag_dump_os_specific_version
|
||||
builtin echo
|
||||
|
||||
# Installed programs
|
||||
programs=(sh zsh ksh bash sed cat grep ls find git posh)
|
||||
local progfile="" extra_str="" sha_str=""
|
||||
for program in $programs; do
|
||||
extra_str="" sha_str=""
|
||||
progfile=$(builtin which $program)
|
||||
if [[ $? == 0 ]]; then
|
||||
if [[ -e $progfile ]]; then
|
||||
if builtin whence shasum &>/dev/null; then
|
||||
sha_str=($(command shasum $progfile))
|
||||
sha_str=$sha_str[1]
|
||||
extra_str+=" SHA $sha_str"
|
||||
fi
|
||||
if [[ -h "$progfile" ]]; then
|
||||
extra_str+=" ( -> ${progfile:A} )"
|
||||
fi
|
||||
fi
|
||||
builtin printf '%-9s %-20s %s\n' "$program is" "$progfile" "$extra_str"
|
||||
else
|
||||
builtin echo "$program: not found"
|
||||
fi
|
||||
done
|
||||
builtin echo
|
||||
builtin echo Command Versions:
|
||||
builtin echo "zsh: $(zsh --version)"
|
||||
builtin echo "this zsh session: $ZSH_VERSION"
|
||||
builtin echo "bash: $(bash --version | command grep bash)"
|
||||
builtin echo "git: $(git --version)"
|
||||
builtin echo "grep: $(grep --version)"
|
||||
builtin echo
|
||||
|
||||
# Core command definitions
|
||||
_omz_diag_dump_check_core_commands || return 1
|
||||
builtin echo
|
||||
|
||||
# ZSH Process state
|
||||
builtin echo Process state:
|
||||
builtin echo pwd: $PWD
|
||||
if builtin whence pstree &>/dev/null; then
|
||||
builtin echo Process tree for this shell:
|
||||
pstree -p $$
|
||||
else
|
||||
ps -fT
|
||||
fi
|
||||
builtin set | command grep -a '^\(ZSH\|plugins\|TERM\|LC_\|LANG\|precmd\|chpwd\|preexec\|FPATH\|TTY\|DISPLAY\|PATH\)\|OMZ'
|
||||
builtin echo
|
||||
#TODO: Should this include `env` instead of or in addition to `export`?
|
||||
builtin echo Exported:
|
||||
builtin echo $(builtin export | command sed 's/=.*//')
|
||||
builtin echo
|
||||
builtin echo Locale:
|
||||
command locale
|
||||
builtin echo
|
||||
|
||||
# Zsh installation and configuration
|
||||
builtin echo Zsh configuration:
|
||||
builtin echo setopt: $(builtin setopt)
|
||||
builtin echo
|
||||
builtin echo zstyle:
|
||||
builtin zstyle
|
||||
builtin echo
|
||||
builtin echo 'compaudit output:'
|
||||
compaudit
|
||||
builtin echo
|
||||
builtin echo '$fpath directories:'
|
||||
command ls -lad $fpath
|
||||
builtin echo
|
||||
|
||||
# Oh-my-zsh installation
|
||||
builtin echo oh-my-zsh installation:
|
||||
command ls -ld ~/.z*
|
||||
command ls -ld ~/.oh*
|
||||
builtin echo
|
||||
builtin echo oh-my-zsh git state:
|
||||
(cd $ZSH && builtin echo "HEAD: $(git rev-parse HEAD)" && git remote -v && git status | command grep "[^[:space:]]")
|
||||
if [[ $verbose -ge 1 ]]; then
|
||||
(cd $ZSH && git reflog --date=default | command grep pull)
|
||||
fi
|
||||
builtin echo
|
||||
if [[ -e $ZSH_CUSTOM ]]; then
|
||||
local custom_dir=$ZSH_CUSTOM
|
||||
if [[ -h $custom_dir ]]; then
|
||||
custom_dir=$(cd $custom_dir && pwd -P)
|
||||
fi
|
||||
builtin echo "oh-my-zsh custom dir:"
|
||||
builtin echo " $ZSH_CUSTOM ($custom_dir)"
|
||||
(cd ${custom_dir:h} && command find ${custom_dir:t} -name .git -prune -o -print)
|
||||
builtin echo
|
||||
fi
|
||||
|
||||
# Key binding and terminal info
|
||||
if [[ $verbose -ge 1 ]]; then
|
||||
builtin echo "bindkey:"
|
||||
builtin bindkey
|
||||
builtin echo
|
||||
builtin echo "infocmp:"
|
||||
command infocmp -L
|
||||
builtin echo
|
||||
fi
|
||||
|
||||
# Configuration file info
|
||||
local zdotdir=${ZDOTDIR:-$HOME}
|
||||
builtin echo "Zsh configuration files:"
|
||||
local cfgfile cfgfiles
|
||||
# Some files for bash that zsh does not use are intentionally included
|
||||
# to help with diagnosing behavior differences between bash and zsh
|
||||
cfgfiles=( /etc/zshenv /etc/zprofile /etc/zshrc /etc/zlogin /etc/zlogout
|
||||
$zdotdir/.zshenv $zdotdir/.zprofile $zdotdir/.zshrc $zdotdir/.zlogin $zdotdir/.zlogout
|
||||
~/.zsh.pre-oh-my-zsh
|
||||
/etc/bashrc /etc/profile ~/.bashrc ~/.profile ~/.bash_profile ~/.bash_logout )
|
||||
command ls -lad $cfgfiles 2>&1
|
||||
builtin echo
|
||||
if [[ $verbose -ge 1 ]]; then
|
||||
for cfgfile in $cfgfiles; do
|
||||
_omz_diag_dump_echo_file_w_header $cfgfile
|
||||
done
|
||||
fi
|
||||
builtin echo
|
||||
builtin echo "Zsh compdump files:"
|
||||
local dumpfile dumpfiles
|
||||
command ls -lad $zdotdir/.zcompdump*
|
||||
dumpfiles=( $zdotdir/.zcompdump*(N) )
|
||||
if [[ $verbose -ge 2 ]]; then
|
||||
for dumpfile in $dumpfiles; do
|
||||
_omz_diag_dump_echo_file_w_header $dumpfile
|
||||
done
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function _omz_diag_dump_check_core_commands() {
|
||||
builtin echo "Core command check:"
|
||||
local redefined name builtins externals reserved_words
|
||||
redefined=()
|
||||
# All the zsh non-module builtin commands
|
||||
# These are taken from the zsh reference manual for 5.0.2
|
||||
# Commands from modules should not be included.
|
||||
# (For back-compatibility, if any of these are newish, they should be removed,
|
||||
# or at least made conditional on the version of the current running zsh.)
|
||||
# "history" is also excluded because OMZ is known to redefine that
|
||||
reserved_words=( do done esac then elif else fi for case if while function
|
||||
repeat time until select coproc nocorrect foreach end '!' '[[' '{' '}'
|
||||
)
|
||||
builtins=( alias autoload bg bindkey break builtin bye cd chdir command
|
||||
comparguments compcall compctl compdescribe compfiles compgroups compquote comptags
|
||||
comptry compvalues continue dirs disable disown echo echotc echoti emulate
|
||||
enable eval exec exit false fc fg functions getln getopts hash
|
||||
jobs kill let limit log logout noglob popd print printf
|
||||
pushd pushln pwd r read rehash return sched set setopt shift
|
||||
source suspend test times trap true ttyctl type ulimit umask unalias
|
||||
unfunction unhash unlimit unset unsetopt vared wait whence where which zcompile
|
||||
zle zmodload zparseopts zregexparse zstyle )
|
||||
if is-at-least 5.1; then
|
||||
reserved_word+=( declare export integer float local readonly typeset )
|
||||
else
|
||||
builtins+=( declare export integer float local readonly typeset )
|
||||
fi
|
||||
builtins_fatal=( builtin command local )
|
||||
externals=( zsh )
|
||||
for name in $reserved_words; do
|
||||
if [[ $(builtin whence -w $name) != "$name: reserved" ]]; then
|
||||
builtin echo "reserved word '$name' has been redefined"
|
||||
builtin which $name
|
||||
redefined+=$name
|
||||
fi
|
||||
done
|
||||
for name in $builtins; do
|
||||
if [[ $(builtin whence -w $name) != "$name: builtin" ]]; then
|
||||
builtin echo "builtin '$name' has been redefined"
|
||||
builtin which $name
|
||||
redefined+=$name
|
||||
fi
|
||||
done
|
||||
for name in $externals; do
|
||||
if [[ $(builtin whence -w $name) != "$name: command" ]]; then
|
||||
builtin echo "command '$name' has been redefined"
|
||||
builtin which $name
|
||||
redefined+=$name
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$redefined" ]]; then
|
||||
builtin echo "SOME CORE COMMANDS HAVE BEEN REDEFINED: $redefined"
|
||||
else
|
||||
builtin echo "All core commands are defined normally"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function _omz_diag_dump_echo_file_w_header() {
|
||||
local file=$1
|
||||
if [[ ( -f $file || -h $file ) ]]; then
|
||||
builtin echo "========== $file =========="
|
||||
if [[ -h $file ]]; then
|
||||
builtin echo "========== ( => ${file:A} ) =========="
|
||||
fi
|
||||
command cat $file
|
||||
builtin echo "========== end $file =========="
|
||||
builtin echo
|
||||
elif [[ -d $file ]]; then
|
||||
builtin echo "File '$file' is a directory"
|
||||
elif [[ ! -e $file ]]; then
|
||||
builtin echo "File '$file' does not exist"
|
||||
else
|
||||
command ls -lad "$file"
|
||||
fi
|
||||
}
|
||||
|
||||
function _omz_diag_dump_os_specific_version() {
|
||||
local osname osver version_file version_files
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
osname=$(command sw_vers -productName)
|
||||
osver=$(command sw_vers -productVersion)
|
||||
builtin echo "OS Version: $osname $osver build $(sw_vers -buildVersion)"
|
||||
;;
|
||||
cygwin)
|
||||
command systeminfo | command head -4 | command tail -2
|
||||
;;
|
||||
esac
|
||||
|
||||
if builtin which lsb_release >/dev/null; then
|
||||
builtin echo "OS Release: $(command lsb_release -s -d)"
|
||||
fi
|
||||
|
||||
version_files=( /etc/*-release(N) /etc/*-version(N) /etc/*_version(N) )
|
||||
for version_file in $version_files; do
|
||||
builtin echo "$version_file:"
|
||||
command cat "$version_file"
|
||||
builtin echo
|
||||
done
|
||||
}
|
||||
|
||||
38
.oh-my-zsh/lib/directories.zsh
Executable file
38
.oh-my-zsh/lib/directories.zsh
Executable file
@@ -0,0 +1,38 @@
|
||||
# Changing/making/removing directory
|
||||
setopt auto_pushd
|
||||
setopt pushd_ignore_dups
|
||||
setopt pushdminus
|
||||
|
||||
alias -g ...='../..'
|
||||
alias -g ....='../../..'
|
||||
alias -g .....='../../../..'
|
||||
alias -g ......='../../../../..'
|
||||
|
||||
alias -- -='cd -'
|
||||
alias 1='cd -'
|
||||
alias 2='cd -2'
|
||||
alias 3='cd -3'
|
||||
alias 4='cd -4'
|
||||
alias 5='cd -5'
|
||||
alias 6='cd -6'
|
||||
alias 7='cd -7'
|
||||
alias 8='cd -8'
|
||||
alias 9='cd -9'
|
||||
|
||||
alias md='mkdir -p'
|
||||
alias rd=rmdir
|
||||
|
||||
function d () {
|
||||
if [[ -n $1 ]]; then
|
||||
dirs "$@"
|
||||
else
|
||||
dirs -v | head -10
|
||||
fi
|
||||
}
|
||||
compdef _dirs d
|
||||
|
||||
# List directory contents
|
||||
alias lsa='ls -lah'
|
||||
alias l='ls -lah'
|
||||
alias ll='ls -lh'
|
||||
alias la='ls -lAh'
|
||||
229
.oh-my-zsh/lib/functions.zsh
Executable file
229
.oh-my-zsh/lib/functions.zsh
Executable file
@@ -0,0 +1,229 @@
|
||||
function zsh_stats() {
|
||||
fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
|
||||
}
|
||||
|
||||
function uninstall_oh_my_zsh() {
|
||||
env ZSH=$ZSH sh $ZSH/tools/uninstall.sh
|
||||
}
|
||||
|
||||
function upgrade_oh_my_zsh() {
|
||||
env ZSH=$ZSH sh $ZSH/tools/upgrade.sh
|
||||
}
|
||||
|
||||
function take() {
|
||||
mkdir -p $@ && cd ${@:$#}
|
||||
}
|
||||
|
||||
function open_command() {
|
||||
local open_cmd
|
||||
|
||||
# define the open command
|
||||
case "$OSTYPE" in
|
||||
darwin*) open_cmd='open' ;;
|
||||
cygwin*) open_cmd='cygstart' ;;
|
||||
linux*) ! [[ $(uname -a) =~ "Microsoft" ]] && open_cmd='xdg-open' || {
|
||||
open_cmd='cmd.exe /c start ""'
|
||||
[[ -e "$1" ]] && { 1="$(wslpath -w "${1:a}")" || return 1 }
|
||||
} ;;
|
||||
msys*) open_cmd='start ""' ;;
|
||||
*) echo "Platform $OSTYPE not supported"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# don't use nohup on OSX
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
${=open_cmd} "$@" &>/dev/null
|
||||
else
|
||||
nohup ${=open_cmd} "$@" &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Get the value of an alias.
|
||||
#
|
||||
# Arguments:
|
||||
# 1. alias - The alias to get its value from
|
||||
# STDOUT:
|
||||
# The value of alias $1 (if it has one).
|
||||
# Return value:
|
||||
# 0 if the alias was found,
|
||||
# 1 if it does not exist
|
||||
#
|
||||
function alias_value() {
|
||||
(( $+aliases[$1] )) && echo $aliases[$1]
|
||||
}
|
||||
|
||||
#
|
||||
# Try to get the value of an alias,
|
||||
# otherwise return the input.
|
||||
#
|
||||
# Arguments:
|
||||
# 1. alias - The alias to get its value from
|
||||
# STDOUT:
|
||||
# The value of alias $1, or $1 if there is no alias $1.
|
||||
# Return value:
|
||||
# Always 0
|
||||
#
|
||||
function try_alias_value() {
|
||||
alias_value "$1" || echo "$1"
|
||||
}
|
||||
|
||||
#
|
||||
# Set variable "$1" to default value "$2" if "$1" is not yet defined.
|
||||
#
|
||||
# Arguments:
|
||||
# 1. name - The variable to set
|
||||
# 2. val - The default value
|
||||
# Return value:
|
||||
# 0 if the variable exists, 3 if it was set
|
||||
#
|
||||
function default() {
|
||||
(( $+parameters[$1] )) && return 0
|
||||
typeset -g "$1"="$2" && return 3
|
||||
}
|
||||
|
||||
#
|
||||
# Set environment variable "$1" to default value "$2" if "$1" is not yet defined.
|
||||
#
|
||||
# Arguments:
|
||||
# 1. name - The env variable to set
|
||||
# 2. val - The default value
|
||||
# Return value:
|
||||
# 0 if the env variable exists, 3 if it was set
|
||||
#
|
||||
function env_default() {
|
||||
(( ${${(@f):-$(typeset +xg)}[(I)$1]} )) && return 0
|
||||
export "$1=$2" && return 3
|
||||
}
|
||||
|
||||
|
||||
# Required for $langinfo
|
||||
zmodload zsh/langinfo
|
||||
|
||||
# URL-encode a string
|
||||
#
|
||||
# Encodes a string using RFC 2396 URL-encoding (%-escaped).
|
||||
# See: https://www.ietf.org/rfc/rfc2396.txt
|
||||
#
|
||||
# By default, reserved characters and unreserved "mark" characters are
|
||||
# not escaped by this function. This allows the common usage of passing
|
||||
# an entire URL in, and encoding just special characters in it, with
|
||||
# the expectation that reserved and mark characters are used appropriately.
|
||||
# The -r and -m options turn on escaping of the reserved and mark characters,
|
||||
# respectively, which allows arbitrary strings to be fully escaped for
|
||||
# embedding inside URLs, where reserved characters might be misinterpreted.
|
||||
#
|
||||
# Prints the encoded string on stdout.
|
||||
# Returns nonzero if encoding failed.
|
||||
#
|
||||
# Usage:
|
||||
# omz_urlencode [-r] [-m] [-P] <string>
|
||||
#
|
||||
# -r causes reserved characters (;/?:@&=+$,) to be escaped
|
||||
#
|
||||
# -m causes "mark" characters (_.!~*''()-) to be escaped
|
||||
#
|
||||
# -P causes spaces to be encoded as '%20' instead of '+'
|
||||
function omz_urlencode() {
|
||||
emulate -L zsh
|
||||
zparseopts -D -E -a opts r m P
|
||||
|
||||
local in_str=$1
|
||||
local url_str=""
|
||||
local spaces_as_plus
|
||||
if [[ -z $opts[(r)-P] ]]; then spaces_as_plus=1; fi
|
||||
local str="$in_str"
|
||||
|
||||
# URLs must use UTF-8 encoding; convert str to UTF-8 if required
|
||||
local encoding=$langinfo[CODESET]
|
||||
local safe_encodings
|
||||
safe_encodings=(UTF-8 utf8 US-ASCII)
|
||||
if [[ -z ${safe_encodings[(r)$encoding]} ]]; then
|
||||
str=$(echo -E "$str" | iconv -f $encoding -t UTF-8)
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Error converting string from $encoding to UTF-8" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use LC_CTYPE=C to process text byte-by-byte
|
||||
local i byte ord LC_ALL=C
|
||||
export LC_ALL
|
||||
local reserved=';/?:@&=+$,'
|
||||
local mark='_.!~*''()-'
|
||||
local dont_escape="[A-Za-z0-9"
|
||||
if [[ -z $opts[(r)-r] ]]; then
|
||||
dont_escape+=$reserved
|
||||
fi
|
||||
# $mark must be last because of the "-"
|
||||
if [[ -z $opts[(r)-m] ]]; then
|
||||
dont_escape+=$mark
|
||||
fi
|
||||
dont_escape+="]"
|
||||
|
||||
# Implemented to use a single printf call and avoid subshells in the loop,
|
||||
# for performance (primarily on Windows).
|
||||
local url_str=""
|
||||
for (( i = 1; i <= ${#str}; ++i )); do
|
||||
byte="$str[i]"
|
||||
if [[ "$byte" =~ "$dont_escape" ]]; then
|
||||
url_str+="$byte"
|
||||
else
|
||||
if [[ "$byte" == " " && -n $spaces_as_plus ]]; then
|
||||
url_str+="+"
|
||||
else
|
||||
ord=$(( [##16] #byte ))
|
||||
url_str+="%$ord"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo -E "$url_str"
|
||||
}
|
||||
|
||||
# URL-decode a string
|
||||
#
|
||||
# Decodes a RFC 2396 URL-encoded (%-escaped) string.
|
||||
# This decodes the '+' and '%' escapes in the input string, and leaves
|
||||
# other characters unchanged. Does not enforce that the input is a
|
||||
# valid URL-encoded string. This is a convenience to allow callers to
|
||||
# pass in a full URL or similar strings and decode them for human
|
||||
# presentation.
|
||||
#
|
||||
# Outputs the encoded string on stdout.
|
||||
# Returns nonzero if encoding failed.
|
||||
#
|
||||
# Usage:
|
||||
# omz_urldecode <urlstring> - prints decoded string followed by a newline
|
||||
function omz_urldecode {
|
||||
emulate -L zsh
|
||||
local encoded_url=$1
|
||||
|
||||
# Work bytewise, since URLs escape UTF-8 octets
|
||||
local caller_encoding=$langinfo[CODESET]
|
||||
local LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
# Change + back to ' '
|
||||
local tmp=${encoded_url:gs/+/ /}
|
||||
# Protect other escapes to pass through the printf unchanged
|
||||
tmp=${tmp:gs/\\/\\\\/}
|
||||
# Handle %-escapes by turning them into `\xXX` printf escapes
|
||||
tmp=${tmp:gs/%/\\x/}
|
||||
local decoded
|
||||
eval "decoded=\$'$tmp'"
|
||||
|
||||
# Now we have a UTF-8 encoded string in the variable. We need to re-encode
|
||||
# it if caller is in a non-UTF-8 locale.
|
||||
local safe_encodings
|
||||
safe_encodings=(UTF-8 utf8 US-ASCII)
|
||||
if [[ -z ${safe_encodings[(r)$caller_encoding]} ]]; then
|
||||
decoded=$(echo -E "$decoded" | iconv -f UTF-8 -t $caller_encoding)
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Error converting string from UTF-8 to $caller_encoding" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -E "$decoded"
|
||||
}
|
||||
191
.oh-my-zsh/lib/git.zsh
Executable file
191
.oh-my-zsh/lib/git.zsh
Executable file
@@ -0,0 +1,191 @@
|
||||
# Outputs current branch info in prompt format
|
||||
function git_prompt_info() {
|
||||
local ref
|
||||
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then
|
||||
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if working tree is dirty
|
||||
function parse_git_dirty() {
|
||||
local STATUS
|
||||
local -a FLAGS
|
||||
FLAGS=('--porcelain' '--ignore-submodules=dirty')
|
||||
if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then
|
||||
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
||||
FLAGS+='--untracked-files=no'
|
||||
fi
|
||||
STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1)
|
||||
fi
|
||||
if [[ -n $STATUS ]]; then
|
||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
else
|
||||
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||
fi
|
||||
}
|
||||
|
||||
# Gets the difference between the local and remote branches
|
||||
function git_remote_status() {
|
||||
local remote ahead behind git_remote_status git_remote_status_detailed
|
||||
remote=${$(command git rev-parse --verify ${hook_com[branch]}@{upstream} --symbolic-full-name 2>/dev/null)/refs\/remotes\/}
|
||||
if [[ -n ${remote} ]]; then
|
||||
ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
|
||||
behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
|
||||
|
||||
if [[ $ahead -eq 0 ]] && [[ $behind -eq 0 ]]; then
|
||||
git_remote_status="$ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE"
|
||||
elif [[ $ahead -gt 0 ]] && [[ $behind -eq 0 ]]; then
|
||||
git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
|
||||
git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}"
|
||||
elif [[ $behind -gt 0 ]] && [[ $ahead -eq 0 ]]; then
|
||||
git_remote_status="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
|
||||
git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
|
||||
elif [[ $ahead -gt 0 ]] && [[ $behind -gt 0 ]]; then
|
||||
git_remote_status="$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
|
||||
git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
|
||||
fi
|
||||
|
||||
if [[ -n $ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]]; then
|
||||
git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX$remote$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX"
|
||||
fi
|
||||
|
||||
echo $git_remote_status
|
||||
fi
|
||||
}
|
||||
|
||||
# Outputs the name of the current branch
|
||||
# Usage example: git pull origin $(git_current_branch)
|
||||
# Using '--quiet' with 'symbolic-ref' will not cause a fatal error (128) if
|
||||
# it's not a symbolic ref, but in a Git repo.
|
||||
function git_current_branch() {
|
||||
local ref
|
||||
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
|
||||
local ret=$?
|
||||
if [[ $ret != 0 ]]; then
|
||||
[[ $ret == 128 ]] && return # no git repo.
|
||||
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
|
||||
fi
|
||||
echo ${ref#refs/heads/}
|
||||
}
|
||||
|
||||
|
||||
# Gets the number of commits ahead from remote
|
||||
function git_commits_ahead() {
|
||||
if command git rev-parse --git-dir &>/dev/null; then
|
||||
local commits="$(git rev-list --count @{upstream}..HEAD 2>/dev/null)"
|
||||
if [[ -n "$commits" && "$commits" != 0 ]]; then
|
||||
echo "$ZSH_THEME_GIT_COMMITS_AHEAD_PREFIX$commits$ZSH_THEME_GIT_COMMITS_AHEAD_SUFFIX"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Gets the number of commits behind remote
|
||||
function git_commits_behind() {
|
||||
if command git rev-parse --git-dir &>/dev/null; then
|
||||
local commits="$(git rev-list --count HEAD..@{upstream} 2>/dev/null)"
|
||||
if [[ -n "$commits" && "$commits" != 0 ]]; then
|
||||
echo "$ZSH_THEME_GIT_COMMITS_BEHIND_PREFIX$commits$ZSH_THEME_GIT_COMMITS_BEHIND_SUFFIX"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Outputs if current branch is ahead of remote
|
||||
function git_prompt_ahead() {
|
||||
if [[ -n "$(command git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null)" ]]; then
|
||||
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||
fi
|
||||
}
|
||||
|
||||
# Outputs if current branch is behind remote
|
||||
function git_prompt_behind() {
|
||||
if [[ -n "$(command git rev-list HEAD..origin/$(git_current_branch) 2> /dev/null)" ]]; then
|
||||
echo "$ZSH_THEME_GIT_PROMPT_BEHIND"
|
||||
fi
|
||||
}
|
||||
|
||||
# Outputs if current branch exists on remote or not
|
||||
function git_prompt_remote() {
|
||||
if [[ -n "$(command git show-ref origin/$(git_current_branch) 2> /dev/null)" ]]; then
|
||||
echo "$ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS"
|
||||
else
|
||||
echo "$ZSH_THEME_GIT_PROMPT_REMOTE_MISSING"
|
||||
fi
|
||||
}
|
||||
|
||||
# Formats prompt string for current git commit short SHA
|
||||
function git_prompt_short_sha() {
|
||||
local SHA
|
||||
SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
|
||||
}
|
||||
|
||||
# Formats prompt string for current git commit long SHA
|
||||
function git_prompt_long_sha() {
|
||||
local SHA
|
||||
SHA=$(command git rev-parse HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
|
||||
}
|
||||
|
||||
# Get the status of the working tree
|
||||
function git_prompt_status() {
|
||||
local INDEX STATUS
|
||||
INDEX=$(command git status --porcelain -b 2> /dev/null)
|
||||
STATUS=""
|
||||
if $(echo "$INDEX" | command grep -E '^\?\? ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^A ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^MM ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^MM ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^D ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||
fi
|
||||
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_STASHED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^## [^ ]\+ .*ahead' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^## [^ ]\+ .*behind' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^## [^ ]\+ .*diverged' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS"
|
||||
fi
|
||||
echo $STATUS
|
||||
}
|
||||
|
||||
# Outputs the name of the current user
|
||||
# Usage example: $(git_current_user_name)
|
||||
function git_current_user_name() {
|
||||
command git config user.name 2>/dev/null
|
||||
}
|
||||
|
||||
# Outputs the email of the current user
|
||||
# Usage example: $(git_current_user_email)
|
||||
function git_current_user_email() {
|
||||
command git config user.email 2>/dev/null
|
||||
}
|
||||
28
.oh-my-zsh/lib/grep.zsh
Executable file
28
.oh-my-zsh/lib/grep.zsh
Executable file
@@ -0,0 +1,28 @@
|
||||
# is x grep argument available?
|
||||
grep-flag-available() {
|
||||
echo | grep $1 "" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
GREP_OPTIONS=""
|
||||
|
||||
# color grep results
|
||||
if grep-flag-available --color=auto; then
|
||||
GREP_OPTIONS+=" --color=auto"
|
||||
fi
|
||||
|
||||
# ignore VCS folders (if the necessary grep flags are available)
|
||||
VCS_FOLDERS="{.bzr,CVS,.git,.hg,.svn}"
|
||||
|
||||
if grep-flag-available --exclude-dir=.cvs; then
|
||||
GREP_OPTIONS+=" --exclude-dir=$VCS_FOLDERS"
|
||||
elif grep-flag-available --exclude=.cvs; then
|
||||
GREP_OPTIONS+=" --exclude=$VCS_FOLDERS"
|
||||
fi
|
||||
|
||||
# export grep settings
|
||||
alias grep="grep $GREP_OPTIONS"
|
||||
|
||||
# clean up
|
||||
unset GREP_OPTIONS
|
||||
unset VCS_FOLDERS
|
||||
unfunction grep-flag-available
|
||||
40
.oh-my-zsh/lib/history.zsh
Executable file
40
.oh-my-zsh/lib/history.zsh
Executable file
@@ -0,0 +1,40 @@
|
||||
## History wrapper
|
||||
function omz_history {
|
||||
local clear list
|
||||
zparseopts -E c=clear l=list
|
||||
|
||||
if [[ -n "$clear" ]]; then
|
||||
# if -c provided, clobber the history file
|
||||
echo -n >| "$HISTFILE"
|
||||
echo >&2 History file deleted. Reload the session to see its effects.
|
||||
elif [[ -n "$list" ]]; then
|
||||
# if -l provided, run as if calling `fc' directly
|
||||
builtin fc "$@"
|
||||
else
|
||||
# unless a number is provided, show all history events (starting from 1)
|
||||
[[ ${@[-1]-} = *[0-9]* ]] && builtin fc -l "$@" || builtin fc -l "$@" 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Timestamp format
|
||||
case ${HIST_STAMPS-} in
|
||||
"mm/dd/yyyy") alias history='omz_history -f' ;;
|
||||
"dd.mm.yyyy") alias history='omz_history -E' ;;
|
||||
"yyyy-mm-dd") alias history='omz_history -i' ;;
|
||||
"") alias history='omz_history' ;;
|
||||
*) alias history="omz_history -t '$HIST_STAMPS'" ;;
|
||||
esac
|
||||
|
||||
## History file configuration
|
||||
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
|
||||
HISTSIZE=50000
|
||||
SAVEHIST=10000
|
||||
|
||||
## History command configuration
|
||||
setopt extended_history # record timestamp of command in HISTFILE
|
||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
||||
setopt hist_ignore_space # ignore commands that start with space
|
||||
setopt hist_verify # show command with history expansion to user before running it
|
||||
setopt inc_append_history # add commands to HISTFILE in order of execution
|
||||
setopt share_history # share command history data
|
||||
93
.oh-my-zsh/lib/key-bindings.zsh
Executable file
93
.oh-my-zsh/lib/key-bindings.zsh
Executable file
@@ -0,0 +1,93 @@
|
||||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html
|
||||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins
|
||||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets
|
||||
|
||||
# Make sure that the terminal is in application mode when zle is active, since
|
||||
# only then values from $terminfo are valid
|
||||
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
|
||||
function zle-line-init() {
|
||||
echoti smkx
|
||||
}
|
||||
function zle-line-finish() {
|
||||
echoti rmkx
|
||||
}
|
||||
zle -N zle-line-init
|
||||
zle -N zle-line-finish
|
||||
fi
|
||||
|
||||
bindkey -e # Use emacs key bindings
|
||||
|
||||
bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark
|
||||
bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls
|
||||
bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line.
|
||||
if [[ "${terminfo[kpp]}" != "" ]]; then
|
||||
bindkey "${terminfo[kpp]}" up-line-or-history # [PageUp] - Up a line of history
|
||||
fi
|
||||
if [[ "${terminfo[knp]}" != "" ]]; then
|
||||
bindkey "${terminfo[knp]}" down-line-or-history # [PageDown] - Down a line of history
|
||||
fi
|
||||
|
||||
# start typing + [Up-Arrow] - fuzzy find history forward
|
||||
if [[ "${terminfo[kcuu1]}" != "" ]]; then
|
||||
autoload -U up-line-or-beginning-search
|
||||
zle -N up-line-or-beginning-search
|
||||
bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
fi
|
||||
# start typing + [Down-Arrow] - fuzzy find history backward
|
||||
if [[ "${terminfo[kcud1]}" != "" ]]; then
|
||||
autoload -U down-line-or-beginning-search
|
||||
zle -N down-line-or-beginning-search
|
||||
bindkey "${terminfo[kcud1]}" down-line-or-beginning-search
|
||||
fi
|
||||
|
||||
if [[ "${terminfo[khome]}" != "" ]]; then
|
||||
bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
|
||||
fi
|
||||
if [[ "${terminfo[kend]}" != "" ]]; then
|
||||
bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
|
||||
fi
|
||||
|
||||
bindkey ' ' magic-space # [Space] - do history expansion
|
||||
|
||||
bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word
|
||||
bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word
|
||||
|
||||
if [[ "${terminfo[kcbt]}" != "" ]]; then
|
||||
bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Shift-Tab] - move through the completion menu backwards
|
||||
fi
|
||||
|
||||
bindkey '^?' backward-delete-char # [Backspace] - delete backward
|
||||
if [[ "${terminfo[kdch1]}" != "" ]]; then
|
||||
bindkey "${terminfo[kdch1]}" delete-char # [Delete] - delete forward
|
||||
else
|
||||
bindkey "^[[3~" delete-char
|
||||
bindkey "^[3;5~" delete-char
|
||||
bindkey "\e[3~" delete-char
|
||||
fi
|
||||
|
||||
# Edit the current command line in $EDITOR
|
||||
autoload -U edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey '\C-x\C-e' edit-command-line
|
||||
|
||||
# file rename magick
|
||||
bindkey "^[m" copy-prev-shell-word
|
||||
|
||||
# consider emacs keybindings:
|
||||
|
||||
#bindkey -e ## emacs key bindings
|
||||
#
|
||||
#bindkey '^[[A' up-line-or-search
|
||||
#bindkey '^[[B' down-line-or-search
|
||||
#bindkey '^[^[[C' emacs-forward-word
|
||||
#bindkey '^[^[[D' emacs-backward-word
|
||||
#
|
||||
#bindkey -s '^X^Z' '%-^M'
|
||||
#bindkey '^[e' expand-cmd-path
|
||||
#bindkey '^[^I' reverse-menu-complete
|
||||
#bindkey '^X^N' accept-and-infer-next-history
|
||||
#bindkey '^W' kill-region
|
||||
#bindkey '^I' complete-word
|
||||
## Fix weird sequence that rxvt produces
|
||||
#bindkey -s '^[[Z' '\t'
|
||||
#
|
||||
35
.oh-my-zsh/lib/misc.zsh
Executable file
35
.oh-my-zsh/lib/misc.zsh
Executable file
@@ -0,0 +1,35 @@
|
||||
autoload -Uz is-at-least
|
||||
|
||||
# *-magic is known buggy in some versions; disable if so
|
||||
if [[ $DISABLE_MAGIC_FUNCTIONS != true ]]; then
|
||||
for d in $fpath; do
|
||||
if [[ -e "$d/url-quote-magic" ]]; then
|
||||
if is-at-least 5.1; then
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
fi
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
## jobs
|
||||
setopt long_list_jobs
|
||||
|
||||
env_default 'PAGER' 'less'
|
||||
env_default 'LESS' '-R'
|
||||
|
||||
## super user alias
|
||||
alias _='sudo'
|
||||
|
||||
## more intelligent acking for ubuntu users
|
||||
if which ack-grep &> /dev/null; then
|
||||
alias afind='ack-grep -il'
|
||||
else
|
||||
alias afind='ack -il'
|
||||
fi
|
||||
|
||||
# recognize comments
|
||||
setopt interactivecomments
|
||||
9
.oh-my-zsh/lib/nvm.zsh
Executable file
9
.oh-my-zsh/lib/nvm.zsh
Executable file
@@ -0,0 +1,9 @@
|
||||
# get the node.js version
|
||||
function nvm_prompt_info() {
|
||||
[[ -f "$NVM_DIR/nvm.sh" ]] || return
|
||||
local nvm_prompt
|
||||
nvm_prompt=$(node -v 2>/dev/null)
|
||||
[[ "${nvm_prompt}x" == "x" ]] && return
|
||||
nvm_prompt=${nvm_prompt:1}
|
||||
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
|
||||
}
|
||||
42
.oh-my-zsh/lib/prompt_info_functions.zsh
Executable file
42
.oh-my-zsh/lib/prompt_info_functions.zsh
Executable file
@@ -0,0 +1,42 @@
|
||||
# *_prompt_info functions for usage in your prompt
|
||||
#
|
||||
# Plugin creators, please add your *_prompt_info function to the list
|
||||
# of dummy implementations to help theme creators not receiving errors
|
||||
# without the need of implementing conditional clauses.
|
||||
#
|
||||
# See also lib/bzr.zsh, lib/git.zsh and lib/nvm.zsh for
|
||||
# git_prompt_info, bzr_prompt_info and nvm_prompt_info
|
||||
|
||||
# Dummy implementations that return false to prevent command_not_found
|
||||
# errors with themes, that implement these functions
|
||||
# Real implementations will be used when the respective plugins are loaded
|
||||
function chruby_prompt_info \
|
||||
rbenv_prompt_info \
|
||||
hg_prompt_info \
|
||||
pyenv_prompt_info \
|
||||
svn_prompt_info \
|
||||
vi_mode_prompt_info \
|
||||
virtualenv_prompt_info \
|
||||
jenv_prompt_info \
|
||||
{
|
||||
return 1
|
||||
}
|
||||
|
||||
# oh-my-zsh supports an rvm prompt by default
|
||||
# get the name of the rvm ruby version
|
||||
function rvm_prompt_info() {
|
||||
[ -f $HOME/.rvm/bin/rvm-prompt ] || return 1
|
||||
local rvm_prompt
|
||||
rvm_prompt=$($HOME/.rvm/bin/rvm-prompt ${=ZSH_THEME_RVM_PROMPT_OPTIONS} 2>/dev/null)
|
||||
[[ -z "${rvm_prompt}" ]] && return 1
|
||||
echo "${ZSH_THEME_RUBY_PROMPT_PREFIX}${rvm_prompt}${ZSH_THEME_RUBY_PROMPT_SUFFIX}"
|
||||
}
|
||||
|
||||
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
|
||||
|
||||
|
||||
# use this to enable users to see their ruby version, no matter which
|
||||
# version management system they use
|
||||
function ruby_prompt_info() {
|
||||
echo $(rvm_prompt_info || rbenv_prompt_info || chruby_prompt_info)
|
||||
}
|
||||
37
.oh-my-zsh/lib/spectrum.zsh
Executable file
37
.oh-my-zsh/lib/spectrum.zsh
Executable file
@@ -0,0 +1,37 @@
|
||||
#! /bin/zsh
|
||||
# A script to make using 256 colors in zsh less painful.
|
||||
# P.C. Shyamshankar <sykora@lucentbeing.com>
|
||||
# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
|
||||
|
||||
typeset -AHg FX FG BG
|
||||
|
||||
FX=(
|
||||
reset "%{[00m%}"
|
||||
bold "%{[01m%}" no-bold "%{[22m%}"
|
||||
italic "%{[03m%}" no-italic "%{[23m%}"
|
||||
underline "%{[04m%}" no-underline "%{[24m%}"
|
||||
blink "%{[05m%}" no-blink "%{[25m%}"
|
||||
reverse "%{[07m%}" no-reverse "%{[27m%}"
|
||||
)
|
||||
|
||||
for color in {000..255}; do
|
||||
FG[$color]="%{[38;5;${color}m%}"
|
||||
BG[$color]="%{[48;5;${color}m%}"
|
||||
done
|
||||
|
||||
|
||||
ZSH_SPECTRUM_TEXT=${ZSH_SPECTRUM_TEXT:-Arma virumque cano Troiae qui primus ab oris}
|
||||
|
||||
# Show all 256 colors with color number
|
||||
function spectrum_ls() {
|
||||
for code in {000..255}; do
|
||||
print -P -- "$code: %{$FG[$code]%}$ZSH_SPECTRUM_TEXT%{$reset_color%}"
|
||||
done
|
||||
}
|
||||
|
||||
# Show all 256 colors where the background is set to specific color
|
||||
function spectrum_bls() {
|
||||
for code in {000..255}; do
|
||||
print -P -- "$code: %{$BG[$code]%}$ZSH_SPECTRUM_TEXT%{$reset_color%}"
|
||||
done
|
||||
}
|
||||
105
.oh-my-zsh/lib/termsupport.zsh
Executable file
105
.oh-my-zsh/lib/termsupport.zsh
Executable file
@@ -0,0 +1,105 @@
|
||||
# Set terminal window and tab/icon title
|
||||
#
|
||||
# usage: title short_tab_title [long_window_title]
|
||||
#
|
||||
# See: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1
|
||||
# Fully supports screen, iterm, and probably most modern xterm and rxvt
|
||||
# (In screen, only short_tab_title is used)
|
||||
# Limited support for Apple Terminal (Terminal can't set window and tab separately)
|
||||
function title {
|
||||
emulate -L zsh
|
||||
setopt prompt_subst
|
||||
|
||||
[[ "$EMACS" == *term* ]] && return
|
||||
|
||||
# if $2 is unset use $1 as default
|
||||
# if it is set and empty, leave it as is
|
||||
: ${2=$1}
|
||||
|
||||
case "$TERM" in
|
||||
cygwin|xterm*|putty*|rxvt*|ansi)
|
||||
print -Pn "\e]2;$2:q\a" # set window name
|
||||
print -Pn "\e]1;$1:q\a" # set tab name
|
||||
;;
|
||||
screen*|tmux*)
|
||||
print -Pn "\ek$1:q\e\\" # set screen hardstatus
|
||||
;;
|
||||
*)
|
||||
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
|
||||
print -Pn "\e]2;$2:q\a" # set window name
|
||||
print -Pn "\e]1;$1:q\a" # set tab name
|
||||
else
|
||||
# Try to use terminfo to set the title
|
||||
# If the feature is available set title
|
||||
if [[ -n "$terminfo[fsl]" ]] && [[ -n "$terminfo[tsl]" ]]; then
|
||||
echoti tsl
|
||||
print -Pn "$1"
|
||||
echoti fsl
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD
|
||||
ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~"
|
||||
# Avoid duplication of directory in terminals with independent dir display
|
||||
if [[ "$TERM_PROGRAM" == Apple_Terminal ]]; then
|
||||
ZSH_THEME_TERM_TITLE_IDLE="%n@%m"
|
||||
fi
|
||||
|
||||
# Runs before showing the prompt
|
||||
function omz_termsupport_precmd {
|
||||
emulate -L zsh
|
||||
|
||||
if [[ "$DISABLE_AUTO_TITLE" == true ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
|
||||
}
|
||||
|
||||
# Runs before executing the command
|
||||
function omz_termsupport_preexec {
|
||||
emulate -L zsh
|
||||
setopt extended_glob
|
||||
|
||||
if [[ "$DISABLE_AUTO_TITLE" == true ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# cmd name only, or if this is sudo or ssh, the next cmd
|
||||
local CMD=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}
|
||||
local LINE="${2:gs/%/%%}"
|
||||
|
||||
title '$CMD' '%100>...>$LINE%<<'
|
||||
}
|
||||
|
||||
precmd_functions+=(omz_termsupport_precmd)
|
||||
preexec_functions+=(omz_termsupport_preexec)
|
||||
|
||||
|
||||
# Keep Apple Terminal.app's current working directory updated
|
||||
# Based on this answer: https://superuser.com/a/315029
|
||||
# With extra fixes to handle multibyte chars and non-UTF-8 locales
|
||||
|
||||
if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
|
||||
# Emits the control sequence to notify Terminal.app of the cwd
|
||||
# Identifies the directory using a file: URI scheme, including
|
||||
# the host name to disambiguate local vs. remote paths.
|
||||
function update_terminalapp_cwd() {
|
||||
emulate -L zsh
|
||||
|
||||
# Percent-encode the pathname.
|
||||
local URL_PATH="$(omz_urlencode -P $PWD)"
|
||||
[[ $? != 0 ]] && return 1
|
||||
|
||||
# Undocumented Terminal.app-specific control sequence
|
||||
printf '\e]7;%s\a' "file://$HOST$URL_PATH"
|
||||
}
|
||||
|
||||
# Use a precmd hook instead of a chpwd hook to avoid contaminating output
|
||||
precmd_functions+=(update_terminalapp_cwd)
|
||||
# Run once to get initial cwd set
|
||||
update_terminalapp_cwd
|
||||
fi
|
||||
54
.oh-my-zsh/lib/theme-and-appearance.zsh
Executable file
54
.oh-my-zsh/lib/theme-and-appearance.zsh
Executable file
@@ -0,0 +1,54 @@
|
||||
# ls colors
|
||||
autoload -U colors && colors
|
||||
|
||||
# Enable ls colors
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
|
||||
# TODO organise this chaotic logic
|
||||
|
||||
if [[ "$DISABLE_LS_COLORS" != "true" ]]; then
|
||||
# Find the option for using colors in ls, depending on the version
|
||||
if [[ "$OSTYPE" == netbsd* ]]; then
|
||||
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
|
||||
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
|
||||
gls --color -d . &>/dev/null && alias ls='gls --color=tty'
|
||||
elif [[ "$OSTYPE" == openbsd* ]]; then
|
||||
# On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base,
|
||||
# with color and multibyte support) are available from ports. "colorls"
|
||||
# will be installed on purpose and can't be pulled in by installing
|
||||
# coreutils, so prefer it to "gls".
|
||||
gls --color -d . &>/dev/null && alias ls='gls --color=tty'
|
||||
colorls -G -d . &>/dev/null && alias ls='colorls -G'
|
||||
elif [[ "$OSTYPE" == (darwin|freebsd)* ]]; then
|
||||
# this is a good alias, it works by default just using $LSCOLORS
|
||||
ls -G . &>/dev/null && alias ls='ls -G'
|
||||
|
||||
# only use coreutils ls if there is a dircolors customization present ($LS_COLORS or .dircolors file)
|
||||
# otherwise, gls will use the default color scheme which is ugly af
|
||||
[[ -n "$LS_COLORS" || -f "$HOME/.dircolors" ]] && gls --color -d . &>/dev/null && alias ls='gls --color=tty'
|
||||
else
|
||||
# For GNU ls, we use the default ls color theme. They can later be overwritten by themes.
|
||||
if [[ -z "$LS_COLORS" ]]; then
|
||||
(( $+commands[dircolors] )) && eval "$(dircolors -b)"
|
||||
fi
|
||||
|
||||
ls --color -d . &>/dev/null && alias ls='ls --color=tty' || { ls -G . &>/dev/null && alias ls='ls -G' }
|
||||
|
||||
# Take advantage of $LS_COLORS for completion as well.
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
setopt auto_cd
|
||||
setopt multios
|
||||
setopt prompt_subst
|
||||
|
||||
[[ -n "$WINDOW" ]] && SCREEN_NO="%B$WINDOW%b " || SCREEN_NO=""
|
||||
|
||||
# git theming default: Variables for theming the git info prompt
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="("
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX=")"
|
||||
121
.oh-my-zsh/oh-my-zsh.sh
Executable file
121
.oh-my-zsh/oh-my-zsh.sh
Executable file
@@ -0,0 +1,121 @@
|
||||
# Set ZSH_CACHE_DIR to the path where cache files should be created
|
||||
# or else we will use the default cache/
|
||||
if [[ -z "$ZSH_CACHE_DIR" ]]; then
|
||||
ZSH_CACHE_DIR="$ZSH/cache"
|
||||
fi
|
||||
|
||||
# Migrate .zsh-update file to $ZSH_CACHE_DIR
|
||||
if [ -f ~/.zsh-update ] && [ ! -f ${ZSH_CACHE_DIR}/.zsh-update ]; then
|
||||
mv ~/.zsh-update ${ZSH_CACHE_DIR}/.zsh-update
|
||||
fi
|
||||
|
||||
# Check for updates on initial load...
|
||||
if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
|
||||
env ZSH=$ZSH ZSH_CACHE_DIR=$ZSH_CACHE_DIR DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh
|
||||
fi
|
||||
|
||||
# Initializes Oh My Zsh
|
||||
|
||||
# add a function path
|
||||
fpath=($ZSH/functions $ZSH/completions $fpath)
|
||||
|
||||
# Load all stock functions (from $fpath files) called below.
|
||||
autoload -U compaudit compinit
|
||||
|
||||
# Set ZSH_CUSTOM to the path where your custom config files
|
||||
# and plugins exists, or else we will use the default custom/
|
||||
if [[ -z "$ZSH_CUSTOM" ]]; then
|
||||
ZSH_CUSTOM="$ZSH/custom"
|
||||
fi
|
||||
|
||||
|
||||
is_plugin() {
|
||||
local base_dir=$1
|
||||
local name=$2
|
||||
test -f $base_dir/plugins/$name/$name.plugin.zsh \
|
||||
|| test -f $base_dir/plugins/$name/_$name
|
||||
}
|
||||
|
||||
# Add all defined plugins to fpath. This must be done
|
||||
# before running compinit.
|
||||
for plugin ($plugins); do
|
||||
if is_plugin $ZSH_CUSTOM $plugin; then
|
||||
fpath=($ZSH_CUSTOM/plugins/$plugin $fpath)
|
||||
elif is_plugin $ZSH $plugin; then
|
||||
fpath=($ZSH/plugins/$plugin $fpath)
|
||||
else
|
||||
echo "[oh-my-zsh] plugin '$plugin' not found"
|
||||
fi
|
||||
done
|
||||
|
||||
# Figure out the SHORT hostname
|
||||
if [[ "$OSTYPE" = darwin* ]]; then
|
||||
# macOS's $HOST changes with dhcp, etc. Use ComputerName if possible.
|
||||
SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/}
|
||||
else
|
||||
SHORT_HOST=${HOST/.*/}
|
||||
fi
|
||||
|
||||
# Save the location of the current completion dump file.
|
||||
if [ -z "$ZSH_COMPDUMP" ]; then
|
||||
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||
fi
|
||||
|
||||
if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
|
||||
source $ZSH/lib/compfix.zsh
|
||||
# If completion insecurities exist, warn the user
|
||||
handle_completion_insecurities
|
||||
# Load only from secure directories
|
||||
compinit -i -C -d "${ZSH_COMPDUMP}"
|
||||
else
|
||||
# If the user wants it, load from all found directories
|
||||
compinit -u -C -d "${ZSH_COMPDUMP}"
|
||||
fi
|
||||
|
||||
|
||||
# Load all of the config files in ~/oh-my-zsh that end in .zsh
|
||||
# TIP: Add files you don't want in git to .gitignore
|
||||
for config_file ($ZSH/lib/*.zsh); do
|
||||
custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}"
|
||||
[ -f "${custom_config_file}" ] && config_file=${custom_config_file}
|
||||
source $config_file
|
||||
done
|
||||
|
||||
# Load all of the plugins that were defined in ~/.zshrc
|
||||
for plugin ($plugins); do
|
||||
if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then
|
||||
source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh
|
||||
elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
|
||||
source $ZSH/plugins/$plugin/$plugin.plugin.zsh
|
||||
fi
|
||||
done
|
||||
|
||||
# Load all of your custom configurations from custom/
|
||||
for config_file ($ZSH_CUSTOM/*.zsh(N)); do
|
||||
source $config_file
|
||||
done
|
||||
unset config_file
|
||||
|
||||
# Load the theme
|
||||
if [[ "$ZSH_THEME" == "random" ]]; then
|
||||
if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = "array" ]] && [[ "${#ZSH_THEME_RANDOM_CANDIDATES[@]}" -gt 0 ]]; then
|
||||
themes=($ZSH/themes/${^ZSH_THEME_RANDOM_CANDIDATES}.zsh-theme)
|
||||
else
|
||||
themes=($ZSH/themes/*zsh-theme)
|
||||
fi
|
||||
N=${#themes[@]}
|
||||
((N=(RANDOM%N)+1))
|
||||
RANDOM_THEME=${themes[$N]}
|
||||
source "$RANDOM_THEME"
|
||||
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
|
||||
else
|
||||
if [ ! "$ZSH_THEME" = "" ]; then
|
||||
if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]; then
|
||||
source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
|
||||
elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]; then
|
||||
source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme"
|
||||
else
|
||||
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
8
.oh-my-zsh/plugins/adb/README.md
Executable file
8
.oh-my-zsh/plugins/adb/README.md
Executable file
@@ -0,0 +1,8 @@
|
||||
# adb autocomplete plugin
|
||||
|
||||
* Adds autocomplete options for all adb commands.
|
||||
* Add autocomplete for `adb -s`
|
||||
|
||||
## Requirements
|
||||
|
||||
In order to make this work, you will need to have the Android adb tools set up in your path.
|
||||
67
.oh-my-zsh/plugins/adb/_adb
Executable file
67
.oh-my-zsh/plugins/adb/_adb
Executable file
@@ -0,0 +1,67 @@
|
||||
#compdef adb
|
||||
#autoload
|
||||
|
||||
# in order to make this work, you will need to have the android adb tools
|
||||
|
||||
# adb zsh completion, based on homebrew completion
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'bugreport:return all information from the device that should be included in a bug report.'
|
||||
'connect:connect to a device via TCP/IP Port 5555 is default.'
|
||||
'devices:list all connected devices'
|
||||
'disconnect:disconnect from a TCP/IP device. Port 5555 is default.'
|
||||
'emu:run emulator console command'
|
||||
'forward:forward socket connections'
|
||||
'get-devpath:print the device path'
|
||||
'get-serialno:print the serial number of the device'
|
||||
'get-state:print the current state of the device: offline | bootloader | device'
|
||||
'help:show the help message'
|
||||
'install:push this package file to the device and install it'
|
||||
'jdwp:list PIDs of processes hosting a JDWP transport'
|
||||
'keygen:generate adb public/private key'
|
||||
'kill-server:kill the server if it is running'
|
||||
'logcat:view device log'
|
||||
'pull:copy file/dir from device'
|
||||
'push:copy file/dir to device'
|
||||
'reboot:reboots the device, optionally into the bootloader or recovery program'
|
||||
'reboot-bootloader:reboots the device into the bootloader'
|
||||
'remount:remounts the partitions on the device read-write'
|
||||
'root:restarts the adbd daemon with root permissions'
|
||||
'sideload:push a ZIP to device and install it'
|
||||
'shell:run remote shell interactively'
|
||||
'sync:copy host->device only if changed (-l means list but dont copy)'
|
||||
'start-server:ensure that there is a server running'
|
||||
'tcpip:restart host adb in tcpip mode'
|
||||
'uninstall:remove this app package from the device'
|
||||
'usb:restart the adbd daemon listing on USB'
|
||||
'version:show version num'
|
||||
'wait-for-device:block until device is online'
|
||||
)
|
||||
|
||||
local expl
|
||||
local -a pkgs installed_pkgs
|
||||
|
||||
_arguments \
|
||||
'-s[devices]:specify device:->specify_device' \
|
||||
'*:: :->subcmds' && return 0
|
||||
|
||||
case "$state" in
|
||||
specify_device)
|
||||
_values -C 'devices' ${$(adb devices -l|awk 'NR>1&& $1 \
|
||||
{sub(/ +/," ",$0); \
|
||||
gsub(":","\\:",$1); \
|
||||
for(i=1;i<=NF;i++) {
|
||||
if($i ~ /model:/) { split($i,m,":") } \
|
||||
else if($i ~ /product:/) { split($i,p,":") } } \
|
||||
printf "%s[%s(%s)] ",$1, p[2], m[2]}'):-""}
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "adb subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
|
||||
_files
|
||||
46
.oh-my-zsh/plugins/alias-finder/README.md
Executable file
46
.oh-my-zsh/plugins/alias-finder/README.md
Executable file
@@ -0,0 +1,46 @@
|
||||
# alias-finder plugin
|
||||
|
||||
This plugin searches the defined aliases and outputs any that match the command inputted. This makes learning new aliases easier.
|
||||
|
||||
To use it, add `alias-finder` to the `plugins` array of your zshrc file:
|
||||
```
|
||||
plugins=(... alias-finder)
|
||||
```
|
||||
|
||||
## Usage
|
||||
To see if there is an alias defined for the command, pass it as an argument to `alias-finder`. This can also run automatically before each command you input - add `ZSH_ALIAS_FINDER_AUTOMATIC=true` to your zshrc if you want this.
|
||||
|
||||
## Options
|
||||
|
||||
- Use `--longer` or `-l` to allow the aliases to be longer than the input (match aliases if they contain the input).
|
||||
- Use `--exact` or `-e` to avoid matching aliases that are shorter than the input.
|
||||
|
||||
## Examples
|
||||
```
|
||||
$ alias-finder "git pull"
|
||||
gl='git pull'
|
||||
g=git
|
||||
```
|
||||
```
|
||||
$ alias-finder "web_search google oh my zsh"
|
||||
google='web_search google'
|
||||
```
|
||||
```
|
||||
$ alias-finder "git commit -v"
|
||||
gc="git commit -v"
|
||||
g=git
|
||||
```
|
||||
```
|
||||
$ alias-finder -e "git commit -v"
|
||||
gc='git commit -v'
|
||||
```
|
||||
```
|
||||
$ alias-finder -l "git commit -v"
|
||||
gc='git commit -v'
|
||||
'gc!'='git commit -v --amend'
|
||||
gca='git commit -v -a'
|
||||
'gca!'='git commit -v -a --amend'
|
||||
'gcan!'='git commit -v -a --no-edit --amend'
|
||||
'gcans!'='git commit -v -a -s --no-edit --amend'
|
||||
'gcn!'='git commit -v --no-edit --amend'
|
||||
```
|
||||
46
.oh-my-zsh/plugins/alias-finder/alias-finder.plugin.zsh
Executable file
46
.oh-my-zsh/plugins/alias-finder/alias-finder.plugin.zsh
Executable file
@@ -0,0 +1,46 @@
|
||||
alias-finder() {
|
||||
local cmd="" exact="" longer="" wordStart="" wordEnd="" multiWordEnd=""
|
||||
for i in $@; do
|
||||
case $i in
|
||||
-e|--exact) exact=true;;
|
||||
-l|--longer) longer=true;;
|
||||
*)
|
||||
if [[ -z $cmd ]]; then
|
||||
cmd=$i
|
||||
else
|
||||
cmd="$cmd $i"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
cmd=$(sed 's/[].\|$(){}?+*^[]/\\&/g' <<< $cmd) # adds escaping for grep
|
||||
if [[ $(wc -l <<< $cmd) == 1 ]]; then
|
||||
while [[ $cmd != "" ]]; do
|
||||
if [[ $longer = true ]]; then
|
||||
wordStart="'{0,1}"
|
||||
else
|
||||
wordEnd="$"
|
||||
multiWordEnd="'$"
|
||||
fi
|
||||
if [[ $cmd == *" "* ]]; then
|
||||
local finder="'$cmd$multiWordEnd"
|
||||
else
|
||||
local finder=$wordStart$cmd$wordEnd
|
||||
fi
|
||||
alias | grep -E "=$finder"
|
||||
if [[ $exact = true || $longer = true ]]; then
|
||||
break
|
||||
else
|
||||
cmd=$(sed -E 's/ {0,1}[^ ]*$//' <<< $cmd) # removes last word
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
preexec_alias-finder() {
|
||||
if [[ $ZSH_ALIAS_FINDER_AUTOMATIC = true ]]; then
|
||||
alias-finder $1
|
||||
fi
|
||||
}
|
||||
|
||||
preexec_functions+=(preexec_alias-finder)
|
||||
34
.oh-my-zsh/plugins/ansible/README.md
Executable file
34
.oh-my-zsh/plugins/ansible/README.md
Executable file
@@ -0,0 +1,34 @@
|
||||
# ansible plugin
|
||||
|
||||
## Introduction
|
||||
|
||||
The `ansible plugin` adds several aliases for useful [ansible](https://docs.ansible.com/ansible/latest/index.html) commands and [aliases](#aliases).
|
||||
|
||||
To use it, add `ansible` to the plugins array of your zshrc file:
|
||||
|
||||
```
|
||||
plugins=(... ansible)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Command | Description |
|
||||
|:-------------------------------------------|:--------------------------------------------------------------------|
|
||||
| `ansible-version` / `aver` | Show the version on ansible installed in this host |
|
||||
| `ansible-role-init <role name>` / `arinit` | Creates the Ansible Role as per Ansible Galaxy standard |
|
||||
| `a` | command `ansible` |
|
||||
| `aconf` | command `ansible-config` |
|
||||
| `acon` | command `ansible-console` |
|
||||
| `ainv` | command `ansible-inventory` |
|
||||
| `aplaybook` | command `ansible-playbook` |
|
||||
| `ainv` | command `ansible-inventory` |
|
||||
| `adoc` | command `ansible-doc` |
|
||||
| `agal` | command `ansible-galaxy` |
|
||||
| `apull` | command `ansible-pull` |
|
||||
| `aval` | command `ansible-vault` |
|
||||
|
||||
## Maintainer
|
||||
|
||||
### [Deepankumar](https://github.com/deepan10)
|
||||
|
||||
[https://github.com/deepan10/oh-my-zsh/tree/features/ansible-plugin](https://github.com/deepan10/oh-my-zsh/tree/features/ansible-plugin)
|
||||
28
.oh-my-zsh/plugins/ansible/ansible.plugin.zsh
Executable file
28
.oh-my-zsh/plugins/ansible/ansible.plugin.zsh
Executable file
@@ -0,0 +1,28 @@
|
||||
# Functions
|
||||
function ansible-version(){
|
||||
ansible --version
|
||||
}
|
||||
|
||||
function ansible-role-init(){
|
||||
if ! [ -z $1] ; then
|
||||
echo "Ansible Role : $1 Creating...."
|
||||
ansible-galaxy init $1
|
||||
tree $1
|
||||
else
|
||||
echo "Usage : ansible-role-init <role name>"
|
||||
echo "Example : ansible-role-init role1"
|
||||
fi
|
||||
}
|
||||
|
||||
# Alias
|
||||
alias a='ansible '
|
||||
alias aconf='ansible-config '
|
||||
alias acon='ansible-console '
|
||||
alias aver='ansible-version'
|
||||
alias arinit='ansible-role-init'
|
||||
alias aplaybook='ansible-playbook '
|
||||
alias ainv='ansible-inventory '
|
||||
alias adoc='ansible-doc '
|
||||
alias agal='ansible-galaxy '
|
||||
alias apull='ansible-pull '
|
||||
alias aval='ansible-vault'
|
||||
12
.oh-my-zsh/plugins/ant/README.md
Executable file
12
.oh-my-zsh/plugins/ant/README.md
Executable file
@@ -0,0 +1,12 @@
|
||||
# Ant
|
||||
|
||||
This plugin provides completion for [Ant](https://ant.apache.org/).
|
||||
|
||||
To use it add ant to the plugins array in your zshrc file.
|
||||
|
||||
```bash
|
||||
plugins=(... ant)
|
||||
```
|
||||
|
||||
It caches ant targets in a file named `.ant_targets`, you might want to add that to
|
||||
your `.gitignore` file.
|
||||
16
.oh-my-zsh/plugins/ant/ant.plugin.zsh
Executable file
16
.oh-my-zsh/plugins/ant/ant.plugin.zsh
Executable file
@@ -0,0 +1,16 @@
|
||||
_ant_does_target_list_need_generating () {
|
||||
[ ! -f .ant_targets ] && return 0;
|
||||
[ build.xml -nt .ant_targets ] && return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
_ant () {
|
||||
if [ -f build.xml ]; then
|
||||
if _ant_does_target_list_need_generating; then
|
||||
ant -p | awk -F " " 'NR > 5 { print lastTarget }{lastTarget = $1}' > .ant_targets
|
||||
fi
|
||||
compadd -- `cat .ant_targets`
|
||||
fi
|
||||
}
|
||||
|
||||
compdef _ant ant
|
||||
19
.oh-my-zsh/plugins/apache2-macports/README.md
Executable file
19
.oh-my-zsh/plugins/apache2-macports/README.md
Executable file
@@ -0,0 +1,19 @@
|
||||
## APACHE2 MACPORTS PLUGIN
|
||||
|
||||
|
||||
---
|
||||
|
||||
### FEATURES
|
||||
|
||||
| Alias | Function | Description |
|
||||
|:--------------:|:-------------------------------------------------------------------------------|----------------------:|
|
||||
| apache2restart | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart | Restart apache daemon |
|
||||
| apache2start | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start | Start apache daemon |
|
||||
| apache2stop | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop | Stop apache daemon |
|
||||
|
||||
---
|
||||
|
||||
### CONTRIBUTORS
|
||||
- Alexander Rinass (alex@rinass.net)
|
||||
|
||||
---
|
||||
6
.oh-my-zsh/plugins/apache2-macports/apache2-macports.plugin.zsh
Executable file
6
.oh-my-zsh/plugins/apache2-macports/apache2-macports.plugin.zsh
Executable file
@@ -0,0 +1,6 @@
|
||||
# commands to control local apache2 server installation
|
||||
# paths are for osx installation via macports
|
||||
|
||||
alias apache2start='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start'
|
||||
alias apache2stop='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop'
|
||||
alias apache2restart='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart'
|
||||
5
.oh-my-zsh/plugins/arcanist/README.md
Executable file
5
.oh-my-zsh/plugins/arcanist/README.md
Executable file
@@ -0,0 +1,5 @@
|
||||
## arcanist
|
||||
|
||||
**Maintainer:** [@emzar](https://github.com/emzar)
|
||||
|
||||
This plugin adds many useful aliases.
|
||||
21
.oh-my-zsh/plugins/arcanist/arcanist.plugin.zsh
Executable file
21
.oh-my-zsh/plugins/arcanist/arcanist.plugin.zsh
Executable file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# Aliases
|
||||
# (sorted alphabetically)
|
||||
#
|
||||
|
||||
alias ara='arc amend'
|
||||
alias arb='arc branch'
|
||||
alias arco='arc cover'
|
||||
alias arci='arc commit'
|
||||
|
||||
alias ard='arc diff'
|
||||
alias ardnu='arc diff --nounit'
|
||||
alias ardnupc='arc diff --nounit --plan-changes'
|
||||
alias ardpc='arc diff --plan-changes'
|
||||
|
||||
alias are='arc export'
|
||||
alias arh='arc help'
|
||||
alias arl='arc land'
|
||||
alias arli='arc lint'
|
||||
alias arls='arc list'
|
||||
alias arpa='arc patch'
|
||||
146
.oh-my-zsh/plugins/archlinux/README.md
Executable file
146
.oh-my-zsh/plugins/archlinux/README.md
Executable file
@@ -0,0 +1,146 @@
|
||||
# Archlinux plugin
|
||||
|
||||
## Features
|
||||
|
||||
#### YAY
|
||||
|
||||
| Alias | Command | Description |
|
||||
|---------|------------------------------------|---------------------------------------------------------------------|
|
||||
| yaconf | yay -Pg | Print current configuration |
|
||||
| yain | yay -S | Install packages from the repositories |
|
||||
| yains | yay -U | Install a package from a local file |
|
||||
| yainsd | yay -S --asdeps | Install packages as dependencies of another package |
|
||||
| yaloc | yay -Qi | Display information about a package in the local database |
|
||||
| yalocs | yay -Qs | Search for packages in the local database |
|
||||
| yalst | yay -Qe | List installed packages including from AUR (tagged as "local") |
|
||||
| yamir | yay -Syy | Force refresh of all package lists after updating mirrorlist |
|
||||
| yaorph | yay -Qtd | Remove orphans using yay |
|
||||
| yare | yay -R | Remove packages, keeping its settings and dependencies |
|
||||
| yarem | yay -Rns | Remove packages, including its settings and unneeded dependencies |
|
||||
| yarep | yay -Si | Display information about a package in the repositories |
|
||||
| yareps | yay -Ss | Search for packages in the repositories |
|
||||
| yaupg | yay -Syu | Sync with repositories before upgrading packages |
|
||||
| yasu | yay -Syu --no-confirm | Same as `yaupg`, but without confirmation |
|
||||
|
||||
#### TRIZEN
|
||||
|
||||
| Alias | Command | Description |
|
||||
|---------|------------------------------------|---------------------------------------------------------------------|
|
||||
| trconf | trizen -C | Fix all configuration files with vimdiff |
|
||||
| trin | trizen -S | Install packages from the repositories |
|
||||
| trins | trizen -U | Install a package from a local file |
|
||||
| trinsd | trizen -S --asdeps | Install packages as dependencies of another package |
|
||||
| trloc | trizen -Qi | Display information about a package in the local database |
|
||||
| trlocs | trizen -Qs | Search for packages in the local database |
|
||||
| trlst | trizen -Qe | List installed packages including from AUR (tagged as "local") |
|
||||
| trmir | trizen -Syy | Force refresh of all package lists after updating mirrorlist |
|
||||
| trorph | trizen -Qtd | Remove orphans using yaourt |
|
||||
| trre | trizen -R | Remove packages, keeping its settings and dependencies |
|
||||
| trrem | trizen -Rns | Remove packages, including its settings and unneeded dependencies |
|
||||
| trrep | trizen -Si | Display information about a package in the repositories |
|
||||
| trreps | trizen -Ss | Search for packages in the repositories |
|
||||
| trupd | trizen -Sy && sudo abs && sudo aur | Update and refresh local package, ABS and AUR databases |
|
||||
| trupd | trizen -Sy && sudo abs | Update and refresh the local package and ABS databases |
|
||||
| trupd | trizen -Sy && sudo aur | Update and refresh the local package and AUR databases |
|
||||
| trupd | trizen -Sy | Update and refresh the local package database |
|
||||
| trupg | trizen -Syua | Sync with repositories before upgrading all packages (from AUR too) |
|
||||
| trsu | trizen -Syua --no-confirm | Same as `trupg`, but without confirmation |
|
||||
| upgrade | trizen -Syu | Sync with repositories before upgrading packages |
|
||||
|
||||
#### YAOURT
|
||||
|
||||
| Alias | Command | Description |
|
||||
|---------|------------------------------------|---------------------------------------------------------------------|
|
||||
| yaconf | yaourt -C | Fix all configuration files with vimdiff |
|
||||
| yain | yaourt -S | Install packages from the repositories |
|
||||
| yains | yaourt -U | Install a package from a local file |
|
||||
| yainsd | yaourt -S --asdeps | Install packages as dependencies of another package |
|
||||
| yaloc | yaourt -Qi | Display information about a package in the local database |
|
||||
| yalocs | yaourt -Qs | Search for packages in the local database |
|
||||
| yalst | yaourt -Qe | List installed packages including from AUR (tagged as "local") |
|
||||
| yamir | yaourt -Syy | Force refresh of all package lists after updating mirrorlist |
|
||||
| yaorph | yaourt -Qtd | Remove orphans using yaourt |
|
||||
| yare | yaourt -R | Remove packages, keeping its settings and dependencies |
|
||||
| yarem | yaourt -Rns | Remove packages, including its settings and unneeded dependencies |
|
||||
| yarep | yaourt -Si | Display information about a package in the repositories |
|
||||
| yareps | yaourt -Ss | Search for packages in the repositories |
|
||||
| yaupd | yaourt -Sy && sudo abs && sudo aur | Update and refresh local package, ABS and AUR databases |
|
||||
| yaupd | yaourt -Sy && sudo abs | Update and refresh the local package and ABS databases |
|
||||
| yaupd | yaourt -Sy && sudo aur | Update and refresh the local package and AUR databases |
|
||||
| yaupd | yaourt -Sy | Update and refresh the local package database |
|
||||
| yaupg | yaourt -Syua | Sync with repositories before upgrading all packages (from AUR too) |
|
||||
| yasu | yaourt -Syua --no-confirm | Same as `yaupg`, but without confirmation |
|
||||
| upgrade | yaourt -Syu | Sync with repositories before upgrading packages |
|
||||
|
||||
#### PACAUR
|
||||
|
||||
| Alias | Command | Description |
|
||||
|---------|------------------------------------|---------------------------------------------------------------------|
|
||||
| pain | pacaur -S | Install packages from the repositories |
|
||||
| pains | pacaur -U | Install a package from a local file |
|
||||
| painsd | pacaur -S --asdeps | Install packages as dependencies of another package |
|
||||
| paloc | pacaur -Qi | Display information about a package in the local database |
|
||||
| palocs | pacaur -Qs | Search for packages in the local database |
|
||||
| palst | pacaur -Qe | List installed packages including from AUR (tagged as "local") |
|
||||
| pamir | pacaur -Syy | Force refresh of all package lists after updating mirrorlist |
|
||||
| paorph | pacaur -Qtd | Remove orphans using pacaur |
|
||||
| pare | pacaur -R | Remove packages, keeping its settings and dependencies |
|
||||
| parem | pacaur -Rns | Remove packages, including its settings and unneeded dependencies |
|
||||
| parep | pacaur -Si | Display information about a package in the repositories |
|
||||
| pareps | pacaur -Ss | Search for packages in the repositories |
|
||||
| paupd | pacaur -Sy && sudo abs && sudo aur | Update and refresh local package, ABS and AUR databases |
|
||||
| paupd | pacaur -Sy && sudo abs | Update and refresh the local package and ABS databases |
|
||||
| paupd | pacaur -Sy && sudo aur | Update and refresh the local package and AUR databases |
|
||||
| paupd | pacaur -Sy | Update and refresh the local package database |
|
||||
| paupg | pacaur -Syua | Sync with repositories before upgrading all packages (from AUR too) |
|
||||
| pasu | pacaur -Syua --no-confirm | Same as `paupg`, but without confirmation |
|
||||
| upgrade | pacaur -Syu | Sync with repositories before upgrading packages |
|
||||
|
||||
#### PACMAN
|
||||
|
||||
| Alias | Command | Description |
|
||||
|--------------|-----------------------------------------|--------------------------------------------------------------|
|
||||
| pacin | sudo pacman -S | Install packages from the repositories |
|
||||
| pacins | sudo pacman -U | Install a package from a local file |
|
||||
| pacinsd | sudo pacman -S --asdeps | Install packages as dependencies of another package |
|
||||
| pacloc | pacman -Qi | Display information about a package in the local database |
|
||||
| paclocs | pacman -Qs | Search for packages in the local database |
|
||||
| paclsorphans | sudo pacman -Qdt | List all orphaned packages |
|
||||
| pacmir | sudo pacman -Syy | Force refresh of all package lists after updating mirrorlist |
|
||||
| pacre | sudo pacman -R | Remove packages, keeping its settings and dependencies |
|
||||
| pacrem | sudo pacman -Rns | Remove packages, including its settings and dependencies |
|
||||
| pacrep | pacman -Si | Display information about a package in the repositories |
|
||||
| pacreps | pacman -Ss | Search for packages in the repositories |
|
||||
| pacrmorphans | sudo pacman -Rs $(pacman -Qtdq) | Delete all orphaned packages |
|
||||
| pacupd | sudo pacman -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases |
|
||||
| pacupd | sudo pacman -Sy && sudo abs | Update and refresh the local package and ABS databases |
|
||||
| pacupd | sudo pacman -Sy && sudo aur | Update and refresh the local package and AUR databases |
|
||||
| pacupd | sudo pacman -Sy | Update and refresh the local package database |
|
||||
| pacupg | sudo pacman -Syu | Sync with repositories before upgrading packages |
|
||||
| upgrade | sudo pacman -Syu | Sync with repositories before upgrading packages |
|
||||
| pacfileupg | sudo pacman -Fy | Download fresh package databases from the server |
|
||||
| pacfiles | pacman -Fs | Search package file names for matching strings |
|
||||
| pacls | pacman -Ql | List files in a package |
|
||||
| pacown | pacman -Qo | Show which package owns a file |
|
||||
|
||||
| Function | Description |
|
||||
|----------------|------------------------------------------------------|
|
||||
| pacdisowned | List all disowned files in your system |
|
||||
| paclist | List all installed packages with a short description |
|
||||
| pacmanallkeys | Get all keys for developers and trusted users |
|
||||
| pacmansignkeys | Locally trust all keys passed as parameters |
|
||||
| pacweb | Open the website of an ArchLinux package |
|
||||
|
||||
---
|
||||
|
||||
## Contributors
|
||||
|
||||
- Benjamin Boudreau - dreurmail@gmail.com
|
||||
- Celso Miranda - contacto@celsomiranda.net
|
||||
- KhasMek - Boushh@gmail.com
|
||||
- Martin Putniorz - mputniorz@gmail.com
|
||||
- MatthR3D - matthr3d@gmail.com
|
||||
- ornicar - thibault.duplessis@gmail.com
|
||||
- Juraj Fiala - doctorjellyface@riseup.net
|
||||
- Majora320 (Moses Miller) - Majora320@gmail.com
|
||||
- Ybalrid (Arthur Brainville) - ybalrid@ybalrid.info
|
||||
219
.oh-my-zsh/plugins/archlinux/archlinux.plugin.zsh
Executable file
219
.oh-my-zsh/plugins/archlinux/archlinux.plugin.zsh
Executable file
@@ -0,0 +1,219 @@
|
||||
if (( $+commands[trizen] )); then
|
||||
alias trconf='trizen -C'
|
||||
alias trupg='trizen -Syua'
|
||||
alias trsu='trizen -Syua --noconfirm'
|
||||
alias trin='trizen -S'
|
||||
alias trins='trizen -U'
|
||||
alias trre='trizen -R'
|
||||
alias trrem='trizen -Rns'
|
||||
alias trrep='trizen -Si'
|
||||
alias trreps='trizen -Ss'
|
||||
alias trloc='trizen -Qi'
|
||||
alias trlocs='trizen -Qs'
|
||||
alias trlst='trizen -Qe'
|
||||
alias trorph='trizen -Qtd'
|
||||
alias trinsd='trizen -S --asdeps'
|
||||
alias trmir='trizen -Syy'
|
||||
|
||||
|
||||
if (( $+commands[abs] && $+commands[aur] )); then
|
||||
alias trupd='trizen -Sy && sudo abs && sudo aur'
|
||||
elif (( $+commands[abs] )); then
|
||||
alias trupd='trizen -Sy && sudo abs'
|
||||
elif (( $+commands[aur] )); then
|
||||
alias trupd='trizen -Sy && sudo aur'
|
||||
else
|
||||
alias trupd='trizen -Sy'
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( $+commands[yaourt] )); then
|
||||
alias yaconf='yaourt -C'
|
||||
alias yaupg='yaourt -Syua'
|
||||
alias yasu='yaourt -Syua --noconfirm'
|
||||
alias yain='yaourt -S'
|
||||
alias yains='yaourt -U'
|
||||
alias yare='yaourt -R'
|
||||
alias yarem='yaourt -Rns'
|
||||
alias yarep='yaourt -Si'
|
||||
alias yareps='yaourt -Ss'
|
||||
alias yaloc='yaourt -Qi'
|
||||
alias yalocs='yaourt -Qs'
|
||||
alias yalst='yaourt -Qe'
|
||||
alias yaorph='yaourt -Qtd'
|
||||
alias yainsd='yaourt -S --asdeps'
|
||||
alias yamir='yaourt -Syy'
|
||||
|
||||
|
||||
if (( $+commands[abs] && $+commands[aur] )); then
|
||||
alias yaupd='yaourt -Sy && sudo abs && sudo aur'
|
||||
elif (( $+commands[abs] )); then
|
||||
alias yaupd='yaourt -Sy && sudo abs'
|
||||
elif (( $+commands[aur] )); then
|
||||
alias yaupd='yaourt -Sy && sudo aur'
|
||||
else
|
||||
alias yaupd='yaourt -Sy'
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( $+commands[yay] )); then
|
||||
alias yaconf='yay -Pg'
|
||||
alias yaupg='yay -Syu'
|
||||
alias yasu='yay -Syu --noconfirm'
|
||||
alias yain='yay -S'
|
||||
alias yains='yay -U'
|
||||
alias yare='yay -R'
|
||||
alias yarem='yay -Rns'
|
||||
alias yarep='yay -Si'
|
||||
alias yareps='yay -Ss'
|
||||
alias yaloc='yay -Qi'
|
||||
alias yalocs='yay -Qs'
|
||||
alias yalst='yay -Qe'
|
||||
alias yaorph='yay -Qtd'
|
||||
alias yainsd='yay -S --asdeps'
|
||||
alias yamir='yay -Syy'
|
||||
|
||||
|
||||
if (( $+commands[abs] && $+commands[aur] )); then
|
||||
alias yaupd='yay -Sy && sudo abs && sudo aur'
|
||||
elif (( $+commands[abs] )); then
|
||||
alias yaupd='yay -Sy && sudo abs'
|
||||
elif (( $+commands[aur] )); then
|
||||
alias yaupd='yay -Sy && sudo aur'
|
||||
else
|
||||
alias yaupd='yay -Sy'
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( $+commands[pacaur] )); then
|
||||
alias paupg='pacaur -Syu'
|
||||
alias pasu='pacaur -Syu --noconfirm'
|
||||
alias pain='pacaur -S'
|
||||
alias pains='pacaur -U'
|
||||
alias pare='pacaur -R'
|
||||
alias parem='pacaur -Rns'
|
||||
alias parep='pacaur -Si'
|
||||
alias pareps='pacaur -Ss'
|
||||
alias paloc='pacaur -Qi'
|
||||
alias palocs='pacaur -Qs'
|
||||
alias palst='pacaur -Qe'
|
||||
alias paorph='pacaur -Qtd'
|
||||
alias painsd='pacaur -S --asdeps'
|
||||
alias pamir='pacaur -Syy'
|
||||
|
||||
if (( $+commands[abs] && $+commands[aur] )); then
|
||||
alias paupd='pacaur -Sy && sudo abs && sudo aur'
|
||||
elif (( $+commands[abs] )); then
|
||||
alias paupd='pacaur -Sy && sudo abs'
|
||||
elif (( $+commands[aur] )); then
|
||||
alias paupd='pacaur -Sy && sudo aur'
|
||||
else
|
||||
alias paupd='pacaur -Sy'
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( $+commands[trizen] )); then
|
||||
function upgrade() {
|
||||
trizen -Syu
|
||||
}
|
||||
elif (( $+commands[pacaur] )); then
|
||||
function upgrade() {
|
||||
pacaur -Syu
|
||||
}
|
||||
elif (( $+commands[yaourt] )); then
|
||||
function upgrade() {
|
||||
yaourt -Syu
|
||||
}
|
||||
elif (( $+commands[yay] )); then
|
||||
function upgrade() {
|
||||
yay -Syu
|
||||
}
|
||||
else
|
||||
function upgrade() {
|
||||
sudo pacman -Syu
|
||||
}
|
||||
fi
|
||||
|
||||
# Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
|
||||
alias pacupg='sudo pacman -Syu'
|
||||
alias pacin='sudo pacman -S'
|
||||
alias pacins='sudo pacman -U'
|
||||
alias pacre='sudo pacman -R'
|
||||
alias pacrem='sudo pacman -Rns'
|
||||
alias pacrep='pacman -Si'
|
||||
alias pacreps='pacman -Ss'
|
||||
alias pacloc='pacman -Qi'
|
||||
alias paclocs='pacman -Qs'
|
||||
alias pacinsd='sudo pacman -S --asdeps'
|
||||
alias pacmir='sudo pacman -Syy'
|
||||
alias paclsorphans='sudo pacman -Qdt'
|
||||
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
||||
alias pacfileupg='sudo pacman -Fy'
|
||||
alias pacfiles='pacman -Fs'
|
||||
alias pacls='pacman -Ql'
|
||||
alias pacown='pacman -Qo'
|
||||
|
||||
|
||||
if (( $+commands[abs] && $+commands[aur] )); then
|
||||
alias pacupd='sudo pacman -Sy && sudo abs && sudo aur'
|
||||
elif (( $+commands[abs] )); then
|
||||
alias pacupd='sudo pacman -Sy && sudo abs'
|
||||
elif (( $+commands[aur] )); then
|
||||
alias pacupd='sudo pacman -Sy && sudo aur'
|
||||
else
|
||||
alias pacupd='sudo pacman -Sy'
|
||||
fi
|
||||
|
||||
function paclist() {
|
||||
# Source: https://bbs.archlinux.org/viewtopic.php?id=93683
|
||||
LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \
|
||||
awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}'
|
||||
}
|
||||
|
||||
function pacdisowned() {
|
||||
emulate -L zsh
|
||||
|
||||
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
|
||||
db=$tmp/db
|
||||
fs=$tmp/fs
|
||||
|
||||
mkdir "$tmp"
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
pacman -Qlq | sort -u > "$db"
|
||||
|
||||
find /bin /etc /lib /sbin /usr ! -name lost+found \
|
||||
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
|
||||
|
||||
comm -23 "$fs" "$db"
|
||||
}
|
||||
|
||||
function pacmanallkeys() {
|
||||
emulate -L zsh
|
||||
curl -s https://www.archlinux.org/people/{developers,trustedusers}/ | \
|
||||
awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | \
|
||||
xargs sudo pacman-key --recv-keys
|
||||
}
|
||||
|
||||
function pacmansignkeys() {
|
||||
emulate -L zsh
|
||||
for key in $*; do
|
||||
sudo pacman-key --recv-keys $key
|
||||
sudo pacman-key --lsign-key $key
|
||||
printf 'trust\n3\n' | sudo gpg --homedir /etc/pacman.d/gnupg \
|
||||
--no-permission-warning --command-fd 0 --edit-key $key
|
||||
done
|
||||
}
|
||||
|
||||
if (( $+commands[xdg-open] )); then
|
||||
function pacweb() {
|
||||
pkg="$1"
|
||||
infos="$(pacman -Si "$pkg")"
|
||||
if [[ -z "$infos" ]]; then
|
||||
return
|
||||
fi
|
||||
repo="$(grep '^Repo' <<< "$infos" | grep -oP '[^ ]+$')"
|
||||
arch="$(grep '^Arch' <<< "$infos" | grep -oP '[^ ]+$')"
|
||||
xdg-open "https://www.archlinux.org/packages/$repo/$arch/$pkg/" &>/dev/null
|
||||
}
|
||||
fi
|
||||
27
.oh-my-zsh/plugins/asdf/README.md
Executable file
27
.oh-my-zsh/plugins/asdf/README.md
Executable file
@@ -0,0 +1,27 @@
|
||||
## asdf
|
||||
|
||||
**Maintainer:** [@RobLoach](https://github.com/RobLoach)
|
||||
|
||||
Adds integration with [asdf](https://github.com/asdf-vm/asdf), the extendable version manager, with support for Ruby, Node.js, Elixir, Erlang and more.
|
||||
|
||||
### Installation
|
||||
|
||||
1. Enable the plugin by adding it to your `plugins` definition in `~/.zshrc`.
|
||||
|
||||
```
|
||||
plugins=(asdf)
|
||||
```
|
||||
|
||||
2. [Install asdf](https://github.com/asdf-vm/asdf#setup) by running the following:
|
||||
```
|
||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
See the [asdf usage documentation](https://github.com/asdf-vm/asdf#usage) for information on how to use asdf:
|
||||
|
||||
```
|
||||
asdf plugin-add nodejs git@github.com:asdf-vm/asdf-nodejs.git
|
||||
asdf install nodejs 5.9.1
|
||||
```
|
||||
19
.oh-my-zsh/plugins/asdf/asdf.plugin.zsh
Executable file
19
.oh-my-zsh/plugins/asdf/asdf.plugin.zsh
Executable file
@@ -0,0 +1,19 @@
|
||||
# Find where asdf should be installed
|
||||
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
|
||||
ASDF_COMPLETIONS="$ASDF_DIR/completions"
|
||||
|
||||
# If not found, check for Homebrew package
|
||||
if [[ ! -f "$ASDF_DIR/asdf.sh" ]] && (( $+commands[brew] )); then
|
||||
ASDF_DIR="$(brew --prefix asdf)"
|
||||
ASDF_COMPLETIONS="$ASDF_DIR/etc/bash_completion.d"
|
||||
fi
|
||||
|
||||
# Load command
|
||||
if [[ -f "$ASDF_DIR/asdf.sh" ]]; then
|
||||
. "$ASDF_DIR/asdf.sh"
|
||||
|
||||
# Load completions
|
||||
if [[ -f "$ASDF_COMPLETIONS/asdf.bash" ]]; then
|
||||
. "$ASDF_COMPLETIONS/asdf.bash"
|
||||
fi
|
||||
fi
|
||||
43
.oh-my-zsh/plugins/autoenv/autoenv.plugin.zsh
Executable file
43
.oh-my-zsh/plugins/autoenv/autoenv.plugin.zsh
Executable file
@@ -0,0 +1,43 @@
|
||||
# Activates autoenv or reports its failure
|
||||
() {
|
||||
if ! type autoenv_init >/dev/null; then
|
||||
for d (~/.autoenv ~/.local/bin /usr/local/opt/autoenv /usr/local/bin); do
|
||||
if [[ -e $d/activate.sh ]]; then
|
||||
autoenv_dir=$d
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -z $autoenv_dir ]]; then
|
||||
cat <<END >&2
|
||||
-------- AUTOENV ---------
|
||||
Could not locate autoenv installation.
|
||||
Please check if autoenv is correctly installed.
|
||||
In the meantime the autoenv plugin is DISABLED.
|
||||
--------------------------
|
||||
END
|
||||
return 1
|
||||
fi
|
||||
source $autoenv_dir/activate.sh
|
||||
fi
|
||||
}
|
||||
[[ $? != 0 ]] && return $?
|
||||
|
||||
# The use_env call below is a reusable command to activate/create a new Python
|
||||
# virtualenv, requiring only a single declarative line of code in your .env files.
|
||||
# It only performs an action if the requested virtualenv is not the current one.
|
||||
|
||||
use_env() {
|
||||
typeset venv
|
||||
venv="$1"
|
||||
if [[ "${VIRTUAL_ENV:t}" != "$venv" ]]; then
|
||||
if workon | grep -q "$venv"; then
|
||||
workon "$venv"
|
||||
else
|
||||
echo -n "Create virtualenv $venv now? (Yn) "
|
||||
read answer
|
||||
if [[ "$answer" == "Y" ]]; then
|
||||
mkvirtualenv "$venv"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
11
.oh-my-zsh/plugins/autojump/README.md
Executable file
11
.oh-my-zsh/plugins/autojump/README.md
Executable file
@@ -0,0 +1,11 @@
|
||||
# Autojump plugin
|
||||
|
||||
This plugin loads the [autojump navigation tool](https://github.com/wting/autojump).
|
||||
|
||||
To use it, add `autojump` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... autojump)
|
||||
```
|
||||
|
||||
More info on the usage: https://github.com/wting/autojump
|
||||
34
.oh-my-zsh/plugins/autojump/autojump.plugin.zsh
Executable file
34
.oh-my-zsh/plugins/autojump/autojump.plugin.zsh
Executable file
@@ -0,0 +1,34 @@
|
||||
declare -a autojump_paths
|
||||
autojump_paths=(
|
||||
$HOME/.autojump/etc/profile.d/autojump.zsh # manual installation
|
||||
$HOME/.autojump/share/autojump/autojump.zsh # manual installation
|
||||
$HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation
|
||||
/run/current-system/sw/share/autojump/autojump.zsh # NixOS installation
|
||||
/usr/share/autojump/autojump.zsh # Debian and Ubuntu package
|
||||
/etc/profile.d/autojump.zsh # manual installation
|
||||
/etc/profile.d/autojump.sh # Gentoo installation
|
||||
/usr/local/share/autojump/autojump.zsh # FreeBSD installation
|
||||
/opt/local/etc/profile.d/autojump.sh # macOS with MacPorts
|
||||
/usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default)
|
||||
)
|
||||
|
||||
for file in $autojump_paths; do
|
||||
if [[ -f "$file" ]]; then
|
||||
source "$file"
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# if no path found, try Homebrew
|
||||
if (( ! found && $+commands[brew] )); then
|
||||
file=$(brew --prefix)/etc/profile.d/autojump.sh
|
||||
if [[ -f "$file" ]]; then
|
||||
source "$file"
|
||||
found=1
|
||||
fi
|
||||
fi
|
||||
|
||||
(( ! found )) && echo '[oh-my-zsh] autojump script not found'
|
||||
|
||||
unset autojump_paths file found
|
||||
8
.oh-my-zsh/plugins/autopep8/README.md
Executable file
8
.oh-my-zsh/plugins/autopep8/README.md
Executable file
@@ -0,0 +1,8 @@
|
||||
# autopep8 plugin
|
||||
|
||||
This plugin adds completion for [autopep8](https://pypi.org/project/autopep8/), a tool that automatically formats Python code to conform to the [PEP 8](http://www.python.org/dev/peps/pep-0008/) style guide.
|
||||
|
||||
To use it, add autopep8 to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... autopep8)
|
||||
```
|
||||
32
.oh-my-zsh/plugins/autopep8/_autopep8
Executable file
32
.oh-my-zsh/plugins/autopep8/_autopep8
Executable file
@@ -0,0 +1,32 @@
|
||||
#compdef autopep8
|
||||
#
|
||||
# this is zsh completion function file.
|
||||
# generated by genzshcomp(ver: 0.5.1)
|
||||
#
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
|
||||
_arguments -s -S \
|
||||
"--help[show this help message and exit]:" \
|
||||
"-h[show this help message and exit]:" \
|
||||
"--version[show program's version number and exit]:" \
|
||||
"--verbose[print verbose messages; multiple -v result in more verbose messages]" \
|
||||
"-v[print verbose messages; multiple -v result in more verbose messages]" \
|
||||
"--diff[print the diff for the fixed source]" \
|
||||
"-d[print the diff for the fixed source]" \
|
||||
"--in-place[make changes to files in place]" \
|
||||
"-i[make changes to files in place]" \
|
||||
"--recursive[run recursively; must be used with --in-place or --diff]" \
|
||||
"-r[run recursively; must be used with --in-place or --diff]" \
|
||||
"--jobs[number of parallel jobs; match CPU count if value is less than 1]::n number of parallel jobs; match CPU count if value is:_files" \
|
||||
"-j[number of parallel jobs; match CPU count if value is less than 1]::n number of parallel jobs; match CPU count if value is:_files" \
|
||||
"--pep8-passes[maximum number of additional pep8 passes (default: 100)]::n:_files" \
|
||||
"-p[maximum number of additional pep8 passes (default: 100)]::n:_files" \
|
||||
"-a[-a result in more aggressive changes]::result:_files" \
|
||||
"--exclude[exclude files/directories that match these comma- separated globs]::globs:_files" \
|
||||
"--list-fixes[list codes for fixes; used by --ignore and --select]" \
|
||||
"--ignore[do not fix these errors/warnings (default E226,E24)]::errors:_files" \
|
||||
"--select[fix only these errors/warnings (e.g. E4,W)]::errors:_files" \
|
||||
"--max-line-length[set maximum allowed line length (default: 79)]::n:_files" \
|
||||
"*::args:_files"
|
||||
38
.oh-my-zsh/plugins/aws/README.md
Executable file
38
.oh-my-zsh/plugins/aws/README.md
Executable file
@@ -0,0 +1,38 @@
|
||||
# aws
|
||||
|
||||
This plugin provides completion support for [awscli](https://docs.aws.amazon.com/cli/latest/reference/index.html)
|
||||
and a few utilities to manage AWS profiles and display them in the prompt.
|
||||
|
||||
To use it, add `aws` to the plugins array in your zshrc file.
|
||||
|
||||
```zsh
|
||||
plugins=(... aws)
|
||||
```
|
||||
|
||||
## Plugin commands
|
||||
|
||||
* `asp [<profile>]`: sets `$AWS_PROFILE` and `$AWS_DEFAULT_PROFILE` (legacy) to `<profile>`.
|
||||
It also sets `$AWS_EB_PROFILE` to `<profile>` for the Elastic Beanstalk CLI.
|
||||
Run `asp` without arguments to clear the profile.
|
||||
|
||||
* `agp`: gets the current value of `$AWS_PROFILE`.
|
||||
|
||||
* `aws_change_access_key`: changes the AWS access key of a profile.
|
||||
|
||||
* `aws_profiles`: lists the available profiles in the `$AWS_CONFIG_FILE` (default: `~/.aws/config`).
|
||||
Used to provide completion for the `asp` function.
|
||||
|
||||
## Plugin options
|
||||
|
||||
* Set `SHOW_AWS_PROMPT=false` in your zshrc file if you want to prevent the plugin from modifying your RPROMPT.
|
||||
Some themes might overwrite the value of RPROMPT instead of appending to it, so they'll need to be fixed to
|
||||
see the AWS profile prompt.
|
||||
|
||||
## Theme
|
||||
|
||||
The plugin creates an `aws_prompt_info` function that you can use in your theme, which displays
|
||||
the current `$AWS_PROFILE`. It uses two variables to control how that is shown:
|
||||
|
||||
- ZSH_THEME_AWS_PREFIX: sets the prefix of the AWS_PROFILE. Defaults to `<aws:`.
|
||||
|
||||
- ZSH_THEME_AWS_SUFFIX: sets the suffix of the AWS_PROFILE. Defaults to `>`.
|
||||
96
.oh-my-zsh/plugins/aws/aws.plugin.zsh
Executable file
96
.oh-my-zsh/plugins/aws/aws.plugin.zsh
Executable file
@@ -0,0 +1,96 @@
|
||||
function agp() {
|
||||
echo $AWS_PROFILE
|
||||
}
|
||||
|
||||
# AWS profile selection
|
||||
function asp() {
|
||||
if [[ -z "$1" ]]; then
|
||||
unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
|
||||
echo AWS profile cleared.
|
||||
return
|
||||
fi
|
||||
|
||||
local available_profiles=($(aws_profiles))
|
||||
if [[ -z "${available_profiles[(r)$1]}" ]]; then
|
||||
echo "${fg[red]}Profile '$1' not found in '${AWS_CONFIG_FILE:-$HOME/.aws/config}'" >&2
|
||||
echo "Available profiles: ${(j:, :)available_profiles:-no profiles found}${reset_color}" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
export AWS_DEFAULT_PROFILE=$1
|
||||
export AWS_PROFILE=$1
|
||||
export AWS_EB_PROFILE=$1
|
||||
}
|
||||
|
||||
function aws_change_access_key() {
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "usage: $0 <profile>"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo Insert the credentials when asked.
|
||||
asp "$1" || return 1
|
||||
aws iam create-access-key
|
||||
aws configure --profile "$1"
|
||||
|
||||
echo You can now safely delete the old access key running \`aws iam delete-access-key --access-key-id ID\`
|
||||
echo Your current keys are:
|
||||
aws iam list-access-keys
|
||||
}
|
||||
|
||||
function aws_profiles() {
|
||||
[[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1
|
||||
grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'
|
||||
}
|
||||
|
||||
function _aws_profiles() {
|
||||
reply=($(aws_profiles))
|
||||
}
|
||||
compctl -K _aws_profiles asp aws_change_access_key
|
||||
|
||||
# AWS prompt
|
||||
function aws_prompt_info() {
|
||||
[[ -z $AWS_PROFILE ]] && return
|
||||
echo "${ZSH_THEME_AWS_PREFIX:=<aws:}${AWS_PROFILE}${ZSH_THEME_AWS_SUFFIX:=>}"
|
||||
}
|
||||
|
||||
if [ "$SHOW_AWS_PROMPT" != false ]; then
|
||||
RPROMPT='$(aws_prompt_info)'"$RPROMPT"
|
||||
fi
|
||||
|
||||
|
||||
# Load awscli completions
|
||||
|
||||
function _awscli-homebrew-installed() {
|
||||
# check if Homebrew is installed
|
||||
(( $+commands[brew] )) || return 1
|
||||
|
||||
# speculatively check default brew prefix
|
||||
if [ -h /usr/local/opt/awscli ]; then
|
||||
_brew_prefix=/usr/local/opt/awscli
|
||||
else
|
||||
# ok, it is not in the default prefix
|
||||
# this call to brew is expensive (about 400 ms), so at least let's make it only once
|
||||
_brew_prefix=$(brew --prefix awscli)
|
||||
fi
|
||||
}
|
||||
|
||||
# get aws_zsh_completer.sh location from $PATH
|
||||
_aws_zsh_completer_path="$commands[aws_zsh_completer.sh]"
|
||||
|
||||
# otherwise check common locations
|
||||
if [[ -z $_aws_zsh_completer_path ]]; then
|
||||
# Homebrew
|
||||
if _awscli-homebrew-installed; then
|
||||
_aws_zsh_completer_path=$_brew_prefix/libexec/bin/aws_zsh_completer.sh
|
||||
# Ubuntu
|
||||
elif [[ -e /usr/share/zsh/vendor-completions/_awscli ]]; then
|
||||
_aws_zsh_completer_path=/usr/share/zsh/vendor-completions/_awscli
|
||||
# RPM
|
||||
else
|
||||
_aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -r $_aws_zsh_completer_path ]] && source $_aws_zsh_completer_path
|
||||
unset _aws_zsh_completer_path _brew_prefix
|
||||
13
.oh-my-zsh/plugins/battery/README.md
Executable file
13
.oh-my-zsh/plugins/battery/README.md
Executable file
@@ -0,0 +1,13 @@
|
||||
# Battery Plugin
|
||||
|
||||
This plugin adds some functions you can use to display battery information in your custom theme.
|
||||
|
||||
To use, add `battery` to the list of plugins in your `.zshrc` file:
|
||||
|
||||
`plugins=(... battery)`
|
||||
|
||||
Then, add the `battery_pct_prompt` function to your custom theme. For example:
|
||||
|
||||
```
|
||||
RPROMPT='$(battery_pct_prompt)'
|
||||
```
|
||||
160
.oh-my-zsh/plugins/battery/battery.plugin.zsh
Executable file
160
.oh-my-zsh/plugins/battery/battery.plugin.zsh
Executable file
@@ -0,0 +1,160 @@
|
||||
###########################################
|
||||
# Battery plugin for oh-my-zsh #
|
||||
# Original Author: Peter hoeg (peterhoeg) #
|
||||
# Email: peter@speartail.com #
|
||||
###########################################
|
||||
# Author: Sean Jones (neuralsandwich) #
|
||||
# Email: neuralsandwich@gmail.com #
|
||||
# Modified to add support for Apple Mac #
|
||||
###########################################
|
||||
|
||||
if [[ "$OSTYPE" = darwin* ]] ; then
|
||||
|
||||
function battery_pct() {
|
||||
local smart_battery_status="$(ioreg -rc "AppleSmartBattery")"
|
||||
typeset -F maxcapacity=$(echo $smart_battery_status | grep '^.*"MaxCapacity"\ =\ ' | sed -e 's/^.*"MaxCapacity"\ =\ //')
|
||||
typeset -F currentcapacity=$(echo $smart_battery_status | grep '^.*"CurrentCapacity"\ =\ ' | sed -e 's/^.*CurrentCapacity"\ =\ //')
|
||||
integer i=$(((currentcapacity/maxcapacity) * 100))
|
||||
echo $i
|
||||
}
|
||||
|
||||
function plugged_in() {
|
||||
[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ Yes') -eq 1 ]
|
||||
}
|
||||
|
||||
function battery_pct_remaining() {
|
||||
if plugged_in ; then
|
||||
echo "External Power"
|
||||
else
|
||||
battery_pct
|
||||
fi
|
||||
}
|
||||
|
||||
function battery_time_remaining() {
|
||||
local smart_battery_status="$(ioreg -rc "AppleSmartBattery")"
|
||||
if [[ $(echo $smart_battery_status | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
|
||||
timeremaining=$(echo $smart_battery_status | grep '^.*"AvgTimeToEmpty"\ =\ ' | sed -e 's/^.*"AvgTimeToEmpty"\ =\ //')
|
||||
if [ $timeremaining -gt 720 ] ; then
|
||||
echo "::"
|
||||
else
|
||||
echo "~$((timeremaining / 60)):$((timeremaining % 60))"
|
||||
fi
|
||||
else
|
||||
echo "∞"
|
||||
fi
|
||||
}
|
||||
|
||||
function battery_pct_prompt () {
|
||||
if [[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
|
||||
b=$(battery_pct_remaining)
|
||||
if [ $b -gt 50 ] ; then
|
||||
color='green'
|
||||
elif [ $b -gt 20 ] ; then
|
||||
color='yellow'
|
||||
else
|
||||
color='red'
|
||||
fi
|
||||
echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}"
|
||||
else
|
||||
echo "∞"
|
||||
fi
|
||||
}
|
||||
|
||||
function battery_is_charging() {
|
||||
[[ $(ioreg -rc "AppleSmartBattery"| grep '^.*"IsCharging"\ =\ ' | sed -e 's/^.*"IsCharging"\ =\ //') == "Yes" ]]
|
||||
}
|
||||
|
||||
elif [[ "$OSTYPE" = linux* ]] ; then
|
||||
|
||||
function battery_is_charging() {
|
||||
! [[ $(acpi 2>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]]
|
||||
}
|
||||
|
||||
function battery_pct() {
|
||||
if (( $+commands[acpi] )) ; then
|
||||
echo "$(acpi 2>/dev/null | cut -f2 -d ',' | tr -cd '[:digit:]')"
|
||||
fi
|
||||
}
|
||||
|
||||
function battery_pct_remaining() {
|
||||
if [ ! $(battery_is_charging) ] ; then
|
||||
battery_pct
|
||||
else
|
||||
echo "External Power"
|
||||
fi
|
||||
}
|
||||
|
||||
function battery_time_remaining() {
|
||||
if [[ $(acpi 2>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then
|
||||
echo $(acpi 2>/dev/null | cut -f3 -d ',')
|
||||
fi
|
||||
}
|
||||
|
||||
function battery_pct_prompt() {
|
||||
b=$(battery_pct_remaining)
|
||||
if [[ $(acpi 2>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then
|
||||
if [ $b -gt 50 ] ; then
|
||||
color='green'
|
||||
elif [ $b -gt 20 ] ; then
|
||||
color='yellow'
|
||||
else
|
||||
color='red'
|
||||
fi
|
||||
echo "%{$fg[$color]%}$(battery_pct_remaining)%%%{$reset_color%}"
|
||||
else
|
||||
echo "∞"
|
||||
fi
|
||||
}
|
||||
|
||||
else
|
||||
# Empty functions so we don't cause errors in prompts
|
||||
function battery_pct_remaining() {
|
||||
}
|
||||
|
||||
function battery_time_remaining() {
|
||||
}
|
||||
|
||||
function battery_pct_prompt() {
|
||||
}
|
||||
fi
|
||||
|
||||
function battery_level_gauge() {
|
||||
local gauge_slots=${BATTERY_GAUGE_SLOTS:-10};
|
||||
local green_threshold=${BATTERY_GREEN_THRESHOLD:-6};
|
||||
local yellow_threshold=${BATTERY_YELLOW_THRESHOLD:-4};
|
||||
local color_green=${BATTERY_COLOR_GREEN:-%F{green}};
|
||||
local color_yellow=${BATTERY_COLOR_YELLOW:-%F{yellow}};
|
||||
local color_red=${BATTERY_COLOR_RED:-%F{red}};
|
||||
local color_reset=${BATTERY_COLOR_RESET:-%{%f%k%b%}};
|
||||
local battery_prefix=${BATTERY_GAUGE_PREFIX:-'['};
|
||||
local battery_suffix=${BATTERY_GAUGE_SUFFIX:-']'};
|
||||
local filled_symbol=${BATTERY_GAUGE_FILLED_SYMBOL:-'▶'};
|
||||
local empty_symbol=${BATTERY_GAUGE_EMPTY_SYMBOL:-'▷'};
|
||||
local charging_color=${BATTERY_CHARGING_COLOR:-$color_yellow};
|
||||
local charging_symbol=${BATTERY_CHARGING_SYMBOL:-'⚡'};
|
||||
|
||||
local battery_remaining_percentage=$(battery_pct);
|
||||
|
||||
if [[ $battery_remaining_percentage =~ [0-9]+ ]]; then
|
||||
local filled=$(((( $battery_remaining_percentage + $gauge_slots - 1) / $gauge_slots)));
|
||||
local empty=$(($gauge_slots - $filled));
|
||||
|
||||
if [[ $filled -gt $green_threshold ]]; then local gauge_color=$color_green;
|
||||
elif [[ $filled -gt $yellow_threshold ]]; then local gauge_color=$color_yellow;
|
||||
else local gauge_color=$color_red;
|
||||
fi
|
||||
else
|
||||
local filled=$gauge_slots;
|
||||
local empty=0;
|
||||
filled_symbol=${BATTERY_UNKNOWN_SYMBOL:-'.'};
|
||||
fi
|
||||
|
||||
local charging=' ' && battery_is_charging && charging=$charging_symbol;
|
||||
|
||||
printf ${charging_color//\%/\%\%}$charging${color_reset//\%/\%\%}${battery_prefix//\%/\%\%}${gauge_color//\%/\%\%}
|
||||
printf ${filled_symbol//\%/\%\%}'%.0s' {1..$filled}
|
||||
[[ $filled -lt $gauge_slots ]] && printf ${empty_symbol//\%/\%\%}'%.0s' {1..$empty}
|
||||
printf ${color_reset//\%/\%\%}${battery_suffix//\%/\%\%}${color_reset//\%/\%\%}
|
||||
}
|
||||
|
||||
|
||||
20
.oh-my-zsh/plugins/bbedit/README.md
Executable file
20
.oh-my-zsh/plugins/bbedit/README.md
Executable file
@@ -0,0 +1,20 @@
|
||||
## bbedit
|
||||
|
||||
Plugin for BBEdit, an HTML and text editor for Mac OS X
|
||||
|
||||
### Requirements
|
||||
|
||||
* [BBEdit](https://www.barebones.com/products/bbedit/)
|
||||
* [BBEdit Command-Line Tools](https://www.barebones.com/support/bbedit/cmd-line-tools.html)
|
||||
|
||||
### Usage
|
||||
|
||||
* If the `bb` command is called without an argument, launch BBEdit
|
||||
|
||||
* If `bb` is passed a directory, cd to it and open it in BBEdit
|
||||
|
||||
* If `bb` is passed a file, open it in BBEdit
|
||||
|
||||
* If `bbpb` create a new BBEdit document with the contents of the clipboard
|
||||
|
||||
* If `bbd` alias for BBEdit diff tool
|
||||
21
.oh-my-zsh/plugins/bbedit/bbedit.plugin.zsh
Executable file
21
.oh-my-zsh/plugins/bbedit/bbedit.plugin.zsh
Executable file
@@ -0,0 +1,21 @@
|
||||
alias bbpb='pbpaste | bbedit --clean --view-top'
|
||||
|
||||
alias bbd=bbdiff
|
||||
|
||||
#
|
||||
# If the bb command is called without an argument, launch BBEdit
|
||||
# If bb is passed a directory, cd to it and open it in BBEdit
|
||||
# If bb is passed a file, open it in BBEdit
|
||||
#
|
||||
function bb() {
|
||||
if [[ -z "$1" ]]
|
||||
then
|
||||
bbedit --launch
|
||||
else
|
||||
bbedit "$1"
|
||||
if [[ -d "$1" ]]
|
||||
then
|
||||
cd "$1"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
54
.oh-my-zsh/plugins/bgnotify/README.md
Executable file
54
.oh-my-zsh/plugins/bgnotify/README.md
Executable file
@@ -0,0 +1,54 @@
|
||||
# bgnotify zsh plugin
|
||||
|
||||
cross-platform background notifications for long running commands! Supports OSX and Ubuntu linux.
|
||||
|
||||
Standalone homepage: [t413/zsh-background-notify](https://github.com/t413/zsh-background-notify)
|
||||
|
||||
----------------------------------
|
||||
|
||||
## How to use!
|
||||
|
||||
Just add bgnotify to your plugins list in your `.zshrc`
|
||||
|
||||
- On OS X you'll need [terminal-notifier](https://github.com/alloy/terminal-notifier)
|
||||
* `brew install terminal-notifier` (or `gem install terminal-notifier`)
|
||||
- On ubuntu you're already all set!
|
||||
- On windows you can use [notifu](https://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package
|
||||
|
||||
|
||||
## Screenshots
|
||||
|
||||
**Linux**
|
||||
|
||||

|
||||
|
||||
**OS X**
|
||||
|
||||

|
||||
|
||||
**Windows**
|
||||
|
||||

|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
One can configure a few things:
|
||||
|
||||
- `bgnotify_threshold` sets the notification threshold time (default 6 seconds)
|
||||
- `function bgnotify_formatted` lets you change the notification
|
||||
|
||||
Use these by adding a function definition before the your call to source. Example:
|
||||
|
||||
~~~ sh
|
||||
bgnotify_threshold=4 ## set your own notification threshold
|
||||
|
||||
function bgnotify_formatted {
|
||||
## $1=exit_status, $2=command, $3=elapsed_time
|
||||
[ $1 -eq 0 ] && title="Holy Smokes Batman!" || title="Holy Graf Zeppelin!"
|
||||
bgnotify "$title -- after $3 s" "$2";
|
||||
}
|
||||
|
||||
plugins=(git bgnotify) ## add to plugins list
|
||||
source $ZSH/oh-my-zsh.sh ## existing source call
|
||||
~~~
|
||||
77
.oh-my-zsh/plugins/bgnotify/bgnotify.plugin.zsh
Executable file
77
.oh-my-zsh/plugins/bgnotify/bgnotify.plugin.zsh
Executable file
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
## setup ##
|
||||
|
||||
[[ -o interactive ]] || return #interactive only!
|
||||
zmodload zsh/datetime || { print "can't load zsh/datetime"; return } # faster than date()
|
||||
autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return }
|
||||
|
||||
(( ${+bgnotify_threshold} )) || bgnotify_threshold=5 #default 10 seconds
|
||||
|
||||
|
||||
## definitions ##
|
||||
|
||||
if ! (type bgnotify_formatted | grep -q 'function'); then ## allow custom function override
|
||||
function bgnotify_formatted { ## args: (exit_status, command, elapsed_seconds)
|
||||
elapsed="$(( $3 % 60 ))s"
|
||||
(( $3 >= 60 )) && elapsed="$((( $3 % 3600) / 60 ))m $elapsed"
|
||||
(( $3 >= 3600 )) && elapsed="$(( $3 / 3600 ))h $elapsed"
|
||||
[ $1 -eq 0 ] && bgnotify "#win (took $elapsed)" "$2" || bgnotify "#fail (took $elapsed)" "$2"
|
||||
}
|
||||
fi
|
||||
|
||||
currentWindowId () {
|
||||
if hash osascript 2>/dev/null; then #osx
|
||||
osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null || echo "0"
|
||||
elif (hash notify-send 2>/dev/null || hash kdialog 2>/dev/null); then #ubuntu!
|
||||
xprop -root 2> /dev/null | awk '/NET_ACTIVE_WINDOW/{print $5;exit} END{exit !$5}' || echo "0"
|
||||
else
|
||||
echo $EPOCHSECONDS #fallback for windows
|
||||
fi
|
||||
}
|
||||
|
||||
bgnotify () { ## args: (title, subtitle)
|
||||
if hash terminal-notifier 2>/dev/null; then #osx
|
||||
[[ "$TERM_PROGRAM" == 'iTerm.app' ]] && term_id='com.googlecode.iterm2';
|
||||
[[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] && term_id='com.apple.terminal';
|
||||
## now call terminal-notifier, (hopefully with $term_id!)
|
||||
[ -z "$term_id" ] && terminal-notifier -message "$2" -title "$1" >/dev/null ||
|
||||
terminal-notifier -message "$2" -title "$1" -activate "$term_id" -sender "$term_id" >/dev/null
|
||||
elif hash growlnotify 2>/dev/null; then #osx growl
|
||||
growlnotify -m "$1" "$2"
|
||||
elif hash notify-send 2>/dev/null; then #ubuntu gnome!
|
||||
notify-send "$1" "$2"
|
||||
elif hash kdialog 2>/dev/null; then #ubuntu kde!
|
||||
kdialog --title "$1" --passivepopup "$2" 5
|
||||
elif hash notifu 2>/dev/null; then #cygwyn support!
|
||||
notifu /m "$2" /p "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
## Zsh hooks ##
|
||||
|
||||
bgnotify_begin() {
|
||||
bgnotify_timestamp=$EPOCHSECONDS
|
||||
bgnotify_lastcmd="$1"
|
||||
bgnotify_windowid=$(currentWindowId)
|
||||
}
|
||||
|
||||
bgnotify_end() {
|
||||
didexit=$?
|
||||
elapsed=$(( EPOCHSECONDS - bgnotify_timestamp ))
|
||||
past_threshold=$(( elapsed >= bgnotify_threshold ))
|
||||
if (( bgnotify_timestamp > 0 )) && (( past_threshold )); then
|
||||
if [ $(currentWindowId) != "$bgnotify_windowid" ]; then
|
||||
print -n "\a"
|
||||
bgnotify_formatted "$didexit" "$bgnotify_lastcmd" "$elapsed"
|
||||
fi
|
||||
fi
|
||||
bgnotify_timestamp=0 #reset it to 0!
|
||||
}
|
||||
|
||||
## only enable if a local (non-ssh) connection
|
||||
if [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then
|
||||
add-zsh-hook preexec bgnotify_begin
|
||||
add-zsh-hook precmd bgnotify_end
|
||||
fi
|
||||
6
.oh-my-zsh/plugins/boot2docker/README.md
Executable file
6
.oh-my-zsh/plugins/boot2docker/README.md
Executable file
@@ -0,0 +1,6 @@
|
||||
## Boot2docker autocomplete plugin
|
||||
|
||||
- Adds autocomplete options for all boot2docker commands.
|
||||
|
||||
|
||||
Maintainer : Manfred Touron ([@moul](https://github.com/moul))
|
||||
73
.oh-my-zsh/plugins/boot2docker/_boot2docker
Executable file
73
.oh-my-zsh/plugins/boot2docker/_boot2docker
Executable file
@@ -0,0 +1,73 @@
|
||||
#compdef boot2docker
|
||||
|
||||
# Boot2docker autocompletion for oh-my-zsh
|
||||
# Requires: Boot2docker installed
|
||||
# Author: Manfred Touron (@moul)
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
"init":"Create a new Boot2Docker VM."
|
||||
"up":"Start VM from any states."
|
||||
"start":"Start VM from any states."
|
||||
"boot":"Start VM from any states."
|
||||
"ssh":"[ssh-command] Login to VM via SSH."
|
||||
"save":"Suspend VM and save state to disk."
|
||||
"suspend":"Suspend VM and save state to disk."
|
||||
"down":"Gracefully shutdown the VM."
|
||||
"stop":"Gracefully shutdown the VM."
|
||||
"halt":"Gracefully shutdown the VM."
|
||||
"restart":"Gracefully reboot the VM."
|
||||
"poweroff":"Forcefully power off the VM (may corrupt disk image)."
|
||||
"reset":"Forcefully power cycle the VM (may corrupt disk image)."
|
||||
"delete":"Delete Boot2Docker VM and its disk image."
|
||||
"destroy":"Delete Boot2Docker VM and its disk image."
|
||||
"config":"Show selected profile file settings."
|
||||
"cfg":"Show selected profile file settings."
|
||||
"info":"Display detailed information of VM."
|
||||
"ip":"Display the IP address of the VM's Host-only network."
|
||||
"socket":"Display the DOCKER_HOST socket to connect to."
|
||||
"shellinit":"Display the shell command to set up the Docker client."
|
||||
"status":"Display current state of VM."
|
||||
"download":"Download Boot2Docker ISO image."
|
||||
"upgrade":"Upgrade the Boot2Docker ISO image (restart if running)."
|
||||
"version":"Display version information."
|
||||
)
|
||||
|
||||
_arguments \
|
||||
'(--basevmdk)--basevmdk[Path to VMDK to use as base for persistent partition]' \
|
||||
'(--cpus)'{-c,--cpus}'[number of CPUs for boot2docker.]' \
|
||||
'(--clobber)--clobber[overwrite Docker client binary on boot2docker upgrade]' \
|
||||
'(--dhcp)--dhcp[enable VirtualBox host-only network DHCP.]' \
|
||||
'(--dhcpip)--dhcpip[VirtualBox host-only network DHCP server address.]' \
|
||||
'(-s --disksize)'{-s,--disksize}'[boot2docker disk image size (in MB).]' \
|
||||
'(--dockerport)--dockerport[host Docker port (forward to port 2376 in VM). (deprecated - use with care)]' \
|
||||
'(--driver)--driver[hypervisor driver.]' \
|
||||
'(--force-upgrade-download)--force-upgrade-download[always download on boot2docker upgrade, never skip.]' \
|
||||
'(--hostip)--hostip[VirtualBox host-only network IP address.]' \
|
||||
'(--iso)--iso[path to boot2docker ISO image.]' \
|
||||
'(--iso-url)--iso-url[/api.github.com/repos/boot2docker/boot2docker/releases": source URL to provision the boot2docker ISO image.]' \
|
||||
'(--lowerip)--lowerip[VirtualBox host-only network DHCP lower bound.]' \
|
||||
'(--memory)'{-m,--memory}'[virtual machine memory size (in MB).]' \
|
||||
'(--netmask)--netmask[VirtualBox host-only network mask.]' \
|
||||
'(--no-dummy)--no-dummy[Example parameter for the dummy driver.]' \
|
||||
'(--retries)--retries[number of port knocking retries during 'start']' \
|
||||
'(--serial)--serial[try serial console to get IP address (experimental)]' \
|
||||
'(--serialfile)--serialfile[path to the serial socket/pipe.]' \
|
||||
'(--ssh)--ssh[path to SSH client utility.]' \
|
||||
'(--ssh-keygen)--ssh-keygen[path to ssh-keygen utility.]' \
|
||||
'(--sshkey)--sshkey[path to SSH key to use.]' \
|
||||
'(--sshport)--sshport[host SSH port (forward to port 22 in VM).]' \
|
||||
'(--upperip)--upperip[VirtualBox host-only network DHCP upper bound.]' \
|
||||
'(--vbm)--vbm[path to VirtualBox management utility.]' \
|
||||
'(--vbox-share)--vbox-share[(defaults to "/Users=Users" if no shares are specified; use "disable" to explicitly prevent any shares from being created) List of directories to share during "up|start|boot" via VirtualBox Guest Additions, with optional labels]' \
|
||||
'(--verbose)'{-v,--verbose}'[display verbose command invocations.]' \
|
||||
'(--vm)--vm[virtual machine name.]' \
|
||||
'(--waittime)--waittime[Time in milliseconds to wait between port knocking retries during 'start']' \
|
||||
'*:: :->subcmds' && return 0
|
||||
|
||||
#_arguments '*:: :->command'
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "boot2docker command" _1st_arguments
|
||||
return
|
||||
fi
|
||||
18
.oh-my-zsh/plugins/bower/README.md
Executable file
18
.oh-my-zsh/plugins/bower/README.md
Executable file
@@ -0,0 +1,18 @@
|
||||
# Bower plugin
|
||||
|
||||
This plugin adds completion for [Bower](https://bower.io/) and a few useful aliases for common Bower commands.
|
||||
|
||||
To use it, add `bower` to the plugins array in your zshrc file:
|
||||
|
||||
```
|
||||
plugins=(... bower)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-------|-----------------|--------------------------------------------------------|
|
||||
| bi | `bower install` | Installs the project dependencies listed in bower.json |
|
||||
| bl | `bower list` | List local packages and possible updates |
|
||||
| bs | `bower search` | Finds all packages or a specific package. |
|
||||
|
||||
58
.oh-my-zsh/plugins/bower/_bower
Executable file
58
.oh-my-zsh/plugins/bower/_bower
Executable file
@@ -0,0 +1,58 @@
|
||||
|
||||
|
||||
# Credits to npm's awesome completion utility.
|
||||
#
|
||||
# Bower completion script, based on npm completion script.
|
||||
|
||||
###-begin-bower-completion-###
|
||||
#
|
||||
# Installation: bower completion >> ~/.bashrc (or ~/.zshrc)
|
||||
# Or, maybe: bower completion > /usr/local/etc/bash_completion.d/bower
|
||||
#
|
||||
|
||||
COMP_WORDBREAKS=${COMP_WORDBREAKS/=/}
|
||||
COMP_WORDBREAKS=${COMP_WORDBREAKS/@/}
|
||||
export COMP_WORDBREAKS
|
||||
|
||||
if type complete &>/dev/null; then
|
||||
_bower_completion () {
|
||||
local si="$IFS"
|
||||
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
|
||||
COMP_LINE="$COMP_LINE" \
|
||||
COMP_POINT="$COMP_POINT" \
|
||||
bower completion -- "${COMP_WORDS[@]}" \
|
||||
2>/dev/null)) || return $?
|
||||
IFS="$si"
|
||||
}
|
||||
complete -F _bower_completion bower
|
||||
elif type compdef &>/dev/null; then
|
||||
_bower_completion() {
|
||||
si=$IFS
|
||||
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
|
||||
COMP_LINE=$BUFFER \
|
||||
COMP_POINT=0 \
|
||||
bower completion -- "${words[@]}" \
|
||||
2>/dev/null)
|
||||
IFS=$si
|
||||
}
|
||||
compdef _bower_completion bower
|
||||
elif type compctl &>/dev/null; then
|
||||
_bower_completion () {
|
||||
local cword line point words si
|
||||
read -Ac words
|
||||
read -cn cword
|
||||
let cword-=1
|
||||
read -l line
|
||||
read -ln point
|
||||
si="$IFS"
|
||||
IFS=$'\n' reply=($(COMP_CWORD="$cword" \
|
||||
COMP_LINE="$line" \
|
||||
COMP_POINT="$point" \
|
||||
bower completion -- "${words[@]}" \
|
||||
2>/dev/null)) || return $?
|
||||
IFS="$si"
|
||||
}
|
||||
compctl -K _bower_completion bower
|
||||
fi
|
||||
###-end-bower-completion-###
|
||||
|
||||
82
.oh-my-zsh/plugins/bower/bower.plugin.zsh
Executable file
82
.oh-my-zsh/plugins/bower/bower.plugin.zsh
Executable file
@@ -0,0 +1,82 @@
|
||||
alias bi="bower install"
|
||||
alias bl="bower list"
|
||||
alias bs="bower search"
|
||||
|
||||
_bower_installed_packages () {
|
||||
bower_package_list=$(bower ls --no-color 2>/dev/null| awk 'NR>3{print p}{p=$0}'| cut -d ' ' -f 2|sed 's/#.*//')
|
||||
}
|
||||
_bower ()
|
||||
{
|
||||
local -a _1st_arguments _no_color _dopts _save_dev _force_lastest _production
|
||||
local expl
|
||||
typeset -A opt_args
|
||||
|
||||
_no_color=('--no-color[Do not print colors (available in all commands)]')
|
||||
|
||||
_dopts=(
|
||||
'(--save)--save[Save installed packages into the project"s bower.json dependencies]'
|
||||
'(--force)--force[Force fetching remote resources even if a local copy exists on disk]'
|
||||
)
|
||||
|
||||
_save_dev=('(--save-dev)--save-dev[Save installed packages into the project"s bower.json devDependencies]')
|
||||
|
||||
_force_lastest=('(--force-latest)--force-latest[Force latest version on conflict]')
|
||||
|
||||
_production=('(--production)--production[Do not install project devDependencies]')
|
||||
|
||||
_1st_arguments=(
|
||||
'cache-clean:Clean the Bower cache, or the specified package caches' \
|
||||
'help:Display help information about Bower' \
|
||||
'info:Version info and description of a particular package' \
|
||||
'init:Interactively create a bower.json file' \
|
||||
'install:Install a package locally' \
|
||||
'link:Symlink a package folder' \
|
||||
'lookup:Look up a package URL by name' \
|
||||
'register:Register a package' \
|
||||
'search:Search for a package by name' \
|
||||
'uninstall:Remove a package' \
|
||||
'update:Update a package' \
|
||||
{ls,list}:'[List all installed packages]'
|
||||
)
|
||||
_arguments \
|
||||
$_no_color \
|
||||
'*:: :->subcmds' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "bower subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
|
||||
case "$words[1]" in
|
||||
install)
|
||||
_arguments \
|
||||
$_dopts \
|
||||
$_save_dev \
|
||||
$_force_lastest \
|
||||
$_no_color \
|
||||
$_production
|
||||
;;
|
||||
update)
|
||||
_arguments \
|
||||
$_dopts \
|
||||
$_no_color \
|
||||
$_force_lastest
|
||||
_bower_installed_packages
|
||||
compadd "$@" $(echo $bower_package_list)
|
||||
;;
|
||||
uninstall)
|
||||
_arguments \
|
||||
$_no_color \
|
||||
$_dopts
|
||||
_bower_installed_packages
|
||||
compadd "$@" $(echo $bower_package_list)
|
||||
;;
|
||||
*)
|
||||
_arguments \
|
||||
$_no_color \
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
compdef _bower bower
|
||||
33
.oh-my-zsh/plugins/branch/README.md
Executable file
33
.oh-my-zsh/plugins/branch/README.md
Executable file
@@ -0,0 +1,33 @@
|
||||
# Branch
|
||||
|
||||
Displays the current Git or Mercurial branch fast.
|
||||
|
||||
## Speed test
|
||||
|
||||
### Mercurial
|
||||
|
||||
```shell
|
||||
$ time hg branch
|
||||
0.11s user 0.14s system 70% cpu 0.355 total
|
||||
```
|
||||
|
||||
### Branch plugin
|
||||
|
||||
```shell
|
||||
$ time zsh /tmp/branch_prompt_info_test.zsh
|
||||
0.00s user 0.01s system 78% cpu 0.014 total
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Edit your theme file (eg.: `~/.oh-my-zsh/theme/robbyrussell.zsh-theme`)
|
||||
adding `$(branch_prompt_info)` in your prompt like this:
|
||||
|
||||
```diff
|
||||
- PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
+ PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(branch_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
```
|
||||
|
||||
## Maintainer
|
||||
|
||||
Victor Torres (<vpaivatorres@gmail.com>)
|
||||
31
.oh-my-zsh/plugins/branch/branch.plugin.zsh
Executable file
31
.oh-my-zsh/plugins/branch/branch.plugin.zsh
Executable file
@@ -0,0 +1,31 @@
|
||||
# Branch: displays the current Git or Mercurial branch fast.
|
||||
# Victor Torres <vpaivatorres@gmail.com>
|
||||
# Oct 2, 2015
|
||||
|
||||
function branch_prompt_info() {
|
||||
# Defines path as current directory
|
||||
local current_dir=$PWD
|
||||
# While current path is not root path
|
||||
while [[ $current_dir != '/' ]]
|
||||
do
|
||||
# Git repository
|
||||
if [[ -d "${current_dir}/.git" ]]
|
||||
then
|
||||
echo '±' ${"$(<"$current_dir/.git/HEAD")"##*/}
|
||||
return;
|
||||
fi
|
||||
# Mercurial repository
|
||||
if [[ -d "${current_dir}/.hg" ]]
|
||||
then
|
||||
if [[ -f "$current_dir/.hg/branch" ]]
|
||||
then
|
||||
echo '☿' $(<"$current_dir/.hg/branch")
|
||||
else
|
||||
echo '☿ default'
|
||||
fi
|
||||
return;
|
||||
fi
|
||||
# Defines path as parent directory and keeps looking for :)
|
||||
current_dir="${current_dir:h}"
|
||||
done
|
||||
}
|
||||
21
.oh-my-zsh/plugins/brew/README.md
Executable file
21
.oh-my-zsh/plugins/brew/README.md
Executable file
@@ -0,0 +1,21 @@
|
||||
# brew plugin
|
||||
|
||||
The plugin adds several aliases for common [brew](https://brew.sh) commands.
|
||||
|
||||
To use it, add `brew` to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... brew)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|--------|----------------------|---------------|
|
||||
| brewp | `brew pin` | Pin a specified formulae, preventing them from being upgraded when issuing the brew upgrade <formulae> command. |
|
||||
| brews | `brew list -1` | List installed formulae, one entry per line, or the installed files for a given formulae. |
|
||||
| brewsp | `brew list --pinned` | Show the versions of pinned formulae, or only the specified (pinned) formulae if formulae are given. |
|
||||
| bubo | `brew update && brew outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated formulae. |
|
||||
| bubc | `brew upgrade && brew cleanup` | Upgrade outdated, unpinned brews (with existing install options), then removes stale lock files and outdated downloads for formulae and casks, and removes old versions of installed formulae. |
|
||||
| bubu | `bubo && bubc` | Updates Homebrew, lists outdated formulae, upgrades oudated and unpinned formulae, and removes stale and outdated downloads and versions. |
|
||||
| bcubo | `brew update && brew cask outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated casks. |
|
||||
| bcubc | `brew cask reinstall $(brew cask outdated) && brew cleanup` | Updates outdated casks, then runs cleanup. |
|
||||
24
.oh-my-zsh/plugins/brew/brew.plugin.zsh
Executable file
24
.oh-my-zsh/plugins/brew/brew.plugin.zsh
Executable file
@@ -0,0 +1,24 @@
|
||||
alias brewp='brew pin'
|
||||
alias brews='brew list -1'
|
||||
alias brewsp='brew list --pinned'
|
||||
alias bubo='brew update && brew outdated'
|
||||
alias bubc='brew upgrade && brew cleanup'
|
||||
alias bubu='bubo && bubc'
|
||||
alias bcubo='brew update && brew cask outdated'
|
||||
alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'
|
||||
|
||||
if command mkdir "$ZSH_CACHE_DIR/.brew-completion-message" 2>/dev/null; then
|
||||
print -P '%F{yellow}'Oh My Zsh brew plugin:
|
||||
cat <<-'EOF'
|
||||
|
||||
With the advent of their 1.0 release, Homebrew has decided to bundle
|
||||
the zsh completion as part of the brew installation, so we no longer
|
||||
ship it with the brew plugin; now it only has brew aliases.
|
||||
|
||||
If you find that brew completion no longer works, make sure you have
|
||||
your Homebrew installation fully up to date.
|
||||
|
||||
You will only see this message once.
|
||||
EOF
|
||||
print -P '%f'
|
||||
fi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user