Add all config files and make them universal
This commit is contained in:
15
alacritty/alacritty.toml
Normal file
15
alacritty/alacritty.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[font.normal]
|
||||
family = "NotoSansM Nerd Font Mono"
|
||||
style = "Regular"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "SpawnNewInstance"
|
||||
key = "Return"
|
||||
mods = "Control|Shift"
|
||||
|
||||
[window]
|
||||
opacity = 0.95
|
||||
|
||||
[window.dimensions]
|
||||
columns = 97
|
||||
lines = 24
|
||||
BIN
assets/icons/cherry.png
Normal file
BIN
assets/icons/cherry.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/wallpaper/hyprchan_wall-4K.png
Normal file
BIN
assets/wallpaper/hyprchan_wall-4K.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
BIN
assets/wallpaper/hyprchan_wall_new-4k.png
Normal file
BIN
assets/wallpaper/hyprchan_wall_new-4k.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 MiB |
BIN
assets/wallpaper/lucy_cp77_wall-4k.jpg
Normal file
BIN
assets/wallpaper/lucy_cp77_wall-4k.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 MiB |
109
dots.sh
Executable file
109
dots.sh
Executable file
@@ -0,0 +1,109 @@
|
||||
#!/bin/bash
|
||||
|
||||
USER_HOME=$(xdg-user-dir HOME)
|
||||
|
||||
# Set paths for symlinks
|
||||
LN_ARRAY=(
|
||||
"$USER_HOME/.dots/lf/bin/lf-cleanup /usr/local/bin/lf-cleanup"
|
||||
"$USER_HOME/.dots/lf/bin/lf-preview /usr/local/bin/lf-preview"
|
||||
"$USER_HOME/.dots/lf/bin/lf-run /usr/local/bin/lf-run"
|
||||
"$USER_HOME/.dots/lf/colors $USER_HOME/.config/lf/colors"
|
||||
"$USER_HOME/.dots/lf/icons $USER_HOME/.config/lf/icons"
|
||||
"$USER_HOME/.dots/lf/lfrc $USER_HOME/.config/lf/lfrc"
|
||||
"$USER_HOME/.dots/alacritty/alacritty.toml $USER_HOME/.config/alacritty/alacritty.toml"
|
||||
"$USER_HOME/.dots/dunst/dunstrc $USER_HOME/.config/dunst/dunstrc"
|
||||
"$USER_HOME/.dots/fastfetch/config.jsonc $USER_HOME/.config/fastfetch/config.jsonc"
|
||||
"$USER_HOME/.dots/hypr/hypridle.conf $USER_HOME/.config/hypr/hypridle.conf"
|
||||
"$USER_HOME/.dots/hypr/hyprland.conf $USER_HOME/.config/hypr/hyprland.conf"
|
||||
"$USER_HOME/.dots/hypr/hyprlock.conf $USER_HOME/.config/hypr/hyprlock.conf"
|
||||
"$USER_HOME/.dots/hypr/hyprpaper.conf $USER_HOME/.config/hypr/hyprpaper.conf"
|
||||
"$USER_HOME/.dots/hypr/bin/fix-mime /usr/local/bin/fix-mime"
|
||||
"$USER_HOME/.dots/wofi/config $USER_HOME/.config/wofi/config"
|
||||
"$USER_HOME/.dots/wofi/style.css $USER_HOME/.config/wofi/style.css"
|
||||
"$USER_HOME/.dots/waybar/style.css $USER_HOME/.config/waybar/style.css"
|
||||
"$USER_HOME/.dots/waybar/config $USER_HOME/.config/waybar/config"
|
||||
"$USER_HOME/.dots/waybar/custom_modules/mediaplayer.py $USER_HOME/.config/waybar/custom_modules/mediaplayer.py"
|
||||
)
|
||||
|
||||
# Set paths for folders
|
||||
DIR_ARRAY=(
|
||||
"$USER_HOME/.config/"
|
||||
"$USER_HOME/.config/lf/"
|
||||
"$USER_HOME/.config/alacritty/"
|
||||
"$USER_HOME/.config/dunst/"
|
||||
"$USER_HOME/.config/fastfetch/"
|
||||
"$USER_HOME/.config/hypr/"
|
||||
"$USER_HOME/.config/wofi/"
|
||||
"$USER_HOME/.config/waybar/"
|
||||
"$USER_HOME/.config/waybar/custom_modules/"
|
||||
)
|
||||
|
||||
# Check if the user is root, if it is return
|
||||
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo "Please dont run this script as root!"
|
||||
echo "You will be prompted for your password later."
|
||||
exit
|
||||
fi
|
||||
|
||||
# Warn the user that this Script will override existing files
|
||||
warn_user (){
|
||||
echo "WARNING: $1"
|
||||
read -p "Do you want to Continue? [y/N]" -n 1 -r
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [[ $1 == "install" ]]; then
|
||||
# Move dots folder to .dots as its fixed location
|
||||
echo "Moving dotfiles..."
|
||||
cd .. && mv dots/ $USER_HOME/.dots/
|
||||
|
||||
# Create all nesecerry folders if they dont exist
|
||||
echo "Creating folders..."
|
||||
for i in ${DIR_ARRAY[@]}; do
|
||||
mkdir -p $i
|
||||
done
|
||||
|
||||
# Symlink every config file into its appropriate folder
|
||||
echo "Symlinking dotfiles..."
|
||||
warn_user "This might override existing config files. Please Backup any pre-existing files!"
|
||||
for i in ${LN_ARRAY[@]}; do
|
||||
sudo ln -s $i
|
||||
done
|
||||
echo "dotfiles installed!"
|
||||
|
||||
|
||||
elif [[ $1 == "remove" ]]; then
|
||||
|
||||
# Remove all Symlinkinked files
|
||||
echo "Removeing symlinks..."
|
||||
warn_user "This will remove ALL config files this script installed!"
|
||||
for i in ${LN_ARRAY[@]}; do
|
||||
sudo rm $(echo $i | cut -d ' ' -f2)
|
||||
done
|
||||
|
||||
# Remove the .dots folder
|
||||
echo "Removeing .dots folder..."
|
||||
rm -r $USER_HOME/.dots/
|
||||
|
||||
echo "dotfiles removed!"
|
||||
|
||||
elif [[ $1 == "update" ]]; then
|
||||
|
||||
# Update every simlink and add any new ones
|
||||
echo "Updateing symlinks..."
|
||||
warn_user "This might override customisations to existing config files!"
|
||||
for i in ${LN_ARRAY[@]}; do
|
||||
sudo ln -sf $i
|
||||
done
|
||||
|
||||
echo "Update done!"
|
||||
|
||||
else
|
||||
# Inform the user about the available commands
|
||||
echo "Please only use \"install\", \"update\" or \"remove\" as arguments."
|
||||
fi
|
||||
24
dunst/dunstrc
Normal file
24
dunst/dunstrc
Normal file
@@ -0,0 +1,24 @@
|
||||
[global]
|
||||
frame_color = "#30c2ed"
|
||||
separator_color= frame
|
||||
follow = mouse
|
||||
corner_radius = 5
|
||||
background = "#1b1f1ceb"
|
||||
gap_size = 5
|
||||
|
||||
|
||||
[urgency_low]
|
||||
frame_color = "#D9E0EE"
|
||||
background = "#1b1f1ceb"
|
||||
foreground = "#D9E0EE"
|
||||
|
||||
[urgency_normal]
|
||||
frame_color = "#30c2ed"
|
||||
background = "#1b1f1ceb"
|
||||
foreground = "#D9E0EE"
|
||||
|
||||
[urgency_critical]
|
||||
background = "#1b1f1ceb"
|
||||
foreground = "#E7B56F"
|
||||
frame_color = "#AC4242"
|
||||
|
||||
37
fastfetch/config.jsonc
Normal file
37
fastfetch/config.jsonc
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"display": {
|
||||
"size": {
|
||||
"ndigits": 0,
|
||||
"maxPrefix": "GB"
|
||||
}
|
||||
},
|
||||
"modules": [
|
||||
"title",
|
||||
"separator",
|
||||
"os",
|
||||
"host",
|
||||
"kernel",
|
||||
"uptime",
|
||||
"packages",
|
||||
"shell",
|
||||
{
|
||||
"type": "display",
|
||||
"compactType": "original",
|
||||
"key": "Resolution"
|
||||
},
|
||||
"wm",
|
||||
"de",
|
||||
"wmtheme",
|
||||
"theme",
|
||||
"icons",
|
||||
"terminal",
|
||||
"terminalfont",
|
||||
"cpu",
|
||||
"gpu",
|
||||
"memory",
|
||||
"disk",
|
||||
"break",
|
||||
"colors"
|
||||
]
|
||||
}
|
||||
3
hypr/bin/fix-mime
Executable file
3
hypr/bin/fix-mime
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
XDG_MENU_PREFIX=arch- kbuildsycoca6
|
||||
27
hypr/hypridle.conf
Normal file
27
hypr/hypridle.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
||||
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1500 # 25min
|
||||
on-timeout = bash ~/.dots/scripts/hypridle-notify.sh idle # Send idle-mode notifcation.
|
||||
on-resume = bash ~/.dots/scripts/hypridle-notify.sh normal # Send normal-mode notifcation.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1800 # 30min
|
||||
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 2100 # 35min
|
||||
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
||||
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 2400 # 40min
|
||||
on-timeout = echo "Not implemented" #systemctl suspend-then-hibernate # suspend pc
|
||||
}
|
||||
257
hypr/hyprland.conf
Normal file
257
hypr/hyprland.conf
Normal file
@@ -0,0 +1,257 @@
|
||||
|
||||
# #######################################################################################
|
||||
# AUTOGENERATED HYPR CONFIG.
|
||||
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
|
||||
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
|
||||
# #######################################################################################
|
||||
|
||||
#
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
#
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
|
||||
# New RX 6900XT config
|
||||
#normal config
|
||||
monitor=,preferred,auto,1
|
||||
monitor=HDMI-A-1, 1920x1080@60, 0x0, 1
|
||||
monitor=HDMI-A-2, 1680x1050, 1920x0,1
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Execute your favorite apps at launch
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
|
||||
# Set the right Env_vars for xdg-desktop-portal-hyprland
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user restart xdg-desktop-portal
|
||||
|
||||
#Start the Clipboard manager
|
||||
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
|
||||
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
|
||||
|
||||
exec-once = waybar & hyprpaper & alacritty & dunst & /usr/lib/polkit-kde-authentication-agent-1 & kdeconnectd & ydotoold & hypridle & fix-mime
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
|
||||
# Configure Hyprcursor
|
||||
env = HYPRCURSOR_THEME,hyprcursor_Dracula
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
|
||||
# Configure Fallback xcursor
|
||||
env = XCURSOR_THEME,Dracula-cursors
|
||||
env = XCURSOR_SIZE,24
|
||||
|
||||
# File association in dolphin.
|
||||
env = XDG_MENU_PREFIX,plasma-
|
||||
|
||||
|
||||
# Some default env vars.
|
||||
#env = XDG_CURRENT_DESKTOP,hyprland
|
||||
|
||||
|
||||
# Set Qt Themeing env vars
|
||||
|
||||
env = QT_QPA_PLATFORM,wayland
|
||||
env = QT_QPA_PLATFORMTHEME,qt6ct
|
||||
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
|
||||
#env = QT_STYLE_OVERRIDE,kvantum
|
||||
|
||||
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = de
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
border_size = 2
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 5
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
}
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_status = master
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
device{
|
||||
name = epic-mouse-v1
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
device{
|
||||
name = ydotoold-virtual-device
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_options =
|
||||
}
|
||||
|
||||
|
||||
# xwaylandvideobridge configuration
|
||||
windowrulev2 = opacity 0.0 override,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noblur,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noanim,class:^(ueberzugpp_.*)$
|
||||
windowrulev2 = noinitialfocus,class:^(ueberzugpp_.*)$
|
||||
windowrulev2 = noblur,class:^(ueberzugpp_.*)$
|
||||
|
||||
#Set appropriate window rules for Steam
|
||||
#Use this for any programm where the hover menu diapears randomly
|
||||
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
|
||||
windowrulev2 = minsize 1 1,title:^()$,class:^(steam)$
|
||||
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Q, exec, alacritty
|
||||
bind = $mainMod, C, killactive
|
||||
bind = $mainMod, B, exec, brave
|
||||
bind = $mainMod, O, exit,
|
||||
bind = $mainMod, L, exec, hyprlock
|
||||
bind = $mainMod, F, fullscreen
|
||||
bind = $mainMod, D, exec, dolphin
|
||||
bind = $mainMod, S, exec, bash ~/Dev/Scripts/screenshot.sh
|
||||
bind = $mainMod, X, togglefloating
|
||||
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||
bind = $mainMod, DELETE, exec, cliphist wipe && notify-send "Clipboard Wiped!"
|
||||
bind = $mainMod, K, exec, rofi -show drun
|
||||
bind = $mainMod, R, exec, wofi --show drun -Im
|
||||
bind = $mainMod, SPACE, exec, wofi --show drun -Im
|
||||
bind = $mainMod, Z, pseudo, # dwindle
|
||||
bind = $mainMod, M, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle && bash ~/Dev/Scripts/getSourceMute.sh # Mute the default mic
|
||||
bind = $mainMod, P, exec, rofi-rbw
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
bind = ,XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bind = ,XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
|
||||
# Binds with alternate Mod key
|
||||
$altMod = ALT
|
||||
|
||||
bind = $altMod, C, exec, hyprpicker -af hex
|
||||
bind = $altMod, M, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Nvidia Specific Customisations
|
||||
|
||||
#env = LIBVA_DRIVER_NAME,nvidia
|
||||
#env = XDG_SESSION_TYPE,wayland
|
||||
#env = WLR_NO_HARDWARE_CURSORS,1
|
||||
#env = WLR_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0
|
||||
105
hypr/hyprlock.conf
Normal file
105
hypr/hyprlock.conf
Normal file
@@ -0,0 +1,105 @@
|
||||
general {
|
||||
hide_cursor = true
|
||||
ignore_empty_input = true
|
||||
immediate_render = true
|
||||
}
|
||||
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = ~/.dots/assets/wallpaper/hyprchan_wall_new-4k.png # supports png, jpg, webp (no animations, though)
|
||||
color = rgba(25, 20, 20, 1.0)
|
||||
|
||||
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
|
||||
blur_passes = 2 # 0 disables blurring
|
||||
blur_size = 3
|
||||
noise = 0.0117
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
image {
|
||||
monitor =
|
||||
path = ~/.dots/assets/icons/cherry.png
|
||||
size = 150 # lesser side if not 1:1 ratio
|
||||
rounding = -1 # negative values mean circle
|
||||
border_size = 0
|
||||
border_color = rgb(221, 221, 221)
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2
|
||||
reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F
|
||||
|
||||
position = 0, 200
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 35
|
||||
outline_thickness = 2
|
||||
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.15 # Scale of dots' absolute size, -1.0 - 1.0
|
||||
dots_center = false
|
||||
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
|
||||
dots_fade_time = 200 # Milliseconds until a dot fully fades in
|
||||
dots_text_format = # Text character used for the input indicator. Leave empty for a rectangle that will be rounded via dots_rounding (default).
|
||||
outer_color = rgba(48, 194, 237, 0.5)
|
||||
inner_color = rgba(23, 26, 26, 0.5)
|
||||
font_color = rgb(200, 200, 200)
|
||||
font_family = Noto Sans # Font used for placeholder_text, fail_text and dots_text_format.
|
||||
fade_on_empty = true
|
||||
fade_timeout = 5000 # Milliseconds before fade_on_empty is triggered.
|
||||
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
|
||||
hide_input = false
|
||||
rounding = -1 # -1 means complete rounding (circle/oval)
|
||||
check_color = rgb(48, 194, 237)
|
||||
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
|
||||
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
|
||||
fail_timeout = 2000 # milliseconds before fail_text and fail_color disappears
|
||||
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
|
||||
capslock_color = rgba(204, 136, 34, 0.5)
|
||||
numlock_color = rgba(9, 140, 4, 0.5)
|
||||
bothlock_color = rgba(200, 200, 200, 0.5) # when both locks are active. -1 means don't change outer color (same for above)
|
||||
invert_numlock = false # change color if numlock is off
|
||||
swap_font_color = false # see below
|
||||
|
||||
position = 0, 10
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = Hi $USER
|
||||
text_align = center # center/right or any value for default left. multi-line text alignment inside label container
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 25
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
shadow_size = 4
|
||||
shadow_passes = 2
|
||||
position = 0, 110
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:500] timedatectl | grep -Po '\d{2,4}\-\d{1,2}\-\d{1,2}'| sed 1q | awk -F '-' '{print $3,$2,$1}' | tr " " "." | tr "\n" " " && timedatectl | grep -Po '\d{1,2}\:\d{1,2}\:\d{1,2}' |sed 1q | awk -F ':' '{print $1 ":" $2 ":" $3}'
|
||||
text_align = center # center/right or any value for default left. multi-line text alignment inside label container
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 15
|
||||
font_family = Noto Sans
|
||||
shadow_size = 2
|
||||
shadow_passes = 2
|
||||
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
font_color = rgb(247, 238, 237)
|
||||
position = 0, 70
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
6
hypr/hyprpaper.conf
Normal file
6
hypr/hyprpaper.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
preload = ~/.dots/assets/wallpaper/hyprchan_wall-4K.png
|
||||
preload = ~/.dots/assets/wallpaper/lucy_cp77_wall-4k.jpg
|
||||
preload = ~/.dots/assets/wallpaper/hyprchan_wall_new-4K.png
|
||||
|
||||
wallpaper = HDMI-A-2,~/.dots/assets/wallpaper/hyprchan_wall-4K.png
|
||||
wallpaper = HDMI-A-1,~/.dots/assets/wallpaper/lucy_cp77_wall-4k.jpg
|
||||
3
lf/bin/lf-cleanup
Executable file
3
lf/bin/lf-cleanup
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
ueberzugpp cmd -s $UB_SOCKET -a remove -i PREVIEW
|
||||
65
lf/bin/lf-preview
Executable file
65
lf/bin/lf-preview
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
|
||||
image() {
|
||||
FILE_PATH="$1"
|
||||
X=$4
|
||||
Y=$5
|
||||
MW=$(($2 - 1))
|
||||
MH=$3
|
||||
ueberzugpp cmd -s "$UB_SOCKET" -a add -i PREVIEW -x "$X" -y "$Y" --max-width "$MW" --max-height "$MH" -f "$FILE_PATH"
|
||||
exit 1
|
||||
}
|
||||
|
||||
batorcat() {
|
||||
file="$1"
|
||||
shift
|
||||
if command -v bat >/dev/null 2>&1; then
|
||||
bat --color=always --style=plain --pager=never "$file" "$@"
|
||||
else
|
||||
cat "$file"
|
||||
fi
|
||||
}
|
||||
|
||||
CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
|
||||
|
||||
case "$(printf "%s\n" "$(readlink -f "$1")" | tr '[:upper:]' '[:lower:]')" in
|
||||
*.tgz | *.tar.gz) tar tzf "$1" ;;
|
||||
*.tar.bz2 | *.tbz2) tar tjf "$1" ;;
|
||||
*.tar.txz | *.txz) xz --list "$1" ;;
|
||||
*.tar) tar tf "$1" ;;
|
||||
*.zip | *.jar | *.war | *.ear | *.oxt) unzip -l "$1" ;;
|
||||
*.rar) unrar l "$1" ;;
|
||||
*.7z) 7z l "$1" ;;
|
||||
*.[1-8]) man "$1" | col -b ;;
|
||||
*.o) nm "$1" ;;
|
||||
*.torrent) transmission-show "$1" ;;
|
||||
*.iso) iso-info --no-header -l "$1" ;;
|
||||
*.odt | *.ods | *.odp | *.sxw) odt2txt "$1" ;;
|
||||
*.doc) catdoc "$1" ;;
|
||||
*.docx) docx2txt "$1" - ;;
|
||||
*.xls | *.xlsx)
|
||||
ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv
|
||||
;;
|
||||
*.wav | *.mp3 | *.flac | *.m4a | *.wma | *.ape | *.ac3 | *.og[agx] | *.spx | *.opus | *.as[fx] | *.mka)
|
||||
exiftool "$1"
|
||||
;;
|
||||
*.pdf)
|
||||
[ ! -f "${CACHE}.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
|
||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.avi | *.mp4 | *.wmv | *.dat | *.3gp | *.ogv | *.mkv | *.mpg | *.mpeg | *.vob | *.fl[icv] | *.m2v | *.mov | *.webm | *.ts | *.mts | *.m4v | *.r[am] | *.qt | *.divx)
|
||||
[ ! -f "${CACHE}.jpg" ] && ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5
|
||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.bmp | *.jpg | *.jpeg | *.png | *.xpm | *.webp | *.gif | *.jfif)
|
||||
image "$1" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.svg)
|
||||
[ ! -f "${CACHE}.jpg" ] && convert "$1" "${CACHE}.jpg"
|
||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*)
|
||||
batorcat "$1"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
34
lf/bin/lf-run
Executable file
34
lf/bin/lf-run
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is a wrapper script for lf that allows it to create image previews with
|
||||
# ueberzug. This works in concert with the lf configuration file and the
|
||||
# lf-cleaner script.
|
||||
|
||||
set -e
|
||||
|
||||
UB_PID=0
|
||||
UB_SOCKET=""
|
||||
|
||||
case "$(uname -a)" in
|
||||
*Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;;
|
||||
*) UEBERZUG_TMP_DIR="/tmp" ;;
|
||||
esac
|
||||
|
||||
cleanup() {
|
||||
exec 3>&-
|
||||
ueberzugpp cmd -s "$UB_SOCKET" -a exit
|
||||
}
|
||||
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
lf "$@"
|
||||
else
|
||||
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
|
||||
UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
|
||||
ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE"
|
||||
UB_PID=$(cat "$UB_PID_FILE")
|
||||
rm "$UB_PID_FILE"
|
||||
UB_SOCKET="$UEBERZUG_TMP_DIR/ueberzugpp-${UB_PID}.socket"
|
||||
export UB_PID UB_SOCKET
|
||||
trap cleanup HUP INT QUIT TERM EXIT
|
||||
lf "$@" 3>&-
|
||||
fi
|
||||
174
lf/colors
Normal file
174
lf/colors
Normal file
@@ -0,0 +1,174 @@
|
||||
# vim:ft=dircolors
|
||||
# (This is not a dircolors file but it helps to highlight colors and comments)
|
||||
|
||||
# default values from dircolors
|
||||
# (entries with a leading # are not implemented in lf)
|
||||
# #no 00 # NORMAL
|
||||
# fi 00 # FILE
|
||||
# #rs 0 # RESET
|
||||
# di 01;34 # DIR
|
||||
# ln 01;36 # LINK
|
||||
# #mh 00 # MULTIHARDLINK
|
||||
# pi 40;33 # FIFO
|
||||
# so 01;35 # SOCK
|
||||
# #do 01;35 # DOOR
|
||||
# bd 40;33;01 # BLK
|
||||
# cd 40;33;01 # CHR
|
||||
# or 40;31;01 # ORPHAN
|
||||
# #mi 00 # MISSING
|
||||
# su 37;41 # SETUID
|
||||
# sg 30;43 # SETGID
|
||||
# #ca 30;41 # CAPABILITY
|
||||
# tw 30;42 # STICKY_OTHER_WRITABLE
|
||||
# ow 34;42 # OTHER_WRITABLE
|
||||
# st 37;44 # STICKY
|
||||
# ex 01;32 # EXEC
|
||||
|
||||
# default values from lf (with matching order)
|
||||
# ln 01;36 # LINK
|
||||
# or 31;01 # ORPHAN
|
||||
# tw 01;34 # STICKY_OTHER_WRITABLE
|
||||
# ow 01;34 # OTHER_WRITABLE
|
||||
# st 01;34 # STICKY
|
||||
# di 01;34 # DIR
|
||||
# pi 33 # FIFO
|
||||
# so 01;35 # SOCK
|
||||
# bd 33;01 # BLK
|
||||
# cd 33;01 # CHR
|
||||
# su 01;32 # SETUID
|
||||
# sg 01;32 # SETGID
|
||||
# ex 01;32 # EXEC
|
||||
# fi 00 # FILE
|
||||
|
||||
# file types (with matching order)
|
||||
ln 01;36 # LINK
|
||||
or 31;01 # ORPHAN
|
||||
tw 34 # STICKY_OTHER_WRITABLE
|
||||
ow 34 # OTHER_WRITABLE
|
||||
st 01;34 # STICKY
|
||||
di 01;34 # DIR
|
||||
pi 33 # FIFO
|
||||
so 01;35 # SOCK
|
||||
bd 33;01 # BLK
|
||||
cd 33;01 # CHR
|
||||
su 01;32 # SETUID
|
||||
sg 01;32 # SETGID
|
||||
ex 01;32 # EXEC
|
||||
fi 00 # FILE
|
||||
|
||||
# archives or compressed (dircolors defaults)
|
||||
*.tar 01;31
|
||||
*.tgz 01;31
|
||||
*.arc 01;31
|
||||
*.arj 01;31
|
||||
*.taz 01;31
|
||||
*.lha 01;31
|
||||
*.lz4 01;31
|
||||
*.lzh 01;31
|
||||
*.lzma 01;31
|
||||
*.tlz 01;31
|
||||
*.txz 01;31
|
||||
*.tzo 01;31
|
||||
*.t7z 01;31
|
||||
*.zip 01;31
|
||||
*.z 01;31
|
||||
*.dz 01;31
|
||||
*.gz 01;31
|
||||
*.lrz 01;31
|
||||
*.lz 01;31
|
||||
*.lzo 01;31
|
||||
*.xz 01;31
|
||||
*.zst 01;31
|
||||
*.tzst 01;31
|
||||
*.bz2 01;31
|
||||
*.bz 01;31
|
||||
*.tbz 01;31
|
||||
*.tbz2 01;31
|
||||
*.tz 01;31
|
||||
*.deb 01;31
|
||||
*.rpm 01;31
|
||||
*.jar 01;31
|
||||
*.war 01;31
|
||||
*.ear 01;31
|
||||
*.sar 01;31
|
||||
*.rar 01;31
|
||||
*.alz 01;31
|
||||
*.ace 01;31
|
||||
*.zoo 01;31
|
||||
*.cpio 01;31
|
||||
*.7z 01;31
|
||||
*.rz 01;31
|
||||
*.cab 01;31
|
||||
*.wim 01;31
|
||||
*.swm 01;31
|
||||
*.dwm 01;31
|
||||
*.esd 01;31
|
||||
|
||||
# image formats (dircolors defaults)
|
||||
*.jpg 01;35
|
||||
*.jpeg 01;35
|
||||
*.mjpg 01;35
|
||||
*.mjpeg 01;35
|
||||
*.gif 01;35
|
||||
*.bmp 01;35
|
||||
*.pbm 01;35
|
||||
*.pgm 01;35
|
||||
*.ppm 01;35
|
||||
*.tga 01;35
|
||||
*.xbm 01;35
|
||||
*.xpm 01;35
|
||||
*.tif 01;35
|
||||
*.tiff 01;35
|
||||
*.png 01;35
|
||||
*.svg 01;35
|
||||
*.svgz 01;35
|
||||
*.mng 01;35
|
||||
*.pcx 01;35
|
||||
*.mov 01;35
|
||||
*.mpg 01;35
|
||||
*.mpeg 01;35
|
||||
*.m2v 01;35
|
||||
*.mkv 01;35
|
||||
*.webm 01;35
|
||||
*.ogm 01;35
|
||||
*.mp4 01;35
|
||||
*.m4v 01;35
|
||||
*.mp4v 01;35
|
||||
*.vob 01;35
|
||||
*.qt 01;35
|
||||
*.nuv 01;35
|
||||
*.wmv 01;35
|
||||
*.asf 01;35
|
||||
*.rm 01;35
|
||||
*.rmvb 01;35
|
||||
*.flc 01;35
|
||||
*.avi 01;35
|
||||
*.fli 01;35
|
||||
*.flv 01;35
|
||||
*.gl 01;35
|
||||
*.dl 01;35
|
||||
*.xcf 01;35
|
||||
*.xwd 01;35
|
||||
*.yuv 01;35
|
||||
*.cgm 01;35
|
||||
*.emf 01;35
|
||||
*.ogv 01;35
|
||||
*.ogx 01;35
|
||||
|
||||
# audio formats (dircolors defaults)
|
||||
*.aac 00;36
|
||||
*.au 00;36
|
||||
*.flac 00;36
|
||||
*.m4a 00;36
|
||||
*.mid 00;36
|
||||
*.midi 00;36
|
||||
*.mka 00;36
|
||||
*.mp3 00;36
|
||||
*.mpc 00;36
|
||||
*.ogg 00;36
|
||||
*.ra 00;36
|
||||
*.wav 00;36
|
||||
*.oga 00;36
|
||||
*.opus 00;36
|
||||
*.spx 00;36
|
||||
*.xspf 00;36
|
||||
357
lf/icons
Normal file
357
lf/icons
Normal file
@@ -0,0 +1,357 @@
|
||||
# vim:ft=conf
|
||||
|
||||
# These examples require Nerd Fonts or a compatible font to be used.
|
||||
# See https://www.nerdfonts.com for more information.
|
||||
|
||||
# default values from lf (with matching order)
|
||||
# ln l # LINK
|
||||
# or l # ORPHAN
|
||||
# tw t # STICKY_OTHER_WRITABLE
|
||||
# ow d # OTHER_WRITABLE
|
||||
# st t # STICKY
|
||||
# di d # DIR
|
||||
# pi p # FIFO
|
||||
# so s # SOCK
|
||||
# bd b # BLK
|
||||
# cd c # CHR
|
||||
# su u # SETUID
|
||||
# sg g # SETGID
|
||||
# ex x # EXEC
|
||||
# fi - # FILE
|
||||
|
||||
# file types (with matching order)
|
||||
ln # LINK
|
||||
or # ORPHAN
|
||||
tw t # STICKY_OTHER_WRITABLE
|
||||
ow # OTHER_WRITABLE
|
||||
st t # STICKY
|
||||
di # DIR
|
||||
pi p # FIFO
|
||||
so s # SOCK
|
||||
bd b # BLK
|
||||
cd c # CHR
|
||||
su u # SETUID
|
||||
sg g # SETGID
|
||||
ex # EXEC
|
||||
fi # FILE
|
||||
|
||||
# file extensions (vim-devicons)
|
||||
*.styl
|
||||
*.sass
|
||||
*.scss
|
||||
*.htm
|
||||
*.html
|
||||
*.slim
|
||||
*.haml
|
||||
*.ejs
|
||||
*.css
|
||||
*.less
|
||||
*.md
|
||||
*.mdx
|
||||
*.markdown
|
||||
*.rmd
|
||||
*.json
|
||||
*.webmanifest
|
||||
*.js
|
||||
*.mjs
|
||||
*.jsx
|
||||
*.rb
|
||||
*.gemspec
|
||||
*.rake
|
||||
*.php
|
||||
*.py
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
*.coffee
|
||||
*.mustache
|
||||
*.hbs
|
||||
*.conf
|
||||
*.ini
|
||||
*.yml
|
||||
*.yaml
|
||||
*.toml
|
||||
*.bat
|
||||
*.mk
|
||||
*.jpg
|
||||
*.jpeg
|
||||
*.bmp
|
||||
*.png
|
||||
*.webp
|
||||
*.gif
|
||||
*.ico
|
||||
*.twig
|
||||
*.cpp
|
||||
*.c++
|
||||
*.cxx
|
||||
*.cc
|
||||
*.cp
|
||||
*.c
|
||||
*.cs
|
||||
*.h
|
||||
*.hh
|
||||
*.hpp
|
||||
*.hxx
|
||||
*.hs
|
||||
*.lhs
|
||||
*.nix
|
||||
*.lua
|
||||
*.java
|
||||
*.sh
|
||||
*.fish
|
||||
*.bash
|
||||
*.zsh
|
||||
*.ksh
|
||||
*.csh
|
||||
*.awk
|
||||
*.ps1
|
||||
*.ml λ
|
||||
*.mli λ
|
||||
*.diff
|
||||
*.db
|
||||
*.sql
|
||||
*.dump
|
||||
*.clj
|
||||
*.cljc
|
||||
*.cljs
|
||||
*.edn
|
||||
*.scala
|
||||
*.go
|
||||
*.dart
|
||||
*.xul
|
||||
*.sln
|
||||
*.suo
|
||||
*.pl
|
||||
*.pm
|
||||
*.t
|
||||
*.rss
|
||||
'*.f#'
|
||||
*.fsscript
|
||||
*.fsx
|
||||
*.fs
|
||||
*.fsi
|
||||
*.rs
|
||||
*.rlib
|
||||
*.d
|
||||
*.erl
|
||||
*.hrl
|
||||
*.ex
|
||||
*.exs
|
||||
*.eex
|
||||
*.leex
|
||||
*.heex
|
||||
*.vim
|
||||
*.ai
|
||||
*.psd
|
||||
*.psb
|
||||
*.ts
|
||||
*.tsx
|
||||
*.jl
|
||||
*.pp
|
||||
*.vue
|
||||
*.elm
|
||||
*.swift
|
||||
*.xcplayground
|
||||
*.tex
|
||||
*.r
|
||||
*.rproj
|
||||
*.sol
|
||||
*.pem
|
||||
|
||||
# file names (vim-devicons) (case-insensitive not supported in lf)
|
||||
*gruntfile.coffee
|
||||
*gruntfile.js
|
||||
*gruntfile.ls
|
||||
*gulpfile.coffee
|
||||
*gulpfile.js
|
||||
*gulpfile.ls
|
||||
*mix.lock
|
||||
*dropbox
|
||||
*.ds_store
|
||||
*.gitconfig
|
||||
*.gitignore
|
||||
*.gitattributes
|
||||
*.gitlab-ci.yml
|
||||
*.bashrc
|
||||
*.zshrc
|
||||
*.zshenv
|
||||
*.zprofile
|
||||
*.vimrc
|
||||
*.gvimrc
|
||||
*_vimrc
|
||||
*_gvimrc
|
||||
*.bashprofile
|
||||
*favicon.ico
|
||||
*license
|
||||
*node_modules
|
||||
*react.jsx
|
||||
*procfile
|
||||
*dockerfile
|
||||
*docker-compose.yml
|
||||
*rakefile
|
||||
*config.ru
|
||||
*gemfile
|
||||
*makefile
|
||||
*cmakelists.txt
|
||||
*robots.txt
|
||||
|
||||
# file names (case-sensitive adaptations)
|
||||
*Gruntfile.coffee
|
||||
*Gruntfile.js
|
||||
*Gruntfile.ls
|
||||
*Gulpfile.coffee
|
||||
*Gulpfile.js
|
||||
*Gulpfile.ls
|
||||
*Dropbox
|
||||
*.DS_Store
|
||||
*LICENSE
|
||||
*React.jsx
|
||||
*Procfile
|
||||
*Dockerfile
|
||||
*Docker-compose.yml
|
||||
*Rakefile
|
||||
*Gemfile
|
||||
*Makefile
|
||||
*CMakeLists.txt
|
||||
|
||||
# file patterns (vim-devicons) (patterns not supported in lf)
|
||||
# .*jquery.*\.js$
|
||||
# .*angular.*\.js$
|
||||
# .*backbone.*\.js$
|
||||
# .*require.*\.js$
|
||||
# .*materialize.*\.js$
|
||||
# .*materialize.*\.css$
|
||||
# .*mootools.*\.js$
|
||||
# .*vimrc.*
|
||||
# Vagrantfile$
|
||||
|
||||
# file patterns (file name adaptations)
|
||||
*jquery.min.js
|
||||
*angular.min.js
|
||||
*backbone.min.js
|
||||
*require.min.js
|
||||
*materialize.min.js
|
||||
*materialize.min.css
|
||||
*mootools.min.js
|
||||
*vimrc
|
||||
Vagrantfile
|
||||
|
||||
# archives or compressed (extensions from dircolors defaults)
|
||||
*.tar
|
||||
*.tgz
|
||||
*.arc
|
||||
*.arj
|
||||
*.taz
|
||||
*.lha
|
||||
*.lz4
|
||||
*.lzh
|
||||
*.lzma
|
||||
*.tlz
|
||||
*.txz
|
||||
*.tzo
|
||||
*.t7z
|
||||
*.zip
|
||||
*.z
|
||||
*.dz
|
||||
*.gz
|
||||
*.lrz
|
||||
*.lz
|
||||
*.lzo
|
||||
*.xz
|
||||
*.zst
|
||||
*.tzst
|
||||
*.bz2
|
||||
*.bz
|
||||
*.tbz
|
||||
*.tbz2
|
||||
*.tz
|
||||
*.deb
|
||||
*.rpm
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
*.sar
|
||||
*.rar
|
||||
*.alz
|
||||
*.ace
|
||||
*.zoo
|
||||
*.cpio
|
||||
*.7z
|
||||
*.rz
|
||||
*.cab
|
||||
*.wim
|
||||
*.swm
|
||||
*.dwm
|
||||
*.esd
|
||||
|
||||
# image formats (extensions from dircolors defaults)
|
||||
*.jpg
|
||||
*.jpeg
|
||||
*.mjpg
|
||||
*.mjpeg
|
||||
*.gif
|
||||
*.bmp
|
||||
*.pbm
|
||||
*.pgm
|
||||
*.ppm
|
||||
*.tga
|
||||
*.xbm
|
||||
*.xpm
|
||||
*.tif
|
||||
*.tiff
|
||||
*.png
|
||||
*.svg
|
||||
*.svgz
|
||||
*.mng
|
||||
*.pcx
|
||||
*.mov
|
||||
*.mpg
|
||||
*.mpeg
|
||||
*.m2v
|
||||
*.mkv
|
||||
*.webm
|
||||
*.ogm
|
||||
*.mp4
|
||||
*.m4v
|
||||
*.mp4v
|
||||
*.vob
|
||||
*.qt
|
||||
*.nuv
|
||||
*.wmv
|
||||
*.asf
|
||||
*.rm
|
||||
*.rmvb
|
||||
*.flc
|
||||
*.avi
|
||||
*.fli
|
||||
*.flv
|
||||
*.gl
|
||||
*.dl
|
||||
*.xcf
|
||||
*.xwd
|
||||
*.yuv
|
||||
*.cgm
|
||||
*.emf
|
||||
*.ogv
|
||||
*.ogx
|
||||
|
||||
# audio formats (extensions from dircolors defaults)
|
||||
*.aac
|
||||
*.au
|
||||
*.flac
|
||||
*.m4a
|
||||
*.mid
|
||||
*.midi
|
||||
*.mka
|
||||
*.mp3
|
||||
*.mpc
|
||||
*.ogg
|
||||
*.ra
|
||||
*.wav
|
||||
*.oga
|
||||
*.opus
|
||||
*.spx
|
||||
*.xspf
|
||||
|
||||
# other formats
|
||||
*.pdf
|
||||
289
lf/lfrc
Normal file
289
lf/lfrc
Normal file
@@ -0,0 +1,289 @@
|
||||
|
||||
# ENV Variables
|
||||
set shell bash
|
||||
set ignorecase true
|
||||
set icons true
|
||||
set drawbox true
|
||||
|
||||
# These Scripts can be found under /usr/local/bin
|
||||
set previewer lf-preview
|
||||
set cleaner lf-cleanup
|
||||
|
||||
# Custom Commands
|
||||
cmd mkdir %{{
|
||||
printf "Directory Name:"
|
||||
read ans
|
||||
mkdir $ans
|
||||
}}
|
||||
|
||||
cmd mkfile %{{
|
||||
printf "File Name: "
|
||||
read ans
|
||||
touch $ans
|
||||
}}
|
||||
|
||||
cmd unzip %{{
|
||||
case "$f" in
|
||||
*.zip) unzip "$f" ;;
|
||||
*.tar.gz) tar -xzvf "$f" ;;
|
||||
*.tar.bz2) tar -xjvf "$f" ;;
|
||||
*.tar) tar -xvf "$f" ;;
|
||||
*.7z) 7za x "$f";;
|
||||
*.rar) unrar x "$f";;
|
||||
*) echo "Unsupported format" ;;
|
||||
esac
|
||||
}}
|
||||
|
||||
cmd zip %{{
|
||||
printf "Filename (without .zip): "
|
||||
read ans
|
||||
name=$ans".zip"
|
||||
if [[ -z "$fs" ]]; then
|
||||
zip -vr $name $fx
|
||||
else
|
||||
zip -vr $name $fs
|
||||
fi
|
||||
}}
|
||||
|
||||
cmd 7zip %{{
|
||||
printf "Filename (without .7z): "
|
||||
read ans
|
||||
name=$ans".7z"
|
||||
if [[ -z "$fs" ]]; then
|
||||
7za a $name $fx
|
||||
else
|
||||
7za a $name $fs
|
||||
fi
|
||||
}}
|
||||
|
||||
|
||||
cmd tar ${{
|
||||
printf " What Compression Algorythim do you want?\n"
|
||||
printf " t - None (.tar)\n"
|
||||
printf " g - For less bigger files (.tar.gz)\n"
|
||||
printf " b - For many smaller files (.tar.bz2)\n"
|
||||
printf " Any - Exit\n"
|
||||
read ft
|
||||
case "$ft" in
|
||||
g)
|
||||
ft=".tar.gz"
|
||||
options="-czvf"
|
||||
;;
|
||||
b)
|
||||
ft=".tar.bz2"
|
||||
options="-cjvf"
|
||||
;;
|
||||
t)
|
||||
ft=".tar"
|
||||
options="-cvf"
|
||||
;;
|
||||
*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
printf "Filename (without $ft): "
|
||||
read ans
|
||||
name=$ans$ft
|
||||
if [[ -z "$fs" ]]; then
|
||||
tar $options $name $fx
|
||||
else
|
||||
tar $options $name $fs
|
||||
fi
|
||||
|
||||
}}
|
||||
|
||||
|
||||
cmd chmod %{{
|
||||
printf "Enter options (q to exit): "
|
||||
read opt
|
||||
case "$opt" in
|
||||
q)
|
||||
exit;;
|
||||
*)
|
||||
if [[ -z "$fs" ]]; then
|
||||
chmod $opt $fx
|
||||
lf -remote "send $id reload"
|
||||
else
|
||||
chmod $opt $fs
|
||||
lf -remote "send $id reload"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}}
|
||||
|
||||
cmd paste %{{cp-p --lf-paste $id}}
|
||||
|
||||
cmd open ${{
|
||||
case "$f" in
|
||||
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2|*.tar.gz|*.tgz|*.tar.xz|*.txz|*.zip|*.rar|*.iso)
|
||||
mntdir="$f-archivemount"
|
||||
if [ ! -d "$mntdir" ]; then
|
||||
mkdir "$mntdir"
|
||||
archivemount "$f" "$mntdir"
|
||||
echo "$mntdir" >> "/tmp/__lf_archivemount_$id"
|
||||
fi
|
||||
mntdir="$(printf '%s' "$mntdir" | sed 's/\\/\\\\/g;s/"/\\"/g')"
|
||||
lf -remote "send $id cd \"$mntdir\""
|
||||
lf -remote "send $id reload"
|
||||
;;
|
||||
*.mp4|*.mkv|*.webm|*.av1|*.avi)
|
||||
printf "Play in terminal? (y|N)"
|
||||
read opt
|
||||
corr="y"
|
||||
if [ "$opt" = "$corr" ]; then
|
||||
clear
|
||||
#timg --center "$f"
|
||||
mpv --no-config --vo=tct "$f"
|
||||
|
||||
else
|
||||
xdg-open "$fx"
|
||||
fi
|
||||
;;
|
||||
|
||||
*.mp3|*.wav|*.flac|*.ogg)
|
||||
printf "Play in terminal? (y|N)"
|
||||
read opt
|
||||
corr="y"
|
||||
if [ "$opt" = "$corr" ]; then
|
||||
clear
|
||||
mpg123 "$f"
|
||||
|
||||
else
|
||||
xdg-open "$fx"
|
||||
fi
|
||||
;;
|
||||
|
||||
*.appimage|*.AppImage)
|
||||
"$fx"
|
||||
;;
|
||||
*)
|
||||
xdg-open "$fx"
|
||||
;;
|
||||
esac
|
||||
}}
|
||||
|
||||
lfcd () {
|
||||
tmp="$(mktemp)"
|
||||
fid="$(mktemp)"
|
||||
lf -command '$printf $id > '"$fid"'' -last-dir-path="$tmp" "$@"
|
||||
id="$(cat "$fid")"
|
||||
archivemount_dir="/tmp/__lf_archivemount_$id"
|
||||
if [ -f "$archivemount_dir" ]; then
|
||||
cat "$archivemount_dir" | \
|
||||
while read -r line; do
|
||||
sudo umount "$line"
|
||||
rmdir "$line"
|
||||
done
|
||||
rm -f "$archivemount_dir"
|
||||
fi
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(cat "$tmp")"
|
||||
rm -f "$tmp"
|
||||
if [ -d "$dir" ]; then
|
||||
if [ "$dir" != "$(pwd)" ]; then
|
||||
cd "$dir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# convert to mp3 files using lame
|
||||
cmd mp3 %{{
|
||||
set -f
|
||||
outname=$(echo "$f" | cut -f 1 -d '.')
|
||||
lame -V --preset 320 "$f" "${outname}.mp3"
|
||||
}}
|
||||
|
||||
cmd fzf_search ${{
|
||||
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
|
||||
res="$(
|
||||
FZF_DEFAULT_COMMAND="$RG_PREFIX ''" \
|
||||
fzf --bind "change:reload:$RG_PREFIX {q} || true" \
|
||||
--ansi --layout=reverse --header 'Search in files' \
|
||||
| cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g'
|
||||
)"
|
||||
[ -n "$res" ] && lf -remote "send $id select \"$res\""
|
||||
}}
|
||||
|
||||
|
||||
# Trash bindings
|
||||
cmd trash %{{
|
||||
files=$(printf "$fx" | tr '\n' ';')
|
||||
while [ "$files" ]; do
|
||||
file=${files%%;*}
|
||||
|
||||
trash-put "$(basename "$file")"
|
||||
if [ "$files" = "$file" ]; then
|
||||
files=''
|
||||
else
|
||||
files="${files#*;}"
|
||||
fi
|
||||
done
|
||||
}}
|
||||
|
||||
cmd restore_trash ${{trash-restore}}
|
||||
|
||||
cmd clear_trash ${{trash-empty}}
|
||||
|
||||
# Remove Defaults
|
||||
map d
|
||||
map m
|
||||
map e
|
||||
map n
|
||||
|
||||
|
||||
# Binds
|
||||
map "v" $vscodium "$f"
|
||||
map "e" unzip
|
||||
|
||||
map "mp3" mp3
|
||||
map sz fzf_search
|
||||
map "z<enter>" 7zip
|
||||
map "zz" zip
|
||||
map "z7" 7zip
|
||||
map "zt" tar
|
||||
map "w" $$SHELL
|
||||
map "mod" chmod
|
||||
map "nn" $$EDITOR "$f"
|
||||
map "nv" $nvim "$f"
|
||||
map "snv" $echo "sudo nvim" "$f"
|
||||
map "ns" $$sudo $EDITOR "$f"
|
||||
|
||||
map "dd" trash
|
||||
map "DD#" clear_trash
|
||||
map . set hidden!
|
||||
map "dr" restore_trash
|
||||
map p paste
|
||||
map x cut
|
||||
map c copy
|
||||
map C clear
|
||||
map <enter> open
|
||||
map R reload
|
||||
map "md" mkdir
|
||||
map "mf" mkfile
|
||||
map "#" search
|
||||
|
||||
|
||||
# Movement Commands
|
||||
cmd Documents $lf -remote "send $id cd $(xdg-user-dir DOCUMENTS)"
|
||||
cmd Pictures $lf -remote "send $id cd $(xdg-user-dir PICTURES)"
|
||||
cmd Plex $lf -remote "send $id cd $(xdg-user-dir DOCUMENTS)/share/plex"
|
||||
cmd Me $lf -remote "send $id cd $(xdg-user-dir DOCUMENTS)/share/me"
|
||||
cmd Videos $lf -remote "send $id cd $(xdg-user-dir VIDEOS)"
|
||||
cmd Downloads $lf -remote "send $id cd $(xdg-user-dir DOWNLOAD)"
|
||||
|
||||
|
||||
|
||||
# Movement
|
||||
map gD Documents
|
||||
map gd Downloads
|
||||
map gP Pictures
|
||||
map gc cd ~/.config
|
||||
map gp Plex
|
||||
map ge Me
|
||||
map gn cd ~/Nextcloud/Documents/HsH/
|
||||
map gh cd ~
|
||||
map gv Videos
|
||||
map gs cd ~/.local/bin
|
||||
map gt cd ~/.local/share/Trash/files
|
||||
9
scripts/getSourceMute.sh
Executable file
9
scripts/getSourceMute.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
Mute=$(pactl get-source-mute @DEFAULT_SOURCE@ | cut -d " " -f 2)
|
||||
|
||||
if [[ "$Mute" = "yes" ]]; then
|
||||
notify-send -t 1000 "Microphone Muted"
|
||||
else
|
||||
notify-send -t 1000 "Microphone Unmuted"
|
||||
fi
|
||||
10
scripts/hypridle-notify.sh
Executable file
10
scripts/hypridle-notify.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $1 == "idle" ]]; then
|
||||
notify-send -u normal 'Hypridle:' "The Screen will lock in 5 minutes."
|
||||
elif [[ $1 == "normal" ]]; then
|
||||
notify-send -u normal 'Hypridle:' "The Idle-timer has been reset."
|
||||
else
|
||||
echo "Please only use \"idle\" or \"normal\" as params!"
|
||||
fi
|
||||
|
||||
18
scripts/leave.sh
Executable file
18
scripts/leave.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
choice=$(printf '%s\n' Shutdown Lock Reboot Logout Suspend | wofi --show=dmenu)
|
||||
|
||||
|
||||
if [ "$choice" == "Shutdown" ]; then
|
||||
poweroff
|
||||
elif [ "$choice" == "Reboot" ]; then
|
||||
reboot
|
||||
elif [ "$choice" == "Logout" ]; then
|
||||
hyprctl dispatch exit
|
||||
elif [ "$choice" == "Lock" ]; then
|
||||
hyprlock
|
||||
elif [ "$choice" == "Suspend" ]; then
|
||||
hyprlock & sleep 0.5; systemctl suspend
|
||||
elif [ "$choice" == "Hibernate" ]; then
|
||||
hyprlock & sleep 0.5; systemctl hibernate
|
||||
fi
|
||||
12
scripts/screenshot.sh
Executable file
12
scripts/screenshot.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
choice=$(printf '%s\n' Region Window Screen | wofi --show=dmenu)
|
||||
prefix="hyprshot -o $(xdg-user-dir PICTURES)/Screenshots -m"
|
||||
|
||||
if [ "$choice" == "Region" ]; then
|
||||
eval "${prefix} region"
|
||||
elif [ "$choice" == "Window" ]; then
|
||||
eval "${prefix} window"
|
||||
elif [ "$choice" == "Screen" ]; then
|
||||
eval "${prefix} output"
|
||||
fi
|
||||
9
scripts/ueberzugpp-lf-setup
Executable file
9
scripts/ueberzugpp-lf-setup
Executable file
@@ -0,0 +1,9 @@
|
||||
lf () {
|
||||
LF_TEMPDIR="$(mktemp -d -t lf-tempdir-XXXXXX)"
|
||||
LF_TEMPDIR="$LF_TEMPDIR" lf-run -last-dir-path="$LF_TEMPDIR/lastdir" "$@"
|
||||
if [ "$(cat "$LF_TEMPDIR/cdtolastdir" 2>/dev/null)" = "1" ]; then
|
||||
cd "$(cat "$LF_TEMPDIR/lastdir")"
|
||||
fi
|
||||
rm -r "$LF_TEMPDIR"
|
||||
unset LF_TEMPDIR
|
||||
}
|
||||
88
waybar/config
Normal file
88
waybar/config
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"modules-left": ["custom/launcher","cpu","temperature","memory","custom/media","tray"],
|
||||
"modules-center": ["hyprland/workspaces"],
|
||||
"modules-right": ["custom/updates","network","pulseaudio","clock","custom/power"],
|
||||
"margin-top": 5,
|
||||
"margin-left": 5,
|
||||
"margin-right": 5,
|
||||
|
||||
"pulseaudio": {
|
||||
"tooltip": false,
|
||||
"scroll-step": 5,
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "☓ Muted",
|
||||
"on-click":"pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||
"format-icons": {
|
||||
"default": ["", "", ""]
|
||||
}
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"num-tags": 9
|
||||
},
|
||||
"network": {
|
||||
"tooltip": false,
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " Connected ",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
},
|
||||
"temperature": {
|
||||
// "thermal-zone": 2,
|
||||
"critical-threshold": 85,
|
||||
// "format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "{icon} {temperatureC}°C",
|
||||
"format-icons": [ ""]
|
||||
},
|
||||
"tray":{
|
||||
"icon-size":18,
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
"timezone": "Europe/Berlin",
|
||||
"format": " {:%H:%M %d.%m.%Y}",
|
||||
},
|
||||
"cpu": {
|
||||
"interval": 15,
|
||||
"format": " {usage}%",
|
||||
"max-length": 10
|
||||
},
|
||||
"memory": {
|
||||
"interval": 30,
|
||||
"format": " {}%",
|
||||
"max-length": 10
|
||||
},
|
||||
"custom/media": {
|
||||
"interval": 30,
|
||||
"format": "{icon} {}",
|
||||
"return-type": "json",
|
||||
"max-length": 20,
|
||||
"format-icons": {
|
||||
"spotify": " ",
|
||||
"default": " "
|
||||
},
|
||||
"escape": true,
|
||||
"exec": "~/.dots/waybar/custom_modules/mediaplayer.py 2>/dev/null",
|
||||
"on-click": "playerctl play-pause"
|
||||
},
|
||||
"custom/launcher":{
|
||||
"format": "",
|
||||
"on-click": "wofi --show drun -Ic ~/.dots/wofi/config",
|
||||
"on-click-right": "killall rofi"
|
||||
},
|
||||
"custom/power":{
|
||||
"format": " ",
|
||||
"on-click": "bash ~/.dots/scripts/leave.sh",
|
||||
},
|
||||
"custom/updates":{
|
||||
"format": "{} Update(s)",
|
||||
"exec": "checkupdates 2>/dev/null | wc -l",
|
||||
"exec-if": "[[ $(checkupdates 2>/dev/null | wc -l) != 0 ]]",
|
||||
"interval": 30,
|
||||
"on-click": "alacritty -e yay -Syu && notify-send 'The system has been updated' "
|
||||
},
|
||||
"custom/wallpaper":{
|
||||
"format":" ",
|
||||
"on-click": ""
|
||||
}
|
||||
}
|
||||
182
waybar/custom_modules/mediaplayer.py
Executable file
182
waybar/custom_modules/mediaplayer.py
Executable file
@@ -0,0 +1,182 @@
|
||||
#!/usr/bin/env python3
|
||||
import gi
|
||||
gi.require_version("Playerctl", "2.0")
|
||||
from gi.repository import Playerctl, GLib
|
||||
from gi.repository.Playerctl import Player
|
||||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
import signal
|
||||
import gi
|
||||
import json
|
||||
import os
|
||||
from typing import List
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
logger.info("Received signal to stop, exiting")
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.flush()
|
||||
# loop.quit()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
class PlayerManager:
|
||||
def __init__(self, selected_player=None):
|
||||
self.manager = Playerctl.PlayerManager()
|
||||
self.loop = GLib.MainLoop()
|
||||
self.manager.connect(
|
||||
"name-appeared", lambda *args: self.on_player_appeared(*args))
|
||||
self.manager.connect(
|
||||
"player-vanished", lambda *args: self.on_player_vanished(*args))
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||
self.selected_player = selected_player
|
||||
|
||||
self.init_players()
|
||||
|
||||
def init_players(self):
|
||||
for player in self.manager.props.player_names:
|
||||
if self.selected_player is not None and self.selected_player != player.name:
|
||||
logger.debug(f"{player.name} is not the filtered player, skipping it")
|
||||
continue
|
||||
self.init_player(player)
|
||||
|
||||
def run(self):
|
||||
logger.info("Starting main loop")
|
||||
self.loop.run()
|
||||
|
||||
def init_player(self, player):
|
||||
logger.info(f"Initialize new player: {player.name}")
|
||||
player = Playerctl.Player.new_from_name(player)
|
||||
player.connect("playback-status",
|
||||
self.on_playback_status_changed, None)
|
||||
player.connect("metadata", self.on_metadata_changed, None)
|
||||
self.manager.manage_player(player)
|
||||
self.on_metadata_changed(player, player.props.metadata)
|
||||
|
||||
def get_players(self) -> List[Player]:
|
||||
return self.manager.props.players
|
||||
|
||||
def write_output(self, text, player):
|
||||
logger.debug(f"Writing output: {text}")
|
||||
|
||||
output = {"text": text,
|
||||
"class": "custom-" + player.props.player_name,
|
||||
"alt": player.props.player_name}
|
||||
|
||||
sys.stdout.write(json.dumps(output) + "\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
def clear_output(self):
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
def on_playback_status_changed(self, player, status, _=None):
|
||||
logger.debug(f"Playback status changed for player {player.props.player_name}: {status}")
|
||||
self.on_metadata_changed(player, player.props.metadata)
|
||||
|
||||
def get_first_playing_player(self):
|
||||
players = self.get_players()
|
||||
logger.debug(f"Getting first playing player from {len(players)} players")
|
||||
if len(players) > 0:
|
||||
# if any are playing, show the first one that is playing
|
||||
# reverse order, so that the most recently added ones are preferred
|
||||
for player in players[::-1]:
|
||||
if player.props.status == "Playing":
|
||||
return player
|
||||
# if none are playing, show the first one
|
||||
return players[0]
|
||||
else:
|
||||
logger.debug("No players found")
|
||||
return None
|
||||
|
||||
def show_most_important_player(self):
|
||||
logger.debug("Showing most important player")
|
||||
# show the currently playing player
|
||||
# or else show the first paused player
|
||||
# or else show nothing
|
||||
current_player = self.get_first_playing_player()
|
||||
if current_player is not None:
|
||||
self.on_metadata_changed(current_player, current_player.props.metadata)
|
||||
else:
|
||||
self.clear_output()
|
||||
|
||||
def on_metadata_changed(self, player, metadata, _=None):
|
||||
logger.debug(f"Metadata changed for player {player.props.player_name}")
|
||||
player_name = player.props.player_name
|
||||
artist = player.get_artist()
|
||||
title = player.get_title()
|
||||
|
||||
track_info = ""
|
||||
if player_name == "spotify" and "mpris:trackid" in metadata.keys() and ":ad:" in player.props.metadata["mpris:trackid"]:
|
||||
track_info = "Advertisement"
|
||||
elif artist is not None and title is not None:
|
||||
track_info = f"{artist} - {title}"
|
||||
else:
|
||||
track_info = title
|
||||
|
||||
if track_info:
|
||||
if player.props.status == "Playing":
|
||||
track_info = " " + track_info
|
||||
else:
|
||||
track_info = " " + track_info
|
||||
# only print output if no other player is playing
|
||||
current_playing = self.get_first_playing_player()
|
||||
if current_playing is None or current_playing.props.player_name == player.props.player_name:
|
||||
self.write_output(track_info, player)
|
||||
else:
|
||||
logger.debug(f"Other player {current_playing.props.player_name} is playing, skipping")
|
||||
|
||||
def on_player_appeared(self, _, player):
|
||||
logger.info(f"Player has appeared: {player.name}")
|
||||
if player is not None and (self.selected_player is None or player.name == self.selected_player):
|
||||
self.init_player(player)
|
||||
else:
|
||||
logger.debug(
|
||||
"New player appeared, but it's not the selected player, skipping")
|
||||
|
||||
def on_player_vanished(self, _, player):
|
||||
logger.info(f"Player {player.props.player_name} has vanished")
|
||||
self.show_most_important_player()
|
||||
|
||||
def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# Increase verbosity with every occurrence of -v
|
||||
parser.add_argument("-v", "--verbose", action="count", default=0)
|
||||
|
||||
# Define for which player we"re listening
|
||||
parser.add_argument("--player")
|
||||
|
||||
parser.add_argument("--enable-logging", action="store_true")
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
arguments = parse_arguments()
|
||||
|
||||
# Initialize logging
|
||||
if arguments.enable_logging:
|
||||
logfile = os.path.join(os.path.dirname(
|
||||
os.path.realpath(__file__)), "media-player.log")
|
||||
logging.basicConfig(filename=logfile, level=logging.DEBUG,
|
||||
format="%(asctime)s %(name)s %(levelname)s:%(lineno)d %(message)s")
|
||||
|
||||
# Logging is set by default to WARN and higher.
|
||||
# With every occurrence of -v it's lowered by one
|
||||
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
|
||||
|
||||
logger.info("Creating player manager")
|
||||
if arguments.player:
|
||||
logger.info(f"Filtering for player: {arguments.player}")
|
||||
player = PlayerManager(arguments.player)
|
||||
player.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
253
waybar/style.css
Normal file
253
waybar/style.css
Normal file
@@ -0,0 +1,253 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 10;
|
||||
font-family: "JetbrainsMono Nerd Font";
|
||||
font-size: 15px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
margin-top : 100px;
|
||||
background: rgba(58,62,60,0.75);
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: transparent;
|
||||
opacity: 1;
|
||||
background: transparent;
|
||||
}
|
||||
#workspaces
|
||||
{
|
||||
margin-top: 5px;
|
||||
margin-left: 15px;
|
||||
font-size: 4px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
background: #2c2d2c;
|
||||
opacity: 1;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
color: #B5E8E0;
|
||||
background: transparent;
|
||||
font-size: 16px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
#workspaces button.occupied {
|
||||
transition: none;
|
||||
color: #F28FAD;
|
||||
background: transparent;
|
||||
font-size: 4px;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #ABE9B3;
|
||||
border-top: 2px solid #ABE9B3;
|
||||
border-bottom: 2px solid #ABE9B3;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: #FAE3B0;
|
||||
border-color: #E8A2AF;
|
||||
color: #E8A2AF;
|
||||
}
|
||||
|
||||
#workspaces button.focused:hover {
|
||||
color: #E8A2AF;
|
||||
}
|
||||
|
||||
#network {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #bd93f9;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #1A1826;
|
||||
background: #FAE3B0;
|
||||
}
|
||||
|
||||
#battery {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #B5E8E0;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: #161320;
|
||||
background-color: #B5E8E0;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #B5E8E0;
|
||||
color: #161320;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #BF616A;
|
||||
color: #B5E8E0;
|
||||
}
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #F8BD96;
|
||||
}
|
||||
#clock {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #ABE9B3;
|
||||
/*background: #1A1826;*/
|
||||
}
|
||||
|
||||
#memory {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: 5px;
|
||||
padding-right: 10px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #DDB6F2;
|
||||
}
|
||||
#cpu {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: 5px;
|
||||
padding-right: 10px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #96CDFB;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: 5px;
|
||||
padding-right: 10px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #B5E8E0;
|
||||
background: #161320;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
font-size: 24px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #89DCEB;
|
||||
background: #201f21;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
font-size: 20px;
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #F28FAD;
|
||||
}
|
||||
|
||||
#custom-wallpaper {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #C9CBFF;
|
||||
}
|
||||
|
||||
#custom-updates {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #E8A2AF;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
margin-top: 5px;
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #161320;
|
||||
background: #F2CDCD;
|
||||
}
|
||||
4
wofi/config
Normal file
4
wofi/config
Normal file
@@ -0,0 +1,4 @@
|
||||
style=~/.dots/wofi/style.css
|
||||
image_size=28
|
||||
key_expand=Right
|
||||
prompt=Search...
|
||||
52
wofi/style.css
Normal file
52
wofi/style.css
Normal file
@@ -0,0 +1,52 @@
|
||||
window {
|
||||
margin: 5px;
|
||||
background-color: #191919;
|
||||
border: 2px solid #3DCAF8;
|
||||
border-radius: 7px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
#input {
|
||||
margin: 5px;
|
||||
border: 2px solid white;
|
||||
background-color: #191919;
|
||||
color: white;
|
||||
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
margin: 5px;
|
||||
background-color: #191919;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 5px;
|
||||
background-color: #191919;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: 5px;
|
||||
background-color: #191919;
|
||||
}
|
||||
|
||||
#text {
|
||||
margin: 5px;
|
||||
border-radius: 2px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #3DCAF8;
|
||||
border: 2px solid white;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: #201a22;
|
||||
}
|
||||
|
||||
#img{
|
||||
margin: 5px;
|
||||
}
|
||||
Reference in New Issue
Block a user