Compare commits
6 Commits
master
...
d0fb7ead04
Author | SHA1 | Date |
---|---|---|
Shaun Reed | d0fb7ead04 | |
Shaun Reed | 4cf23d7c58 | |
Shaun Reed | 142ce24675 | |
Shaun Reed | a667db027f | |
Shaun Reed | b00f64def5 | |
Shaun Reed | 574cc7802a |
|
@ -0,0 +1,48 @@
|
|||
!
|
||||
! ██████ ██████ ██ ██ ██████ █████ █████ ██████ █████ ██████
|
||||
! ██░░░░ ██░░░░██░██ ░██░░██░░████░░░██ ██░░░██░░██░░████░░░██░░██░░██
|
||||
! ░░█████ ░██ ░██░██ ░██ ░██ ░░░██ ░░ ░███████ ░██ ░░░███████ ░██ ░░
|
||||
! ░░░░░██░██ ░██░██ ░██ ░██ ░██ ██░██░░░░ ░██ ░██░░░░ ░██
|
||||
! ██████ ░░██████ ░░██████░███ ░░█████ ░░██████░███ ░░██████░███
|
||||
! ░░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░
|
||||
! r e a d c o d e l i k e a w i z a r d
|
||||
!
|
||||
! sourcerer by xero harrison (http://sourcerer.xero.nu)
|
||||
! ├─ based on sorcerer by Jeet Sukumaran (http://jeetworks.org)
|
||||
! └─ based on mustang by Henrique C. Alves (hcarvalhoalves@gmail.com)
|
||||
|
||||
! █▓▒░ scorcerer colors
|
||||
*.foreground: #c2c2b0
|
||||
*.background: #222222
|
||||
*.cursorColor: #c2c2b0
|
||||
! black
|
||||
*.color0: #111111
|
||||
*.color8: #181818
|
||||
! red
|
||||
*.color1: #aa4450
|
||||
*.color9: #ff6a6a
|
||||
! green
|
||||
*.color2: #719611
|
||||
*.color10: #b1d631
|
||||
! yellow
|
||||
*.color3: #ff9800
|
||||
*.color11: #87875f
|
||||
! blue
|
||||
*.color4: #6688aa
|
||||
*.color12: #90b0d1
|
||||
! magenta
|
||||
*.color5: #8f6f8f
|
||||
*.color13: #8181a6
|
||||
! cyan
|
||||
*.color6: #528b8b
|
||||
*.color14: #87ceeb
|
||||
! white
|
||||
*.color7: #d3d3d3
|
||||
*.color15: #c1cdc1
|
||||
! stylized
|
||||
*.colorIT: #719611
|
||||
*.colorBD: #d3d3d3
|
||||
*.colorUL: #528b8b
|
||||
|
||||
URxvt.font: xft:Inconsolata Nerd Font:size=30
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
# Aliases to use the correct python version
|
||||
# + Because python doesn't know how to update.. :')
|
||||
alias python3='python3.9'
|
||||
alias pip3='python3.9 -m pip'
|
||||
|
||||
# Alias to restart plasmashell for Kubuntu Plasma session
|
||||
alias kapp-plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &'
|
||||
# Alias to clear swap
|
||||
alias kapp-swap='sudo swapoff -a && sudo swapon -a'
|
||||
# Alias to initialize github user
|
||||
alias kapp-git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
|
||||
# Alias to update and upgrade with useful flags set
|
||||
alias kapp-update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
|
||||
|
||||
# Alias / export customizations
|
||||
|
@ -22,7 +27,7 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
|
|||
export EDITOR="vim"
|
||||
export VISUAL="vim"
|
||||
export LS_COLORS="di=1;34:ln=31;47:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
|
||||
export PATH=$PATH:/opt/:/home/kapper/.local/bin/
|
||||
export PATH=$PATH:/opt/:/home/kapper/.local/bin/:/home/kapper/.local/bin/i3scripts
|
||||
|
||||
# Example path for autocompletion using libclang-9-dev package, obtained by the following command
|
||||
# find /usr/ -name libclang.so.1 2>/dev/null
|
||||
|
@ -33,4 +38,11 @@ if [ -f ~/.bash_secrets ]; then
|
|||
. ~/.bash_secrets
|
||||
fi
|
||||
|
||||
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
|
||||
# Set the default terminal to use konsole, with Kapper profile
|
||||
# + Execute tmux on start
|
||||
export TERMINAL='konsole --profile Kapper -e tmux'
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../.local/bin/mountdrive.sh
|
|
@ -0,0 +1 @@
|
|||
.local/share/applications/jetbrains-toolbox.desktop
|
|
@ -0,0 +1 @@
|
|||
.local/share/applications/mullvad-vpn.desktop
|
|
@ -0,0 +1 @@
|
|||
.local/share/applications/org.kde.yakuake.desktop
|
|
@ -0,0 +1,109 @@
|
|||
# Shadow
|
||||
shadow = true;
|
||||
# no-dnd-shadow = true;
|
||||
no-dock-shadow = true;
|
||||
clear-shadow = true;
|
||||
detect-rounded-corners = true;
|
||||
shadow-radius = 5;
|
||||
shadow-offset-x = 1;
|
||||
shadow-offset-y = 1;
|
||||
shadow-opacity = .3;
|
||||
shadow-ignore-shaped = false;
|
||||
shadow-exclude = [
|
||||
"name = 'Notification'",
|
||||
# workaround for conky until it provides window properties:
|
||||
"override_redirect = 1 && !WM_CLASS@:s",
|
||||
"class_g ?= 'Dmenu'",
|
||||
# "class_g ?= 'Dunst'",
|
||||
# disable shadows for hidden windows:
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
# disables shadows on sticky windows:
|
||||
# "_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'",
|
||||
# disables shadows on i3 frames
|
||||
"class_g ?= 'i3-frame'"
|
||||
];
|
||||
|
||||
# shadow-exclude-reg = "x10+0+0";
|
||||
# xinerama-shadow-crop = true;
|
||||
|
||||
#menu-opacity = 0.95;
|
||||
#inactive-opacity = 0.93;
|
||||
#active-opacity = 1;
|
||||
#alpha-step = 0.01;
|
||||
#inactive-dim = 0.0;
|
||||
#blur-background = false;
|
||||
#blur-kern = "3x3box";
|
||||
|
||||
fading = false;
|
||||
fade-delta = 1;
|
||||
fade-in-step = 0.03;
|
||||
fade-out-step = 0.03;
|
||||
fade-exclude = [ ];
|
||||
|
||||
backend = "xrender";
|
||||
mark-wmwin-focused = true;
|
||||
mark-ovredir-focused = true;
|
||||
detect-client-opacity = true;
|
||||
unredir-if-possible = true;
|
||||
refresh-rate = 0;
|
||||
vsync = "none";
|
||||
dbe = false;
|
||||
paint-on-overlay = true;
|
||||
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||
detect-transient = true;
|
||||
detect-client-leader = true;
|
||||
invert-color-include = [ ];
|
||||
glx-copy-from-front = false;
|
||||
glx-swap-method = "undefined";
|
||||
|
||||
opacity-rule = [
|
||||
#"99:name *?= 'Call'",
|
||||
#"99:class_g = 'Chromium'",
|
||||
#"50:class_g *= 'shortcuts_green'",
|
||||
#"50:class_g *= 'sysinfo_green'",
|
||||
#"50:class_g *= 'conky'",
|
||||
#"99:class_g = 'Darktable'",
|
||||
#"50:class_g = 'Dmenu'",
|
||||
#"99:name *?= 'Event'",
|
||||
#"99:class_g = 'Firefox'",
|
||||
#"99:class_g = 'GIMP'",
|
||||
#"99:name *?= 'Image'",
|
||||
#"99:class_g = 'Lazpaint'",
|
||||
#"99:class_g = 'Midori'",
|
||||
#"99:name *?= 'Minitube'",
|
||||
#"99:class_g = 'Mousepad'",
|
||||
#"99:name *?= 'MuseScore'",
|
||||
#"90:name *?= 'Page Info'",
|
||||
#"99:name *?= 'Pale Moon'",
|
||||
#"90:name *?= 'Panel'",
|
||||
#"99:class_g = 'Pinta'",
|
||||
#"90:name *?= 'Restart'",
|
||||
#"99:name *?= 'sudo'",
|
||||
#"99:name *?= 'Screenshot'",
|
||||
#"99:class_g = 'Viewnior'",
|
||||
#"99:class_g = 'VirtualBox'",
|
||||
#"99:name *?= 'VLC'",
|
||||
#"99:name *?= 'Write'",
|
||||
#"93:class_g = 'URxvt' && !_NET_WM_STATE@:32a",
|
||||
#"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
#"96:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
|
||||
];
|
||||
|
||||
wintypes :
|
||||
{
|
||||
tooltip :
|
||||
{
|
||||
fade = true;
|
||||
shadow = false;
|
||||
opacity = 0.85;
|
||||
focus = true;
|
||||
};
|
||||
fullscreen :
|
||||
{
|
||||
fade = true;
|
||||
shadow = false;
|
||||
opacity = 1;
|
||||
focus = true;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,96 @@
|
|||
conky.config = {
|
||||
alignment = 'top_left',
|
||||
background = true,
|
||||
color2 = '2ECC71',
|
||||
cpu_avg_samples = 2,
|
||||
default_color = 'FFFFFF',
|
||||
double_buffer = true,
|
||||
font = 'Bitstream Vera Sans:size=10',
|
||||
gap_x = 15,
|
||||
gap_y = 15,
|
||||
minimum_width = 200,
|
||||
no_buffers = true,
|
||||
own_window = true,
|
||||
own_window_class = 'shortcuts_green',
|
||||
own_window_type = 'override',
|
||||
own_window_transparent = true,
|
||||
update_interval = 10.0,
|
||||
use_xft = true,
|
||||
}
|
||||
conky.text = [[
|
||||
# Date Display
|
||||
${alignr}${color1}
|
||||
# Month
|
||||
${goto 20}${color}${voffset 0}${color}${font Bitstream Vera Sans:size=18}${time %b}\
|
||||
# Date
|
||||
${goto 65}${voffset 0} ${color}${font Bitstream Vera Sans:size=16}${time %e}\
|
||||
# Year
|
||||
${goto 100}${voffset -5} ${color}${font Bitstream Vera Sans:size=20}${time %Y}
|
||||
${goto 0}${voffset -20}$font${color2}$hr
|
||||
# Day
|
||||
${goto 20}${voffset 0}${color2}${font Bitstream Vera Sans:size=16}${time %A}
|
||||
#
|
||||
$font${color}
|
||||
${color2}mod key - ${color}Meta
|
||||
${color2}lock session - ${color}mod+l
|
||||
|
||||
---------------Vim Keybinds---------------
|
||||
${color2}Toggle color highlighting - ${color}CTRL+c
|
||||
${color2}Build make project in CWD - ${color}CTRL+m
|
||||
${color2}Build cmake project in CWD - ${color}CTRL+b
|
||||
${color2}Previous ALE Warning / Error - ${color}CTRL+k
|
||||
${color2}Next ALE Warning / Error - ${color}CTRL+j
|
||||
|
||||
-----------------Commands-----------------
|
||||
${color2}Window info - ${color}xprop
|
||||
|
||||
---------------Applications---------------
|
||||
${color2}[konsole] Open new terminal - ${color}mod+Enter
|
||||
${color2}[yakuake] Open dropdown terminal - ${color}mod+`
|
||||
${color2}[firefox] Web Browser ${color}mod+Shift+f
|
||||
|
||||
---------------Screenshots----------------
|
||||
${color2}[scrot] image clip tool - ${color}mod+Shift+p
|
||||
|
||||
---------------Menus----------------------
|
||||
${color2}[pavucontrol] Audio devices ${color}mod+Ctrl+a
|
||||
${color2}[blueman-manager] Bluetooth devices ${color}mod+Ctrl+d
|
||||
${color2}[dmenu] App launcher - ${color}mod+d
|
||||
${color2}[rofi] App launcher - ${color}mod+x
|
||||
${color2}[rofi] Active window menu - ${color}mod+a
|
||||
${color2}[rofi] Network / SSH menu - ${color}mod+z
|
||||
${color2}bmenu system settings - ${color}mod+Ctrl+b
|
||||
|
||||
---------------Restart / Reload-----------
|
||||
${color2}kill conky - ${color}mod+o
|
||||
${color2}start conky - ${color}mod+shift+o
|
||||
${color2}kill polybar - ${color}mod+p
|
||||
${color2}start polybar - ${color}mod+shift+p
|
||||
${color2}kill compton - ${color}mod+t
|
||||
${color2}start compton - ${color}mod+Shift+t
|
||||
${color2}reload i3 - ${color}mod+Shift+c
|
||||
${color2}restart i3 - ${color}mod+Shift+r
|
||||
|
||||
---------------Scratchpad-----------------
|
||||
${color2}send to scratchpad - ${color}mod+Shift+minus
|
||||
${color2}remove from scratchpad - ${color}mod+Shift+Space
|
||||
${color2}show scratchpad - ${color}mod+minus
|
||||
|
||||
---------------Windows--------------------
|
||||
${color2}modify gaps - ${color}mod+Shift+g
|
||||
${color2}resize mode - ${color}mod+r
|
||||
${color2}toggle split direction - ${color}mod+q
|
||||
${color2}kill cursor selection - ${color}mod+Ctrl+q
|
||||
${color2}kill active window - ${color}mod+Shift+q
|
||||
${color2}toggle floating - ${color}mod+Shift+Space
|
||||
${color2}move floating window - ${color}mod+Click&Drag
|
||||
${color2}resize floating window - ${color}mod+RightClick&Drag
|
||||
|
||||
---------------Workspace--------------------
|
||||
${color2}move to empty workspace - ${color}mod+Shift+z
|
||||
${color2}switch to workspace 1-9 - ${color}mod+1-9
|
||||
${color2}navigate active workspaces - ${color}mod+Ctrl+arrowkeys
|
||||
${color2}send active to workspace 1-9 - ${color}mod+Ctrl+1-9
|
||||
${color2}move active to workspace 1-9 - ${color}mod+Ctrl+1-9
|
||||
]]
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
conky.config = {
|
||||
alignment = 'top_right',
|
||||
background = true,
|
||||
color2 = '2ECC71',
|
||||
cpu_avg_samples = 2,
|
||||
default_color = 'FFFFFF',
|
||||
double_buffer = true,
|
||||
font = 'Bitstream Vera Sans:size=10',
|
||||
gap_x = 20,
|
||||
gap_y = 10,
|
||||
minimum_width = 200,
|
||||
no_buffers = true,
|
||||
own_window = true,
|
||||
own_window_type = 'override',
|
||||
own_window_class = 'sysinfo_green',
|
||||
own_window_transparent = true,
|
||||
update_interval = 10.0,
|
||||
use_xft = true,
|
||||
temperature_unit = 'fahrenheit',
|
||||
}
|
||||
|
||||
conky.text = [[
|
||||
# Process list, load average
|
||||
# 1m / 5m / 15m format for lad avg
|
||||
${color2}${voffset 35}${alignr}${font Bitstream Vera Sans:size=10}Proccesses${color}
|
||||
${color}${alignr}${font Bitstream Vera Sans:size=8}Load Average: $font$alignr${loadavg}
|
||||
|
||||
#
|
||||
# Process list CPU / RAM utilization table
|
||||
${font}CPU${goto 170}RAM
|
||||
${voffset 3}$font${color2}${top name 1}${goto 120}${color}${top cpu 1}%${goto 170}${color2}${top_mem name 1}${color}${alignr}${top_mem mem_res 1}${color}
|
||||
${color2}${top name 2}${goto 120}${color}${top cpu 2}%${goto 170}${color2}${top_mem name 2}${color}${alignr}${top_mem mem_res 2}${color}
|
||||
${voffset 3}$hr
|
||||
|
||||
#
|
||||
# RAM Display
|
||||
${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}RAM ${color}
|
||||
${goto 0}${color2}$alignc${memgraph 40,305}${color}
|
||||
${voffset 4}${goto 0}${alignc}${color2}${membar 10, 305}
|
||||
${color}${goto 10}${font}${memperc}%${alignr}${exec grep -w Active: /proc/meminfo | awk '{print $2 / 1024 }'}MiB /${memmax}
|
||||
${voffset 3}${color}$hr
|
||||
|
||||
#
|
||||
# CPU Display
|
||||
${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}CPU ${color}
|
||||
# Chipset
|
||||
${alignr}${font}${exec lscpu | grep -w "Model name:" | awk '{print $3 " " $4 " " $5 " " $6 " " $7 " " $8 " " $9}'}
|
||||
# CPU Graph
|
||||
${voffset 4}${goto 0}${alignc}${color2}${cpugraph 40, 305}
|
||||
# Percentage / GHz utilized
|
||||
${voffset 0}${goto 10}${color}${font}${exec cat /sys/class/thermal/thermal_zone2/temp | awk '{print ( ( ( (9/5) * $1) / 1000) + 32) "°F" }'}${alignr}${cpu}% - ${freq_g}GHz
|
||||
# CPU Core Graphs
|
||||
${voffset 10}${color}${goto 10}${font Bitstream Vera Sans:size=8}${cpu cpu1}%${goto 43}${color2}${cpubar cpu1 12,110} ${goto 170}${color}${cpu cpu2}%${goto 203}${color2}${cpubar cpu2 12,110}
|
||||
${voffset 10}${color}${goto 10}${font Bitstream Vera Sans:size=8}${cpu cpu3}%${goto 43}${color2}${cpubar cpu3 12,110} ${goto 170}${color}${cpu cpu4}%${goto 203}${color2}${cpubar cpu4 12,110}
|
||||
${voffset 10}${color}${goto 10}${font Bitstream Vera Sans:size=8}${cpu cpu5}%${goto 43}${color2}${cpubar cpu5 12,110} ${goto 170}${color}${cpu cpu6}%${goto 203}${color2}${cpubar cpu6 12,110}
|
||||
${voffset 10}${color}${goto 10}${font Bitstream Vera Sans:size=8}${cpu cpu7}%${goto 43}${color2}${cpubar cpu7 12,110} ${goto 170}${color}${cpu cpu8}%${goto 203}${color2}${cpubar cpu8 12,110}
|
||||
|
||||
${voffset 3}${color}$hr
|
||||
|
||||
#
|
||||
# Network display
|
||||
${color2}${font}${alignr}NETWORK${color}
|
||||
${color}${voffset 4}${font}Interface: ${gw_iface} ${font}${alignr}Gateway IP: ${gw_ip}
|
||||
${font}${alignr}${if_match "$wireless_essid"=="off/any"}Déconnecté${else}${wireless_essid}${endif}
|
||||
${font}${goto 5}Down${alignr}Up
|
||||
${goto 10}${color2}${downspeedgraph wlp0s20f3 40,160}${goto 180}${upspeedgraph wlp0s20f3 40,160}
|
||||
# Uncomment next line for wireless
|
||||
# ${goto 10}${color}${downspeedf wlp0s20f3} Kb/s - ${totaldown wlp0s20f3}${goto 180}${upspeedf wlp0s20f3} Kb/s - ${totalup wlp0s20f3}
|
||||
# Ethernet network display
|
||||
${goto 10}${color}${downspeedf wlp0s20f3} Kb/s - ${totaldown wlp0s20f3}${alignr}${upspeedf wlp0s20f3} Kb/s - ${totalup wlp0s20f3}
|
||||
${voffset 4}${color}$hr
|
||||
|
||||
#
|
||||
# HDDisk Display
|
||||
${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}DISKS${color}
|
||||
|
||||
#
|
||||
# Root Filesystem Display
|
||||
${voffset 2}${font}${goto 45} /dev/sda - /${font}${alignr}System: ${fs_used /} / ${fs_size /}
|
||||
${color2}${diskiograph /dev/sda}${color}
|
||||
${color2}${fs_bar 8 /}${color}
|
||||
|
||||
#
|
||||
# Home Filesystem Display
|
||||
#${voffset 6}${font}${goto 45}/dev/sda1 - /home/${font}${alignr}Data: ${fs_used /home/} / ${fs_size /home/}
|
||||
#${color2}${diskiograph /dev/sda1}${color}
|
||||
#${color2}${fs_bar 8 /home/} ${color}
|
||||
# Optinal drive display, specify path to check mount
|
||||
#${if_mounted /run/media/thib/Data}${color}${font}${exec sudo hddtemp /dev/sdb -u F | awk '{print $NF}'}${alignr}${fs_used /run/media/thib/Data}/${fs_size /run/media/thib/Data}${else}${color}${font}${alignr}Unmounted${endif}
|
||||
$hr
|
||||
|
||||
#
|
||||
# Other information
|
||||
${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}OTHER${color}
|
||||
# MOBO temp, uptime
|
||||
${color}${voffset 4}${font}Motherboard: ${goto 120}${acpitemp}F°${alignr}Uptime: ${uptime_short}
|
||||
# Domain status
|
||||
${color}${voffset 4}${font}Knoats: ${alignc}${execi 120 curl -Is https://knoats.com | grep HTTP | awk '{print $1 " - " $2}'}${alignr}${execi 120 curl -o /dev/null -s -w %{time_total}\\n https://knoats.com}s
|
||||
${font}Shaunreed: ${alignc}${execi 120 curl -Is https://shaunreed.com | grep HTTP | awk '{print $1 " - " $2}'}${alignr}${execi 120 curl -o /dev/null -s -w %{time_total}\\n https://shaunreed.com}s
|
||||
# ${font}dv: ${alignc}${execi 120 curl -Is https://kapp.ga | grep HTTP | awk '{print $1 " - " $2}'}${alignr}${execi 120 curl -o /dev/null -s -w %{time_total}\\n https://kapp.ga}s
|
||||
#
|
||||
${voffset 3}$hr
|
||||
|
||||
#
|
||||
#
|
||||
# Things I don't use, but could in the future
|
||||
# I don't need to track docker containers.. unless I can check remotes?
|
||||
# ${font}Docker containers: ${goto 120}${exec docker ps -q $1 | wc -l}/${exec docker ps -a | grep -v -F 'Exited (0)' | grep -c -F 'Exited ('}
|
||||
|
||||
#
|
||||
# Battery Display
|
||||
$color2${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}BATTERY
|
||||
$color${alignr}${if_match "$battery_time"=="unknown"}Charging...${else}Remain Time: ${battery_time}${endif}
|
||||
${color2}${battery_bar}
|
||||
${voffset 3}${alignr}${battery_percent}%
|
||||
]]
|
||||
|
|
@ -0,0 +1,450 @@
|
|||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
#
|
||||
# Startup scripts and commands for i3 sessions
|
||||
exec --no-startup-id yakuake
|
||||
exec --no-startup-id xbindkeys --poll-rc
|
||||
exec --no-startup-id xautolock -time 10 -locker blurlock
|
||||
exec_always --no-startup-id compton
|
||||
# Run custom scripts to start polybar, conky, and feh background
|
||||
exec --no-startup-id $HOME/.local/bin/i3scripts/start-konky
|
||||
exec --no-startup-id $HOME/.local/bin/i3scripts/fehbg
|
||||
exec_always --no-startup-id $HOME/.local/bin/i3scripts/start-polybar
|
||||
|
||||
#
|
||||
# i3 settings
|
||||
|
||||
set $mod Mod4
|
||||
# Mod1 = Alt
|
||||
#set $mod Mod1
|
||||
focus_follows_mouse no
|
||||
|
||||
# Move to a new empty workspace
|
||||
#bindsym $mod+Ctrl+Left exec --no-startup-id i3empty.py prev
|
||||
bindsym $mod+Shift+z exec --no-startup-id $HOME/.local/bin/i3scripts/i3empty.py
|
||||
|
||||
# Keybinds for laptop media keys
|
||||
bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
bindsym XF86AudioLowerVolume exec "pulsemixer --change-volume -5"
|
||||
bindsym XF86AudioRaiseVolume exec "pulsemixer --change-volume +5 --max-volume 125"
|
||||
bindsym XF86MonBrightnessUp exec "brightnessctl s +2.5%"
|
||||
bindsym XF86MonBrightnessDown exec "brightnessctl s 2.5%-"
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:Inconsolata Nerd Font Mono 10
|
||||
#font pango:monospace 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
# set default desktop layout (default is tiling)
|
||||
# workspace_layout tabbed <stacking|tabbed>
|
||||
|
||||
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||||
default_border pixel 2
|
||||
default_floating_border normal
|
||||
# Hide borders
|
||||
hide_edge_borders none
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
#bindsym $mod+j focus left
|
||||
#bindsym $mod+k focus down
|
||||
#bindsym $mod+l focus up
|
||||
#bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor 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
|
||||
|
||||
# split in horizontal orientation
|
||||
# bindsym $mod+h split h
|
||||
# split in vertical orientation
|
||||
# bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
# bindsym $mod+s layout stacking
|
||||
# bindsym $mod+w layout tabbed
|
||||
# bindsym $mod+e layout toggle split
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
# bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
#bindsym $mod+a focus parent
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# Application keybinds
|
||||
###########################################
|
||||
|
||||
# Passing -n to urxvt forces Xorg to default the WM_ICON_NAME to tmux
|
||||
# Only this instance of urxvt will have that WM_ICON_NAME
|
||||
# Prevents for_window from acting on new terminals
|
||||
# Passing -T to urxvt sets WM_NAME and WM_ICON_NAME, if not set in a later argument
|
||||
# Use -T below to title the startup terminal and assign properties to it
|
||||
# exec_always --no-startup-id i3-msg 'exec urxvt -T origin -hold -e htop'
|
||||
# for_window [title="origin"] move to workspace number $ws95
|
||||
# for_window [title="origin"] floating enable
|
||||
# for_window [title="origin"] resize set height 700
|
||||
# for_window [title="origin"] resize set width 1000
|
||||
# for_window [title="origin"] move position center
|
||||
|
||||
# NOTE: To get these window class names, run `xprop` and click a window
|
||||
for_window [class="yakuake"] floating enable
|
||||
|
||||
bindsym $mod+Ctrl+a exec "pavucontrol"
|
||||
for_window [class="Pavucontrol"] floating enable
|
||||
for_window [class="Pavucontrol"] resize set height 400
|
||||
for_window [class="Pavucontrol"] resize set width 600
|
||||
for_window [class="Pavucontrol"] move position center
|
||||
|
||||
for_window [class="Yad"] floating enable
|
||||
for_window [class="Yad"] resize set height 400
|
||||
for_window [class="Yad"] resize set width 600
|
||||
|
||||
for_window [class="Bitwarden"] floating enable
|
||||
for_window [class="Bitwarden"] resize set height 600
|
||||
for_window [class="Bitwarden"] resize set width 800
|
||||
for_window [class="Bitwarden"] move position center
|
||||
|
||||
for_window [class="Gpick"] floating enable
|
||||
for_window [class="Gpick"] resize set height 500
|
||||
for_window [class="Gpick"] resize set width 700
|
||||
for_window [class="Gpick"] move position center
|
||||
|
||||
for_window [class="discord"] floating enable
|
||||
for_window [class="discord"] resize set height 600
|
||||
for_window [class="discord"] resize set width 800
|
||||
for_window [class="discord"] move position center
|
||||
|
||||
# Bluetooth device settings
|
||||
bindsym $mod+Ctrl+d exec "blueman-manager
|
||||
for_window [class="Blueman-manager"] floating enable
|
||||
for_window [class="Blueman-manager"] resize set height 400
|
||||
for_window [class="Blueman-manager"] resize set width 600
|
||||
for_window [class="Blueman-manager"] move position center
|
||||
|
||||
for_window [class="systemsettings"] floating enable
|
||||
for_window [class="Steam"] floating enable
|
||||
for_window [class="Signal"] floating enable
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec dmenu_run
|
||||
bindsym $mod+x exec rofi -show run
|
||||
bindsym $mod+a exec rofi -show window
|
||||
bindsym $mod+z exec rofi -show ssh
|
||||
|
||||
# Locks the screen now with i3locker
|
||||
bindsym $mod+l exec i3lock -c 000000
|
||||
|
||||
bindsym $mod+Return exec konsole -e tmux
|
||||
# start a terminal
|
||||
# Uses $TERMINAL environment setting
|
||||
# bindsym $mod+Return exec terminal
|
||||
# Start / kill conky
|
||||
bindsym $mod+t exec pkill compton
|
||||
bindsym $mod+Shift+t exec compton
|
||||
# Firefox
|
||||
bindsym $mod+Shift+f exec firefox
|
||||
# Screenshot marquee tool
|
||||
bindsym $mod+Shift+p --release exec --no-startup-id scrot -s
|
||||
|
||||
# Restart, reload, kill keybinds
|
||||
###########################################
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# Bind Mod+O to kill conky
|
||||
bindsym $mod+o exec pkill conky
|
||||
# Bind Mod+Shift+O to start conky
|
||||
bindsym $mod+Shift+o exec $HOME/.local/bin/i3scripts/start-konky
|
||||
|
||||
# Bind Mod+P kill polybars
|
||||
bindsym $mod+p exec pkill -f polybar
|
||||
# Bind Mod+Shift+P to start polybars
|
||||
bindsym $mod+Shift+p exec $HOME/.local/bin/i3scripts/start-polybar
|
||||
|
||||
# Workspace keybinds
|
||||
###########################################
|
||||
|
||||
# Modify window borders
|
||||
bindsym $mod+u border none
|
||||
bindsym $mod+y border pixel 1
|
||||
bindsym $mod+n border normal
|
||||
#navigate workspaces next / previous
|
||||
bindsym $mod+Ctrl+Right workspace next
|
||||
bindsym $mod+Ctrl+Left workspace prev
|
||||
# workspace back and forth (with/without active container)
|
||||
workspace_auto_back_and_forth yes
|
||||
# Bind to swap to previous / last workspace
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
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"
|
||||
|
||||
# Custom named workspaces for keeping frequently used apps
|
||||
# Numbers overwritten by Polybar i3 module config
|
||||
set $ws99 99
|
||||
set $ws98 98
|
||||
set $ws97 97
|
||||
set $ws96 96
|
||||
set $ws95 95
|
||||
set $ws94 94
|
||||
|
||||
# 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
|
||||
|
||||
# Custom named workspace keybinds
|
||||
# To get keysymbols, run 'xmodmap -pke'
|
||||
bindsym $mod+Ctrl+backslash move container to workspace $ws99
|
||||
bindsym $mod+Ctrl+bracketright move container to workspace $ws98
|
||||
bindsym $mod+Ctrl+apostrophe move container to workspace $ws97
|
||||
bindsym $mod+Ctrl+slash move container to workspace $ws96
|
||||
bindsym $mod+Ctrl+period move container to workspace $ws95
|
||||
bindsym $mod+Ctrl+comma move container to workspace $ws94
|
||||
# Move to workspace with focused container
|
||||
bindsym $mod+Shift+backslash move container to workspace $ws99; workspace $ws99
|
||||
bindsym $mod+Shift+bracketright move container to workspace $ws98; workspace $ws98
|
||||
bindsym $mod+Shift+apostrophe move container to workspace $ws97; workspace $ws97
|
||||
bindsym $mod+Shift+slash move container to workspace $ws96; workspace $ws96
|
||||
bindsym $mod+Shift+period move container to workspace $ws95; workspace $ws95
|
||||
bindsym $mod+Shift+comma move container to workspace $ws94; workspace $ws94
|
||||
# Move to workspace
|
||||
bindsym $mod+backslash workspace number $ws99
|
||||
bindsym $mod+bracketright workspace number $ws98
|
||||
bindsym $mod+apostrophe workspace number $ws97
|
||||
bindsym $mod+slash workspace number $ws96
|
||||
bindsym $mod+period workspace number $ws95
|
||||
bindsym $mod+comma workspace number $ws94
|
||||
|
||||
# move focused container to workspace
|
||||
# bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
# bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
# bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
# bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
# bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
# bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
# bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
# bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
# bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
# bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# Layout keybinds
|
||||
###########################################
|
||||
|
||||
# Split orientation toggles
|
||||
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
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
# To remove a window from scratchpad, toggle floating
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
# toggle sticky
|
||||
bindsym $mod+Shift+s sticky toggle
|
||||
# focus the parent container
|
||||
#bindsym $mod+a focus parent
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but 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
|
||||
|
||||
# back to normal: Enter or Escape or $mod+r
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
#bar {
|
||||
#
|
||||
# status_command i3blocks
|
||||
#}
|
||||
|
||||
# Theme colors
|
||||
# class border backgr. text indic. child_border
|
||||
client.focused #005F00 #005F00 #80FFF9 #AFD700
|
||||
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
|
||||
client.unfocused #000000 #000000 #1ABC9C #000000
|
||||
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||
|
||||
client.background #000000
|
||||
|
||||
|
||||
#################################################################
|
||||
### Settings for i3-gaps #######################################
|
||||
#################################################################
|
||||
|
||||
# Set inner/outer gaps default values
|
||||
gaps inner 14
|
||||
gaps outer -2
|
||||
|
||||
# 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"
|
||||
|
||||
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"
|
||||
}
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
# i3blocks config file
|
||||
#
|
||||
# Please see man i3blocks for a complete reference!
|
||||
# The man page is also hosted at http://vivien.github.io/i3blocks
|
||||
#
|
||||
# List of valid properties:
|
||||
#
|
||||
# align
|
||||
# color
|
||||
# command
|
||||
# full_text
|
||||
# instance
|
||||
# interval
|
||||
# label
|
||||
# min_width
|
||||
# name
|
||||
# separator
|
||||
# separator_block_width
|
||||
# short_text
|
||||
# signal
|
||||
# urgent
|
||||
|
||||
# Global properties
|
||||
#
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
# Each block command defaults to the script name to avoid boilerplate.
|
||||
command=/usr/share/i3blocks/$BLOCK_NAME
|
||||
separator_block_width=20
|
||||
markup=none
|
||||
|
||||
[weather]
|
||||
command=sh $HOME/.local/bin/i3scripts/weathermap
|
||||
align=right
|
||||
color=#ffaf00
|
||||
interval=1800
|
||||
|
||||
|
||||
|
||||
[wicd-wifi]
|
||||
#label=
|
||||
command=sudo pkill wicd-client && wicd-client -t
|
||||
interval=once
|
||||
|
||||
# Volume indicator
|
||||
#
|
||||
# The first parameter sets the step (and units to display)
|
||||
# The second parameter overrides the mixer selection
|
||||
# See the script for details.
|
||||
|
||||
[volume]
|
||||
# DEPENDS: sudo apt install volumeicon-alsa
|
||||
#label=VOL
|
||||
#label=♪
|
||||
#instance=Master
|
||||
#instance=PCM
|
||||
command=volumeicon
|
||||
interval=once
|
||||
#signal=10
|
||||
|
||||
# Memory usage
|
||||
#
|
||||
# The type defaults to "mem" if the instance is not specified.
|
||||
[memory]
|
||||
label=MEM
|
||||
separator=false
|
||||
interval=30
|
||||
|
||||
[memory]
|
||||
label=SWAP
|
||||
instance=swap
|
||||
separator=true
|
||||
interval=30
|
||||
|
||||
# CPU usage
|
||||
#
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
[cpu_usage]
|
||||
label=CPU
|
||||
interval=10
|
||||
min_width=CPU: 100.00%
|
||||
separator=false
|
||||
|
||||
[load_average]
|
||||
interval=10
|
||||
|
||||
|
||||
# Disk usage
|
||||
#
|
||||
# The directory defaults to $HOME if the instance is not specified.
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
label=HOME
|
||||
#instance=/mnt/data
|
||||
interval=30
|
||||
|
||||
# Network interface monitoring
|
||||
#
|
||||
# If the instance is not specified, use the interface used for default route.
|
||||
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
|
||||
[iface]
|
||||
#instance=wlan0
|
||||
color=#00FF00
|
||||
interval=10
|
||||
separator=false
|
||||
|
||||
[public-ip]
|
||||
command=wget -qO - ifconfig.me
|
||||
interval=60
|
||||
|
||||
|
||||
[wifi]
|
||||
#instance=wlp3s0
|
||||
interval=10
|
||||
separator=false
|
||||
|
||||
[bandwidth]
|
||||
#instance=eth0
|
||||
interval=5
|
||||
|
||||
[backlight]
|
||||
label=BRI
|
||||
command=xbacklight
|
||||
separator=true
|
||||
interval=1
|
||||
|
||||
|
||||
# Battery indicator
|
||||
#
|
||||
# The battery instance defaults to 0.
|
||||
[battery]
|
||||
label=BAT
|
||||
#label=⚡
|
||||
#instance=1
|
||||
interval=30
|
||||
|
||||
# Date Time
|
||||
#
|
||||
[time]
|
||||
command=date '+%Y-%m-%d %H:%M:%S'
|
||||
interval=5
|
||||
|
||||
# Generic media player support
|
||||
#
|
||||
# This displays "ARTIST - SONG" if a music is playing.
|
||||
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
|
||||
#[mediaplayer]
|
||||
#instance=spotify
|
||||
#interval=5
|
||||
#signal=10
|
||||
|
||||
# OpenVPN support
|
||||
#
|
||||
# Support multiple VPN, with colors.
|
||||
#[openvpn]
|
||||
#interval=20
|
||||
|
||||
# Temperature
|
||||
#
|
||||
# Support multiple chips, though lm-sensors.
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
#[temperature]
|
||||
#label=TEMP
|
||||
#interval=10
|
||||
|
||||
# Key indicators
|
||||
#
|
||||
# Add the following bindings to i3 config file:
|
||||
#
|
||||
# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks
|
||||
# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks
|
||||
#[keyindicator]
|
||||
#instance=CAPS
|
||||
#interval=once
|
||||
#signal=11
|
||||
|
||||
#[keyindicator]
|
||||
#instance=NUM
|
||||
#interval=once
|
||||
#signal=11
|
|
@ -0,0 +1,175 @@
|
|||
#!/bin/bash
|
||||
# Displays the default device, volume, and mute status for i3blocks
|
||||
|
||||
set -a
|
||||
|
||||
AUDIO_HIGH_SYMBOL=${AUDIO_HIGH_SYMBOL:-' '}
|
||||
|
||||
AUDIO_MED_THRESH=${AUDIO_MED_THRESH:-50}
|
||||
AUDIO_MED_SYMBOL=${AUDIO_MED_SYMBOL:-' '}
|
||||
|
||||
AUDIO_LOW_THRESH=${AUDIO_LOW_THRESH:-0}
|
||||
AUDIO_LOW_SYMBOL=${AUDIO_LOW_SYMBOL:-' '}
|
||||
|
||||
AUDIO_MUTED_SYMBOL=${AUDIO_MUTED_SYMBOL:-' '}
|
||||
|
||||
AUDIO_DELTA=${AUDIO_DELTA:-5}
|
||||
|
||||
DEFAULT_COLOR=${DEFAULT_COLOR:-"#ffffff"}
|
||||
MUTED_COLOR=${MUTED_COLOR:-"#a0a0a0"}
|
||||
|
||||
LONG_FORMAT=${LONG_FORMAT:-'${SYMB} ${VOL}% [${INDEX}:${NAME}]'}
|
||||
SHORT_FORMAT=${SHORT_FORMAT:-'${SYMB} ${VOL}% [${INDEX}]'}
|
||||
USE_ALSA_NAME=${USE_ALSA_NAME:-0}
|
||||
USE_DESCRIPTION=${USE_DESCRIPTION:-0}
|
||||
|
||||
SUBSCRIBE=${SUBSCRIBE:-0}
|
||||
|
||||
MIXER=${MIXER:-""}
|
||||
SCONTROL=${SCONTROL:-""}
|
||||
|
||||
while getopts F:Sf:adH:M:L:X:T:t:C:c:i:m:s:h opt; do
|
||||
case "$opt" in
|
||||
S) SUBSCRIBE=1 ;;
|
||||
F) LONG_FORMAT="$OPTARG" ;;
|
||||
f) SHORT_FORMAT="$OPTARG" ;;
|
||||
a) USE_ALSA_NAME=1 ;;
|
||||
d) USE_DESCRIPTION=1 ;;
|
||||
H) AUDIO_HIGH_SYMBOL="$OPTARG" ;;
|
||||
M) AUDIO_MED_SYMBOL="$OPTARG" ;;
|
||||
L) AUDIO_LOW_SYMBOL="$OPTARG" ;;
|
||||
X) AUDIO_MUTED_SYMBOL="$OPTARG" ;;
|
||||
T) AUDIO_MED_THRESH="$OPTARG" ;;
|
||||
t) AUDIO_LOW_THRESH="$OPTARG" ;;
|
||||
C) DEFAULT_COLOR="$OPTARG" ;;
|
||||
c) MUTED_COLOR="$OPTARG" ;;
|
||||
i) AUDIO_INTERVAL="$OPTARG" ;;
|
||||
m) MIXER="$OPTARG" ;;
|
||||
s) SCONTROL="$OPTARG" ;;
|
||||
h) printf \
|
||||
"Usage: volume-pulseaudio [-S] [-F format] [-f format] [-p] [-a|-d] [-H symb] [-M symb]
|
||||
[-L symb] [-X symb] [-T thresh] [-t thresh] [-C color] [-c color] [-i inter]
|
||||
[-m mixer] [-s scontrol] [-h]
|
||||
Options:
|
||||
-F, -f\tOutput format (-F long format, -f short format) to use, with exposed variables:
|
||||
\${SYMB}, \${VOL}, \${INDEX}, \${NAME}
|
||||
-S\tSubscribe to volume events (requires persistent block, always uses long format)
|
||||
-a\tUse ALSA name if possible
|
||||
-d\tUse device description instead of name if possible
|
||||
-H\tSymbol to use when audio level is high. Default: '$AUDIO_HIGH_SYMBOL'
|
||||
-M\tSymbol to use when audio level is medium. Default: '$AUDIO_MED_SYMBOL'
|
||||
-L\tSymbol to use when audio level is low. Default: '$AUDIO_LOW_SYMBOL'
|
||||
-X\tSymbol to use when audio is muted. Default: '$AUDIO_MUTED_SYMBOL'
|
||||
-T\tThreshold for medium audio level. Default: $AUDIO_MED_THRESH
|
||||
-t\tThreshold for low audio level. Default: $AUDIO_LOW_THRESH
|
||||
-C\tColor for non-muted audio. Default: $DEFAULT_COLOR
|
||||
-c\tColor for muted audio. Default: $MUTED_COLOR
|
||||
-i\tInterval size of volume increase/decrease. Default: $AUDIO_DELTA
|
||||
-m\tUse the given mixer.
|
||||
-s\tUse the given scontrol.
|
||||
-h\tShow this help text
|
||||
" && exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z "$MIXER" ]] ; then
|
||||
MIXER="default"
|
||||
if amixer -D pulse info >/dev/null 2>&1 ; then
|
||||
MIXER="pulse"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$SCONTROL" ]] ; then
|
||||
SCONTROL=$(amixer -D "$MIXER" scontrols | sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" | head -n1)
|
||||
fi
|
||||
|
||||
CAPABILITY=$(amixer -D $MIXER get $SCONTROL | sed -n "s/ Capabilities:.*cvolume.*/Capture/p")
|
||||
|
||||
|
||||
function move_sinks_to_new_default {
|
||||
DEFAULT_SINK=$1
|
||||
pacmd list-sink-inputs | grep index: | grep -o '[0-9]\+' | while read SINK
|
||||
do
|
||||
pacmd move-sink-input $SINK $DEFAULT_SINK
|
||||
done
|
||||
}
|
||||
|
||||
function set_default_playback_device_next {
|
||||
inc=${1:-1}
|
||||
num_devices=$(pacmd list-sinks | grep -c index:)
|
||||
sink_arr=($(pacmd list-sinks | grep index: | grep -o '[0-9]\+'))
|
||||
default_sink_index=$(( $(pacmd list-sinks | grep index: | grep -no '*' | grep -o '^[0-9]\+') - 1 ))
|
||||
default_sink_index=$(( ($default_sink_index + $num_devices + $inc) % $num_devices ))
|
||||
default_sink=${sink_arr[$default_sink_index]}
|
||||
pacmd set-default-sink $default_sink
|
||||
move_sinks_to_new_default $default_sink
|
||||
}
|
||||
|
||||
case "$BLOCK_BUTTON" in
|
||||
1) set_default_playback_device_next ;;
|
||||
2) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY toggle ;;
|
||||
3) set_default_playback_device_next -1 ;;
|
||||
4) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_DELTA%+ ;;
|
||||
5) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_DELTA%- ;;
|
||||
esac
|
||||
|
||||
function print_format {
|
||||
echo "$1" | envsubst '${SYMB}${VOL}${INDEX}${NAME}'
|
||||
}
|
||||
|
||||
function print_block {
|
||||
ACTIVE=$(pacmd list-sinks | grep "state\: RUNNING" -B4 -A7 | grep "index:\|name:\|volume: front\|muted:")
|
||||
[ -z "$ACTIVE" ] && ACTIVE=$(pacmd list-sinks | grep "index:\|name:\|volume: front\|muted:" | grep -A3 '*')
|
||||
for name in INDEX NAME VOL MUTED; do
|
||||
read $name
|
||||
done < <(echo "$ACTIVE")
|
||||
INDEX=$(echo "$INDEX" | grep -o '[0-9]\+')
|
||||
VOL=$(echo "$VOL" | grep -o "[0-9]*%" | head -1 )
|
||||
VOL="${VOL%?}"
|
||||
|
||||
NAME=$(echo "$NAME" | sed \
|
||||
's/.*<.*\.\(.*\)>.*/\1/; t;'\
|
||||
's/.*<\(.*\)>.*/\1/; t;'\
|
||||
's/.*/unknown/')
|
||||
|
||||
if [[ $USE_ALSA_NAME == 1 ]] ; then
|
||||
ALSA_NAME=$(pacmd list-sinks |\
|
||||
awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
|
||||
grep "alsa.name\|alsa.mixer_name" |\
|
||||
head -n1 |\
|
||||
sed 's/.*= "\(.*\)".*/\1/')
|
||||
NAME=${ALSA_NAME:-$NAME}
|
||||
elif [[ $USE_DESCRIPTION == 1 ]] ; then
|
||||
DESCRIPTION=$(pacmd list-sinks |\
|
||||
awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
|
||||
grep "device.description" |\
|
||||
head -n1 |\
|
||||
sed 's/.*= "\(.*\)".*/\1/')
|
||||
NAME=${DESCRIPTION:-$NAME}
|
||||
fi
|
||||
|
||||
if [[ $MUTED =~ "no" ]] ; then
|
||||
SYMB=$AUDIO_HIGH_SYMBOL
|
||||
[[ $VOL -le $AUDIO_MED_THRESH ]] && SYMB=$AUDIO_MED_SYMBOL
|
||||
[[ $VOL -le $AUDIO_LOW_THRESH ]] && SYMB=$AUDIO_LOW_SYMBOL
|
||||
COLOR=$DEFAULT_COLOR
|
||||
else
|
||||
SYMB=$AUDIO_MUTED_SYMBOL
|
||||
COLOR=$MUTED_COLOR
|
||||
fi
|
||||
|
||||
if [[ $SUBSCRIBE == 1 ]] ; then
|
||||
print_format "$LONG_FORMAT"
|
||||
else
|
||||
print_format "$LONG_FORMAT"
|
||||
print_format "$SHORT_FORMAT"
|
||||
echo "$COLOR"
|
||||
fi
|
||||
}
|
||||
|
||||
print_block
|
||||
if [[ $SUBSCRIBE == 1 ]] ; then
|
||||
while read -r EVENT; do
|
||||
print_block
|
||||
done < <(pactl subscribe | stdbuf -oL grep change)
|
||||
fi
|
|
@ -0,0 +1,74 @@
|
|||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = true
|
||||
interval = 5
|
||||
}
|
||||
|
||||
# order += "read_file BRIGHTNESS"
|
||||
order += "memory"
|
||||
order += "cpu_usage"
|
||||
order += "volume master"
|
||||
order += "ipv6"
|
||||
order += "disk /"
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
order += "battery all"
|
||||
order += "load"
|
||||
order += "tztime local"
|
||||
|
||||
# read_file BRIGHTNESS {
|
||||
# format = "BRI %content"
|
||||
# path = "/home/kapper/.config/.brightness"
|
||||
# max_characters = 5
|
||||
# }
|
||||
|
||||
memory 0{
|
||||
|
||||
format = "%free %available%"
|
||||
|
||||
}
|
||||
|
||||
volume master {
|
||||
format = "♪: %volume"
|
||||
format_muted = "♪: muted (%volume)"
|
||||
}
|
||||
|
||||
cpu_usage {
|
||||
format = "CPU %usage {%cpu0 %cpu1}"
|
||||
max_threshold = 75
|
||||
}
|
||||
|
||||
wireless _first_ {
|
||||
format_up = "W: (%quality at %essid) %ip"
|
||||
format_down = "W: down"
|
||||
}
|
||||
|
||||
ethernet _first_ {
|
||||
# if you use %speed, i3status requires root privileges
|
||||
format_up = "E: %ip (%speed)"
|
||||
format_down = "E: down"
|
||||
}
|
||||
|
||||
battery all {
|
||||
format = "%status %percentage %remaining"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M:%S"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "%1min"
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "%avail"
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[Desktop Entry]
|
||||
DefaultProfile=Kapper.profile
|
||||
|
||||
[Favorite Profiles]
|
||||
Favorites=
|
||||
|
||||
[KonsoleWindow]
|
||||
ShowMenuBarByDefault=false
|
||||
|
||||
[MainWindow]
|
||||
Height 1200=1151
|
||||
MenuBar=Disabled
|
||||
State=AAAA/wAAAAD9AAAAAAAAA8AAAARvAAAABAAAAAQAAAAIAAAACPwAAAAA
|
||||
ToolBarsMovable=Disabled
|
||||
Width 1920=1916
|
|
@ -0,0 +1,8 @@
|
|||
[window]
|
||||
width=596
|
||||
height=396
|
||||
sinkInputType=0
|
||||
sourceOutputType=1
|
||||
sinkType=0
|
||||
sourceType=0
|
||||
showVolumeMeters=1
|
|
@ -0,0 +1,106 @@
|
|||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
scrollUp
|
||||
scrollUp
|
||||
scrollUp
|
||||
scrollUp
|
||||
scrollUp
|
||||
scrollUp
|
||||
scrollUp
|
||||
scrollUp
|
||||
scrollUp
|
||||
left
|
||||
left
|
||||
right
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
right
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
scrollDown
|
||||
left
|
||||
right
|
||||
right
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
right
|
||||
left
|
||||
right
|
||||
right
|
||||
right
|
||||
left
|
||||
middle
|
||||
middle
|
||||
middle
|
||||
right
|
||||
middle
|
||||
middle
|
||||
right
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
left
|
||||
middle
|
||||
right
|
||||
left
|
||||
left
|
||||
left
|
||||
right
|
||||
right
|
||||
left
|
|
@ -0,0 +1,701 @@
|
|||
; Polybars
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
[bar/top]
|
||||
; Polybar Position
|
||||
monitor = ${env:MONITOR}
|
||||
width = 100%
|
||||
height = 25
|
||||
|
||||
; Polybar Color
|
||||
; Depreciated..
|
||||
;tray-transparent = true
|
||||
; Transparent adds 2 leading values to color (2+hex)
|
||||
background = #00000000
|
||||
; Opaque is hex color (hex)
|
||||
foreground = #00c24a
|
||||
line-color = ${bar/bottom.background}
|
||||
line-size = 16
|
||||
spacing = 2
|
||||
tray-background = #00111111
|
||||
|
||||
; Polybar Padding
|
||||
padding-left = 0
|
||||
padding-right = 5
|
||||
|
||||
; Margin Between Modules
|
||||
module-margin = 2
|
||||
|
||||
; Type font
|
||||
font-0 = NotoSans-Regular:size=12;0
|
||||
font-1 = Inconsolata Nerd Font:size=12;0
|
||||
font-2 = Noto Sans Mono:size=10;0
|
||||
|
||||
; Modules
|
||||
modules-left = powermenu weather
|
||||
modules-center = ki3
|
||||
modules-right = brightness volume date
|
||||
|
||||
; Set the cursor to display pointer / resize is interaction available
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[bar/bottom]
|
||||
; Position, size of polybar
|
||||
monitor = ${env:MONITOR}
|
||||
bottom = true
|
||||
width = 100%
|
||||
height = 30
|
||||
|
||||
; Use top bar colors
|
||||
background = ${bar/top.background}
|
||||
foreground = ${bar/top.foreground}
|
||||
line-color = ${bar/top.background}
|
||||
line-size = 2
|
||||
spacing = 3
|
||||
|
||||
; Polybar padding
|
||||
padding-left = 6
|
||||
padding-right = 6
|
||||
|
||||
; Margins between modules
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
; Font settings, order matters
|
||||
; Top font takes priority over following
|
||||
;font-0 = Source Code Pro:size=10;0
|
||||
font-0 = NotoSans-Regular:size=12;1
|
||||
font-1 = Inconsolata Nerd Font:size=12;3
|
||||
font-2 = Noto Sans Mono:size=8;0
|
||||
|
||||
; Modules
|
||||
modules-left = temp-cpu cpu memory
|
||||
modules-center = popup-utc network public-ip filesystem
|
||||
modules-right = vpn battery
|
||||
|
||||
; Set the cursor to display pointer / resize is interaction available
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
; Modules
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
; VPN Status
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/vpn]
|
||||
type = custom/script
|
||||
exec = mullvad status | awk '{print "VPN: "$3}'
|
||||
interval = 10
|
||||
|
||||
; Pop-up Calendar
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/popup-utc]
|
||||
type = custom/script
|
||||
exec = ~/.local/bin/i3scripts/popup-calendar
|
||||
interval = 5
|
||||
click-left = ~/.local/bin/i3scripts/popup-calendar --popup
|
||||
click-right = ~/.local/bin/i3scripts/popup-calendar-local
|
||||
|
||||
; Local Date
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %%{F#aaa}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-}
|
||||
date-alt = %%{F#aaa}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-}
|
||||
click-right = exec notify-send hi
|
||||
|
||||
; Weather
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/weather]
|
||||
type = custom/script
|
||||
exec = ~/.local/bin/i3scripts/weathermap
|
||||
interval = 600
|
||||
;label-font = Font Awesome 5 Free Solid:size=40;0
|
||||
|
||||
; Brightness
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/brightness]
|
||||
type = custom/script
|
||||
exec = echo " $(brightnessctl -P g)%"
|
||||
tail = true
|
||||
|
||||
|
||||
; Type Speed
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/info-hackspeed]
|
||||
type = custom/script
|
||||
exec = ~/.local/bin/i3scripts/info-hackspeed
|
||||
tail = true
|
||||
|
||||
; Polybar Break Timer
|
||||
[module/breaktimer]
|
||||
type = custom/script
|
||||
format-prefix = " "
|
||||
;format-foreground = ${colors.verdeclaro}
|
||||
exec = polybar-break-timer $HOME/.config/polybar/.env/break-timer
|
||||
click-left = echo left >> $HOME/.config/polybar/.env/break-timer
|
||||
click-middle = echo middle >> $HOME/.config/polybar/.env/break-timer
|
||||
click-right = echo right >> $HOME/.config/polybar/.env/break-timer
|
||||
scroll-up = echo scrollUp >> $HOME/.config/polybar/.env/break-timer
|
||||
scroll-down = echo scrollDown >> $HOME/.config/polybar/.env/break-timer
|
||||
tail = true
|
||||
|
||||
; System Idle Time
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/info-idle]
|
||||
type = custom/script
|
||||
exec = ~/.local/bin/i3scripts/info-idle
|
||||
tail = true
|
||||
|
||||
; Disk Space
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
; Mountpoints to display
|
||||
mount-0 = /
|
||||
;mount-1 = /home
|
||||
;mount-2 = /var
|
||||
; Seconds to sleep between updates
|
||||
; Default: 30
|
||||
interval = 10
|
||||
; Display fixed precision values
|
||||
; Default: false
|
||||
fixed-values = true
|
||||
;Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = <label-mounted>
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
label-mounted = %mountpoint% %free%
|
||||
; Spacing between entries
|
||||
; Default: 2
|
||||
spacing = 4
|
||||
|
||||
; Network Status
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/network]
|
||||
type = internal/network
|
||||
interface = enp0s31f6
|
||||
; Available tags:
|
||||
; <label-connected> (default)
|
||||
; <ramp-signal>
|
||||
format-connected = <label-connected>
|
||||
; Available tags:
|
||||
; <label-disconnected> (default)
|
||||
format-disconnected = <label-disconnected>
|
||||
; Available tags:
|
||||
; <label-connected> (default)
|
||||
; <label-packetloss>
|
||||
; <animation-packetloss>
|
||||
format-packetloss = <animation-packetloss> <label-connected>
|
||||
; Default: %ifname% %local_ip%
|
||||
label-connected = %upspeed% / %downspeed:9% 龍 %linkspeed% %local_ip%
|
||||
label-connected-foreground =#00c24a
|
||||
; Default: (none)
|
||||
label-disconnected = not connected
|
||||
label-disconnected-foreground = #d00
|
||||
; Default: (none)
|
||||
;label-packetloss = %essid%
|
||||
;label-packetloss-foreground = #eefafafa
|
||||
; Only applies if <ramp-signal> is used
|
||||
;ramp-signal-0 = 😱
|
||||
;ramp-signal-1 = 😠
|
||||
;ramp-signal-2 = 😒
|
||||
;ramp-signal-3 = 😊
|
||||
;ramp-signal-4 = 😃
|
||||
;ramp-signal-5 = 😈
|
||||
; Only applies if <animation-packetloss> is used
|
||||
;animation-packetloss-0 = ⚠
|
||||
;animation-packetloss-0-foreground = #ffa64c
|
||||
;animation-packetloss-1 = 📶
|
||||
;animation-packetloss-1-foreground = #000000
|
||||
; Framerate in milliseconds
|
||||
;animation-packetloss-framerate = 500
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 5.0
|
||||
; Test connectivity every Nth update
|
||||
; A value of 0 disables the feature
|
||||
; NOTE: Experimental (needs more testing)
|
||||
; Default: 0
|
||||
;ping-interval = 3
|
||||
; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
|
||||
; Minimum output width of upload/download rate
|
||||
; Default: 3
|
||||
udspeed-minwidth = 5
|
||||
; Accumulate values from all interfaces
|
||||
; when querying for up/downspeed rate
|
||||
; Default: false
|
||||
accumulate-stats = true
|
||||
; Consider an `UNKNOWN` interface state as up.
|
||||
; Some devices like USB network adapters have
|
||||
; an unknown state, even when they're running
|
||||
; Default: false
|
||||
unknown-as-up = true
|
||||
|
||||
; Show Public IP
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/public-ip]
|
||||
type = custom/script
|
||||
exec = curl -s ifconfig.me
|
||||
interval = 600
|
||||
|
||||
; CPU Temp
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/temp-cpu]
|
||||
type = custom/script
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 5.0
|
||||
; Full path of temperature sysfs path
|
||||
; Use `sensors` to find preferred temperature source, then run
|
||||
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
|
||||
; to find path to desired file
|
||||
; Default reverts to thermal zone setting
|
||||
exec = cat /sys/class/thermal/thermal_zone2/temp | awk '{print ( ( ( (9/5) * $1) / 1000) + 32) "°F" }'
|
||||
format = <label>
|
||||
tail = true
|
||||
label = CPU: %output%
|
||||
|
||||
; GPU Temp
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/temp-gpu]
|
||||
type = internal/temperature
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 5.0
|
||||
; Thermal zone to use
|
||||
; To list all the zone types, run
|
||||
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
|
||||
; Default: 0
|
||||
thermal-zone = 2
|
||||
; Full path of temperature sysfs path
|
||||
; Use `sensors` to find preferred temperature source, then run
|
||||
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
|
||||
; to find path to desired file
|
||||
; Default reverts to thermal zone setting
|
||||
hwmon-path = /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon3/temp1_input
|
||||
; Base temperature for where to start the ramp (in degrees celsius)
|
||||
; Default: 0
|
||||
base-temperature = 20
|
||||
; Threshold temperature to display warning label (in degrees celsius)
|
||||
; Default: 80
|
||||
warn-temperature = 60
|
||||
; Available tokens:
|
||||
; %temperature% (deprecated)
|
||||
; %temperature-c% (default, temperature in °C)
|
||||
; %temperature-f% (temperature in °F)
|
||||
label = ﲅ %temperature-f%
|
||||
; Available tokens:
|
||||
; %temperature% (deprecated)
|
||||
; %temperature-c% (default, temperature in °C)
|
||||
; %temperature-f% (temperature in °F)
|
||||
label-warn = %temperature-f%
|
||||
label-warn-foreground = #f00
|
||||
|
||||
; Keyboard Status
|
||||
; Locale, Caps, Numlock
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/keyboard]
|
||||
type = internal/xkeyboard
|
||||
; List of indicators to ignore
|
||||
blacklist-1 = scroll lock
|
||||
label-indicator-on-capslock = Caps
|
||||
label-indicator-off-capslock =
|
||||
label-indicator-on-numlock = Num
|
||||
label-indicator-off-numlock =
|
||||
format = <label-indicator> <label-layout>
|
||||
; layout-icon-[0-9]+ = layout;icon
|
||||
; Assign each layout an icon that will be available as %icon% token for the
|
||||
; <label-layout> tag. The part before ';' will try to match %layout% value.
|
||||
label-layout = %name% %icon%
|
||||
;layout-icon-default =
|
||||
;layout-icon-1 = us;
|
||||
|
||||
; System Menus
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
format-padding = 0
|
||||
format = <label-toggle> <menu>
|
||||
label-open = " "
|
||||
label-close = " "
|
||||
menu-0-0 = " Restart i3 |"
|
||||
menu-0-0-foreground = #fba922
|
||||
;menu-0-0-background = #141414
|
||||
menu-0-0-exec = i3 restart
|
||||
menu-0-1 = " Logout |"
|
||||
menu-0-1-foreground = #fba922
|
||||
menu-0-1-exec = pkill -KILL -u kapper
|
||||
menu-0-2 = " Reboot |"
|
||||
menu-0-2-foreground = #fba922
|
||||
menu-0-2-exec = reboot
|
||||
menu-0-3 = " Power off |"
|
||||
menu-0-3-foreground = #fba922
|
||||
menu-0-3-exec = poweroff
|
||||
menu-0-4 = " Lock |"
|
||||
menu-0-4-foreground = #fba922
|
||||
menu-0-4-exec = i3lock -c 000000
|
||||
|
||||
; Pseudo-Caffeine
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/caffeine]
|
||||
type = custom/menu
|
||||
format = <menu> <label-toggle>
|
||||
label-open = " "
|
||||
label-close = " "
|
||||
label-open-padding = 0
|
||||
label-close-padding = 1
|
||||
label-separator = " "
|
||||
|
||||
menu-0-0 = " ON "
|
||||
menu-0-0-exec = sh /home/kapper/.local/bin/i3scripts/xoffee disable
|
||||
menu-0-1 = " OFF "
|
||||
menu-0-1-exec = sh /home/kapper/.local/bin/i3scripts/xoffee enable
|
||||
|
||||
; CPU Core Usages
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 5
|
||||
format = <ramp-coreload> <label>
|
||||
label = %percentage-cores%
|
||||
ramp-coreload-0 = ▁
|
||||
ramp-coreload-0-font = 2
|
||||
ramp-coreload-0-foreground = #aaff77
|
||||
ramp-coreload-1 = ▂
|
||||
ramp-coreload-1-font = 2
|
||||
ramp-coreload-1-foreground = #aaff77
|
||||
ramp-coreload-2 = ▃
|
||||
ramp-coreload-2-font = 2
|
||||
ramp-coreload-2-foreground = #aaff77
|
||||
ramp-coreload-3 = ▄
|
||||
ramp-coreload-3-font = 2
|
||||
ramp-coreload-3-foreground = #aaff77
|
||||
ramp-coreload-4 = ▅
|
||||
ramp-coreload-4-font = 2
|
||||
ramp-coreload-4-foreground = #fba922
|
||||
ramp-coreload-5 = ▆
|
||||
ramp-coreload-5-font = 2
|
||||
ramp-coreload-5-foreground = #fba922
|
||||
ramp-coreload-6 = ▇
|
||||
ramp-coreload-6-font = 2
|
||||
ramp-coreload-6-foreground = #ff5555
|
||||
ramp-coreload-7 = █
|
||||
ramp-coreload-7-font = 2
|
||||
ramp-coreload-7-foreground = #ff5555
|
||||
|
||||
; UTC Date / Time
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/clock-utc]
|
||||
type = custom/script
|
||||
exec = TZ=UTC date +"UTC: %%{F#999}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-}"
|
||||
interval = 30
|
||||
|
||||
; Local Date / Time
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/clock]
|
||||
type = internal/date
|
||||
interval = 30
|
||||
date = %%{F#999}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-}
|
||||
|
||||
; Memory Free MiB
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/memfree]
|
||||
type = custom/script
|
||||
exec = grep -w MemAvailable: /proc/meminfo | awk '{print $2 / 1024 "MiB"}'
|
||||
interval = 5
|
||||
label = RAM: %output%
|
||||
|
||||
|
||||
; Memory Usage
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-used>
|
||||
; <bar-free>
|
||||
; <ramp-used>
|
||||
; <ramp-free>
|
||||
; <bar-swap-used>
|
||||
; <bar-swap-free>
|
||||
; <ramp-swap-used>
|
||||
; <ramp-swap-free>
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
format = <label> <bar-used>
|
||||
;label = SWAP:%gb_swap_used% RAM: %gb_used%
|
||||
label = RAM:
|
||||
bar-used-width = 25
|
||||
bar-used-foreground-0 = #aaff77
|
||||
bar-used-foreground-1 = #fba922
|
||||
bar-used-foreground-2 = #ff5555
|
||||
;bar-used-foreground-3 = #ff5555
|
||||
bar-used-indicator =
|
||||
bar-used-indicator-font = 6
|
||||
bar-used-indicator-foreground = #ff
|
||||
|
||||
bar-used-fill =
|
||||
bar-used-fill-font = 6
|
||||
bar-used-empty = -
|
||||
bar-used-empty-font = 6
|
||||
bar-used-empty-foreground = #9a9999
|
||||
|
||||
|
||||
; Battery Status
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
|
||||
; This is useful in case the battery never reports 100% charge
|
||||
full-at = 99
|
||||
|
||||
; Use the following command to list batteries and adapters:
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
battery = BAT0
|
||||
adapter = AC
|
||||
|
||||
; If an inotify event haven't been reported in this many
|
||||
; seconds, manually poll for new values.
|
||||
;
|
||||
; Needed as a fallback for systems that don't report events
|
||||
; on sysfs/procfs.
|
||||
;
|
||||
; Disable polling by setting the interval to 0.
|
||||
;
|
||||
; Default: 5
|
||||
poll-interval = 5
|
||||
|
||||
; see "man date" for details on how to format the time string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; Default: %H:%M:%S
|
||||
;time-format = %H:%M
|
||||
|
||||
; Available tags:
|
||||
; <label-charging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-charging>
|
||||
format-charging = <ramp-capacity> <label-charging>
|
||||
|
||||
; Available tags:
|
||||
; <label-discharging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-discharging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
|
||||
; Available tags:
|
||||
; <label-full> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
format-full = <ramp-capacity> <label-full>
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - is set to 100 if full-at is reached
|
||||
; %percentage_raw%
|
||||
; %time%
|
||||
; %consumption% (shows current charge rate in watts)
|
||||
label-charging = Charging %percentage%% | %time% | %consumption% W
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - is set to 100 if full-at is reached
|
||||
; %percentage_raw%
|
||||
; %time%
|
||||
; %consumption% (shows current discharge rate in watts)
|
||||
label-discharging = %percentage%% | %time% | %consumption% W
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - is set to 100 if full-at is reached
|
||||
; %percentage_raw%
|
||||
label-full = Fully charged
|
||||
|
||||
; Only applies if <ramp-capacity> is used
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
|
||||
; Only applies if <bar-capacity> is used
|
||||
bar-capacity-width = 10
|
||||
;bar-used-width = 15
|
||||
;bar-used-foreground-0 = #aaff77
|
||||
;bar-used-foreground-1 = #aaff77
|
||||
;bar-used-foreground-2 = #fba922
|
||||
;bar-used-foreground-3 = #ff5555
|
||||
;bar-used-indicator =
|
||||
;bar-used-indicator-font = 6
|
||||
;bar-used-indicator-foreground = #ff
|
||||
;bar-used-fill =
|
||||
;bar-used-fill-font = 6
|
||||
;bar-used-empty = -
|
||||
;bar-used-empty-font = 6
|
||||
;bar-used-empty-foreground = #444444
|
||||
|
||||
; Only applies if <animation-charging> is used
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-3 =
|
||||
animation-charging-4 =
|
||||
; Framerate in milliseconds
|
||||
animation-charging-framerate = 750
|
||||
|
||||
; Only applies if <animation-discharging> is used
|
||||
animation-discharging-0 =
|
||||
animation-discharging-1 =
|
||||
animation-discharging-2 =
|
||||
animation-discharging-3 =
|
||||
animation-discharging-4 =
|
||||
; Framerate in milliseconds
|
||||
animation-discharging-framerate = 500
|
||||
|
||||
; I3 Workspace Display
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/ki3]
|
||||
type = internal/i3
|
||||
; Only show workspaces defined on the same output as the bar
|
||||
;
|
||||
; Useful if you want to show monitor specific workspaces
|
||||
; on different bars
|
||||
;
|
||||
; Default: false
|
||||
pin-workspaces = true
|
||||
; This will split the workspace name on ':'
|
||||
; Default: false
|
||||
strip-wsnumbers = false
|
||||
; Sort the workspaces by index instead of the default
|
||||
; sorting that groups the workspaces by output
|
||||
; Default: false
|
||||
index-sort = true
|
||||
; Create click handler used to focus workspace
|
||||
; Default: true
|
||||
enable-click = true
|
||||
; Create scroll handlers used to cycle workspaces
|
||||
; Default: true
|
||||
enable-scroll = true
|
||||
; Wrap around when reaching the first/last workspace
|
||||
; Default: true
|
||||
wrapping-scroll = true
|
||||
; Set the scroll cycle direction
|
||||
; Default: true
|
||||
reverse-scroll = false
|
||||
; Use fuzzy (partial) matching on labels when assigning
|
||||
; icons to workspaces
|
||||
; Example: code;♚ will apply the icon to all workspaces
|
||||
; containing 'code' in the label
|
||||
; Default: false
|
||||
fuzzy-match = false
|
||||
; Available tags:
|
||||
; <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)>
|
||||
; <label-mode> (default)
|
||||
format = <label-state> <label-mode>
|
||||
; Available tokens:
|
||||
; %mode%
|
||||
; Default: %mode%
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 2
|
||||
label-mode-background = #e60053
|
||||
|
||||
|
||||
; ws-icon-[0-9]+ = label;icon
|
||||
; NOTE: The label needs to match the name of the i3 workspace
|
||||
ws-icon-0 = 1;
|
||||
ws-icon-1 = 2;
|
||||
ws-icon-2 = 3;
|
||||
ws-icon-3 = 4;
|
||||
ws-icon-4 = 5;
|
||||
ws-icon-5 = 6;
|
||||
ws-icon-6 = 7;
|
||||
ws-icon-7 = 8;
|
||||
ws-icon-8 = 9;
|
||||
ws-icon-9 = 99;
|
||||
ws-icon-10 = 98;
|
||||
ws-icon-11 = 97;
|
||||
ws-icon-12 = 96;爵
|
||||
ws-icon-13 = 95;
|
||||
ws-icon-14 = 94;
|
||||
ws-icon-default =
|
||||
; NOTE: You cannot skip icons, e.g. to get a ws-icon-6
|
||||
; you must also define a ws-icon-5.
|
||||
; NOTE: Icon will be available as the %icon% token inside label-*
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; %output%
|
||||
; Default: %icon% %name%
|
||||
label-focused = %icon%
|
||||
;label-focused-foreground = #ffffff
|
||||
;label-focused-background = #016239
|
||||
;label-focused-underline = #6e
|
||||
label-focused-padding = 4
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; %output%
|
||||
; Default: %icon% %name%
|
||||
label-unfocused = %icon%
|
||||
label-unfocused-padding = 4
|
||||
label-unfocused-foreground = #3f3f3f
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; %output%
|
||||
; Default: %icon% %name%
|
||||
label-visible = %icon%
|
||||
label-visible-foreground = #777777
|
||||
;label-visible-underline = #1f1f1f
|
||||
label-visible-padding = 4
|
||||
; Separator in between workspaces
|
||||
label-separator = |
|
||||
label-separator-padding = 1
|
||||
label-separator-foreground = #ffb52a
|
||||
|
||||
; Volume Status
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
;speaker-mixer =
|
||||
;headphone-mixer = Headphone
|
||||
;headphone-id = 9
|
||||
format-volume = <ramp-volume> <label-volume>
|
||||
label-muted = muted
|
||||
label-muted-foreground = #66
|
||||
ramp-volume-0 = 奄
|
||||
ramp-volume-1 = 奔
|
||||
ramp-volume-2 = 墳
|
||||
ramp-volume-3 =
|
||||
|
|
@ -0,0 +1 @@
|
|||
../../.local/bin/i3scripts/start-polybar
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a9b8c9bb39dbfb7ec3c639e497b5a76fa6dcb8cc
|
|
@ -243,9 +243,8 @@ class cd(Command):
|
|||
|
||||
paths = self._tab_fuzzy_match(basepath, tokens)
|
||||
if not os.path.isabs(dest):
|
||||
paths_rel = self.fm.thisdir.path
|
||||
paths = [os.path.relpath(os.path.join(basepath, path), paths_rel)
|
||||
for path in paths]
|
||||
paths_rel = basepath
|
||||
paths = [os.path.relpath(path, paths_rel) for path in paths]
|
||||
else:
|
||||
paths_rel = ''
|
||||
return paths, paths_rel
|
||||
|
@ -275,7 +274,7 @@ class cd(Command):
|
|||
return None
|
||||
if len(paths) == 1:
|
||||
return start + paths[0] + sep
|
||||
return [start + dirname + sep for dirname in paths]
|
||||
return [start + dirname for dirname in paths]
|
||||
|
||||
|
||||
class chain(Command):
|
||||
|
@ -283,7 +282,6 @@ class chain(Command):
|
|||
|
||||
Calls multiple commands at once, separated by semicolons.
|
||||
"""
|
||||
resolve_macros = False
|
||||
|
||||
def execute(self):
|
||||
if not self.rest(1).strip():
|
||||
|
@ -574,7 +572,7 @@ class default_linemode(Command):
|
|||
class quit(Command): # pylint: disable=redefined-builtin
|
||||
""":quit
|
||||
|
||||
Closes the current tab, if there's more than one tab.
|
||||
Closes the current tab, if there's only one tab.
|
||||
Otherwise quits if there are no tasks in progress.
|
||||
"""
|
||||
def _exit_no_work(self):
|
||||
|
@ -593,7 +591,7 @@ class quit(Command): # pylint: disable=redefined-builtin
|
|||
class quit_bang(Command):
|
||||
""":quit!
|
||||
|
||||
Closes the current tab, if there's more than one tab.
|
||||
Closes the current tab, if there's only one tab.
|
||||
Otherwise force quits immediately.
|
||||
"""
|
||||
name = 'quit!'
|
||||
|
@ -701,64 +699,6 @@ class delete(Command):
|
|||
self.fm.delete(files)
|
||||
|
||||
|
||||
class trash(Command):
|
||||
""":trash
|
||||
|
||||
Tries to move the selection or the files passed in arguments (if any) to
|
||||
the trash, using rifle rules with label "trash".
|
||||
The arguments use a shell-like escaping.
|
||||
|
||||
"Selection" is defined as all the "marked files" (by default, you
|
||||
can mark files with space or v). If there are no marked files,
|
||||
use the "current file" (where the cursor is)
|
||||
|
||||
When attempting to trash non-empty directories or multiple
|
||||
marked files, it will require a confirmation.
|
||||
"""
|
||||
|
||||
allow_abbrev = False
|
||||
escape_macros_for_shell = True
|
||||
|
||||
def execute(self):
|
||||
import shlex
|
||||
from functools import partial
|
||||
|
||||
def is_directory_with_files(path):
|
||||
return os.path.isdir(path) and not os.path.islink(path) and len(os.listdir(path)) > 0
|
||||
|
||||
if self.rest(1):
|
||||
files = shlex.split(self.rest(1))
|
||||
many_files = (len(files) > 1 or is_directory_with_files(files[0]))
|
||||
else:
|
||||
cwd = self.fm.thisdir
|
||||
tfile = self.fm.thisfile
|
||||
if not cwd or not tfile:
|
||||
self.fm.notify("Error: no file selected for deletion!", bad=True)
|
||||
return
|
||||
|
||||
# relative_path used for a user-friendly output in the confirmation.
|
||||
files = [f.relative_path for f in self.fm.thistab.get_selection()]
|
||||
many_files = (cwd.marked_items or is_directory_with_files(tfile.path))
|
||||
|
||||
confirm = self.fm.settings.confirm_on_delete
|
||||
if confirm != 'never' and (confirm != 'multiple' or many_files):
|
||||
self.fm.ui.console.ask(
|
||||
"Confirm deletion of: %s (y/N)" % ', '.join(files),
|
||||
partial(self._question_callback, files),
|
||||
('n', 'N', 'y', 'Y'),
|
||||
)
|
||||
else:
|
||||
# no need for a confirmation, just delete
|
||||
self.fm.execute_file(files, label='trash')
|
||||
|
||||
def tab(self, tabnum):
|
||||
return self._tab_directory_content()
|
||||
|
||||
def _question_callback(self, files, answer):
|
||||
if answer == 'y' or answer == 'Y':
|
||||
self.fm.execute_file(files, label='trash')
|
||||
|
||||
|
||||
class jump_non(Command):
|
||||
""":jump_non [-FLAGS...]
|
||||
|
||||
|
@ -1056,7 +996,7 @@ class rename_append(Command):
|
|||
relpath = tfile.relative_path.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)
|
||||
basename = tfile.basename.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)
|
||||
|
||||
if basename.find('.') <= 0 or os.path.isdir(relpath):
|
||||
if basename.find('.') <= 0:
|
||||
self.fm.open_console('rename ' + relpath)
|
||||
return
|
||||
|
||||
|
@ -1088,9 +1028,8 @@ class chmod(Command):
|
|||
def execute(self):
|
||||
mode_str = self.rest(1)
|
||||
if not mode_str:
|
||||
if self.quantifier is None:
|
||||
self.fm.notify("Syntax: chmod <octal number> "
|
||||
"or specify a quantifier", bad=True)
|
||||
if not self.quantifier:
|
||||
self.fm.notify("Syntax: chmod <octal number>", bad=True)
|
||||
return
|
||||
mode_str = str(self.quantifier)
|
||||
|
||||
|
@ -1124,8 +1063,7 @@ class bulkrename(Command):
|
|||
After you close it, it will be executed.
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
# pylint: disable=too-many-locals,too-many-statements,too-many-branches
|
||||
def execute(self): # pylint: disable=too-many-locals,too-many-statements
|
||||
import sys
|
||||
import tempfile
|
||||
from ranger.container.file import File
|
||||
|
@ -1134,57 +1072,46 @@ class bulkrename(Command):
|
|||
|
||||
# Create and edit the file list
|
||||
filenames = [f.relative_path for f in self.fm.thistab.get_selection()]
|
||||
with tempfile.NamedTemporaryFile(delete=False) as listfile:
|
||||
listfile = tempfile.NamedTemporaryFile(delete=False)
|
||||
listpath = listfile.name
|
||||
|
||||
if py3:
|
||||
listfile.write("\n".join(filenames).encode(
|
||||
encoding="utf-8", errors="surrogateescape"))
|
||||
listfile.write("\n".join(filenames).encode("utf-8"))
|
||||
else:
|
||||
listfile.write("\n".join(filenames))
|
||||
listfile.close()
|
||||
self.fm.execute_file([File(listpath)], app='editor')
|
||||
with (open(listpath, 'r', encoding="utf-8", errors="surrogateescape") if
|
||||
py3 else open(listpath, 'r')) as listfile:
|
||||
listfile = open(listpath, 'r')
|
||||
new_filenames = listfile.read().split("\n")
|
||||
listfile.close()
|
||||
os.unlink(listpath)
|
||||
if all(a == b for a, b in zip(filenames, new_filenames)):
|
||||
self.fm.notify("No renaming to be done!")
|
||||
return
|
||||
|
||||
# Generate script
|
||||
with tempfile.NamedTemporaryFile() as cmdfile:
|
||||
cmdfile = tempfile.NamedTemporaryFile()
|
||||
script_lines = []
|
||||
script_lines.append("# This file will be executed when you close"
|
||||
" the editor.")
|
||||
script_lines.append("# Please double-check everything, clear the"
|
||||
" file to abort.")
|
||||
new_dirs = []
|
||||
for old, new in zip(filenames, new_filenames):
|
||||
if old != new:
|
||||
basepath, _ = os.path.split(new)
|
||||
if (basepath and basepath not in new_dirs
|
||||
and not os.path.isdir(basepath)):
|
||||
script_lines.append("mkdir -vp -- {dir}".format(
|
||||
dir=esc(basepath)))
|
||||
new_dirs.append(basepath)
|
||||
script_lines.append("mv -vi -- {old} {new}".format(
|
||||
old=esc(old), new=esc(new)))
|
||||
# Make sure not to forget the ending newline
|
||||
script_content = "\n".join(script_lines) + "\n"
|
||||
script_lines.append("# This file will be executed when you close the editor.\n")
|
||||
script_lines.append("# Please double-check everything, clear the file to abort.\n")
|
||||
script_lines.extend("mv -vi -- %s %s\n" % (esc(old), esc(new))
|
||||
for old, new in zip(filenames, new_filenames) if old != new)
|
||||
script_content = "".join(script_lines)
|
||||
if py3:
|
||||
cmdfile.write(script_content.encode(encoding="utf-8",
|
||||
errors="surrogateescape"))
|
||||
cmdfile.write(script_content.encode("utf-8"))
|
||||
else:
|
||||
cmdfile.write(script_content)
|
||||
cmdfile.flush()
|
||||
|
||||
# Open the script and let the user review it, then check if the
|
||||
# script was modified by the user
|
||||
# Open the script and let the user review it, then check if the script
|
||||
# was modified by the user
|
||||
self.fm.execute_file([File(cmdfile.name)], app='editor')
|
||||
cmdfile.seek(0)
|
||||
script_was_edited = (script_content != cmdfile.read())
|
||||
|
||||
# Do the renaming
|
||||
self.fm.run(['/bin/sh', cmdfile.name], flags='w')
|
||||
cmdfile.close()
|
||||
|
||||
# Retag the files, but only if the script wasn't changed during review,
|
||||
# because only then we know which are the source and destination files.
|
||||
|
@ -1303,7 +1230,7 @@ class copycmap(copymap):
|
|||
|
||||
|
||||
class copytmap(copymap):
|
||||
""":copytmap <keys> <newkeys1> [<newkeys2>...]
|
||||
""":copycmap <keys> <newkeys1> [<newkeys2>...]
|
||||
|
||||
Copies a "taskview" keybinding from <keys> to <newkeys>
|
||||
"""
|
||||
|
@ -1322,69 +1249,30 @@ class unmap(Command):
|
|||
self.fm.ui.keymaps.unbind(self.context, arg)
|
||||
|
||||
|
||||
class uncmap(unmap):
|
||||
""":uncmap <keys> [<keys2>, ...]
|
||||
|
||||
Remove the given "console" mappings
|
||||
"""
|
||||
context = 'console'
|
||||
|
||||
|
||||
class cunmap(uncmap):
|
||||
class cunmap(unmap):
|
||||
""":cunmap <keys> [<keys2>, ...]
|
||||
|
||||
Remove the given "console" mappings
|
||||
|
||||
DEPRECATED in favor of uncmap.
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
self.fm.notify("cunmap is deprecated in favor of uncmap!")
|
||||
super(cunmap, self).execute()
|
||||
context = 'browser'
|
||||
|
||||
|
||||
class unpmap(unmap):
|
||||
""":unpmap <keys> [<keys2>, ...]
|
||||
class punmap(unmap):
|
||||
""":punmap <keys> [<keys2>, ...]
|
||||
|
||||
Remove the given "pager" mappings
|
||||
"""
|
||||
context = 'pager'
|
||||
|
||||
|
||||
class punmap(unpmap):
|
||||
""":punmap <keys> [<keys2>, ...]
|
||||
|
||||
Remove the given "pager" mappings
|
||||
|
||||
DEPRECATED in favor of unpmap.
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
self.fm.notify("punmap is deprecated in favor of unpmap!")
|
||||
super(punmap, self).execute()
|
||||
|
||||
|
||||
class untmap(unmap):
|
||||
""":untmap <keys> [<keys2>, ...]
|
||||
class tunmap(unmap):
|
||||
""":tunmap <keys> [<keys2>, ...]
|
||||
|
||||
Remove the given "taskview" mappings
|
||||
"""
|
||||
context = 'taskview'
|
||||
|
||||
|
||||
class tunmap(untmap):
|
||||
""":tunmap <keys> [<keys2>, ...]
|
||||
|
||||
Remove the given "taskview" mappings
|
||||
|
||||
DEPRECATED in favor of untmap.
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
self.fm.notify("tunmap is deprecated in favor of untmap!")
|
||||
super(tunmap, self).execute()
|
||||
|
||||
|
||||
class map_(Command):
|
||||
""":map <keysequence> <command>
|
||||
|
||||
|
@ -1691,7 +1579,7 @@ class filter_stack(Command):
|
|||
elif subcommand == "clear":
|
||||
self.fm.thisdir.filter_stack = []
|
||||
elif subcommand == "rotate":
|
||||
rotate_by = int(self.arg(2) or self.quantifier or 1)
|
||||
rotate_by = int(self.arg(2) or 1)
|
||||
self.fm.thisdir.filter_stack = (
|
||||
self.fm.thisdir.filter_stack[-rotate_by:]
|
||||
+ self.fm.thisdir.filter_stack[:-rotate_by]
|
||||
|
@ -1751,17 +1639,6 @@ class flat(Command):
|
|||
self.fm.thisdir.flat = level
|
||||
self.fm.thisdir.load_content()
|
||||
|
||||
|
||||
class reset_previews(Command):
|
||||
""":reset_previews
|
||||
|
||||
Reset the file previews.
|
||||
"""
|
||||
def execute(self):
|
||||
self.fm.previews = {}
|
||||
self.fm.ui.need_redraw = True
|
||||
|
||||
|
||||
# Version control commands
|
||||
# --------------------------------
|
||||
|
||||
|
@ -1925,14 +1802,11 @@ class yank(Command):
|
|||
['xsel'],
|
||||
['xsel', '-b'],
|
||||
],
|
||||
'wl-copy': [
|
||||
['wl-copy'],
|
||||
],
|
||||
'pbcopy': [
|
||||
['pbcopy'],
|
||||
],
|
||||
}
|
||||
ordered_managers = ['pbcopy', 'wl-copy', 'xclip', 'xsel']
|
||||
ordered_managers = ['pbcopy', 'xclip', 'xsel']
|
||||
executables = get_executables()
|
||||
for manager in ordered_managers:
|
||||
if manager in executables:
|
||||
|
@ -1960,34 +1834,3 @@ class yank(Command):
|
|||
in sorted(self.modes.keys())
|
||||
if mode
|
||||
)
|
||||
|
||||
|
||||
class paste_ext(Command):
|
||||
"""
|
||||
:paste_ext
|
||||
|
||||
Like paste but tries to rename conflicting files so that the
|
||||
file extension stays intact (e.g. file_.ext).
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def make_safe_path(dst):
|
||||
if not os.path.exists(dst):
|
||||
return dst
|
||||
|
||||
dst_name, dst_ext = os.path.splitext(dst)
|
||||
|
||||
if not dst_name.endswith("_"):
|
||||
dst_name += "_"
|
||||
if not os.path.exists(dst_name + dst_ext):
|
||||
return dst_name + dst_ext
|
||||
n = 0
|
||||
test_dst = dst_name + str(n)
|
||||
while os.path.exists(test_dst + dst_ext):
|
||||
n += 1
|
||||
test_dst = dst_name + str(n)
|
||||
|
||||
return test_dst + dst_ext
|
||||
|
||||
def execute(self):
|
||||
return self.fm.paste(make_safe_path=paste_ext.make_safe_path)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit feb2d7a90fe8aabd7ee3965d4bd67ebedceca817
|
|
@ -1,10 +1,3 @@
|
|||
#
|
||||
# Please note that configuration files may change as ranger evolves.
|
||||
# It's completely up to you to keep them up to date.
|
||||
#
|
||||
# To stop ranger from loading both the default and your custom rc.conf,
|
||||
# please set the environment variable RANGER_LOAD_DEFAULT_RC to FALSE.
|
||||
#
|
||||
# ===================================================================
|
||||
# This file contains the default startup commands for ranger.
|
||||
# To change them, it is recommended to create either /etc/ranger/rc.conf
|
||||
|
@ -41,7 +34,7 @@ set column_ratios 1,3,4
|
|||
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
|
||||
|
||||
# Show hidden files? You can toggle this by typing 'zh'
|
||||
set show_hidden false
|
||||
set show_hidden true
|
||||
|
||||
# Ask for a confirmation when running the "delete" command?
|
||||
# Valid values are "always", "never", "multiple" (default)
|
||||
|
@ -78,7 +71,7 @@ set vcs_backend_svn disabled
|
|||
set vcs_msg_length 50
|
||||
|
||||
# Use one of the supported image preview protocols
|
||||
set preview_images false
|
||||
set preview_images true
|
||||
|
||||
# Set the preview image method. Supported methods:
|
||||
#
|
||||
|
@ -121,7 +114,7 @@ set preview_images false
|
|||
# Preview images in full color with the external command "ueberzug".
|
||||
# Images are shown by using a child window.
|
||||
# Only for users who run X11 in GNU/Linux.
|
||||
set preview_images_method w3m
|
||||
set preview_images_method ueberzug
|
||||
|
||||
# Delay in seconds before displaying an image with the w3m method.
|
||||
# Increase it in case of experiencing display corruption.
|
||||
|
@ -287,14 +280,14 @@ set clear_filters_on_dir_change false
|
|||
|
||||
# Disable displaying line numbers in main column.
|
||||
# Possible values: false, absolute, relative.
|
||||
set line_numbers false
|
||||
set line_numbers absolute
|
||||
|
||||
# When line_numbers=relative show the absolute line number in the
|
||||
# current line.
|
||||
set relative_current_zero false
|
||||
|
||||
# Start line numbers from 1 instead of 0
|
||||
set one_indexed false
|
||||
set one_indexed true
|
||||
|
||||
# Save tabs on exit
|
||||
set save_tabs_on_exit false
|
||||
|
@ -460,6 +453,7 @@ map gu cd /usr
|
|||
map gd cd /dev
|
||||
map gl cd -r .
|
||||
map gL cd -r %f
|
||||
map gc cd ~/.config
|
||||
map go cd /opt
|
||||
map gv cd /var
|
||||
map gm cd /media
|
||||
|
@ -547,7 +541,7 @@ map <A-Left> tab_move -1
|
|||
map gt tab_move 1
|
||||
map gT tab_move -1
|
||||
map gn tab_new
|
||||
map gc tab_close
|
||||
map gC tab_close
|
||||
map uq tab_restore
|
||||
map <a-1> tab_open 1
|
||||
map <a-2> tab_open 2
|
||||
|
@ -764,3 +758,7 @@ tmap <delete> eval -q fm.ui.taskview.task_remove()
|
|||
tmap <C-l> redraw_window
|
||||
tmap <ESC> taskview_close
|
||||
copytmap <ESC> q Q w <C-c>
|
||||
|
||||
# Ranger devicons plugic
|
||||
default_linemode devicons
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
# directory | $1 is a directory
|
||||
# number <n> | change the number of this command to n
|
||||
# terminal | stdin, stderr and stdout are connected to a terminal
|
||||
# X | A graphical environment is available (darwin, Xorg, or Wayland)
|
||||
# X | $DISPLAY is not empty (i.e. Xorg runs)
|
||||
#
|
||||
# There are also pseudo-conditions which have a "side effect":
|
||||
# flag <flags> | Change how the program is run. See below.
|
||||
|
@ -66,13 +66,13 @@ ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
|
|||
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
|
||||
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
|
||||
ext x?html?, has midori, X, flag f = midori -- "$@"
|
||||
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
||||
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
||||
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
||||
ext x?html?, has opera, X, flag f = opera -- "$@"
|
||||
ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
||||
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
|
||||
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
|
||||
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
||||
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
||||
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
||||
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
|
||||
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
|
||||
ext x?html?, has elinks, terminal = elinks "$@"
|
||||
|
@ -98,7 +98,7 @@ ext exe = wine "$1"
|
|||
name ^[mM]akefile$ = make
|
||||
|
||||
#--------------------------------------------
|
||||
# Scripts
|
||||
# Code
|
||||
#-------------------------------------------
|
||||
ext py = python3 -- "$1"
|
||||
ext pl = perl -- "$1"
|
||||
|
@ -131,7 +131,7 @@ mime ^video|audio, has totem, X, flag f = totem -- "$@"
|
|||
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video without X
|
||||
# Video without X:
|
||||
#-------------------------------------------
|
||||
mime ^video, terminal, !X, has mpv = mpv -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
|
||||
|
@ -167,20 +167,14 @@ ext djvu, has atril, X, flag f = atril -- "$@"
|
|||
ext djvu, has djview, X, flag f = djview -- "$@"
|
||||
|
||||
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
ext epub, has zathura, X, flag f = zathura -- "$@"
|
||||
ext epub, has mupdf, X, flag f = mupdf -- "$@"
|
||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
|
||||
ext cbr, has zathura, X, flag f = zathura -- "$@"
|
||||
ext cbz, has zathura, X, flag f = zathura -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Images
|
||||
# Image Viewing:
|
||||
#-------------------------------------------
|
||||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
||||
mime ^image/svg, has display, X, flag f = display -- "$@"
|
||||
|
||||
mime ^image, has imv, X, flag f = imv -- "$@"
|
||||
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
||||
|
@ -190,7 +184,6 @@ mime ^image, has eog, X, flag f = eog -- "$@"
|
|||
mime ^image, has eom, X, flag f = eom -- "$@"
|
||||
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
|
||||
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
|
||||
mime ^image, has gpicview, X, flag f = gpicview -- "$@"
|
||||
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
|
||||
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
||||
ext xcf, X, flag f = gimp -- "$@"
|
||||
|
@ -218,11 +211,6 @@ ext ace, has unace = for file in "$@"; do unace e "$file"; done
|
|||
ext rar, has unrar = unrar l "$1" | "$PAGER"
|
||||
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
||||
|
||||
#-------------------------------------------
|
||||
# Fonts
|
||||
#-------------------------------------------
|
||||
mime ^font, has fontforge, X, flag f = fontforge "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Flag t fallback terminals
|
||||
#-------------------------------------------
|
||||
|
@ -259,26 +247,10 @@ label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
|||
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
||||
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
||||
|
||||
#-------------------------------------------
|
||||
# Generic file openers
|
||||
#-------------------------------------------
|
||||
label open, has xdg-open = xdg-open -- "$@"
|
||||
label open, has open = open -- "$@"
|
||||
|
||||
# Define the editor for non-text files + pager as last action
|
||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
|
||||
######################################################################
|
||||
# The actions below are left so low down in this file on purpose, so #
|
||||
# they are never triggered accidentally. #
|
||||
######################################################################
|
||||
|
||||
# Execute a file as program/script.
|
||||
# The very last action, so that it's never triggered accidentally, is to execute a program:
|
||||
mime application/x-executable = "$1"
|
||||
|
||||
# Move the file to trash using trash-cli.
|
||||
label trash, has trash-put = trash-put -- "$@"
|
||||
label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash
|
||||
|
|
|
@ -3,206 +3,129 @@
|
|||
set -o noclobber -o noglob -o nounset -o pipefail
|
||||
IFS=$'\n'
|
||||
|
||||
## If the option `use_preview_script` is set to `true`,
|
||||
## then this script will be called and its output will be displayed in ranger.
|
||||
## ANSI color codes are supported.
|
||||
## STDIN is disabled, so interactive scripts won't work properly
|
||||
# If the option `use_preview_script` is set to `true`,
|
||||
# then this script will be called and its output will be displayed in ranger.
|
||||
# ANSI color codes are supported.
|
||||
# STDIN is disabled, so interactive scripts won't work properly
|
||||
|
||||
## This script is considered a configuration file and must be updated manually.
|
||||
## It will be left untouched if you upgrade ranger.
|
||||
# This script is considered a configuration file and must be updated manually.
|
||||
# It will be left untouched if you upgrade ranger.
|
||||
|
||||
## Because of some automated testing we do on the script #'s for comments need
|
||||
## to be doubled up. Code that is commented out, because it's an alternative for
|
||||
## example, gets only one #.
|
||||
# Meanings of exit codes:
|
||||
# code | meaning | action of ranger
|
||||
# -----+------------+-------------------------------------------
|
||||
# 0 | success | Display stdout as preview
|
||||
# 1 | no preview | Display no preview at all
|
||||
# 2 | plain text | Display the plain content of the file
|
||||
# 3 | fix width | Don't reload when width changes
|
||||
# 4 | fix height | Don't reload when height changes
|
||||
# 5 | fix both | Don't ever reload
|
||||
# 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
|
||||
# 7 | image | Display the file directly as an image
|
||||
|
||||
## Meanings of exit codes:
|
||||
## code | meaning | action of ranger
|
||||
## -----+------------+-------------------------------------------
|
||||
## 0 | success | Display stdout as preview
|
||||
## 1 | no preview | Display no preview at all
|
||||
## 2 | plain text | Display the plain content of the file
|
||||
## 3 | fix width | Don't reload when width changes
|
||||
## 4 | fix height | Don't reload when height changes
|
||||
## 5 | fix both | Don't ever reload
|
||||
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
|
||||
## 7 | image | Display the file directly as an image
|
||||
|
||||
## Script arguments
|
||||
# Script arguments
|
||||
FILE_PATH="${1}" # Full path of the highlighted file
|
||||
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
|
||||
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
|
||||
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
|
||||
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
|
||||
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
|
||||
|
||||
FILE_EXTENSION="${FILE_PATH##*.}"
|
||||
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
|
||||
FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
## Settings
|
||||
# Settings
|
||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
||||
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
|
||||
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
|
||||
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
|
||||
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
|
||||
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
|
||||
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
|
||||
HIGHLIGHT_TABWIDTH=8
|
||||
HIGHLIGHT_STYLE='pablo'
|
||||
PYGMENTIZE_STYLE='autumn'
|
||||
|
||||
|
||||
handle_extension() {
|
||||
case "${FILE_EXTENSION_LOWER}" in
|
||||
## Archive
|
||||
# Archive
|
||||
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
||||
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
||||
atool --list -- "${FILE_PATH}" && exit 5
|
||||
bsdtar --list --file "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
rar)
|
||||
## Avoid password prompt by providing empty password
|
||||
# Avoid password prompt by providing empty password
|
||||
unrar lt -p- -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
7z)
|
||||
## Avoid password prompt by providing empty password
|
||||
# Avoid password prompt by providing empty password
|
||||
7z l -p -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## PDF
|
||||
# PDF
|
||||
pdf)
|
||||
## Preview as text conversion
|
||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
|
||||
fmt -w "${PV_WIDTH}" && exit 5
|
||||
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
|
||||
fmt -w "${PV_WIDTH}" && exit 5
|
||||
# Preview as text conversion
|
||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5
|
||||
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## BitTorrent
|
||||
# BitTorrent
|
||||
torrent)
|
||||
transmission-show -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## OpenDocument
|
||||
# OpenDocument
|
||||
odt|ods|odp|sxw)
|
||||
## Preview as text conversion
|
||||
# Preview as text conversion
|
||||
odt2txt "${FILE_PATH}" && exit 5
|
||||
## Preview as markdown conversion
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## XLSX
|
||||
xlsx)
|
||||
## Preview as csv conversion
|
||||
## Uses: https://github.com/dilshod/xlsx2csv
|
||||
xlsx2csv -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## HTML
|
||||
# HTML
|
||||
htm|html|xhtml)
|
||||
## Preview as text conversion
|
||||
# Preview as text conversion
|
||||
w3m -dump "${FILE_PATH}" && exit 5
|
||||
lynx -dump -- "${FILE_PATH}" && exit 5
|
||||
elinks -dump "${FILE_PATH}" && exit 5
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
;;
|
||||
|
||||
## JSON
|
||||
json)
|
||||
jq --color-output . "${FILE_PATH}" && exit 5
|
||||
python -m json.tool -- "${FILE_PATH}" && exit 5
|
||||
;;
|
||||
|
||||
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
|
||||
## by file(1).
|
||||
dff|dsf|wv|wvc)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
;; # Continue with next handler on failure
|
||||
esac
|
||||
}
|
||||
|
||||
handle_image() {
|
||||
## Size of the preview if there are multiple options or it has to be
|
||||
## rendered from vector graphics. If the conversion program allows
|
||||
## specifying only one dimension while keeping the aspect ratio, the width
|
||||
## will be used.
|
||||
local DEFAULT_SIZE="1920x1080"
|
||||
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
## SVG
|
||||
# image/svg+xml|image/svg)
|
||||
# convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# SVG
|
||||
# image/svg+xml)
|
||||
# convert "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## DjVu
|
||||
# image/vnd.djvu)
|
||||
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
|
||||
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
|
||||
# && exit 6 || exit 1;;
|
||||
|
||||
## Image
|
||||
# Image
|
||||
image/*)
|
||||
local orientation
|
||||
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
|
||||
## If orientation data is present and the image actually
|
||||
## needs rotating ("1" means no rotation)...
|
||||
# If orientation data is present and the image actually
|
||||
# needs rotating ("1" means no rotation)...
|
||||
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
|
||||
## ...auto-rotate the image according to the EXIF data.
|
||||
# ...auto-rotate the image according to the EXIF data.
|
||||
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
|
||||
fi
|
||||
|
||||
## `w3mimgdisplay` will be called for all images (unless overriden
|
||||
## as above), but might fail for unsupported types.
|
||||
# `w3mimgdisplay` will be called for all images (unless overriden as above),
|
||||
# but might fail for unsupported types.
|
||||
exit 7;;
|
||||
|
||||
## Video
|
||||
# Video
|
||||
# video/*)
|
||||
# # Thumbnail
|
||||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## PDF
|
||||
# PDF
|
||||
# application/pdf)
|
||||
# pdftoppm -f 1 -l 1 \
|
||||
# -scale-to-x "${DEFAULT_SIZE%x*}" \
|
||||
# -scale-to-x 1920 \
|
||||
# -scale-to-y -1 \
|
||||
# -singlefile \
|
||||
# -jpeg -tiffcompression jpeg \
|
||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
# && exit 6 || exit 1;;
|
||||
|
||||
|
||||
## ePub, MOBI, FB2 (using Calibre)
|
||||
# application/epub+zip|application/x-mobipocket-ebook|\
|
||||
# application/x-fictionbook+xml)
|
||||
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
|
||||
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
|
||||
# "${DEFAULT_SIZE%x*}" && exit 6
|
||||
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
|
||||
# >/dev/null && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## Font
|
||||
application/font*|application/*opentype)
|
||||
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
|
||||
if fontimage -o "${preview_png}" \
|
||||
--pixelsize "120" \
|
||||
--fontname \
|
||||
--pixelsize "80" \
|
||||
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
|
||||
--text " abcdefghijklmnopqrstuvwxyz " \
|
||||
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
|
||||
--text " The quick brown fox jumps over the lazy dog. " \
|
||||
"${FILE_PATH}";
|
||||
then
|
||||
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
|
||||
&& rm "${preview_png}" \
|
||||
&& exit 6
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
## Preview archives using the first image inside.
|
||||
## (Very useful for comic book collections for example.)
|
||||
# Preview archives using the first image inside.
|
||||
# (Very useful for comic book collections for example.)
|
||||
# application/zip|application/x-rar|application/x-7z-compressed|\
|
||||
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
|
||||
# local fn=""; local fe=""
|
||||
|
@ -238,60 +161,14 @@ handle_image() {
|
|||
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
|
||||
# ;;
|
||||
esac
|
||||
|
||||
# openscad_image() {
|
||||
# TMPPNG="$(mktemp -t XXXXXX.png)"
|
||||
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
|
||||
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
|
||||
# -o "${TMPPNG}" "${1}"
|
||||
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
|
||||
# }
|
||||
|
||||
# case "${FILE_EXTENSION_LOWER}" in
|
||||
# ## 3D models
|
||||
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
|
||||
# ## is hardcoded as jpeg. So we make a tempfile.png and just
|
||||
# ## move/rename it to jpg. This works because image libraries are
|
||||
# ## smart enough to handle it.
|
||||
# csg|scad)
|
||||
# openscad_image "${FILE_PATH}" && exit 6
|
||||
# ;;
|
||||
# 3mf|amf|dxf|off|stl)
|
||||
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
|
||||
# ;;
|
||||
# esac
|
||||
}
|
||||
|
||||
handle_mime() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
## RTF and DOC
|
||||
text/rtf|*msword)
|
||||
## Preview as text conversion
|
||||
## note: catdoc does not always work for .doc files
|
||||
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||
catdoc -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## DOCX, ePub, FB2 (using markdown)
|
||||
## You might want to remove "|epub" and/or "|fb2" below if you have
|
||||
## uncommented other methods to preview those formats
|
||||
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
|
||||
## Preview as markdown conversion
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## XLS
|
||||
*ms-excel)
|
||||
## Preview as csv conversion
|
||||
## xls2csv comes with catdoc:
|
||||
## http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||
xls2csv -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Text
|
||||
# Text
|
||||
text/* | */xml)
|
||||
## Syntax highlight
|
||||
# Syntax highlight
|
||||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
|
||||
exit 2
|
||||
fi
|
||||
|
@ -302,30 +179,19 @@ handle_mime() {
|
|||
local pygmentize_format='terminal'
|
||||
local highlight_format='ansi'
|
||||
fi
|
||||
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
|
||||
--out-format="${highlight_format}" \
|
||||
--force -- "${FILE_PATH}" && exit 5
|
||||
env COLORTERM=8bit bat --color=always --style="plain" \
|
||||
-- "${FILE_PATH}" && exit 5
|
||||
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
|
||||
-- "${FILE_PATH}" && exit 5
|
||||
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
|
||||
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
|
||||
# pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5
|
||||
exit 2;;
|
||||
|
||||
## DjVu
|
||||
image/vnd.djvu)
|
||||
## Preview as text conversion (requires djvulibre)
|
||||
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Image
|
||||
# Image
|
||||
image/*)
|
||||
## Preview as text conversion
|
||||
# Preview as text conversion
|
||||
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Video and audio
|
||||
# Video and audio
|
||||
video/* | audio/*)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/apps.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_apps.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/backlight.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_backlight.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/battery.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_battery.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/mpd.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_mpd.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/network.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_network.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/powermenu.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_powermenu.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/quicklinks.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_quicklinks.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/screenshot.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_screenshot.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/time.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_time.sh
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Source: http://askubuntu.com/a/450136
|
||||
|
||||
# I only slightly modify this script to add an option to show icon, useful for my tint2 executor
|
||||
# Also useful for polybar custom script, dzen2 feeder, conkybar, lemonbar feeder, dunst notify, etc.
|
||||
# 'usedcpu -i' = with icon, 'usedcpu' = text only
|
||||
# Cheers!
|
||||
# Addy
|
||||
|
||||
PREV_TOTAL=0
|
||||
PREV_IDLE=0
|
||||
|
||||
cpuFile="/tmp/.cpu"
|
||||
|
||||
if [[ -f "${cpuFile}" ]]; then
|
||||
fileCont=$(cat "${cpuFile}")
|
||||
PREV_TOTAL=$(echo "${fileCont}" | head -n 1)
|
||||
PREV_IDLE=$(echo "${fileCont}" | tail -n 1)
|
||||
fi
|
||||
|
||||
CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
|
||||
unset CPU[0] # Discard the "cpu" prefix.
|
||||
IDLE=${CPU[4]} # Get the idle CPU time.
|
||||
|
||||
# Calculate the total CPU time.
|
||||
TOTAL=0
|
||||
|
||||
for VALUE in "${CPU[@]:0:4}"; do
|
||||
let "TOTAL=$TOTAL+$VALUE"
|
||||
done
|
||||
|
||||
if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then
|
||||
# Calculate the CPU usage since we last checked.
|
||||
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
|
||||
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
|
||||
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
|
||||
if [[ $1 = "-i" ]]; then
|
||||
echo " ${DIFF_USAGE}%"
|
||||
else
|
||||
echo "${DIFF_USAGE}%"
|
||||
fi
|
||||
else
|
||||
if [[ $1 = "-i" ]]; then
|
||||
echo " ?"
|
||||
else
|
||||
echo "?"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remember the total and idle CPU times for the next check.
|
||||
echo "${TOTAL}" > "${cpuFile}"
|
||||
echo "${IDLE}" >> "${cpuFile}"
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
# this script is taken from screenfetch
|
||||
# I only slightly modify this script to add an option to show icon, useful for my tint2 executor
|
||||
# 'usedram -i' = with icon, 'usedram' = text only
|
||||
# 'usedram -fi' = full summary with icon, 'usedram' = full summary text only
|
||||
# Cheers!
|
||||
# Addy
|
||||
|
||||
mem_info=$(</proc/meminfo)
|
||||
mem_info=$(echo $(echo $(mem_info=${mem_info// /}; echo ${mem_info//kB/})))
|
||||
for m in $mem_info; do
|
||||
case ${m//:*} in
|
||||
"MemTotal") usedmem=$((usedmem+=${m//*:})); totalmem=${m//*:} ;;
|
||||
"ShMem") usedmem=$((usedmem+=${m//*:})) ;;
|
||||
"MemFree"|"Buffers"|"Cached"|"SReclaimable") usedmem=$((usedmem-=${m//*:})) ;;
|
||||
esac
|
||||
done
|
||||
usedmem=$((usedmem / 1024))
|
||||
totalmem=$((totalmem / 1024))
|
||||
mem="${usedmem}MB / ${totalmem}MB"
|
||||
|
||||
## Complete summary
|
||||
if [[ $1 = "-fi" ]]; then
|
||||
echo " $mem"
|
||||
elif [[ $1 = "-f" ]]; then
|
||||
echo "$mem"
|
||||
|
||||
## Only used RAM
|
||||
elif [[ $1 = "-i" ]]; then
|
||||
echo " $usedmem MB"
|
||||
else
|
||||
echo "$usedmem MB"
|
||||
fi
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/volume.sh
|
|
@ -0,0 +1 @@
|
|||
/home/aditya/.config/rofi/scripts/menu_volume.sh
|
|
@ -0,0 +1,150 @@
|
|||
/**
|
||||
* User: simonvic
|
||||
* Copyright: simonvic
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
display-drun: "§";
|
||||
display-run: "$";
|
||||
display-window: "缾";
|
||||
display-ssh: "~#";
|
||||
show-icons: true;
|
||||
sidebar-mode: false;
|
||||
font: "NotoSans Regular 16";
|
||||
}
|
||||
|
||||
* {
|
||||
text-color: @foreground;
|
||||
active-background: rgb(100,50,50);
|
||||
active-foreground: @foreground;
|
||||
normal-background: @background;
|
||||
normal-foreground: @foreground;
|
||||
urgent-background: #9E2A5E;
|
||||
urgent-foreground: @foreground;
|
||||
alternate-active-background: @background;
|
||||
alternate-active-foreground: @foreground;
|
||||
alternate-normal-background: @background;
|
||||
alternate-normal-foreground: @foreground;
|
||||
alternate-urgent-background: @background;
|
||||
alternate-urgent-foreground: @foreground;
|
||||
selected-active-background: rgb(200,10,10);
|
||||
selected-active-foreground: #FFFFFF;
|
||||
selected-normal-background: rgb(200,50,50);
|
||||
selected-normal-foreground: #FFFFFF;
|
||||
selected-urgent-background: #9D596B;
|
||||
selected-urgent-foreground: @foreground;
|
||||
background-color: transparent;
|
||||
background: rgba(33,33,33 ,0.6);
|
||||
foreground: rgb(200,200,200);
|
||||
spacing: 0;
|
||||
|
||||
}
|
||||
|
||||
window {
|
||||
location: center;
|
||||
anchor: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
orientation: vertical;
|
||||
children: [mainbox];
|
||||
hide-scrollbar: true;
|
||||
padding: 20% 35% 20% 35%;
|
||||
background-color: #00000000;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
children: [inputbar, listview];
|
||||
}
|
||||
|
||||
|
||||
|
||||
listview {
|
||||
spacing: 0.6em;
|
||||
dynamic: false;
|
||||
cycle: false;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
border-radius: 50%;
|
||||
padding: 10px;
|
||||
border-spacing: 5px 0 0 0;
|
||||
border: 0px;
|
||||
spacing: 0px;
|
||||
margin: 10px;
|
||||
border-color: rgb(200,50,50);
|
||||
background-color: @background;
|
||||
text-color: #FFFFFF;
|
||||
|
||||
}
|
||||
|
||||
entry{
|
||||
padding: 5px;
|
||||
border: 0px 0px 2px 0px;
|
||||
border-color: rgb(250,50,50);
|
||||
background-color: rgba(0,0,0,0);
|
||||
text-color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
prompt{
|
||||
padding: 5px;
|
||||
background-color: #00000000;
|
||||
text-color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
element {
|
||||
padding: 10px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
border-color: @active-background;
|
||||
}
|
||||
|
||||
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: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
element alternate.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
|
||||
element alternate.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
|
||||
rofi.theme: /home/kapper/.config/rofi/themes/onedark.rasi
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## browser : @adi1090x
|
||||
## music : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/apps.rasi"
|
||||
|
||||
# Links
|
||||
terminal=""
|
||||
files="ﱮ"
|
||||
editor=""
|
||||
browser=""
|
||||
music=""
|
||||
settings="漣"
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$terminal\n$files\n$editor\n$browser\n$music\n$settings"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$terminal)
|
||||
termite &
|
||||
;;
|
||||
$files)
|
||||
thunar &
|
||||
;;
|
||||
$editor)
|
||||
geany &
|
||||
;;
|
||||
$browser)
|
||||
firefox &
|
||||
;;
|
||||
$music)
|
||||
lxmusic &
|
||||
;;
|
||||
$settings)
|
||||
xfce4-settings-manager &
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/backlight.rasi"
|
||||
|
||||
## Get Brightness
|
||||
VAR="$(xbacklight -get)"
|
||||
BLIGHT="$(printf "%.0f\n" "$VAR")"
|
||||
|
||||
if [[ $BLIGHT -ge 1 ]] && [[ $BLIGHT -le 29 ]]; then
|
||||
MSG="Low"
|
||||
elif [[ $BLIGHT -ge 30 ]] && [[ $BLIGHT -le 49 ]]; then
|
||||
MSG="Optimal"
|
||||
elif [[ $BLIGHT -ge 50 ]] && [[ $BLIGHT -le 69 ]]; then
|
||||
MSG="High"
|
||||
elif [[ $BLIGHT -ge 70 ]] && [[ $BLIGHT -le 99 ]]; then
|
||||
MSG="Too Much"
|
||||
fi
|
||||
|
||||
## Icons
|
||||
ICON_UP=""
|
||||
ICON_DOWN=""
|
||||
ICON_OPT=""
|
||||
|
||||
options="$ICON_UP\n$ICON_OPT\n$ICON_DOWN"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$BLIGHT%" -dmenu -selected-row 1)"
|
||||
case $chosen in
|
||||
$ICON_UP)
|
||||
xbacklight -inc 10 && notify-send -u low -t 1500 "Brightness Up $ICON_UP"
|
||||
;;
|
||||
$ICON_DOWN)
|
||||
xbacklight -dec 10 && notify-send -u low -t 1500 "Brightness Down $ICON_DOWN"
|
||||
;;
|
||||
$ICON_OPT)
|
||||
xbacklight -set 35 && notify-send -u low -t 1500 "Optimal Brightness $ICON_OPT"
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/battery.rasi"
|
||||
|
||||
## Get data
|
||||
|
||||
BATTERY="$(acpi | awk -F ' ' '{print $4}' | tr -d \%,)"
|
||||
CHARGE="$(acpi | awk -F ' ' '{print $3}' | tr -d \,)"
|
||||
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
if [[ $CHARGE = *"Charging"* ]]; then
|
||||
active="-a 1"
|
||||
ICON_CHRG=""
|
||||
MSG=$CHARGE
|
||||
else
|
||||
urgent="-u 1"
|
||||
ICON_CHRG="ﮤ"
|
||||
MSG="Discharging"
|
||||
fi
|
||||
|
||||
# Discharging
|
||||
#if [[ $CHARGE -eq 1 ]] && [[ $BATTERY -eq 100 ]]; then
|
||||
# ICON_DISCHRG=""
|
||||
if [[ $BATTERY -ge 5 ]] && [[ $BATTERY -le 19 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 20 ]] && [[ $BATTERY -le 39 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 40 ]] && [[ $BATTERY -le 59 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 60 ]] && [[ $BATTERY -le 79 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 80 ]] && [[ $BATTERY -le 100 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
fi
|
||||
|
||||
## Icons
|
||||
ICON_PMGR=""
|
||||
|
||||
options="$ICON_DISCHRG\n$ICON_CHRG\n$ICON_PMGR"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$BATTERY%" -dmenu $active $urgent -selected-row 0)"
|
||||
case $chosen in
|
||||
$ICON_CHRG)
|
||||
;;
|
||||
$ICON_DISCHRG)
|
||||
;;
|
||||
$ICON_PMGR)
|
||||
xfce4-power-manager-settings
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## browser : @adi1090x
|
||||
## music : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/apps.rasi"
|
||||
|
||||
# Links
|
||||
terminal=""
|
||||
files="ﱮ"
|
||||
editor=""
|
||||
browser=""
|
||||
music=""
|
||||
settings="漣"
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$terminal\n$files\n$editor\n$browser\n$music\n$settings"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$terminal)
|
||||
termite &
|
||||
;;
|
||||
$files)
|
||||
thunar &
|
||||
;;
|
||||
$editor)
|
||||
geany &
|
||||
;;
|
||||
$browser)
|
||||
firefox &
|
||||
;;
|
||||
$music)
|
||||
lxmusic &
|
||||
;;
|
||||
$settings)
|
||||
xfce4-settings-manager &
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/backlight.rasi"
|
||||
|
||||
## Get Brightness
|
||||
VAR="$(xbacklight -get)"
|
||||
BLIGHT="$(printf "%.0f\n" "$VAR")"
|
||||
|
||||
if [[ $BLIGHT -ge 1 ]] && [[ $BLIGHT -le 29 ]]; then
|
||||
MSG="Low"
|
||||
elif [[ $BLIGHT -ge 30 ]] && [[ $BLIGHT -le 49 ]]; then
|
||||
MSG="Optimal"
|
||||
elif [[ $BLIGHT -ge 50 ]] && [[ $BLIGHT -le 69 ]]; then
|
||||
MSG="High"
|
||||
elif [[ $BLIGHT -ge 70 ]] && [[ $BLIGHT -le 99 ]]; then
|
||||
MSG="Too Much"
|
||||
fi
|
||||
|
||||
## Icons
|
||||
ICON_UP=""
|
||||
ICON_DOWN=""
|
||||
ICON_OPT=""
|
||||
|
||||
options="$ICON_UP\n$ICON_OPT\n$ICON_DOWN"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$BLIGHT% : $MSG" -dmenu -selected-row 1)"
|
||||
case $chosen in
|
||||
$ICON_UP)
|
||||
xbacklight -inc 10 && notify-send -u low -t 1500 "Brightness Up $ICON_UP"
|
||||
;;
|
||||
$ICON_DOWN)
|
||||
xbacklight -dec 10 && notify-send -u low -t 1500 "Brightness Down $ICON_DOWN"
|
||||
;;
|
||||
$ICON_OPT)
|
||||
xbacklight -set 35 && notify-send -u low -t 1500 "Optimal Brightness $ICON_OPT"
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/battery.rasi"
|
||||
|
||||
## Get data
|
||||
BATTERY="$(acpi | awk -F ' ' '{print $4}' | tr -d \%,)"
|
||||
CHARGE="$(acpi | awk -F ' ' '{print $3}' | tr -d \,)"
|
||||
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
if [[ $CHARGE = *"Charging"* ]]; then
|
||||
active="-a 1"
|
||||
ICON_CHRG=""
|
||||
MSG=$CHARGE
|
||||
else
|
||||
urgent="-u 1"
|
||||
ICON_CHRG="ﮤ"
|
||||
MSG="Discharging"
|
||||
fi
|
||||
|
||||
# Discharging
|
||||
#if [[ $CHARGE -eq 1 ]] && [[ $BATTERY -eq 100 ]]; then
|
||||
# ICON_DISCHRG=""
|
||||
if [[ $BATTERY -ge 5 ]] && [[ $BATTERY -le 19 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 20 ]] && [[ $BATTERY -le 39 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 40 ]] && [[ $BATTERY -le 59 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 60 ]] && [[ $BATTERY -le 79 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
elif [[ $BATTERY -ge 80 ]] && [[ $BATTERY -le 100 ]]; then
|
||||
ICON_DISCHRG=""
|
||||
fi
|
||||
|
||||
## Icons
|
||||
ICON_PMGR=""
|
||||
|
||||
options="$ICON_DISCHRG\n$ICON_CHRG\n$ICON_PMGR"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$MSG : $BATTERY%" -dmenu $active $urgent -selected-row 0)"
|
||||
case $chosen in
|
||||
$ICON_CHRG)
|
||||
;;
|
||||
$ICON_DISCHRG)
|
||||
;;
|
||||
$ICON_PMGR)
|
||||
xfce4-power-manager-settings
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
#!/bin/bash
|
||||
|
||||
rofi_command="rofi -theme themes/menu/mpd.rasi"
|
||||
|
||||
# Gets the current status of mpd (for us to parse it later on)
|
||||
status="$(mpc status)"
|
||||
# Defines the Play / Pause option content
|
||||
if [[ $status == *"[playing]"* ]]; then
|
||||
play_pause=""
|
||||
else
|
||||
play_pause=""
|
||||
fi
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
# Display if repeat mode is on / off
|
||||
tog_repeat="凌"
|
||||
if [[ $status == *"repeat: on"* ]]; then
|
||||
active="-a 4"
|
||||
elif [[ $status == *"repeat: off"* ]]; then
|
||||
urgent="-u 4"
|
||||
else
|
||||
tog_repeat=" Parsing error"
|
||||
fi
|
||||
|
||||
# Display if random mode is on / off
|
||||
tog_random=""
|
||||
if [[ $status == *"random: on"* ]]; then
|
||||
[ -n "$active" ] && active+=",5" || active="-a 5"
|
||||
elif [[ $status == *"random: off"* ]]; then
|
||||
[ -n "$urgent" ] && urgent+=",5" || urgent="-u 5"
|
||||
else
|
||||
tog_random=" Parsing error"
|
||||
fi
|
||||
stop=""
|
||||
next=""
|
||||
previous=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random"
|
||||
|
||||
# Get the current playing song
|
||||
current=$(mpc current)
|
||||
# If mpd isn't running it will return an empty string, we don't want to display that
|
||||
if [[ -z "$current" ]]; then
|
||||
current="-"
|
||||
fi
|
||||
|
||||
# Spawn the mpd menu with the "Play / Pause" entry selected by default
|
||||
chosen="$(echo -e "$options" | $rofi_command -p " $current" -dmenu $active $urgent -selected-row 1)"
|
||||
case $chosen in
|
||||
$previous)
|
||||
mpc -q prev && notify-send -u low -t 1800 " $(mpc current)"
|
||||
;;
|
||||
$play_pause)
|
||||
mpc -q toggle && notify-send -u low -t 1800 " $(mpc current)"
|
||||
;;
|
||||
$stop)
|
||||
mpc -q stop
|
||||
;;
|
||||
$next)
|
||||
mpc -q next && notify-send -u low -t 1800 " $(mpc current)"
|
||||
;;
|
||||
$tog_repeat)
|
||||
mpc -q repeat
|
||||
;;
|
||||
$tog_random)
|
||||
mpc -q random
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/network.rasi"
|
||||
|
||||
## Get info
|
||||
IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')"
|
||||
#SSID="$(iwgetid -r)"
|
||||
#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')"
|
||||
#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
|
||||
STATUS="$(nmcli radio wifi)"
|
||||
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
|
||||
if [[ $STATUS == *"enable"* ]]; then
|
||||
if [[ $IFACE == e* ]]; then
|
||||
connected=""
|
||||
else
|
||||
connected="直"
|
||||
fi
|
||||
active="-a 0"
|
||||
SSID=" $(iwgetid -r)"
|
||||
PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
|
||||
fi
|
||||
else
|
||||
urgent="-u 0"
|
||||
SSID="Disconnected"
|
||||
PIP="Not Available"
|
||||
connected="睊"
|
||||
fi
|
||||
|
||||
## Icons
|
||||
bmon="龍"
|
||||
launch_cli=""
|
||||
launch="歷"
|
||||
|
||||
options="$connected\n$bmon\n$launch_cli\n$launch"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$SSID : $PIP" -dmenu $active $urgent -selected-row 1)"
|
||||
case $chosen in
|
||||
$connected)
|
||||
if [[ $STATUS == *"enable"* ]]; then
|
||||
nmcli radio wifi off
|
||||
else
|
||||
nmcli radio wifi on
|
||||
fi
|
||||
;;
|
||||
$bmon)
|
||||
termite -e bmon
|
||||
;;
|
||||
$launch_cli)
|
||||
termite -e nmtui
|
||||
;;
|
||||
$launch)
|
||||
nm-connection-editor
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/powermenu.rasi"
|
||||
uptime=$(uptime -p | sed -e 's/up //g')
|
||||
#mem=$( free -h | grep -i mem | awk -F ' ' '{print $3}')
|
||||
cpu=$(sh ~/.config/rofi/bin/usedcpu)
|
||||
memory=$(sh ~/.config/rofi/bin/usedram)
|
||||
|
||||
# Options
|
||||
shutdown="襤"
|
||||
reboot="ﰇ"
|
||||
lock=""
|
||||
suspend="鈴"
|
||||
logout=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "祥 $uptime $cpu $memory " -dmenu -selected-row 2)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
$reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
$lock)
|
||||
i3lock
|
||||
;;
|
||||
$suspend)
|
||||
mpc -q pause
|
||||
amixer set Master mute
|
||||
systemctl suspend
|
||||
;;
|
||||
$logout)
|
||||
openbox --exit
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/quicklinks.rasi"
|
||||
|
||||
# Links
|
||||
google=""
|
||||
facebook=""
|
||||
twitter=""
|
||||
github=""
|
||||
reddit=""
|
||||
youtube=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$google\n$facebook\n$twitter\n$github\n$reddit\n$youtube"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Open In : Firefox" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$google)
|
||||
firefox --new-tab https://www.google.com
|
||||
;;
|
||||
$facebook)
|
||||
firefox --new-tab https://www.facebook.com
|
||||
;;
|
||||
$twitter)
|
||||
firefox --new-tab https://www.twitter.com
|
||||
;;
|
||||
$github)
|
||||
firefox --new-tab https://www.github.com
|
||||
;;
|
||||
$reddit)
|
||||
firefox --new-tab https://www.reddit.com
|
||||
;;
|
||||
$youtube)
|
||||
firefox --new-tab https://www.youtube.com
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/screenshot.rasi"
|
||||
|
||||
# Options
|
||||
screen=""
|
||||
area=""
|
||||
window=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$screen\n$area\n$window"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p 'scrot' -dmenu -selected-row 1)"
|
||||
case $chosen in
|
||||
$screen)
|
||||
sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
|
||||
;;
|
||||
$area)
|
||||
scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
|
||||
;;
|
||||
$window)
|
||||
sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/time.rasi"
|
||||
|
||||
## Get time and date
|
||||
TIME="$(date +"%I:%M %p")"
|
||||
DN=$(date +"%A")
|
||||
MN=$(date +"%B")
|
||||
DAY="$(date +"%d")"
|
||||
MONTH="$(date +"%m")"
|
||||
YEAR="$(date +"%Y")"
|
||||
|
||||
options="$DAY\n$MONTH\n$YEAR"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p " at $TIME on $DN in $MN" -dmenu -selected-row 1)"
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/menu/volume.rasi"
|
||||
|
||||
## Get Volume
|
||||
#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')
|
||||
MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%')
|
||||
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
if [[ $MUTE == *"off"* ]]; then
|
||||
active="-a 1"
|
||||
else
|
||||
urgent="-u 1"
|
||||
fi
|
||||
|
||||
if [[ $MUTE == *"on"* ]]; then
|
||||
VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%"
|
||||
else
|
||||
VOLUME="Muted"
|
||||
fi
|
||||
|
||||
## Icons
|
||||
ICON_UP="ﱛ"
|
||||
ICON_DOWN="ﱜ"
|
||||
ICON_MUTED="ﱝ"
|
||||
|
||||
options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)"
|
||||
case $chosen in
|
||||
$ICON_UP)
|
||||
amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP"
|
||||
;;
|
||||
$ICON_DOWN)
|
||||
amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN"
|
||||
;;
|
||||
$ICON_MUTED)
|
||||
amixer -q set Master toggle
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
#!/bin/bash
|
||||
|
||||
rofi_command="rofi -theme themes/mpd.rasi"
|
||||
|
||||
# Gets the current status of mpd (for us to parse it later on)
|
||||
status="$(mpc status)"
|
||||
# Defines the Play / Pause option content
|
||||
if [[ $status == *"[playing]"* ]]; then
|
||||
play_pause=""
|
||||
else
|
||||
play_pause=""
|
||||
fi
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
# Display if repeat mode is on / off
|
||||
tog_repeat="凌"
|
||||
if [[ $status == *"repeat: on"* ]]; then
|
||||
active="-a 4"
|
||||
elif [[ $status == *"repeat: off"* ]]; then
|
||||
urgent="-u 4"
|
||||
else
|
||||
tog_repeat=" Parsing error"
|
||||
fi
|
||||
|
||||
# Display if random mode is on / off
|
||||
tog_random=""
|
||||
if [[ $status == *"random: on"* ]]; then
|
||||
[ -n "$active" ] && active+=",5" || active="-a 5"
|
||||
elif [[ $status == *"random: off"* ]]; then
|
||||
[ -n "$urgent" ] && urgent+=",5" || urgent="-u 5"
|
||||
else
|
||||
tog_random=" Parsing error"
|
||||
fi
|
||||
stop=""
|
||||
next=""
|
||||
previous=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random"
|
||||
|
||||
# Get the current playing song
|
||||
current=$(mpc -f %title% current)
|
||||
# If mpd isn't running it will return an empty string, we don't want to display that
|
||||
if [[ -z "$current" ]]; then
|
||||
current="-"
|
||||
fi
|
||||
|
||||
# Spawn the mpd menu with the "Play / Pause" entry selected by default
|
||||
chosen="$(echo -e "$options" | $rofi_command -p " $current" -dmenu $active $urgent -selected-row 1)"
|
||||
case $chosen in
|
||||
$previous)
|
||||
mpc -q prev && notify-send -u low -t 1800 " $(mpc current)"
|
||||
;;
|
||||
$play_pause)
|
||||
mpc -q toggle && notify-send -u low -t 1800 " $(mpc current)"
|
||||
;;
|
||||
$stop)
|
||||
mpc -q stop
|
||||
;;
|
||||
$next)
|
||||
mpc -q next && notify-send -u low -t 1800 " $(mpc current)"
|
||||
;;
|
||||
$tog_repeat)
|
||||
mpc -q repeat
|
||||
;;
|
||||
$tog_random)
|
||||
mpc -q random
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/network.rasi"
|
||||
|
||||
## Get info
|
||||
IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')"
|
||||
#SSID="$(iwgetid -r)"
|
||||
#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')"
|
||||
#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
|
||||
STATUS="$(nmcli radio wifi)"
|
||||
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
|
||||
if [[ $STATUS == *"enable"* ]]; then
|
||||
if [[ $IFACE == e* ]]; then
|
||||
connected=""
|
||||
else
|
||||
connected="直"
|
||||
fi
|
||||
active="-a 0"
|
||||
MSG=" Online"
|
||||
PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
|
||||
fi
|
||||
else
|
||||
urgent="-u 0"
|
||||
MSG="Offline"
|
||||
PIP="Not Available"
|
||||
connected="睊"
|
||||
fi
|
||||
|
||||
## Icons
|
||||
bmon="龍"
|
||||
launch_cli=""
|
||||
launch="歷"
|
||||
|
||||
options="$connected\n$bmon\n$launch_cli\n$launch"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$MSG" -dmenu $active $urgent -selected-row 1)"
|
||||
case $chosen in
|
||||
$connected)
|
||||
if [[ $STATUS == *"enable"* ]]; then
|
||||
nmcli radio wifi off
|
||||
else
|
||||
nmcli radio wifi on
|
||||
fi
|
||||
;;
|
||||
$bmon)
|
||||
termite -e bmon
|
||||
;;
|
||||
$launch_cli)
|
||||
termite -e nmtui
|
||||
;;
|
||||
$launch)
|
||||
nm-connection-editor
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/powermenu.rasi"
|
||||
uptime=$(uptime -p | sed -e 's/up //g')
|
||||
|
||||
# Options
|
||||
shutdown="襤"
|
||||
reboot="ﰇ"
|
||||
lock=""
|
||||
suspend="鈴"
|
||||
logout=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "UP - $uptime" -dmenu -selected-row 2)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
$reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
$lock)
|
||||
i3lock
|
||||
;;
|
||||
$suspend)
|
||||
mpc -q pause
|
||||
amixer set Master mute
|
||||
systemctl suspend
|
||||
;;
|
||||
$logout)
|
||||
openbox --exit
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/quicklinks.rasi"
|
||||
|
||||
# Links
|
||||
google=""
|
||||
facebook=""
|
||||
twitter=""
|
||||
github=""
|
||||
reddit=""
|
||||
youtube=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$google\n$facebook\n$twitter\n$github\n$reddit\n$youtube"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Open In : Firefox" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$google)
|
||||
firefox --new-tab https://www.google.com
|
||||
;;
|
||||
$facebook)
|
||||
firefox --new-tab https://www.facebook.com
|
||||
;;
|
||||
$twitter)
|
||||
firefox --new-tab https://www.twitter.com
|
||||
;;
|
||||
$github)
|
||||
firefox --new-tab https://www.github.com
|
||||
;;
|
||||
$reddit)
|
||||
firefox --new-tab https://www.reddit.com
|
||||
;;
|
||||
$youtube)
|
||||
firefox --new-tab https://www.youtube.com
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/screenshot.rasi"
|
||||
|
||||
# Options
|
||||
screen=""
|
||||
area=""
|
||||
window=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$screen\n$area\n$window"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)"
|
||||
case $chosen in
|
||||
$screen)
|
||||
sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
|
||||
;;
|
||||
$area)
|
||||
scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
|
||||
;;
|
||||
$window)
|
||||
sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/time.rasi"
|
||||
|
||||
## Get time and date
|
||||
TIME="$(date +"%A, %I:%M %p")"
|
||||
DAY="$(date +"%d")"
|
||||
MONTH="$(date +"%m")"
|
||||
YEAR="$(date +"%Y")"
|
||||
|
||||
options="$DAY\n$MONTH\n$YEAR"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p " $TIME" -dmenu -selected-row 1)"
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/volume.rasi"
|
||||
|
||||
## Get Volume
|
||||
#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')
|
||||
MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%')
|
||||
|
||||
active=""
|
||||
urgent=""
|
||||
|
||||
if [[ $MUTE == *"off"* ]]; then
|
||||
active="-a 1"
|
||||
else
|
||||
urgent="-u 1"
|
||||
fi
|
||||
|
||||
if [[ $MUTE == *"off"* ]]; then
|
||||
active="-a 1"
|
||||
else
|
||||
urgent="-u 1"
|
||||
fi
|
||||
|
||||
if [[ $MUTE == *"on"* ]]; then
|
||||
VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%"
|
||||
else
|
||||
VOLUME="Mu..."
|
||||
fi
|
||||
|
||||
## Icons
|
||||
ICON_UP="ﱛ"
|
||||
ICON_DOWN="ﱜ"
|
||||
ICON_MUTED="ﱝ"
|
||||
|
||||
options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN"
|
||||
|
||||
## Main
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)"
|
||||
case $chosen in
|
||||
$ICON_UP)
|
||||
amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP"
|
||||
;;
|
||||
$ICON_DOWN)
|
||||
amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN"
|
||||
;;
|
||||
$ICON_MUTED)
|
||||
amixer -q set Master toggle
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
#### fancy
|
||||
![fancy](https://53280.de/rofi/fancy.png)
|
||||
|
||||
#### flat-orange
|
||||
![flat_orange](https://53280.de/rofi/flat_orange.png)
|
||||
|
||||
#### oxide
|
||||
![oxide](https://53280.de/rofi/oxide.png)
|
||||
|
||||
#### solarized-darker
|
||||
![solarized_darker](https://53280.de/rofi/solarized_darker.png)
|
||||
|
||||
#### sidetab
|
||||
![sidetab](https://53280.de/rofi/sidetab.png)
|
||||
|
||||
#### material
|
||||
![material](https://53280.de/rofi/material.png)
|
||||
|
||||
#### arc-red-dark
|
||||
![arc-red-dark](https://53280.de/rofi/arc-red.png)
|
||||
|
||||
#### onedark
|
||||
![onedark](https://53280.de/rofi/onedark.png)
|
||||
|
||||
#### ribbon
|
||||
![ribbon](https://53280.de/rofi/ribbon.png)
|
||||
|
||||
#### rezlooks
|
||||
![rezlooks](https://53280.de/rofi/rezlooks.png)
|
||||
|
||||
#### slate
|
||||
![slate](https://53280.de/rofi/slate.png)
|
||||
|
||||
#### flamingo
|
||||
![flamingo](https://53280.de/rofi/flamingo.png)
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
*
|
||||
* Author : Aditya Shakya (adi1090x)
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Reddit : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
/* General */
|
||||
text-font: "Comfortaa 12";
|
||||
icon-font: "Hurmit Nerd Font Mono 32";
|
||||
icon-font-small: "Hurmit Nerd Font Mono 24";
|
||||
|
||||
option-6-listview-spacing: 10px;
|
||||
|
||||
menu-window-padding: 5px 15px;
|
||||
menu-inputbar-margin: 10px 0px;
|
||||
menu-prompt-padding: 10px 20px 10px 20px;
|
||||
menu-prompt-margin: 0px 0px 0px -2px;
|
||||
menu-element-border: 10px;
|
||||
menu-element-padding: 3px 8px -1px -40px;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
#window {
|
||||
width: 34.5%;
|
||||
height: 20%;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
font: @icon-font;
|
||||
}
|
||||
|
||||
#horibox {
|
||||
children: [ listview ];
|
||||
}
|
||||
#listview {
|
||||
layout: horizontal;
|
||||
}
|
||||
#element {
|
||||
padding: @option-element-padding;
|
||||
background-color: @background-light;
|
||||
}
|
||||
#element.selected {
|
||||
background-color: @accent;
|
||||
text-color: @background;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
font: @text-font;
|
||||
}
|
||||
#window {
|
||||
padding: @menu-window-padding;
|
||||
children: [ inputbar, horibox ];
|
||||
}
|
||||
#inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
margin: @menu-inputbar-margin;
|
||||
}
|
||||
prompt,
|
||||
textbox-prompt-colon {
|
||||
padding: @menu-prompt-padding;
|
||||
border: 2px;
|
||||
border-color: @accent;
|
||||
}
|
||||
#prompt {
|
||||
margin: @menu-prompt-margin;
|
||||
background-color: @background-light;
|
||||
text-color: @accent;
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: "Apps";
|
||||
background-color: @accent;
|
||||
text-color: @background;
|
||||
}
|
||||
#horibox {
|
||||
padding: 0px;
|
||||
}
|
||||
#listview {
|
||||
spacing: @option-6-listview-spacing;
|
||||
lines: 6;
|
||||
}
|
||||
#element {
|
||||
font: @icon-font;
|
||||
border: @menu-element-border;
|
||||
padding: @menu-element-padding;
|
||||
border-color: @background-light;
|
||||
}
|
||||
#element.selected {
|
||||
border-color: @accent;
|
||||
}
|
||||
element.active,
|
||||
element.selected.urgent {
|
||||
background-color: @on;
|
||||
text-color: @background;
|
||||
border-color: @on;
|
||||
}
|
||||
element.selected.urgent {
|
||||
border-color: @accent;
|
||||
}
|
||||
element.urgent,
|
||||
element.selected.active {
|
||||
background-color: @off;
|
||||
text-color: @background;
|
||||
border-color: @off;
|
||||
}
|
||||
element.selected.active {
|
||||
border-color: @accent;
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* ROFI Color theme
|
||||
* A red variation of Arc-Dark theme by leofa, based on arc-theme-Red (https://github.com/mclmza/arc-theme-Red)
|
||||
* User: wikwg9
|
||||
*/
|
||||
* {
|
||||
selected-normal-foreground: rgba ( 249, 249, 249, 100 % );
|
||||
foreground: rgba ( 196, 203, 212, 100 % );
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: rgba ( 64, 69, 82, 59 % );
|
||||
red: rgba ( 220, 50, 47, 100 % );
|
||||
selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
|
||||
blue: rgba ( 38, 139, 210, 100 % );
|
||||
urgent-foreground: rgba ( 204, 102, 102, 100 % );
|
||||
alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
|
||||
active-foreground: rgba ( 220, 140, 160, 100 % );
|
||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||
selected-active-foreground: rgba ( 249, 249, 249, 100 % );
|
||||
alternate-active-background: rgba ( 75, 81, 96, 89 % );
|
||||
background: rgba ( 45, 48, 59, 95 % );
|
||||
alternate-normal-foreground: @foreground;
|
||||
normal-background: @background;
|
||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||
selected-normal-background: rgba ( 204, 87, 93, 100 % );
|
||||
border-color: rgba ( 137, 131, 124, 100 % );
|
||||
spacing: 2;
|
||||
separatorcolor: rgba ( 29, 31, 33, 100 % );
|
||||
urgent-background: rgba ( 29, 31, 33, 17 % );
|
||||
selected-urgent-background: rgba ( 165, 66, 66, 100 % );
|
||||
alternate-urgent-foreground: @urgent-foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
alternate-active-foreground: @active-foreground;
|
||||
active-background: rgba ( 29, 31, 33, 17 % );
|
||||
selected-active-background: rgba ( 204, 87, 93, 100 % );
|
||||
}
|
||||
#window {
|
||||
background-color: @background;
|
||||
padding: 5;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#message {
|
||||
border: 2px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: false;
|
||||
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;
|
||||
}
|
||||
#mode-switcher {
|
||||
border: 2px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#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;
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
*
|
||||
* Author : Aditya Shakya (adi1090x)
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Reddit : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
/* General */
|
||||
text-font: "Comfortaa 12";
|
||||
icon-font: "Hurmit Nerd Font Mono 32";
|
||||
icon-font-small: "Hurmit Nerd Font Mono 24";
|
||||
|
||||
option-6-listview-spacing: 10px;
|
||||
|
||||
menu-window-padding: 5px 15px;
|
||||
menu-inputbar-margin: 10px 0px;
|
||||
menu-prompt-padding: 10px 20px 10px 20px;
|
||||
menu-prompt-margin: 0px 0px 0px -2px;
|
||||
menu-element-border: 10px;
|
||||
menu-element-padding: 3px 8px -1px -40px;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
#window {
|
||||
width: 18%;
|
||||
height: 20%;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
font: @icon-font;
|
||||
}
|
||||
|
||||
#horibox {
|
||||
children: [ listview ];
|
||||
}
|
||||
#listview {
|
||||
layout: horizontal;
|
||||
}
|
||||
#element {
|
||||
padding: @option-element-padding;
|
||||
background-color: @background-light;
|
||||
}
|
||||
#element.selected {
|
||||
background-color: @accent;
|
||||
text-color: @background;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
font: @text-font;
|
||||
}
|
||||
#window {
|
||||
padding: @menu-window-padding;
|
||||
children: [ inputbar, horibox ];
|
||||
}
|
||||
#inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
margin: @menu-inputbar-margin;
|
||||
}
|
||||
prompt,
|
||||
textbox-prompt-colon {
|
||||
padding: @menu-prompt-padding;
|
||||
border: 2px;
|
||||
border-color: @accent;
|
||||
}
|
||||
#prompt {
|
||||
margin: @menu-prompt-margin;
|
||||
background-color: @background-light;
|
||||
text-color: @accent;
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: "Brightness";
|
||||
background-color: @accent;
|
||||
text-color: @background;
|
||||
}
|
||||
#horibox {
|
||||
padding: 0px;
|
||||
}
|
||||
#listview {
|
||||
spacing: @option-6-listview-spacing;
|
||||
lines: 3;
|
||||
}
|
||||
#element {
|
||||
font: @icon-font;
|
||||
border: @menu-element-border;
|
||||
padding: @menu-element-padding;
|
||||
border-color: @background-light;
|
||||
}
|
||||
#element.selected {
|
||||
border-color: @accent;
|
||||
}
|
||||
element.active,
|
||||
element.selected.urgent {
|
||||
background-color: @on;
|
||||
text-color: @background;
|
||||
border-color: @on;
|
||||
}
|
||||
element.selected.urgent {
|
||||
border-color: @accent;
|
||||
}
|
||||
element.urgent,
|
||||
element.selected.active {
|
||||
background-color: @off;
|
||||
text-color: @background;
|
||||
border-color: @off;
|
||||
}
|
||||
element.selected.active {
|
||||
border-color: @accent;
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
*
|
||||
* Author : Aditya Shakya (adi1090x)
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Reddit : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
/* General */
|
||||
text-font: "Comfortaa 12";
|
||||
icon-font: "Hurmit Nerd Font Mono 32";
|
||||
icon-font-small: "Hurmit Nerd Font Mono 24";
|
||||
|
||||
option-6-listview-spacing: 10px;
|
||||
|
||||
menu-window-padding: 5px 15px;
|
||||
menu-inputbar-margin: 10px 0px;
|
||||
menu-prompt-padding: 10px 20px 10px 20px;
|
||||
menu-prompt-margin: 0px 0px 0px -2px;
|
||||
menu-element-border: 0px;
|
||||
menu-element-padding: 10px 15px 5px -35px;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
#window {
|
||||
width: 16.5%;
|
||||
height: 19%;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
font: @icon-font;
|
||||
}
|
||||
|
||||
#horibox {
|
||||
children: [ listview ];
|
||||
}
|
||||
#listview {
|
||||
layout: horizontal;
|
||||
}
|
||||
#element {
|
||||
padding: @option-element-padding;
|
||||
background-color: @background-light;
|
||||
}
|
||||
#element.selected {
|
||||
background-color: @accent;
|
||||
text-color: @background;
|
||||
}
|
||||
|
||||
/* ########### */
|
||||
|
||||
* {
|
||||
font: @text-font;
|
||||
}
|
||||
#window {
|
||||
padding: @menu-window-padding;
|
||||
children: [ inputbar, horibox ];
|
||||
}
|
||||
#inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
margin: @menu-inputbar-margin;
|
||||
}
|
||||
prompt,
|
||||
textbox-prompt-colon {
|
||||
padding: @menu-prompt-padding;
|
||||
border: 2px;
|
||||
border-color: @accent;
|
||||
}
|
||||
#prompt {
|
||||
margin: @menu-prompt-margin;
|
||||
background-color: @background-light;
|
||||
text-color: @accent;
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: "Battery";
|
||||
background-color: @accent;
|
||||
text-color: @background;
|
||||
}
|
||||
#horibox {
|
||||
padding: 0px;
|
||||
}
|
||||
#listview {
|
||||
spacing: @option-6-listview-spacing;
|
||||
lines: 3;
|
||||
}
|
||||
#element {
|
||||
font: @icon-font;
|
||||
border: @menu-element-border;
|
||||
padding: @menu-element-padding;
|
||||
border-color: @background-light;
|
||||
}
|
||||
#element.selected {
|
||||
border-color: @accent;
|
||||
}
|
||||
element.active {
|
||||
background-color: @on;
|
||||
text-color: @background;
|
||||
border-color: @on;
|
||||
}
|
||||
element.selected.urgent {
|
||||
background-color: @off;
|
||||
text-color: @background;
|
||||
border-color: @accent;
|
||||
}
|
||||
element.urgent,
|
||||
element.selected.active {
|
||||
background-color: @off;
|
||||
text-color: @background;
|
||||
border-color: @off;
|
||||
}
|
||||
element.selected.active {
|
||||
background-color: @on;
|
||||
text-color: @background;
|
||||
border-color: @accent;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Change the colorscheme for every menu simply by editing this file...
|
||||
*
|
||||
* Available Color Schemes
|
||||
* // Dark
|
||||
* material-dark/amber material-dark/blue material-dark/blue_grey material-dark/brown material-dark/cyan material-dark/deep_orange
|
||||
* material-dark/deep_purple material-dark/green material-dark/grey material-dark/indigo material-dark/light_blue material-dark/light_green
|
||||
* material-dark/lime material-dark/orange material-dark/pink material-dark/purple material-dark/red material-dark/teal
|
||||
* material-dark/yellow
|
||||
* // Light
|
||||
* material-light/amber material-light/blue material-light/blue_grey material-light/brown material-light/cyan material-light/deep_orange
|
||||
* material-light/deep_purple material-light/green material-light/grey material-light/indigo material-light/light_blue material-light/light_green
|
||||
* material-light/lime material-light/orange material-light/pink material-light/purple material-light/red material-light/teal
|
||||
* material-light/yellow
|
||||
*
|
||||
* // Other
|
||||
* adapta, adapta-nokto, arc, arc-dark, adwaita, gruvbox, dark
|
||||
* armchair, darkpink, fresh, inside, party, sirin
|
||||
*
|
||||
*/
|
||||
|
||||
@import "colorschemes/dark.rasi"
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #00BCD4;
|
||||
background: #263238;
|
||||
background-light: #293840;
|
||||
foreground: #E7E8EB;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #00ADC2;
|
||||
background: #FFFFFF;
|
||||
background-light: #E7E7E7;
|
||||
foreground: #535353;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #2E6BB6;
|
||||
background: #2D2D2D;
|
||||
background-light: #353535;
|
||||
foreground: #E7E8EB;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #6BA0DE;
|
||||
background: #383C4A;
|
||||
background-light: #404552;
|
||||
foreground: #E4E4E4;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #5294E2;
|
||||
background: #FFFFFF;
|
||||
background-light: #E7E8EB;
|
||||
foreground: #333333;
|
||||
on: #44ad4d;
|
||||
off: #e34039;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #E85A50;
|
||||
background: #EAE8DC;
|
||||
background-light: #E4D9C8;
|
||||
foreground: #8E8D89;
|
||||
on: #66bb6a;
|
||||
off: #F68887;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #A9C03F;
|
||||
background: #141c21;
|
||||
background-light: #1C252A;
|
||||
foreground: #93a1a1;
|
||||
on: #5BB462;
|
||||
off: #DE635E;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #F75176;
|
||||
background: #414656;
|
||||
background-light: #4B5060;
|
||||
foreground: #F2F7E3;
|
||||
on: #CDF0D9;
|
||||
off: #FF796A;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #043968;
|
||||
background: #5CDB94;
|
||||
background-light: #59C78A;
|
||||
foreground: #303030;
|
||||
on: #2e7d32;
|
||||
off: #d32f2f;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #83a598;
|
||||
background: #282828;
|
||||
background-light: #303030;
|
||||
foreground: #ebdbb2;
|
||||
on: #44ad4d;
|
||||
off: #fb4934;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #C7493A;
|
||||
background: #151515;
|
||||
background-light: #202020;
|
||||
foreground: #AD8174;
|
||||
on: #689775;
|
||||
off: #A33327;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #ffc107;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #1e88e5;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #607d8b;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #8d6e63;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #26c6da;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #ff5722;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #7e57c2;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #4caf50;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #a5d6a7;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #9e9e9e;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #5c6bc0;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #039be5;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #8bc34a;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #4caf50;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #cddc39;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #ff9800;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
* {
|
||||
accent: #ec407a;
|
||||
background: #212121;
|
||||
background-light: #272727;
|
||||
foreground: #bdbdbd;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue