Juni Kim
3 years ago
commit
1d924ef973
31 changed files with 5210 additions and 0 deletions
-
2.gitignore
-
163configuration.nix
-
31dotfiles/bspwm/bspwmrc
-
7dotfiles/bspwm/kill.sh
-
224dotfiles/bspwm/polybar/config
-
22dotfiles/bspwm/polybar/launch.sh
-
165dotfiles/bspwm/sxhkdrc
-
3dotfiles/bspwm/xinitrc
-
3dotfiles/config.nix
-
162dotfiles/eww/eww.scss
-
165dotfiles/eww/eww.yuck
-
6dotfiles/eww/scripts/date.sh
-
28dotfiles/eww/scripts/music.sh
-
8dotfiles/eww/scripts/songperc.sh
-
201dotfiles/init.vim
-
35dotfiles/kitty.conf
-
428dotfiles/mpd.conf
-
621dotfiles/ncmpcpp.conf
-
8dotfiles/picom.conf
-
62dotfiles/ranger/commands.py
-
1993dotfiles/ranger/commands_full.py
-
3dotfiles/ranger/rc.conf
-
285dotfiles/ranger/rifle.conf
-
350dotfiles/ranger/scope.sh
-
90dotfiles/rofi/config.rasi
-
BINdotfiles/rofi/geo.png
-
2dotfiles/tmux.conf
-
2dotfiles/xinitrc
-
18dotfiles/zshrc
-
25hardware-configuration.nix
-
98home.nix
@ -0,0 +1,2 @@ |
|||
/config.nix |
|||
/hardware-configuration.nix |
@ -0,0 +1,163 @@ |
|||
# Edit this configuration file to define what should be installed on |
|||
# your system. Help is available in the configuration.nix(5) man page |
|||
# and in the NixOS manual (accessible by running ‘nixos-help’). |
|||
|
|||
{ config, pkgs, ... }: |
|||
|
|||
let |
|||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; |
|||
in |
|||
{ |
|||
imports = |
|||
[ # Include the results of the hardware scan. |
|||
./hardware-configuration.nix |
|||
(import "${home-manager}/nixos") |
|||
]; |
|||
|
|||
services.xserver.displayManager.startx.enable = true; |
|||
|
|||
# Use the GRUB 2 boot loader. |
|||
boot.loader.grub.enable = true; |
|||
boot.loader.grub.version = 2; |
|||
boot.loader.grub.efiSupport = true; |
|||
# boot.loader.grub.efiInstallAsRemovable = true; |
|||
boot.loader.efi.efiSysMountPoint = "/boot/efi"; |
|||
# Define on which hard drive you want to install Grub. |
|||
boot.loader.grub.device = "nodev"; # or "nodev" for efi only |
|||
boot.loader.grub.useOSProber = true; |
|||
|
|||
networking.hostName = "nixos-lemp"; # Define your hostname. |
|||
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. |
|||
networking.networkmanager.enable = true; |
|||
|
|||
# Set your time zone. |
|||
time.timeZone = "US/Eastern"; |
|||
|
|||
# The global useDHCP flag is deprecated, therefore explicitly set to false here. |
|||
# Per-interface useDHCP will be mandatory in the future, so this generated config |
|||
# replicates the default behaviour. |
|||
networking.useDHCP = true; |
|||
#networking.interfaces.enp1s0.useDHCP = true; |
|||
|
|||
# Configure network proxy if necessary |
|||
# networking.proxy.default = "http://user:password@proxy:port/"; |
|||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; |
|||
|
|||
# Select internationalisation properties. |
|||
i18n.defaultLocale = "en_US.UTF-8"; |
|||
console = { |
|||
font = "Lat2-Terminus16"; |
|||
keyMap = "us"; |
|||
}; |
|||
|
|||
# Enable the X11 windowing system. |
|||
services.xserver.enable = true; |
|||
|
|||
# use nix flakes |
|||
nix = { |
|||
package = pkgs.nixFlakes; # or versioned attributes like nix_2_7 |
|||
extraOptions = '' |
|||
experimental-features = nix-command flakes |
|||
''; |
|||
}; |
|||
|
|||
# Configure keymap in X11 |
|||
services.xserver.layout = "us"; |
|||
services.xserver.xkbOptions = "eurosign:e"; |
|||
|
|||
# Enable CUPS to print documents. |
|||
services.printing.enable = true; |
|||
|
|||
# Enable sound. |
|||
sound.enable = true; |
|||
hardware.bluetooth.enable = true; |
|||
services.blueman.enable = true; |
|||
services.pipewire.enable = true; |
|||
services.pipewire.alsa.enable = true; |
|||
services.pipewire.pulse.enable = true; |
|||
|
|||
# Enable touchpad support (enabled default in most desktopManager). |
|||
services.xserver.libinput.enable = true; |
|||
|
|||
# Define a user account. Don't forget to set a password with ‘passwd’. |
|||
users.users.junikim = { |
|||
isNormalUser = true; |
|||
extraGroups = [ "wheel" "video" "audio" "input" ]; # Enable ‘sudo’ for the user. |
|||
shell = pkgs.zsh; |
|||
}; |
|||
programs.zsh.enable = true; |
|||
programs.zsh.ohMyZsh.enable = true; |
|||
programs.zsh.autosuggestions.enable = true; |
|||
programs.zsh.shellAliases = { |
|||
"gac" = "git add . && git commit"; |
|||
"v" = "nvim"; |
|||
"c" = "clear"; |
|||
"s" = "ls"; |
|||
"e" = "exit"; |
|||
"sy" = "systemctl"; |
|||
"cp" = "cp -r"; |
|||
}; |
|||
programs.zsh.ohMyZsh.plugins = [ "git" "command-not-found" ]; |
|||
programs.zsh.syntaxHighlighting.enable = true; |
|||
|
|||
nixpkgs.config.allowUnfree = true; |
|||
environment.homeBinInPath = true; |
|||
environment.variables = { |
|||
"EDITOR" = "nvim"; |
|||
}; |
|||
|
|||
services.gnome.gnome-keyring.enable = true; |
|||
|
|||
# List packages installed in system profile. To search, run: |
|||
# $ nix search wget |
|||
fonts.fonts = with pkgs; [ |
|||
jetbrains-mono |
|||
dejavu_fonts |
|||
noto-fonts-emoji |
|||
iosevka |
|||
nerdfonts |
|||
]; |
|||
environment.systemPackages = with pkgs; [ |
|||
vim neovim neofetch pfetch tmux |
|||
fff |
|||
nodejs shellcheck |
|||
bash dash git |
|||
wget brave scrot |
|||
nfs-utils gcc gnumake |
|||
mpd htop |
|||
]; |
|||
|
|||
services.mpd = { |
|||
enable = true; |
|||
user = "junikim"; |
|||
}; |
|||
|
|||
# Some programs need SUID wrappers, can be configured further or are |
|||
# started in user sessions. |
|||
# programs.mtr.enable = true; |
|||
programs.gnupg.agent = { |
|||
enable = true; |
|||
#enableSSHSupport = true; |
|||
}; |
|||
|
|||
# List services that you want to enable: |
|||
|
|||
# Enable the OpenSSH daemon. |
|||
# services.openssh.enable = true; |
|||
|
|||
# Open ports in the firewall. |
|||
# networking.firewall.allowedTCPPorts = [ ... ]; |
|||
# networking.firewall.allowedUDPPorts = [ ... ]; |
|||
# Or disable the firewall altogether. |
|||
# networking.firewall.enable = false; |
|||
|
|||
# This value determines the NixOS release from which the default |
|||
# settings for stateful data, like file locations and database versions |
|||
# on your system were taken. It‘s perfectly fine and recommended to leave |
|||
# this value at the release version of the first install of this system. |
|||
# Before changing this value read the documentation for this option |
|||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). |
|||
#system.stateVersion = "21.11"; # Did you read the comment? |
|||
system.stateVersion = "unstable"; # Did you read the comment? |
|||
} |
|||
|
@ -0,0 +1,31 @@ |
|||
#! /bin/sh |
|||
|
|||
pkill picom |
|||
picom & |
|||
nitrogen --restore & |
|||
~/.config/polybar/launch.sh |
|||
|
|||
|
|||
pgrep -x sxhkd > /dev/null || sxhkd & |
|||
|
|||
#bspc monitor -d I II III IV V VI VII VIII IX X |
|||
bspc monitor -d 1 2 3 4 5 6 |
|||
|
|||
bspc config border_width 1 |
|||
bspc config window_gap 20 |
|||
|
|||
bspc config top_padding 25 |
|||
bspc config split_ratio 0.50 |
|||
bspc config borderless_monocle true |
|||
bspc config gapless_monocle true |
|||
|
|||
bspc rule -a Gimp desktop='^8' state=floating follow=on |
|||
bspc rule -a Spotify desktop='^6' |
|||
|
|||
eww daemon |
|||
eww open right |
|||
|
|||
# only add if nothing is there |
|||
#if test "$(mpc playlist | wc -l)" -eq 0 ; then |
|||
# mpc ls | mpc add |
|||
#fi |
@ -0,0 +1,7 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
QUIT=$(printf "No\nYes" | dmenu -i -p "Are you sure u want to kill bspwm?") |
|||
|
|||
if test "$QUIT" == "Yes" ; then |
|||
pkill bspwm |
|||
fi |
@ -0,0 +1,224 @@ |
|||
;========================================================== |
|||
; |
|||
; |
|||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ |
|||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ |
|||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ |
|||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ |
|||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ |
|||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ |
|||
; |
|||
; |
|||
; To learn more about how to configure Polybar |
|||
; go to https://github.com/polybar/polybar |
|||
; |
|||
; The README contains a lot of information |
|||
; |
|||
;========================================================== |
|||
|
|||
[colors] |
|||
background = #222 |
|||
background-alt = #444 |
|||
;foreground = ${xrdb:color7:#222} |
|||
foreground = #dfdfdf |
|||
foreground-alt = #555 |
|||
primary = #cec0af |
|||
secondary = #242e35 |
|||
alert = #bd2c40 |
|||
black = #000 |
|||
white = #fff |
|||
grey = #aaa |
|||
darkgrey = #555 |
|||
red = #f00 |
|||
green = #0f0 |
|||
blue = #2d02d0 |
|||
yellow = #d2b55b |
|||
|
|||
;;; ========================================== |
|||
;;; MAIN BAR |
|||
|
|||
[bar/main] |
|||
modules-center = date |
|||
font-0 = Jetbrains Mono:style=Regular |
|||
height = 30 |
|||
width = 320 |
|||
offset-x = 15 |
|||
|
|||
offset-y = 15 |
|||
background = ${colors.primary} |
|||
radius=5 |
|||
override-redirect=true |
|||
|
|||
[module/date] |
|||
type = internal/date |
|||
date = "%h-%d-20%y %r" |
|||
label-foreground = #000000 |
|||
|
|||
;;; ========================================== |
|||
;;; PULSEAUDIO BAR |
|||
|
|||
[bar/pulse] |
|||
modules-center = pulseaudio |
|||
height = 30 |
|||
width = 200 |
|||
offset-y = 15 |
|||
#offset-x = 1300 |
|||
offset-x = 350 |
|||
radius=5 |
|||
override-redirect=true |
|||
background = ${colors.secondary} |
|||
foreground = #fff |
|||
font-0 = Jetbrains Mono:style=Regular |
|||
font-1 = FontAwesome:style=Regular |
|||
font-2 = "Iosevka:pixelsize=12;0" |
|||
font-3 = RobotoMono Nerd Font:pixelsize=12;1 |
|||
|
|||
[module/pulseaudio] |
|||
type = internal/pulseaudio |
|||
format-volume-prefix = "VOL " |
|||
format-volume-prefix-foreground = ${colors.primary} |
|||
format-volume = <label-volume> |
|||
label-volume = %percentage%% |
|||
label-muted = muted |
|||
label-muted-foreground = ${colors.disabled} |
|||
|
|||
;;; =============================================== |
|||
;;; BACKLIGHT BAR |
|||
|
|||
[bar/backlight] |
|||
modules-center = backlight |
|||
height = 30 |
|||
width = 150 |
|||
offset-x = 565 |
|||
offset-y = 15 |
|||
radius=5 |
|||
override-redirect=true |
|||
background = ${colors.secondary} |
|||
font-0 = Jetbrains Mono:style=Regular |
|||
|
|||
[module/backlight] |
|||
|
|||
type = internal/backlight |
|||
card = intel_backlight |
|||
format = BRI <label> |
|||
label = "%percentage%%" |
|||
|
|||
;;; =========================================== |
|||
;;; BSPWM BAR |
|||
|
|||
[bar/bspwm] |
|||
modules-center = bspwm |
|||
height = 30 |
|||
width = 350 |
|||
offset-y = 15 |
|||
offset-x = 730 |
|||
radius=5 |
|||
background = ${colors.secondary} |
|||
font-0 = Jetbrains Mono:style=Regular |
|||
font-1 = "Iosevka:pixelsize=12;0" |
|||
|
|||
[module/bspwm] |
|||
type=internal/bspwm |
|||
#label-focused = %index% |
|||
label-focused = ● |
|||
#label-focused-background = ${colors.blue} |
|||
label-focused-underline= #ffb52a |
|||
label-focused-padding = 2 |
|||
#label-occupied = %index% |
|||
label-occupied = ○ |
|||
label-occupied-padding = 2 |
|||
#label-urgent = %index%! |
|||
label-urgent = ○ |
|||
label-urgent-background = ${colors.alert} |
|||
label-urgent-padding = 2 |
|||
#label-empty = %index% |
|||
label-empty = ○ |
|||
label-empty-foreground = ${colors.foreground-alt} |
|||
label-empty-padding = 2 |
|||
|
|||
;;; =================================================== |
|||
;;; BAT BAR |
|||
|
|||
[bar/battery] |
|||
modules-center = battery |
|||
height = 30 |
|||
width = 150 |
|||
offset-y = 15 |
|||
#offset-x = 600 |
|||
offset-x = 1095 |
|||
radius=5 |
|||
override-redirect=true |
|||
background = ${colors.secondary} |
|||
font-0 = Jetbrains Mono:style=Regular |
|||
|
|||
[module/battery] |
|||
type = internal/battery |
|||
full-at = 100 |
|||
battery = BAT0 |
|||
adapter = ADP1 |
|||
poll-interval = 5 |
|||
|
|||
time-format = %H:%M |
|||
format-charging = CHR <label-charging> |
|||
format-discharging = DIS <label-discharging> |
|||
|
|||
label-charging = %percentage%% |
|||
label-discharging = %percentage%% |
|||
label-full = 100% |
|||
|
|||
;;; =============================================== |
|||
;;; WLAN BAR |
|||
|
|||
[bar/wlan] |
|||
;background = #1a0936 |
|||
modules-center = wlan |
|||
height = 30 |
|||
width = 320 |
|||
offset-y = 15 |
|||
offset-x = 1260 |
|||
radius=5 |
|||
override-redirect=true |
|||
background = ${colors.secondary} |
|||
font-0 = Jetbrains Mono:style=Regular |
|||
font-1 = NotoColorEmoji:scale=13 |
|||
|
|||
[module/wlan] |
|||
type = internal/network |
|||
interface = wlp0s20f3 |
|||
format-disconnected = <label-disconnected> |
|||
format-connected = <label-connected> <ramp-signal> |
|||
label-connected = "%essid%" |
|||
label-disconnected = "UNC" |
|||
ramp-signal-0 = 😱 |
|||
ramp-signal-1 = 😠 |
|||
ramp-signal-2 = 😒 |
|||
ramp-signal-3 = 😊 |
|||
ramp-signal-4 = 😃 |
|||
ramp-signal-5 = 😈 |
|||
|
|||
;;; =============================================== |
|||
;; OTHER Modules |
|||
|
|||
[module/xwindow] |
|||
type = internal/xwindow |
|||
label = %title:0:60:...% |
|||
|
|||
|
|||
[network-base] |
|||
type = internal/network |
|||
interval = 5 |
|||
format-connected = <label-connected> |
|||
format-disconnected = <label-disconnected> |
|||
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected |
|||
|
|||
|
|||
[module/eth] |
|||
inherit = network-base |
|||
interface-type = wired |
|||
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% |
|||
|
|||
[settings] |
|||
screenchange-reload = true |
|||
pseudo-transparency = true |
|||
|
|||
; vim:ft=dosini |
@ -0,0 +1,22 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
# Terminate already running bar instances |
|||
pkill polybar |
|||
|
|||
# Wait until the processes have been shut down |
|||
while pgrep -u "$(id -u)" -x polybar >/dev/null; do sleep 1; done |
|||
|
|||
# Launch Polybar, using default config location ~/.config/polybar/config |
|||
|
|||
newver() { |
|||
polybar main & sleep 0.5 |
|||
polybar pulse & |
|||
polybar backlight & |
|||
polybar bspwm & |
|||
polybar battery & |
|||
polybar wlan & |
|||
} |
|||
|
|||
newver |
|||
|
|||
echo "Polybar launched..." |
@ -0,0 +1,165 @@ |
|||
# |
|||
# wm independent hotkeys |
|||
# |
|||
|
|||
# terminal emulator |
|||
super + Return |
|||
kitty |
|||
# browser |
|||
super + shift + w |
|||
brave |
|||
|
|||
# program launcher |
|||
super + {p,space} |
|||
rofi -show drun |
|||
#dmenu_run -fn "Fira Code:size=14" |
|||
|
|||
# make sxhkd reload its configuration files: |
|||
super + Escape |
|||
pkill -USR1 -x sxhkd |
|||
|
|||
# |
|||
# bspwm hotkeys |
|||
# |
|||
|
|||
# quit/restart bspwm |
|||
super + shift + r |
|||
bspc wm -r |
|||
|
|||
super + shift + p |
|||
~/.config/polybar/launch.bspwm.sh |
|||
|
|||
super + shift + e |
|||
~/.config/bspwm/kill.sh |
|||
|
|||
# close and kill |
|||
|
|||
super + shift + q |
|||
bspc node -c |
|||
|
|||
# alternate between the tiled and monocle layout |
|||
super + m |
|||
bspc desktop -l next |
|||
|
|||
# send the newest marked node to the newest preselected node |
|||
super + y |
|||
bspc node newest.marked.local -n newest.!automatic.local |
|||
|
|||
# swap the current node and the biggest window |
|||
super + g |
|||
bspc node -s biggest.window |
|||
|
|||
# |
|||
# state/flags |
|||
# |
|||
|
|||
# set the window state |
|||
super + {t,shift + t,s,f} |
|||
bspc node -t {tiled,pseudo_tiled,floating,fullscreen} |
|||
|
|||
# set the node flags |
|||
super + ctrl + {m,x,y,z} |
|||
bspc node -g {marked,locked,sticky,private} |
|||
|
|||
# |
|||
# focus/swap |
|||
# |
|||
|
|||
# focus the node in the given direction |
|||
super + {_,shift + }{h,j,k,l} |
|||
bspc node -{f,s} {west,south,north,east} |
|||
|
|||
# focus the node for the given path jump |
|||
#super + {p,b,comma,period} |
|||
# bspc node -f @{parent,brother,first,second} |
|||
|
|||
# focus the next/previous window in the current desktop |
|||
super + {_,shift + }c |
|||
bspc node -f {next,prev}.local.!hidden.window |
|||
|
|||
# focus the next/previous desktop in the current monitor |
|||
super + bracket{left,right} |
|||
bspc desktop -f {prev,next}.local |
|||
|
|||
# focus the last node/desktop |
|||
super + {grave,Tab} |
|||
bspc {node,desktop} -f last |
|||
|
|||
# focus the older or newer node in the focus history |
|||
super + {o,i} |
|||
bspc wm -h off; \ |
|||
bspc node {older,newer} -f; \ |
|||
bspc wm -h on |
|||
|
|||
# focus or send to the given desktop |
|||
super + {_,shift + }{1-9,0} |
|||
bspc {desktop -f,node -d} '^{1-9,10}' |
|||
|
|||
# |
|||
# preselect |
|||
# |
|||
|
|||
# preselect the direction |
|||
super + ctrl + {h,j,k,l} |
|||
bspc node -p {west,south,north,east} |
|||
|
|||
# preselect the ratio |
|||
super + ctrl + {1-9} |
|||
bspc node -o 0.{1-9} |
|||
|
|||
# cancel the preselection for the focused node |
|||
super + ctrl + space |
|||
bspc node -p cancel |
|||
|
|||
# cancel the preselection for the focused desktop |
|||
super + ctrl + shift + space |
|||
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel |
|||
|
|||
# |
|||
# move/resize |
|||
# |
|||
|
|||
# expand a window by moving one of its side outward |
|||
super + alt + {h,j,k,l} |
|||
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} |
|||
|
|||
# contract a window by moving one of its side inward |
|||
super + alt + shift + {h,j,k,l} |
|||
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} |
|||
|
|||
# move a floating window |
|||
super + {Left,Down,Up,Right} |
|||
bspc node -v {-20 0,0 20,0 -20,20 0} |
|||
|
|||
#fn + {F8,F9} |
|||
# brightnessctl set {10%-,10%+} |
|||
|
|||
|
|||
# old alt keybindings |
|||
# |
|||
#alt + {Left,Right} |
|||
# brightnessctl set {10%-,10%+} |
|||
|
|||
#alt + {Up,Down} |
|||
# /usr/bin/pactl set-sink-volume 0 {+5%,-5%} |
|||
|
|||
# audio stuff |
|||
XF86AudioRaiseVolume |
|||
test "$(pamixer --get-volume)" -lt 100 && /usr/bin/pactl set-sink-volume 0 +5% |
|||
|
|||
XF86AudioLowerVolume |
|||
/usr/bin/pactl set-sink-volume 0 -5% |
|||
|
|||
XF86AudioMute |
|||
/usr/bin/pactl set-sink-mute 0 toggle |
|||
|
|||
# brightness stuff |
|||
{XF86MonBrightnessUp,XF86MonBrightnessDown} |
|||
xbacklight {+10,-10} |
|||
|
|||
# screenshot capability |
|||
super + shift + s |
|||
mkdir -p ~/screenshots && scrot ~/screenshots/%Y-%m-%d-%T-screenshot.png |
|||
|
|||
Print |
|||
mkdir -p ~/screenshots && scrot ~/screenshots/%Y-%m-%d-%T-screenshot.png |
@ -0,0 +1,3 @@ |
|||
#!/bin/bash |
|||
|
|||
exec bspwm |
@ -0,0 +1,3 @@ |
|||
{ |
|||
allowUnfree = true; |
|||
} |
@ -0,0 +1,162 @@ |
|||
$beige:#cec0af; |
|||
$darkblue:#242e35; |
|||
$lightblue:#2e02d0; |
|||
$pink:#f0cad5; |
|||
|
|||
$gray: #3B4442; |
|||
$white: #1B2020; |
|||
$gray: #2A3331; |
|||
$gray: $darkblue; |
|||
$green: #7CA198; |
|||
$yellow: #DDB278; |
|||
$blue: #6080B0; |
|||
$purple: #8E6F98; |
|||
$cyan: #6ca8cf; |
|||
|
|||
|
|||
|
|||
$bg : #000000; |
|||
$fg : #ffffff; |
|||
$border : #cec0af; |
|||
|
|||
* { |
|||
all: unset; |
|||
font-family: JetBrains Mono, Sans-serif; |
|||
} |
|||
|
|||
.background { |
|||
//background-color: #{$darkblue}; |
|||
background-color: transparent; |
|||
color: #{beige}; |
|||
} |
|||
|
|||
.container { |
|||
//background-color: #{$darkblue}; |
|||
background-color: black; |
|||
color: #{$fg}; |
|||
//border: 5px solid #{$border}; |
|||
border-radius: 1rem; |
|||
margin: 1rem; |
|||
padding-top: 1rem; |
|||
padding-bottom: 1rem; |
|||
} |
|||
|
|||
.musiccontainer { |
|||
font-size: 20px; |
|||
padding: 10px; |
|||
} |
|||
|
|||
.header { |
|||
font-size: 30px; |
|||
} |
|||
|
|||
.body { |
|||
font-size: 20px; |
|||
} |
|||
|
|||
.progress { |
|||
margin: 1rem; |
|||
border-radius:1rem; |
|||
min-height: 10px; |
|||
} |
|||
|
|||
|
|||
.bluescale {color: #{$blue};} |
|||
.greenscale {color: #{$green};} |
|||
.yellowscale {color: #{$yellow};} |
|||
|
|||
.progress scale trough highlight { border-radius: 10px; } |
|||
.bluescale scale trough highlight {background-color: #{$blue};} |
|||
.greenscale scale trough highlight {background-color: #{$green};} |
|||
.yellowscale scale trough highlight {background-color: #{$yellow};} |
|||
.purplescale scale trough highlight {background-color: #{$purple};} |
|||
|
|||
|
|||
.progress scale trough, |
|||
{ |
|||
background-color: $gray; |
|||
border-radius: 10px; |
|||
min-height: 20px; |
|||
min-width: 135px; |
|||
margin-left: 20px; |
|||
} |
|||
|
|||
// music bar |
|||
|
|||
.musicprogress { |
|||
margin: 1rem; |
|||
border-radius:1rem; |
|||
min-height: 10px; |
|||
} |
|||
.musicprogress scale trough highlight { border-radius: 10px; } |
|||
|
|||
.musicprogress scale trough, |
|||
{ |
|||
background-color: $gray; |
|||
border-radius: 10px; |
|||
min-height: 20px; |
|||
min-width: 500px; |
|||
margin-left: 20px; |
|||
} |
|||
|
|||
.music { |
|||
margin: 1rem; |
|||
padding: 1rem; |
|||
background-color: #{$darkblue}; |
|||
border-radius:2rem; |
|||
border: 5px solid #{$border}; |
|||
font-size: 20px; |
|||
} |
|||
|
|||
.musicsel { |
|||
padding: 0.1rem; |
|||
//background-color: #{$darkblue}; |
|||
border-radius:2rem; |
|||
font-size: 50px; |
|||
} |
|||
|
|||
// bar |
|||
|
|||
.box { |
|||
margin: 10px; |
|||
} |
|||
|
|||
.launch { |
|||
margin: 0.5rem; |
|||
margin-left:2rem; |
|||
margin-right:2rem; |
|||
border-radius:5px; |
|||
font-size: 50px; |
|||
color: black; |
|||
background-color: $beige; |
|||
} |
|||
|
|||
@keyframes spin { |
|||
to { -gtk-icon-transform: rotate(1turn); } |
|||
} |
|||
|
|||
.launch:hover { |
|||
background-color: $darkblue; |
|||
color: white; |
|||
|
|||
animation-name: spin; |
|||
animation-duration: 1s; |
|||
animation-timing-function: linear; |
|||
animation-iteration-count: 1; |
|||
} |
|||
|
|||
.launchbutton { |
|||
padding: 0.1rem; |
|||
padding-left: 1.0rem; |
|||
padding-right: 1.0rem; |
|||
} |
|||
|
|||
// ad-hoc stuff |
|||
|
|||
.mt-20 { |
|||
margin-top: 20px; |
|||
} |
|||
|
|||
.beige { |
|||
color: $beige; |
|||
} |
@ -0,0 +1,165 @@ |
|||
(defwindow right |
|||
:monitor 0 |
|||
:geometry (geometry :x "-5%" |
|||
:y "0%" |
|||
:width "30%" |
|||
:height "70%" |
|||
:anchor "right center") |
|||
:stacking 'bg' |
|||
:windowtype "dock" |
|||
:wm-ignore true |
|||
(root) |
|||
) |
|||
|
|||
(defwidget root[] |
|||
(box |
|||
:class "background" |
|||
:orientation "v" |
|||
:space-evenly false |
|||
:spacing 0 |
|||
(musicwidget) |
|||
(box |
|||
:class "background" |
|||
:orientation "h" |
|||
:space-evenly true |
|||
:spacing 10 |
|||
(sys) (cal)) |
|||
(box |
|||
:class "background" |
|||
:orientation "h" |
|||
:space-evenly true |
|||
:spacing 10 |
|||
(bar)) |
|||
)) |
|||
|
|||
(defwidget musicwidget[] |
|||
(box |
|||
:class "container musiccontainer" |
|||
:spacing 10 |
|||
:orientation "v" |
|||
(label :text music :wrap true :show-truncated true :limit-width 80) |
|||
(box |
|||
:class "musicprogress box purplescale" |
|||
:orientation "h" |
|||
:space-evenly false |
|||
:halign "center" |
|||
(scale |
|||
:min 0 |
|||
:max 101 |
|||
:active false |
|||
:value "${songperc}" |
|||
:valign "center" |
|||
)) |
|||
(box |
|||
:class "musicsel" |
|||
:spacing 90 |
|||
:space-evenly true |
|||
:orientation "h" |
|||
(button :onclick "mpc prev" :class "musicbutton" "玲") |
|||
(button :onclick "mpc toggle" :class "musicbutton" paused) |
|||
(button :onclick "mpc next" :class "musicbutton" "怜")))) |
|||
|
|||
(defwidget sys [] |
|||
(box |
|||
:class "container header" |
|||
:orientation "v" |
|||
:space-evenly true |
|||
:valign "center" |
|||
(box |
|||
:class "progress box bluescale" |
|||
:orientation "h" |
|||
:space-evenly false |
|||
(label :text " /") |
|||
(scale |
|||
:min 0 |
|||
:max 101 |
|||
:active false |
|||
:value {EWW_DISK["/"]["used_perc"]} |
|||
:valign "center" |
|||
)) |
|||
(box |
|||
:class "progress box bluescale" |
|||
:orientation "h" |
|||
:space-evenly false |
|||
(label :text " ") |
|||
(scale |
|||
:min 0 |
|||
:max 101 |
|||
:active false |
|||
:value {EWW_DISK["/home"]["used_perc"]} |
|||
:valign "center" |
|||
)) |
|||
|
|||
(box |
|||
:class "progress box greenscale" |
|||
:orientation "h" |
|||
:space-evenly false |
|||
(label :text " ") |
|||
(scale |
|||
:min 0 |
|||
:max 101 |
|||
:active false |
|||
:value {EWW_BATTERY["BAT0"]["capacity"]} |
|||
:valign "center" |
|||
)) |
|||
|
|||
(box |
|||
:class "progress box yellowscale" |
|||
:orientation "h" |
|||
:space-evenly false |
|||
(label :text "CPU") |
|||
(scale |
|||
:min 0 |
|||
:max 101 |
|||
:active false |
|||
:value "${cpu}" |
|||
:valign "center" |
|||
)) |
|||
|
|||
)) |
|||
|
|||
(defwidget bar[] |
|||
(box |
|||
:class "background header mt-20" |
|||
:orientation "h" |
|||
:space-evenly true |
|||
:spacing 20 |
|||
:halign "center" |
|||
:hexpand true |
|||
|
|||
(eventbox :class "launch" |
|||
(button :class "launchbutton" :onclick "rofi -show drun&" "")) |
|||
|
|||
(eventbox :class "launch" |
|||
(button :class "launchbutton" :onclick "alacritty -e \"nvim\"&" "")) |
|||
|
|||
(eventbox :class "launch" |
|||
(button :class "launchbutton" :onclick "code&" "")) |
|||
|
|||
(eventbox :class "launch" |
|||
(button :class "launchbutton" :onclick "brave&" "爵")) |
|||
)) |
|||
|
|||
;(defwidget bat [] |
|||
; (box :class "container header" :orientation "v" |
|||
; :space-evenly true |
|||
; (circular-progress |
|||
; :value {EWW_BATTERY["BAT0"]["capacity"]} |
|||
; :class "progress" :thickness 10) |
|||
; (label :text battery) |
|||
; )) |
|||
|
|||
(defwidget cal [] |
|||
(box :class "container beige" :orientation "v" :space-evenly true |
|||
(calendar :valign "center") |
|||
;(label :text rems :valign "center") |
|||
)) |
|||
|
|||
(deflisten battery :initial "UNK" `loop battery.sh`) |
|||
(deflisten brightness :initial "UNK" `loop brightness.py`) |
|||
(deflisten time :initial "No Time" `~/.config/eww/scripts/date.sh`) |
|||
(deflisten music :initial "-" `loop ~/.config/eww/scripts/music.sh status`) |
|||
(deflisten paused :initial "-" `loop ~/.config/eww/scripts/music.sh paused`) |
|||
(defpoll cpu :interval "1s" "echo `top -b -n1 | grep \"Cpu(s)\" | awk '{print $2 + $4}'`") |
|||
(defpoll songperc :interval "1s" "~/.config/eww/scripts/songperc.sh") |
|||
(defpoll rems :interval "1m" "rems l") |
@ -0,0 +1,6 @@ |
|||
#!/bin/bash |
|||
|
|||
while true; do |
|||
date '+%a %m/%d %I:%M%p' |
|||
sleep 1 |
|||
done |
@ -0,0 +1,28 @@ |
|||
#!/bin/bash |
|||
|
|||
case "$1" in |
|||
[Ss]tatus) |
|||
OT="$(mpc status -f "%file%" | head -n 1)" |
|||
if echo "$OT" | grep "volume:" > /dev/null ; then |
|||
echo "MPD Inactive"; |
|||
else |
|||
echo "$OT"; |
|||
fi |
|||
;; |
|||
[Pp]aused) |
|||
OT="$(mpc status 2> /dev/null)" |
|||
if echo "$OT" | head -n 1 | grep "volume:" > /dev/null; then |
|||
echo "⏹" |
|||
exit; |
|||
fi |
|||
if echo "$OT" | grep "paused" > /dev/null; then |
|||
echo "⏵" |
|||
else |
|||
echo "⏸" |
|||
fi |
|||
;; |
|||
*) |
|||
echo "No arg exists for $1"; |
|||
;; |
|||
esac |
|||
|
@ -0,0 +1,8 @@ |
|||
#!/bin/bash |
|||
|
|||
X=$(mpc status 2>/dev/null | grep "%)") |
|||
if test $? -eq 0; then |
|||
echo "$X" | awk '{ print $4 }' | awk -F% '{ print $1 }' | awk 'sub(/^.{1}/,"")' |
|||
else |
|||
echo "0" |
|||
fi |
@ -0,0 +1,201 @@ |
|||
map j gj |
|||
map k gk |
|||
|
|||
set mouse+=a |
|||
|
|||
"let g:airline_theme ='base16_atelier_heath_light' |
|||
|
|||
set number |
|||
set norelativenumber |
|||
set wrap |
|||
set linebreak |
|||
|
|||
" use indents of 4 spaces, and have them copied down lines: |
|||
set shiftwidth=2 |
|||
set tabstop=2 |
|||
set softtabstop=2 |
|||
set expandtab |
|||
set smarttab |
|||
set autoindent |
|||
set textwidth=80 |
|||
filetype indent off |
|||
|
|||
" enable filetype detection: |
|||
filetype on |
|||
|
|||
autocmd FileType markdown,tex,text set nosmarttab noautoindent |
|||
" for C-like programming, have automatic indentation: |
|||
autocmd FileType c,cpp,slang set cindent |
|||
" * Keystrokes -- Insert Mode |
|||
autocmd Filetype python set shiftwidth=4 tabstop=4 softtabstop=4 |
|||
|
|||
"Coc Stuff |
|||
|
|||
set encoding=utf-8 |
|||
|
|||
" TextEdit might fail if hidden is not set. |
|||
set hidden |
|||
|
|||
" Some servers have issues with backup files, see #649. |
|||
set nobackup |
|||
set nowritebackup |
|||
|
|||
" Give more space for displaying messages. |
|||
set cmdheight=2 |
|||
|
|||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable |
|||
" delays and poor user experience. |
|||
set updatetime=300 |
|||
|
|||
" Don't pass messages to |ins-completion-menu|. |
|||
set shortmess+=c |
|||
|
|||
" Always show the signcolumn, otherwise it would shift the text each time |
|||
" diagnostics appear/become resolved. |
|||
if has("nvim-0.5.0") || has("patch-8.1.1564") |
|||
" Recently vim can merge signcolumn and number column into one |
|||
set signcolumn=number |
|||
else |
|||
set signcolumn=yes |
|||
endif |
|||
|
|||
" Use tab for trigger completion with characters ahead and navigate. |
|||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by |
|||
" other plugin before putting this into your config. |
|||
inoremap <silent><expr> <TAB> |
|||
\ pumvisible() ? "\<C-n>" : |
|||
\ <SID>check_back_space() ? "\<TAB>" : |
|||
\ coc#refresh() |
|||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" |
|||
|
|||
function! s:check_back_space() abort |
|||
let col = col('.') - 1 |
|||
return !col || getline('.')[col - 1] =~# '\s' |
|||
endfunction |
|||
|
|||
" Use <c-space> to trigger completion. |
|||
if has('nvim') |
|||
inoremap <silent><expr> <c-space> coc#refresh() |
|||
else |
|||
inoremap <silent><expr> <c-@> coc#refresh() |
|||
endif |
|||
|
|||
" Make <CR> auto-select the first completion item and notify coc.nvim to |
|||
" format on enter, <cr> could be remapped by other vim plugin |
|||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() |
|||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" |
|||
|
|||
" Use `[g` and `]g` to navigate diagnostics |
|||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. |
|||
nmap <silent> [g <Plug>(coc-diagnostic-prev) |
|||
nmap <silent> ]g <Plug>(coc-diagnostic-next) |
|||
|
|||
" GoTo code navigation. |
|||
nmap <silent> gd <Plug>(coc-definition) |
|||
nmap <silent> gy <Plug>(coc-type-definition) |
|||
nmap <silent> gi <Plug>(coc-implementation) |
|||
nmap <silent> gr <Plug>(coc-references) |
|||
|
|||
" Use K to show documentation in preview window. |
|||
nnoremap <silent> K :call <SID>show_documentation()<CR> |
|||
|
|||
function! s:show_documentation() |
|||
if (index(['vim','help'], &filetype) >= 0) |
|||
execute 'h '.expand('<cword>') |
|||
elseif (coc#rpc#ready()) |
|||
call CocActionAsync('doHover') |
|||
else |
|||
execute '!' . &keywordprg . " " . expand('<cword>') |
|||
endif |
|||
endfunction |
|||
|
|||
" Highlight the symbol and its references when holding the cursor. |
|||
autocmd CursorHold * silent call CocActionAsync('highlight') |
|||
|
|||
" Symbol renaming. |
|||
nmap <leader>rn <Plug>(coc-rename) |
|||
|
|||
" Formatting selected code. |
|||
xmap <leader>f <Plug>(coc-format-selected) |
|||
nmap <leader>f <Plug>(coc-format-selected) |
|||
|
|||
augroup mygroup |
|||
autocmd! |
|||
" Setup formatexpr specified filetype(s). |
|||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') |
|||
" Update signature help on jump placeholder. |
|||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') |
|||
augroup end |
|||
|
|||
" Applying codeAction to the selected region. |
|||
" Example: `<leader>aap` for current paragraph |
|||
xmap <leader>a <Plug>(coc-codeaction-selected) |
|||
nmap <leader>a <Plug>(coc-codeaction-selected) |
|||
|
|||
" Remap keys for applying codeAction to the current buffer. |
|||
nmap <leader>ac <Plug>(coc-codeaction) |
|||
" Apply AutoFix to problem on the current line. |
|||
nmap <leader>qf <Plug>(coc-fix-current) |
|||
|
|||
" Run the Code Lens action on the current line. |
|||
nmap <leader>cl <Plug>(coc-codelens-action) |
|||
|
|||
" Map function and class text objects |
|||
" NOTE: Requires 'textDocument.documentSymbol' support from the language server. |
|||
xmap if <Plug>(coc-funcobj-i) |
|||
omap if <Plug>(coc-funcobj-i) |
|||
xmap af <Plug>(coc-funcobj-a) |
|||
omap af <Plug>(coc-funcobj-a) |
|||
xmap ic <Plug>(coc-classobj-i) |
|||
omap ic <Plug>(coc-classobj-i) |
|||
xmap ac <Plug>(coc-classobj-a) |
|||
omap ac <Plug>(coc-classobj-a) |
|||
|
|||
" Remap <C-f> and <C-b> for scroll float windows/popups. |
|||
if has('nvim-0.4.0') || has('patch-8.2.0750') |
|||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>" |
|||
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>" |
|||
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>" |
|||
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>" |
|||
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>" |
|||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>" |
|||
endif |
|||
|
|||
" Use CTRL-S for selections ranges. |
|||
" Requires 'textDocument/selectionRange' support of language server. |
|||
nmap <silent> <C-s> <Plug>(coc-range-select) |
|||
xmap <silent> <C-s> <Plug>(coc-range-select) |
|||
|
|||
" Add `:Format` command to format current buffer. |
|||
command! -nargs=0 Format :call CocActionAsync('format') |
|||
|
|||
" Add `:Fold` command to fold current buffer. |
|||
command! -nargs=? Fold :call CocAction('fold', <f-args>) |
|||
|
|||
" Add `:OR` command for organize imports of the current buffer. |
|||
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') |
|||
|
|||
" Add (Neo)Vim's native statusline support. |
|||
" NOTE: Please see `:h coc-status` for integrations with external plugins that |
|||
" provide custom statusline: lightline.vim, vim-airline. |
|||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} |
|||
|
|||
" Mappings for CoCList |
|||
" Show all diagnostics. |
|||
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr> |
|||
" Manage extensions. |
|||
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr> |
|||
" Show commands. |
|||
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr> |
|||
" Find symbol of current document. |
|||
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr> |
|||
" Search workspace symbols. |
|||
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr> |
|||
" Do default action for next item. |
|||
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR> |
|||
" Do default action for previous item. |
|||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR> |
|||
" Resume latest coc list. |
|||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR> |
|||
|
|||
" END Coc |
@ -0,0 +1,35 @@ |
|||
# vim:ft=conf |
|||
|
|||
font_family JetBrains Mono |
|||
font_size 11.5 |
|||
|
|||
background_opacity 0.8 |
|||
dynamic_background_opacity yes |
|||
|
|||
window_margin_width 5 |
|||
bell_path none |
|||
bell_on_tab no |
|||
|
|||
enable_audio_bell no |
|||
|
|||
background #2b2c2e |
|||
foreground #d2d8d9 |
|||
cursor #708183 |
|||
selection_background #e3e8ed |
|||
color0 #7c8a8f |
|||
color8 #888888 |
|||
color1 #b23a51 |
|||
color9 #f24840 |
|||
color2 #789a69 |
|||
color10 #80c46f |
|||
color3 #b9ab4a |
|||
color11 #ffeb62 |
|||
color4 #2a7fac |
|||
color12 #4095ff |
|||
color5 #bc4f5a |
|||
color13 #fb5175 |
|||
color6 #44a799 |
|||
color14 #52ccbd |
|||
color7 #d2d8d9 |
|||
color15 #d2d8d9 |
|||
selection_foreground #2b2c2e |
@ -0,0 +1,428 @@ |
|||
# An example configuration file for MPD. |
|||
# Read the user manual for documentation: http://www.musicpd.org/doc/user/ |
|||
|
|||
|
|||
# Files and directories ####################################################### |
|||
# |
|||
# This setting controls the top directory which MPD will search to discover the |
|||
# available audio files and add them to the daemon's online database. This |
|||
# setting defaults to the XDG directory, otherwise the music directory will be |
|||
# be disabled and audio files will only be accepted over ipc socket (using |
|||
# file:// protocol) or streaming files over an accepted protocol. |
|||
# |
|||
music_directory "~/music" |
|||
# |
|||
# This setting sets the MPD internal playlist directory. The purpose of this |
|||
# directory is storage for playlists created by MPD. The server will use |
|||
# playlist files not created by the server but only if they are in the MPD |
|||
# format. This setting defaults to playlist saving being disabled. |
|||
# |
|||
playlist_directory "~/.mpd/playlists" |
|||
# |
|||
# This setting sets the location of the MPD database. This file is used to |
|||
# load the database at server start up and store the database while the |
|||
# server is not up. This setting defaults to disabled which will allow |
|||
# MPD to accept files over ipc socket (using file:// protocol) or streaming |
|||
# files over an accepted protocol. |
|||
# |
|||
db_file "~/.mpd/database" |
|||
# |
|||
# These settings are the locations for the daemon log files for the daemon. |
|||
# These logs are great for troubleshooting, depending on your log_level |
|||
# settings. |
|||
# |
|||
# The special value "syslog" makes MPD use the local syslog daemon. This |
|||
# setting defaults to logging to syslog. |
|||
# |
|||
log_file "syslog" |
|||
# |
|||
# This setting sets the location of the file which stores the process ID |
|||
# for use of mpd --kill and some init scripts. This setting is disabled by |
|||
# default and the pid file will not be stored. |
|||
# |
|||
#pid_file "~/.mpd/pid" |
|||
# |
|||
# This setting sets the location of the file which contains information about |
|||
# most variables to get MPD back into the same general shape it was in before |
|||
# it was brought down. This setting is disabled by default and the server |
|||
# state will be reset on server start up. |
|||
# |
|||
#state_file "~/.mpd/state" |
|||
# |
|||
# The location of the sticker database. This is a database which |
|||
# manages dynamic information attached to songs. |
|||
# |
|||
#sticker_file "~/.mpd/sticker.sql" |
|||
# |
|||
############################################################################### |
|||
|
|||
|
|||
# General music daemon options ################################################ |
|||
# |
|||
# This setting specifies the user that MPD will run as. MPD should never run as |
|||
# root and you may use this setting to make MPD change its user ID after |
|||
# initialization. This setting is disabled by default and MPD is run as the |
|||
# current user. |
|||
# |
|||
user "junikim" |
|||
# |
|||
# This setting specifies the group that MPD will run as. If not specified |
|||
# primary group of user specified with "user" setting will be used (if set). |
|||
# This is useful if MPD needs to be a member of group such as "audio" to |
|||
# have permission to use sound card. |
|||
# |
|||
#group "nogroup" |
|||
# |
|||
# This setting sets the address for the daemon to listen on. Careful attention |
|||
# should be paid if this is assigned to anything other than the default, any. |
|||
# This setting can deny access to control of the daemon. Not effective if |
|||
# systemd socket activiation is in use. |
|||
# |
|||
# For network |
|||
#bind_to_address "any" |
|||
# |
|||
# And for Unix Socket |
|||
#bind_to_address "~/.mpd/socket" |
|||
# |
|||
# This setting is the TCP port that is desired for the daemon to get assigned |
|||
# to. |
|||
# |
|||
#port "6600" |
|||
# |
|||
# Suppress all messages below the given threshold. Use "verbose" for |
|||
# troubleshooting. Available setting arguments are "notice", "info", "verbose", |
|||
# "warning" and "error". |
|||
# |
|||
#log_level "notice" |
|||
# |
|||
# Setting "restore_paused" to "yes" puts MPD into pause mode instead |
|||
# of starting playback after startup. |
|||
# |
|||
#restore_paused "no" |
|||
# |
|||
# This setting enables MPD to create playlists in a format usable by other |
|||
# music players. |
|||
# |
|||
#save_absolute_paths_in_playlists "no" |
|||
# |
|||
# This setting defines a list of tag types that will be extracted during the |
|||
# audio file discovery process. The complete list of possible values can be |
|||
# found in the user manual. |
|||
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" |
|||
# |
|||
# This example just enables the "comment" tag without disabling all |
|||
# the other supported tags: |
|||
#metadata_to_use "+comment" |
|||
# |
|||
# This setting enables automatic update of MPD's database when files in |
|||
# music_directory are changed. |
|||
# |
|||
#auto_update "yes" |
|||
# |
|||
# Limit the depth of the directories being watched, 0 means only watch |
|||
# the music directory itself. There is no limit by default. |
|||
# |
|||
#auto_update_depth "3" |
|||
# |
|||
############################################################################### |
|||
|
|||
|
|||
# Symbolic link behavior ###################################################### |
|||
# |
|||
# If this setting is set to "yes", MPD will discover audio files by following |
|||
# symbolic links outside of the configured music_directory. |
|||
# |
|||
#follow_outside_symlinks "yes" |
|||
# |
|||
# If this setting is set to "yes", MPD will discover audio files by following |
|||
# symbolic links inside of the configured music_directory. |
|||
# |
|||
#follow_inside_symlinks "yes" |
|||
# |
|||
############################################################################### |
|||
|
|||
|
|||
# Zeroconf / Avahi Service Discovery ########################################## |
|||
# |
|||
# If this setting is set to "yes", service information will be published with |
|||
# Zeroconf / Avahi. |
|||
# |
|||
#zeroconf_enabled "yes" |
|||
# |
|||
# The argument to this setting will be the Zeroconf / Avahi unique name for |
|||
# this MPD server on the network. %h will be replaced with the hostname. |
|||
# |
|||
#zeroconf_name "Music Player @ %h" |
|||
# |
|||
############################################################################### |
|||
|
|||
|
|||
# Permissions ################################################################# |
|||
# |
|||
# If this setting is set, MPD will require password authorization. The password |
|||
# setting can be specified multiple times for different password profiles. |
|||
# |
|||
#password "password@read,add,control,admin" |
|||
# |
|||
# This setting specifies the permissions a user has who has not yet logged in. |
|||
# |
|||
#default_permissions "read,add,control,admin" |
|||
# |
|||
############################################################################### |
|||
|
|||
|
|||
# Database ####################################################################### |
|||
# |
|||
# An example of a database section instead of the old 'db_file' setting. |
|||
# It enables mounting other storages into the music directory. |
|||
# |
|||
#database { |
|||
# plugin "simple" |
|||
# path "~/.local/share/mpd/db |
|||
# cache_directory "~/.local/share/mpd/cache" |
|||
#} |
|||
# |
|||
# An example of database config for a sattelite setup |
|||
# |
|||
#music_directory "nfs://fileserver.local/srv/mp3" |
|||
#database { |
|||
# plugin "proxy" |
|||
# host "other.mpd.host" |
|||
# port "6600" |
|||
#} |
|||
|
|||
# Input ####################################################################### |
|||
# |
|||
input { |
|||
plugin "curl" |
|||
# proxy "proxy.isp.com:8080" |
|||
# proxy_user "user" |
|||
# proxy_password "password" |
|||
} |
|||
|
|||
# |
|||
############################################################################### |
|||
|
|||
# Audio Output ################################################################ |
|||
# |
|||
# MPD supports various audio output types, as well as playing through multiple |
|||
# audio outputs at the same time, through multiple audio_output settings |
|||
# blocks. Setting this block is optional, though the server will only attempt |
|||
# autodetection for one sound card. |
|||
# |
|||
# An example of an ALSA output: |
|||
# |
|||
#audio_output { |
|||
# type "alsa" |
|||
# name "My ALSA Device" |
|||
## device "hw:0,0" # optional |
|||
## mixer_type "hardware" # optional |
|||
## mixer_device "default" # optional |
|||
## mixer_control "PCM" # optional |
|||
## mixer_index "0" # optional |
|||
#} |
|||
# |
|||
# An example of an OSS output: |
|||
# |
|||
#audio_output { |
|||
# type "oss" |
|||
# name "My OSS Device" |
|||
## device "/dev/dsp" # optional |
|||
## mixer_type "hardware" # optional |
|||
## mixer_device "/dev/mixer" # optional |
|||
## mixer_control "PCM" # optional |
|||
#} |
|||
# |
|||
# An example of a shout output (for streaming to Icecast): |
|||
# |
|||
#audio_output { |
|||
# type "shout" |
|||
# encoder "vorbis" # optional |
|||
# name "My Shout Stream" |
|||
# host "localhost" |
|||
# port "8000" |
|||
# mount "/mpd.ogg" |
|||
# password "hackme" |
|||
# quality "5.0" |
|||
# bitrate "128" |
|||
# format "44100:16:1" |
|||
## protocol "icecast2" # optional |
|||
## user "source" # optional |
|||
## description "My Stream Description" # optional |
|||
## url "http://example.com" # optional |
|||
## genre "jazz" # optional |
|||
## public "no" # optional |
|||
## timeout "2" # optional |
|||
## mixer_type "software" # optional |
|||
#} |
|||
# |
|||
# An example of a recorder output: |
|||
# |
|||
#audio_output { |
|||
# type "recorder" |
|||
# name "My recorder" |
|||
# encoder "vorbis" # optional, vorbis or lame |
|||
# path "/var/lib/mpd/recorder/mpd.ogg" |
|||
## quality "5.0" # do not define if bitrate is defined |
|||
# bitrate "128" # do not define if quality is defined |
|||
# format "44100:16:1" |
|||
#} |
|||
# |
|||
# An example of a httpd output (built-in HTTP streaming server): |
|||
# |
|||
#audio_output { |
|||
# type "httpd" |
|||
# name "My HTTP Stream" |
|||
# encoder "vorbis" # optional, vorbis or lame |
|||
# port "8000" |
|||
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 |
|||
## quality "5.0" # do not define if bitrate is defined |
|||
# bitrate "128" # do not define if quality is defined |
|||
# format "44100:16:1" |
|||
# max_clients "0" # optional 0=no limit |
|||
#} |
|||
# |
|||
# An example of a pulseaudio output (streaming to a remote pulseaudio server) |
|||
# |
|||
#audio_output { |
|||
# type "pulse" |
|||
# name "My Pulse Output" |
|||
## server "remote_server" # optional |
|||
## sink "remote_server_sink" # optional |
|||
## media_role "media_role" #optional |
|||
#} |
|||
# |
|||
# An example of a winmm output (Windows multimedia API). |
|||
# |
|||
#audio_output { |
|||
# type "winmm" |
|||
# name "My WinMM output" |
|||
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional |
|||
# or |
|||
## device "0" # optional |
|||
## mixer_type "hardware" # optional |
|||
#} |
|||
# |
|||
# An example of a wasapi output (Windows multimedia API). |
|||
# |
|||
#audio_output { |
|||
# type "wasapi" |
|||
# name "My WASAPI output" |
|||
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional |
|||
# or |
|||
## device "0" # optional |
|||
## Exclusive mode blocks all other audio source, and get best audio quality without resampling. |
|||
## exclusive "no" # optional |
|||
## Enumerate all devices in log. |
|||
## enumerate "no" # optional |
|||
#} |
|||
# |
|||
# An example of an openal output. |
|||
# |
|||
#audio_output { |
|||
# type "openal" |
|||
# name "My OpenAL output" |
|||
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional |
|||
#} |
|||
# |
|||
# An example of an sndio output. |
|||
# |
|||
#audio_output { |
|||
# type "sndio" |
|||
# name "sndio output" |
|||
# mixer_type "hardware" |
|||
#} |
|||
# |
|||
# An example of an OS X output: |
|||
# |
|||
#audio_output { |
|||
# type "osx" |
|||
# name "My OS X Device" |
|||
## device "Built-in Output" # optional |
|||
## channel_map "-1,-1,0,1" # optional |
|||
#} |
|||
# |
|||
## Example "pipe" output: |
|||
# |
|||
#audio_output { |
|||
# type "pipe" |
|||
# name "my pipe" |
|||
# command "aplay -f cd 2>/dev/null" |
|||
## Or if you're want to use AudioCompress |
|||
# command "AudioCompress -m | aplay -f cd 2>/dev/null" |
|||
## Or to send raw PCM stream through PCM: |
|||
# command "nc example.org 8765" |
|||
# format "44100:16:2" |
|||
#} |
|||
# |
|||
## An example of a null output (for no audio output): |
|||
# |
|||
#audio_output { |
|||
# type "null" |
|||
# name "My Null Output" |
|||
# mixer_type "none" # optional |
|||
#} |
|||
# |
|||
############################################################################### |
|||
|
|||
|
|||
# Normalization automatic volume adjustments ################################## |
|||
# |
|||
# This setting specifies the type of ReplayGain to use. This setting can have |
|||
# the argument "off", "album", "track" or "auto". "auto" is a special mode that |
|||
# chooses between "track" and "album" depending on the current state of |
|||
# random playback. If random playback is enabled then "track" mode is used. |
|||
# See <https://wiki.hydrogenaud.io/index.php?title=Replaygain> for |
|||
# more details about ReplayGain. |
|||
# This setting is off by default. |
|||
# |
|||
#replaygain "album" |
|||
# |
|||
# This setting sets the pre-amp used for files that have ReplayGain tags. By |
|||
# default this setting is disabled. |
|||
# |
|||
#replaygain_preamp "0" |
|||
# |
|||
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. |
|||
# By default this setting is disabled. |
|||
# |
|||
#replaygain_missing_preamp "0" |
|||
# |
|||
# This setting enables or disables ReplayGain limiting. |
|||
# MPD calculates actual amplification based on the ReplayGain tags |
|||
# and replaygain_preamp / replaygain_missing_preamp setting. |
|||
# If replaygain_limit is enabled MPD will never amplify audio signal |
|||
# above its original level. If replaygain_limit is disabled such amplification |
|||
# might occur. By default this setting is enabled. |
|||
# |
|||
#replaygain_limit "yes" |
|||
# |
|||
# This setting enables on-the-fly normalization volume adjustment. This will |
|||
# result in the volume of all playing audio to be adjusted so the output has |
|||
# equal "loudness". This setting is disabled by default. |
|||
# |
|||
#volume_normalization "no" |
|||
# |
|||
############################################################################### |
|||
|
|||
# Character Encoding ########################################################## |
|||
# |
|||
# If file or directory names do not display correctly for your locale then you |
|||
# may need to modify this setting. |
|||
# |
|||
#filesystem_charset "UTF-8" |
|||
# |
|||
############################################################################### |
|||
|
|||
audio_output { |
|||
type "pulse" |
|||
name "pulse audio" |
|||
} |
|||
|
|||
# adds fifo |
|||
audio_output { |
|||
type "fifo" |
|||
name "my_fifo" |
|||
path "/tmp/mpd.fifo" |
|||
format "44100:16:2" |
|||
} |
@ -0,0 +1,621 @@ |
|||
############################################################## |
|||
## This is an example configuration file. Copy it to ## |
|||
## $XDG_CONFIG_HOME/ncmpcpp/config or $HOME/.ncmpcpp/config ## |
|||
## and set up your preferences. ## |
|||
############################################################## |
|||
# |
|||
##### directories ###### |
|||
## |
|||
## Directory for storing ncmpcpp related files. Changing it is useful if you |
|||
## want to store everything somewhere else and provide command line setting for |
|||
## alternative location to config file which defines that while launching |
|||
## ncmpcpp. |
|||
## |
|||
# |
|||
#ncmpcpp_directory = ~/.config/ncmpcpp |
|||
# |
|||
## |
|||
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other |
|||
## MPD clients (eg. ncmpc) also use that location. |
|||
## |
|||
# |
|||
#lyrics_directory = ~/.lyrics |
|||
# |
|||
##### connection settings ##### |
|||
# |
|||
mpd_host = localhost |
|||
#mpd_host = 192.168.1.34 |
|||
# |
|||
mpd_port = 6600 |
|||
# |
|||
#mpd_password = "" |
|||
# |
|||
#mpd_connection_timeout = 5 |
|||
# |
|||
## Needed for tag editor and file operations to work. |
|||
## |
|||
#mpd_music_dir = ~/music |
|||
# |
|||
#mpd_crossfade_time = 5 |
|||
# |
|||
# Exclude pattern for random song action |
|||
# http://www.boost.org/doc/libs/1_46_1/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html |
|||
#random_exclude_pattern = "^(temp|midi_songs).*" |
|||
# |
|||
##### music visualizer ##### |
|||
## |
|||
## In order to make music visualizer work with MPD you need to use the fifo |
|||
## output. Its format parameter has to be set to 44100:16:1 for mono |
|||
## visualization or 44100:16:2 for stereo visualization. As an example here is |
|||
## the relevant section for mpd.conf: |
|||
## |
|||
audio_output { |
|||
type "fifo" |
|||
name "Visualizer feed" |
|||
path "/tmp/mpd.fifo" |
|||
format "44100:16:2" |
|||
} |
|||
|
|||
visualizer_data_source = "/tmp/mpd.fifo" |
|||
visualizer_output_name = "my_fifo" |
|||
visualizer_in_stereo = "yes" |
|||
visualizer_type = "spectrum" |
|||
visualizer_look = "+|" |
|||
## |
|||
## If the visualization on occasion diverges from the audio output, please set |
|||
## 'buffer_time' parameter of your audio output in mpd.conf to '100000' (100ms) |
|||
## or less to prevent that from happening. |
|||
## |
|||
## Note: If you're using Mopidy, an address of a udpsink gstreamer's output is |
|||
## also accepted. For example, the following section in mopidy.conf: |
|||
## |
|||
## [audio] |
|||
## output = tee name=t ! queue ! autoaudiosink t. |
|||
## ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE |
|||
## ! udpsink host=localhost port=5555 |
|||
## |
|||
## will make localhost:5555 available as a source of data for the stereo |
|||
## visualizer. |
|||
## |
|||
# |
|||
#visualizer_data_source = /tmp/mpd.fifo |
|||
# |
|||
## |
|||
## Note: Below parameter is needed for ncmpcpp to determine which output |
|||
## provides data for visualizer and reset it at the beginning of visualization |
|||
## to synchronize with audio. |
|||
## |
|||
# |
|||
#visualizer_output_name = Visualizer feed |
|||
# |
|||
## |
|||
## If you set format to 44100:16:2, make it 'yes'. |
|||
## |
|||
#visualizer_in_stereo = yes |
|||
# |
|||
## |
|||
## Note: set below to >=10 only if you have synchronization issues with |
|||
## visualization and audio. |
|||
## |
|||
# |
|||
#visualizer_sync_interval = 0 |
|||
# |
|||
## |
|||
## Note: To enable spectrum frequency visualization you need to compile ncmpcpp |
|||
## with fftw3 support. |
|||
## |
|||
# |
|||
## Available values: spectrum, wave, wave_filled, ellipse. |
|||
## |
|||
#visualizer_type = spectrum |
|||
# |
|||
#visualizer_fps = 60 |
|||
# |
|||
#visualizer_autoscale = no |
|||
# |
|||
#visualizer_look = ●▮ |
|||
# |
|||
#visualizer_color = blue, cyan, green, yellow, magenta, red |
|||
# |
|||
## Alternative subset of 256 colors for terminals that support it. |
|||
## |
|||
#visualizer_color = 47, 83, 119, 155, 191, 227, 221, 215, 209, 203, 197, 161 |
|||
# |
|||
## |
|||
## Note: The next few visualization options apply to the spectrum visualizer. |
|||
## |
|||
# |
|||
## Use unicode block characters for a smoother, more continuous look. |
|||
## This will override the visualizer_look option. With transparent terminals |
|||
## and visualizer_in_stereo set, artifacts may be visible on the bottom half of |
|||
## the visualization. |
|||
# |
|||
#visualizer_spectrum_smooth_look = yes |
|||
# |
|||
## A value between 1 and 5 inclusive. Specifying a larger value makes the |
|||
## visualizer look at a larger slice of time, which results in less jumpy |
|||
## visualizer output. |
|||
# |
|||
#visualizer_spectrum_dft_size = 2 |
|||
# |
|||
#visualizer_spectrum_gain = 10 |
|||
# |
|||
## Left-most frequency of visualizer in Hz, must be less than HZ MAX |
|||
# |
|||
#visualizer_spectrum_hz_min = 20 |
|||
# |
|||
## Right-most frequency of visualizer in Hz, must be greater than HZ MIN |
|||
# |
|||
#visualizer_spectrum_hz_max = 20000 |
|||
# |
|||
##### system encoding ##### |
|||
## |
|||
## ncmpcpp should detect your charset encoding but if it failed to do so, you |
|||
## can specify charset encoding you are using here. |
|||
## |
|||
## Note: You can see whether your ncmpcpp build supports charset detection by |
|||
## checking output of `ncmpcpp --version`. |
|||
## |
|||
## Note: Since MPD uses UTF-8 by default, setting this option makes sense only |
|||
## if your encoding is different. |
|||
## |
|||
# |
|||
#system_encoding = "" |
|||
# |
|||
##### delays ##### |
|||
# |
|||
## Time of inactivity (in seconds) after playlist highlighting will be disabled |
|||
## (0 = always on). |
|||
## |
|||
#playlist_disable_highlight_delay = 5 |
|||
# |
|||
## Defines how long messages are supposed to be visible. |
|||
## |
|||
#message_delay_time = 5 |
|||
# |
|||
##### song format ##### |
|||
## |
|||
## For a song format you can use: |
|||
## |
|||
## %l - length |
|||
## %f - filename |
|||
## %D - directory |
|||
## %a - artist |
|||
## %A - album artist |
|||
## %t - title |
|||
## %b - album |
|||
## %y - date |
|||
## %n - track number (01/12 -> 01) |
|||
## %N - full track info (01/12 -> 01/12) |
|||
## %g - genre |
|||
## %c - composer |
|||
## %p - performer |
|||
## %d - disc |
|||
## %C - comment |
|||
## %P - priority |
|||
## $R - begin right alignment |
|||
## |
|||
## If you want to make sure that a part of the format is displayed only when |
|||
## certain tags are present, you can archieve it by grouping them with brackets, |
|||
## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are |
|||
## present or '' otherwise. It is also possible to define a list of |
|||
## alternatives by providing several groups and separating them with '|', |
|||
## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is |
|||
## not present. |
|||
## |
|||
## Note: If you want to set limit on maximal length of a tag, just put the |
|||
## appropriate number between % and character that defines tag type, e.g. to |
|||
## make album take max. 20 terminal cells, use '%20b'. |
|||
## |
|||
## In addition, formats support markers used for text attributes. They are |
|||
## followed by character '$'. After that you can put: |
|||
## |
|||
## - 0 - default window color (discards all other colors) |
|||
## - 1 - black |
|||
## - 2 - red |
|||
## - 3 - green |
|||
## - 4 - yellow |
|||
## - 5 - blue |
|||
## - 6 - magenta |
|||
## - 7 - cyan |
|||
## - 8 - white |
|||
## - 9 - end of current color |
|||
## - b - bold text |
|||
## - u - underline text |
|||
## - r - reverse colors |
|||
## - a - use alternative character set |
|||
## |
|||
## If you don't want to use a non-color attribute anymore, just put it again, |
|||
## but this time insert character '/' between '$' and attribute character, |
|||
## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with |
|||
## reversed colors. |
|||
## |
|||
## If you want to use 256 colors and/or background colors in formats (the naming |
|||
## scheme is described below in section about color definitions), it can be done |
|||
## with the syntax $(COLOR), e.g. to set the artist tag to one of the |
|||
## non-standard colors and make it have yellow background, you need to write |
|||
## $(197_yellow)%a$(end). Note that for standard colors this is interchangable |
|||
## with attributes listed above. |
|||
## |
|||
## Note: colors can be nested. |
|||
## |
|||
# |
|||
#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3%l$9} |
|||
# |
|||
#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} |
|||
# |
|||
#song_library_format = {%n - }{%t}|{%f} |
|||
# |
|||
#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b |
|||
# |
|||
#alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} |
|||
# |
|||
#current_item_prefix = $(yellow)$r |
|||
# |
|||
#current_item_suffix = $/r$(end) |
|||
# |
|||
#current_item_inactive_column_prefix = $(white)$r |
|||
# |
|||
#current_item_inactive_column_suffix = $/r$(end) |
|||
# |
|||
#now_playing_prefix = $b |
|||
# |
|||
#now_playing_suffix = $/b |
|||
# |
|||
#browser_playlist_prefix = "$2playlist$9 " |
|||
# |
|||
#selected_item_prefix = $6 |
|||
# |
|||
#selected_item_suffix = $9 |
|||
# |
|||
#modified_item_prefix = $3> $9 |
|||
# |
|||
## |
|||
## Note: attributes are not supported for the following variables. |
|||
## |
|||
#song_window_title_format = {%a - }{%t}|{%f} |
|||
## |
|||
## Note: Below variables are used for sorting songs in browser. The sort mode |
|||
## determines how songs are sorted, and can be used in combination with a sort |
|||
## format to specify a custom sorting format. Available values for |
|||
## browser_sort_mode are "type", "name", "mtime", "format" and "none". |
|||
## |
|||
# |
|||
#browser_sort_mode = type |
|||
# |
|||
#browser_sort_format = {%a - }{%t}|{%f} {%l} |
|||
# |
|||
##### columns settings ##### |
|||
## |
|||
## syntax of song columns list format is "column column etc." |
|||
## |
|||
## - syntax for each column is: |
|||
## |
|||
## (width of the column)[color of the column]{displayed tag} |
|||
## |
|||
## Note: Width is by default in %, if you want a column to have fixed size, add |
|||
## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of |
|||
## screen (so the real width will depend on actual screen size), whereas |
|||
## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen |
|||
## is. |
|||
## |
|||
## - color is optional (if you want the default one, leave the field empty). |
|||
## |
|||
## Note: You can give a column additional attributes by putting appropriate |
|||
## character after displayed tag character. Available attributes are: |
|||
## |
|||
## - r - column will be right aligned |
|||
## - E - if tag is empty, empty tag marker won't be displayed |
|||
## |
|||
## You can also: |
|||
## |
|||
## - give a column custom name by putting it after attributes, separated with |
|||
## character ':', e.g. {lr:Length} gives you right aligned column of lengths |
|||
## named "Length". |
|||
## |
|||
## - define sequence of tags, that have to be displayed in case predecessor is |
|||
## empty in a way similar to the one in classic song format, i.e. using '|' |
|||
## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to |
|||
## display artist tag and then composer and performer if previous ones are not |
|||
## available. |
|||
## |
|||
# |
|||
#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} |
|||
# |
|||
##### various settings ##### |
|||
# |
|||
## |
|||
## Note: Custom command that will be executed each time song changes. Useful for |
|||
## notifications etc. |
|||
## |
|||
#execute_on_song_change = "" |
|||
# |
|||
## |
|||
## Note: Custom command that will be executed each time player state |
|||
## changes. The environment variable MPD_PLAYER_STATE is set to the current |
|||
## state (either unknown, play, pause, or stop) for its duration. |
|||
## |
|||
# |
|||
#execute_on_player_state_change = "" |
|||
# |
|||
#playlist_show_mpd_host = no |
|||
# |
|||
#playlist_show_remaining_time = no |
|||
# |
|||
#playlist_shorten_total_times = no |
|||
# |
|||
#playlist_separate_albums = no |
|||
# |
|||
## |
|||
## Note: Possible display modes: classic, columns. |
|||
## |
|||
#playlist_display_mode = columns |
|||
# |
|||
#browser_display_mode = classic |
|||
# |
|||
#search_engine_display_mode = classic |
|||
# |
|||
#playlist_editor_display_mode = classic |
|||
# |
|||
#discard_colors_if_item_is_selected = yes |
|||
# |
|||
#show_duplicate_tags = yes |
|||
# |
|||
#incremental_seeking = yes |
|||
# |
|||
#seek_time = 1 |
|||
# |
|||
#volume_change_step = 2 |
|||
# |
|||
#autocenter_mode = no |
|||
# |
|||
#centered_cursor = no |
|||
# |
|||
## |
|||
## Note: You can specify third character which will be used to build 'empty' |
|||
## part of progressbar. |
|||
## |
|||
#progressbar_look = => |
|||
# |
|||
## Available values: database, playlist. |
|||
## |
|||
#default_place_to_search_in = database |
|||
# |
|||
## Available values: classic, alternative. |
|||
## |
|||
#user_interface = classic |
|||
# |
|||
#data_fetching_delay = yes |
|||
# |
|||
## Available values: artist, album_artist, date, genre, composer, performer. |
|||
## |
|||
#media_library_primary_tag = artist |
|||
# |
|||
#media_library_albums_split_by_date = yes |
|||
# |
|||
#media_library_hide_album_dates = no |
|||
# |
|||
## Available values: wrapped, normal. |
|||
## |
|||
#default_find_mode = wrapped |
|||
# |
|||
#default_tag_editor_pattern = %n - %t |
|||
# |
|||
#header_visibility = yes |
|||
# |
|||
#statusbar_visibility = yes |
|||
# |
|||
## Show the "Connected to ..." message on startup |
|||
#connected_message_on_startup = yes |
|||
# |
|||
#titles_visibility = yes |
|||
# |
|||
#header_text_scrolling = yes |
|||
# |
|||
#cyclic_scrolling = no |
|||
# |
|||
#lyrics_fetchers = azlyrics, genius, musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet |
|||
# |
|||
#follow_now_playing_lyrics = no |
|||
# |
|||
#fetch_lyrics_for_current_song_in_background = no |
|||
# |
|||
#store_lyrics_in_song_dir = no |
|||
# |
|||
#generate_win32_compatible_filenames = yes |
|||
# |
|||
#allow_for_physical_item_deletion = no |
|||
# |
|||
## |
|||
## Note: If you set this variable, ncmpcpp will try to get info from last.fm in |
|||
## language you set and if it fails, it will fall back to english. Otherwise it |
|||
## will use english the first time. |
|||
## |
|||
## Note: Language has to be expressed as an ISO 639 alpha-2 code. |
|||
## |
|||
#lastfm_preferred_language = en |
|||
# |
|||
#space_add_mode = add_remove |
|||
# |
|||
#show_hidden_files_in_local_browser = no |
|||
# |
|||
## |
|||
## How shall screen switcher work? |
|||
## |
|||
## - "previous" - switch between the current and previous screen. |
|||
## - "screen1,...,screenN" - switch between given sequence of screens. |
|||
## |
|||
## Screens available for use: help, playlist, browser, search_engine, |
|||
## media_library, playlist_editor, tag_editor, outputs, visualizer, clock, |
|||
## lyrics, last_fm. |
|||
## |
|||
#screen_switcher_mode = playlist, browser |
|||
# |
|||
## |
|||
## Note: You can define startup screen by choosing screen from the list above. |
|||
## |
|||
#startup_screen = playlist |
|||
# |
|||
## |
|||
## Note: You can define startup slave screen by choosing screen from the list |
|||
## above or an empty value for no slave screen. |
|||
## |
|||
#startup_slave_screen = "" |
|||
# |
|||
#startup_slave_screen_focus = no |
|||
# |
|||
## |
|||
## Default width of locked screen (in %). Acceptable values are from 20 to 80. |
|||
## |
|||
# |
|||
#locked_screen_width_part = 50 |
|||
# |
|||
#ask_for_locked_screen_width_part = yes |
|||
# |
|||
## |
|||
## Width of media_library screen columns |
|||
## |
|||
# |
|||
#media_library_column_width_ratio_two = 1:1 |
|||
# |
|||
#media_library_column_width_ratio_three = 1:1:1 |
|||
# |
|||
## |
|||
## Width of playlist_editor screen columns |
|||
## |
|||
# |
|||
#playlist_editor_column_width_ratio = 1:2 |
|||
# |
|||
#jump_to_now_playing_song_at_start = yes |
|||
# |
|||
#ask_before_clearing_playlists = yes |
|||
# |
|||
#clock_display_seconds = no |
|||
# |
|||
#display_volume_level = yes |
|||
# |
|||
#display_bitrate = no |
|||
# |
|||
#display_remaining_time = no |
|||
# |
|||
## Available values: none, basic, extended, perl. |
|||
## |
|||
#regular_expressions = perl |
|||
# |
|||
## |
|||
## Note: if below is enabled, ncmpcpp will ignore leading "The" word while |
|||
## sorting items in browser, tags in media library, etc. |
|||
## |
|||
#ignore_leading_the = no |
|||
# |
|||
## |
|||
## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and |
|||
## filtering lists. This takes an effect only if boost was compiled with ICU |
|||
## support. |
|||
## |
|||
#ignore_diacritics = no |
|||
# |
|||
#block_search_constraints_change_if_items_found = yes |
|||
# |
|||
#mouse_support = yes |
|||
# |
|||
#mouse_list_scroll_whole_page = no |
|||
# |
|||
#lines_scrolled = 5 |
|||
# |
|||
#empty_tag_marker = <empty> |
|||
# |
|||
#tags_separator = " | " |
|||
# |
|||
#tag_editor_extended_numeration = no |
|||
# |
|||
#media_library_sort_by_mtime = no |
|||
# |
|||
#enable_window_title = yes |
|||
# |
|||
## |
|||
## Note: You can choose default search mode for search engine. Available modes |
|||
## are: |
|||
## |
|||
## - 1 - use mpd built-in searching (no regexes, pattern matching) |
|||
## |
|||
## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but |
|||
## if your mpd is on a remote machine, downloading big database to process |
|||
## it can take a while |
|||
## |
|||
## - 3 - match only exact values (this mode uses mpd function for searching in |
|||
## database and local one for searching in current playlist) |
|||
## |
|||
# |
|||
#search_engine_default_search_mode = 1 |
|||
# |
|||
#external_editor = nano |
|||
# |
|||
## Note: set to yes if external editor is a console application. |
|||
## |
|||
#use_console_editor = yes |
|||
# |
|||
##### colors definitions ##### |
|||
## |
|||
## It is possible to set a background color by setting a color value |
|||
## "<foreground>_<background>", e.g. red_black will set foregound color to red |
|||
## and background color to black. |
|||
## |
|||
## In addition, for terminals that support 256 colors it is possible to set one |
|||
## of them by using a number in range [1, 256] instead of color name, |
|||
## e.g. numerical value corresponding to red_black is 2_1. To find out if the |
|||
## terminal supports 256 colors, run ncmpcpp and check out the bottom of the |
|||
## help screen for list of available colors and their numerical values. |
|||
## |
|||
## What is more, there are two special values for the background color: |
|||
## "transparent" and "current". The first one explicitly sets the background to |
|||
## be transparent, while the second one allows you to preserve current |
|||
## background color and change only the foreground one. It's used implicitly |
|||
## when background color is not specified. |
|||
## |
|||
## Moreover, it is possible to attach format information to selected color |
|||
## variables by appending to their end a colon followed by one or more format |
|||
## flags, e.g. black:b or red:ur. The following variables support this syntax: |
|||
## visualizer_color, color1, color2, empty_tag_color, volume_color, |
|||
## state_line_color, state_flags_color, progressbar_color, |
|||
## progressbar_elapsed_color, player_state_color, statusbar_time_color, |
|||
## alternative_ui_separator_color. |
|||
## |
|||
## Note: due to technical limitations of older ncurses version, if 256 colors |
|||
## are used there is a possibility that you'll be able to use only colors with |
|||
## transparent background. |
|||
# |
|||
#colors_enabled = yes |
|||
# |
|||
#empty_tag_color = cyan |
|||
# |
|||
#header_window_color = default |
|||
# |
|||
#volume_color = default |
|||
# |
|||
#state_line_color = default |
|||
# |
|||
#state_flags_color = default:b |
|||
# |
|||
#main_window_color = yellow |
|||
# |
|||
#color1 = white |
|||
# |
|||
#color2 = green |
|||
# |
|||
#progressbar_color = black:b |
|||
# |
|||
#progressbar_elapsed_color = green:b |
|||
# |
|||
#statusbar_color = default |
|||
# |
|||
#statusbar_time_color = default:b |
|||
# |
|||
#player_state_color = default:b |
|||
# |
|||
#alternative_ui_separator_color = black:b |
|||
# |
|||
#window_border_color = green |
|||
# |
|||
#active_window_border = red |
|||
# |
@ -0,0 +1,8 @@ |
|||
#vim:ft=conf |
|||
|
|||
fade-in-step = 1.0; |
|||
fade-out-step = 1.0; |
|||
|
|||
rounded-corners-exclude = [ |
|||
"class_g = 'Polybar'" |
|||
] |
@ -0,0 +1,62 @@ |
|||
# This is a sample commands.py. You can add your own commands here. |
|||
# |
|||
# Please refer to commands_full.py for all the default commands and a complete |
|||
# documentation. Do NOT add them all here, or you may end up with defunct |
|||
# commands when upgrading ranger. |
|||
|
|||
# A simple command for demonstration purposes follows. |
|||
# ----------------------------------------------------------------------------- |
|||
|
|||
from __future__ import (absolute_import, division, print_function) |
|||
|
|||
# You can import any python module as needed. |
|||
import os |
|||
|
|||
# You always need to import ranger.api.commands here to get the Command class: |
|||
from ranger.api.commands import Command |
|||
|
|||
|
|||
# Any class that is a subclass of "Command" will be integrated into ranger as a |
|||
# command. Try typing ":my_edit<ENTER>" in ranger! |
|||
class my_edit(Command): |
|||
# The so-called doc-string of the class will be visible in the built-in |
|||
# help that is accessible by typing "?c" inside ranger. |
|||
""":my_edit <filename> |
|||
|
|||
A sample command for demonstration purposes that opens a file in an editor. |
|||
""" |
|||
|
|||
# The execute method is called when you run this command in ranger. |
|||
def execute(self): |
|||
# self.arg(1) is the first (space-separated) argument to the function. |
|||
# This way you can write ":my_edit somefilename<ENTER>". |
|||
if self.arg(1): |
|||
# self.rest(1) contains self.arg(1) and everything that follows |
|||
target_filename = self.rest(1) |
|||
else: |
|||
# self.fm is a ranger.core.filemanager.FileManager object and gives |
|||
# you access to internals of ranger. |
|||
# self.fm.thisfile is a ranger.container.file.File object and is a |
|||
# reference to the currently selected file. |
|||
target_filename = self.fm.thisfile.path |
|||
|
|||
# This is a generic function to print text in ranger. |
|||
self.fm.notify("Let's edit the file " + target_filename + "!") |
|||
|
|||
# Using bad=True in fm.notify allows you to print error messages: |
|||
if not os.path.exists(target_filename): |
|||
self.fm.notify("The given file does not exist!", bad=True) |
|||
return |
|||
|
|||
# This executes a function from ranger.core.acitons, a module with a |
|||
# variety of subroutines that can help you construct commands. |
|||
# Check out the source, or run "pydoc ranger.core.actions" for a list. |
|||
self.fm.edit_file(target_filename) |
|||
|
|||
# The tab method is called when you press tab, and should return a list of |
|||
# suggestions that the user will tab through. |
|||
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default |
|||
def tab(self, tabnum): |
|||
# This is a generic tab-completion function that iterates through the |
|||
# content of the current directory. |
|||
return self._tab_directory_content() |
1993
dotfiles/ranger/commands_full.py
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,3 @@ |
|||
set preview_images true |
|||
set preview_images_method ueberzug |
|||
set draw_borders true |
@ -0,0 +1,285 @@ |
|||
# vim: ft=cfg |
|||
# |
|||
# This is the configuration file of "rifle", ranger's file executor/opener. |
|||
# Each line consists of conditions and a command. For each line the conditions |
|||
# are checked and if they are met, the respective command is run. |
|||
# |
|||
# Syntax: |
|||
# <condition1> , <condition2> , ... = command |
|||
# |
|||
# The command can contain these environment variables: |
|||
# $1-$9 | The n-th selected file |
|||
# $@ | All selected files |
|||
# |
|||
# If you use the special command "ask", rifle will ask you what program to run. |
|||
# |
|||
# Prefixing a condition with "!" will negate its result. |
|||
# These conditions are currently supported: |
|||
# match <regexp> | The regexp matches $1 |
|||
# ext <regexp> | The regexp matches the extension of $1 |
|||
# mime <regexp> | The regexp matches the mime type of $1 |
|||
# name <regexp> | The regexp matches the basename of $1 |
|||
# path <regexp> | The regexp matches the absolute path of $1 |
|||
# has <program> | The program is installed (i.e. located in $PATH) |
|||
# env <variable> | The environment variable "variable" is non-empty |
|||
# file | $1 is a file |
|||
# 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) |
|||
# |
|||
# There are also pseudo-conditions which have a "side effect": |
|||
# flag <flags> | Change how the program is run. See below. |
|||
# label <label> | Assign a label or name to the command so it can |
|||
# | be started with :open_with <label> in ranger |
|||
# | or `rifle -p <label>` in the standalone executable. |
|||
# else | Always true. |
|||
# |
|||
# Flags are single characters which slightly transform the command: |
|||
# f | Fork the program, make it run in the background. |
|||
# | New command = setsid $command >& /dev/null & |
|||
# r | Execute the command with root permissions |
|||
# | New command = sudo $command |
|||
# t | Run the program in a new terminal. If $TERMCMD is not defined, |
|||
# | rifle will attempt to extract it from $TERM. |
|||
# | New command = $TERMCMD -e $command |
|||
# Note: The "New command" serves only as an illustration, the exact |
|||
# implementation may differ. |
|||
# Note: When using rifle in ranger, there is an additional flag "c" for |
|||
# only running the current file even if you have marked multiple files. |
|||
|
|||
|
|||
#------------------------------------------- |
|||
# Websites |
|||
#------------------------------------------- |
|||
# Rarely installed browsers get higher priority; It is assumed that if you |
|||
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the |
|||
# other hand are often only installed as fallback browsers. |
|||
ext x?html?, has surf, X, flag f = surf -- file://"$1" |
|||
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@" |
|||
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@" |
|||
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@" |
|||
ext x?html?, has dwb, X, flag f = dwb -- "$@" |
|||
ext x?html?, has jumanji, X, flag f = jumanji -- "$@" |
|||
ext x?html?, has luakit, X, flag f = luakit -- "$@" |
|||
ext x?html?, has uzbl, X, flag f = uzbl -- "$@" |
|||
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 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 "$@" |
|||
ext x?html?, has links2, terminal = links2 "$@" |
|||
ext x?html?, has links, terminal = links "$@" |
|||
ext x?html?, has lynx, terminal = lynx -- "$@" |
|||
ext x?html?, has w3m, terminal = w3m "$@" |
|||
|
|||
#------------------------------------------- |
|||
# Misc |
|||
#------------------------------------------- |
|||
# Define the "editor" for text files as first action |
|||
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@" |
|||
mime ^text, label pager = "$PAGER" -- "$@" |
|||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" |
|||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" |
|||
|
|||
ext 1 = man "$1" |
|||
ext s[wmf]c, has zsnes, X = zsnes "$1" |
|||
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1" |
|||
ext nes, has fceux, X = fceux "$1" |
|||
ext exe = wine "$1" |
|||
name ^[mM]akefile$ = make |
|||
|
|||
#-------------------------------------------- |
|||
# Scripts |
|||
#------------------------------------------- |
|||
ext py = python -- "$1" |
|||
ext pl = perl -- "$1" |
|||
ext rb = ruby -- "$1" |
|||
ext js = node -- "$1" |
|||
ext sh = sh -- "$1" |
|||
ext php = php -- "$1" |
|||
|
|||
#-------------------------------------------- |
|||
# Audio without X |
|||
#------------------------------------------- |
|||
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@" |
|||
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@" |
|||
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@" |
|||
ext midi?, terminal, has wildmidi = wildmidi -- "$@" |
|||
|
|||
#-------------------------------------------- |
|||
# Video/Audio with a GUI |
|||
#------------------------------------------- |
|||
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@" |
|||
mime ^video|audio, has smplayer, X, flag f = smplayer "$@" |
|||
mime ^video, has mpv, X, flag f = mpv -- "$@" |
|||
mime ^video, has mpv, X, flag f = mpv --fs -- "$@" |
|||
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@" |
|||
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@" |
|||
mime ^video, has mplayer, X, flag f = mplayer -- "$@" |
|||
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@" |
|||
mime ^video|audio, has vlc, X, flag f = vlc -- "$@" |
|||
mime ^video|audio, has totem, X, flag f = totem -- "$@" |
|||
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@" |
|||
|
|||
#-------------------------------------------- |
|||
# Video without X |
|||
#------------------------------------------- |
|||
mime ^video, terminal, !X, has mpv = mpv -- "$@" |
|||
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@" |
|||
mime ^video, terminal, !X, has mplayer = mplayer -- "$@" |
|||
|
|||
#------------------------------------------- |
|||
# Documents |
|||
#------------------------------------------- |
|||
ext pdf, has llpp, X, flag f = llpp "$@" |
|||
ext pdf, has zathura, X, flag f = zathura -- "$@" |
|||
ext pdf, has mupdf, X, flag f = mupdf "$@" |
|||
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@" |
|||
ext pdf, has apvlv, X, flag f = apvlv -- "$@" |
|||
ext pdf, has xpdf, X, flag f = xpdf -- "$@" |
|||
ext pdf, has evince, X, flag f = evince -- "$@" |
|||
ext pdf, has atril, X, flag f = atril -- "$@" |
|||
ext pdf, has okular, X, flag f = okular -- "$@" |
|||
ext pdf, has epdfview, X, flag f = epdfview -- "$@" |
|||
ext pdf, has qpdfview, X, flag f = qpdfview "$@" |
|||
ext pdf, has open, X, flag f = open "$@" |
|||
|
|||
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER" |
|||
|
|||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@" |
|||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@" |
|||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@" |
|||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@" |
|||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@" |
|||
|
|||
ext djvu, has zathura,X, flag f = zathura -- "$@" |
|||
ext djvu, has evince, X, flag f = evince -- "$@" |
|||
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 |
|||
#------------------------------------------- |
|||
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 -- "$@" |
|||
mime ^image, has mirage, X, flag f = mirage -- "$@" |
|||
mime ^image, has ristretto, X, flag f = ristretto "$@" |
|||
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 -- "$@" |
|||
|
|||
#------------------------------------------- |
|||
# Archives |
|||
#------------------------------------------- |
|||
|
|||
# avoid password prompt by providing empty password |
|||
ext 7z, has 7z = 7z -p l "$@" | "$PAGER" |
|||
# This requires atool |
|||
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER" |
|||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER" |
|||
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@" |
|||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@" |
|||
|
|||
# Listing and extracting archives without atool: |
|||
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER" |
|||
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done |
|||
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done |
|||
ext zip, has unzip = unzip -l "$1" | less |
|||
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done |
|||
ext ace, has unace = unace l "$1" | less |
|||
ext ace, has unace = for file in "$@"; do unace e "$file"; done |
|||
ext rar, has unrar = unrar l "$1" | less |
|||
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 |
|||
#------------------------------------------- |
|||
# Rarely installed terminal emulators get higher priority; It is assumed that |
|||
# if you install a rare terminal emulator, you probably use it. |
|||
# gnome-terminal/konsole/xterm on the other hand are often installed as part of |
|||
# a desktop environment or as fallback terminal emulators. |
|||
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@" |
|||
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@" |
|||
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"' |
|||
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@" |
|||
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@" |
|||
mime ^ranger/x-terminal-emulator, has st = st -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@" |
|||
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@" |
|||
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@" |
|||
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@" |
|||
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@" |
|||
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@" |
|||
|
|||
#------------------------------------------- |
|||
# Misc |
|||
#------------------------------------------- |
|||
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1" |
|||
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|rs= ${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. |
|||
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 |
@ -0,0 +1,350 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
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 |
|||
|
|||
## 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 |
|||
|
|||
## 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:]')" |
|||
|
|||
## 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} |
|||
|
|||
handle_extension() { |
|||
case "${FILE_EXTENSION_LOWER}" in |
|||
## 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 |
|||
unrar lt -p- -- "${FILE_PATH}" && exit 5 |
|||
exit 1;; |
|||
7z) |
|||
## Avoid password prompt by providing empty password |
|||
7z l -p -- "${FILE_PATH}" && exit 5 |
|||
exit 1;; |
|||
|
|||
## 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 |
|||
exiftool "${FILE_PATH}" && exit 5 |
|||
exit 1;; |
|||
|
|||
## BitTorrent |
|||
torrent) |
|||
transmission-show -- "${FILE_PATH}" && exit 5 |
|||
exit 1;; |
|||
|
|||
## OpenDocument |
|||
odt|ods|odp|sxw) |
|||
## 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 |
|||
htm|html|xhtml) |
|||
## 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 |
|||
# 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/*) |
|||
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 [[ -n "$orientation" && "$orientation" != 1 ]]; then |
|||
## ...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. |
|||
exit 7;; |
|||
|
|||
## Video |
|||
# video/*) |
|||
# # Thumbnail |
|||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 |
|||
# exit 1;; |
|||
|
|||
## PDF |
|||
application/pdf) |
|||
pdftoppm -f 1 -l 1 \ |
|||
-scale-to-x "${DEFAULT_SIZE%x*}" \ |
|||
-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.) |
|||
# 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="" |
|||
# local zip=""; local rar=""; local tar=""; local bsd="" |
|||
# case "${mimetype}" in |
|||
# application/zip) zip=1 ;; |
|||
# application/x-rar) rar=1 ;; |
|||
# application/x-7z-compressed) ;; |
|||
# *) tar=1 ;; |
|||
# esac |
|||
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \ |
|||
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \ |
|||
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \ |
|||
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return |
|||
# |
|||
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \ |
|||
# [ print(l, end='') for l in sys.stdin if \ |
|||
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\ |
|||
# sort -V | head -n 1) |
|||
# [ "$fn" = "" ] && return |
|||
# [ "$bsd" ] && fn=$(printf '%b' "$fn") |
|||
# |
|||
# [ "$tar" ] && tar --extract --to-stdout \ |
|||
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6 |
|||
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g') |
|||
# [ "$bsd" ] && bsdtar --extract --to-stdout \ |
|||
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6 |
|||
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}" |
|||
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \ |
|||
# "${IMAGE_CACHE_PATH}" && exit 6 |
|||
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \ |
|||
# "${IMAGE_CACHE_PATH}" && exit 6 |
|||
# [ "$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/* | */xml) |
|||
## Syntax highlight |
|||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then |
|||
exit 2 |
|||
fi |
|||
if [[ "$( tput colors )" -ge 256 ]]; then |
|||
local pygmentize_format='terminal256' |
|||
local highlight_format='xterm256' |
|||
else |
|||
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 |
|||
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/*) |
|||
## 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/* | audio/*) |
|||
mediainfo "${FILE_PATH}" && exit 5 |
|||
exiftool "${FILE_PATH}" && exit 5 |
|||
exit 1;; |
|||
esac |
|||
} |
|||
|
|||
handle_fallback() { |
|||
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5 |
|||
exit 1 |
|||
} |
|||
|
|||
|
|||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )" |
|||
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then |
|||
handle_image "${MIMETYPE}" |
|||
fi |
|||
handle_extension |
|||
handle_mime "${MIMETYPE}" |
|||
handle_fallback |
|||
|
|||
exit 1 |
@ -0,0 +1,90 @@ |
|||
// vim:ft=css |
|||
|
|||
configuration { |
|||
modi: "drun"; |
|||
font: "Jetbrains Mono 14"; |
|||
display-drun: ""; |
|||
icon-theme: "Adwaita"; |
|||
drun-display-format: "{name}"; |
|||
sidebar-mode: true; |
|||
} |
|||
|
|||
@theme "/dev/null" |
|||
|
|||
* { |
|||
bg: #242e35; |
|||
fg: #cec0af; |
|||
button: #1b1e25; |
|||
background-color: @bg; |
|||
text-color: @fg; |
|||
} |
|||
|
|||
window { |
|||
transparency: "real"; |
|||
width: 50%; |
|||
height: 50%; |
|||
} |
|||
|
|||
prompt { |
|||
enabled: false; |
|||
background-color: @bg; |
|||
icon-size: 90; |
|||
padding: 12px 18px 10px 18px; |
|||
border-radius: 8px; |
|||
} |
|||
|
|||
entry { |
|||
placeholder: "Search"; |
|||
placeholder-color: @fg; |
|||
expand: true; |
|||
padding: 1.5%; |
|||
border-radius: 8px; |
|||
} |
|||
|
|||
inputbar { |
|||
children: [ prompt, entry ]; |
|||
background-image: url("geo.png"); |
|||
expand: false; |
|||
border-radius: 0px 0px 0px 0px; |
|||
padding: 100px 300px 30px 30px; |
|||
} |
|||
|
|||
listview { |
|||
columns: 3; |
|||
lines: 4; |
|||
cycle: false; |
|||
dynamic: true; |
|||
border: 0px 0px 0px 0px; |
|||
layout: vertical; |
|||
padding: 20px 20px 20px 20px; |
|||
border-color: @fg; |
|||
border-radius: 0px 0px 0px 0px; |
|||
} |
|||
|
|||
mainbox { |
|||
children: [ inputbar, listview ]; |
|||
} |
|||
|
|||
element { |
|||
orientation: vertical; |
|||
padding: 1.5% 0% 1.5% 0%; |
|||
border-radius: 8px; |
|||
} |
|||
|
|||
element-text { |
|||
expand: true; |
|||
vertical-align: 1; |
|||
margin: 0.5% 1% 0% 1%; |
|||
background-color: inherit; |
|||
text-color: inherit; |
|||
} |
|||
|
|||
element-icon { |
|||
size: 25px; |
|||
} |
|||
|
|||
element selected { |
|||
background-color: @button; |
|||
border-radius: 10px; |
|||
text-color: #f0cad5; |
|||
} |
After Width: 1280 | Height: 720 | Size: 299 KiB |
@ -0,0 +1,2 @@ |
|||
set -sg escape-time 0 |
|||
set -g mouse on |
@ -0,0 +1,2 @@ |
|||
xrandr -s 1600x900 |
|||
exec dbus-run-session "$HOME/cwm.sh" |
@ -0,0 +1,18 @@ |
|||
set -o vi |
|||
|
|||
export MT_EDITOR=nvim |
|||
export VISUAL=nvim |
|||
|
|||
eval "$(starship init zsh)" |
|||
|
|||
f() { |
|||
fff "$@" |
|||
cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/fff/.fff_d")" |
|||
} |
|||
|
|||
export PATH=~/cp:$PATH |
|||
|
|||
resetcursor() { |
|||
printf '\033]50;CursorShape=1\x7' |
|||
} |
|||
export PS1="$(resetcursor)$PS1" |
@ -0,0 +1,25 @@ |
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’ |
|||
# and may be overwritten by future invocations. Please make changes |
|||
# to /etc/nixos/configuration.nix instead. |
|||
{ config, lib, pkgs, modulesPath, ... }: |
|||
|
|||
{ |
|||
imports = |
|||
[ (modulesPath + "/installer/scan/not-detected.nix") |
|||
]; |
|||
|
|||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; |
|||
boot.initrd.kernelModules = [ ]; |
|||
boot.kernelModules = [ "kvm-intel" ]; |
|||
boot.extraModulePackages = [ ]; |
|||
|
|||
fileSystems."/" = |
|||
{ device = "/dev/disk/by-uuid/f787afbd-3a43-4064-a28e-1641313579f5"; |
|||
fsType = "ext4"; |
|||
}; |
|||
|
|||
swapDevices = [ ]; |
|||
|
|||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; |
|||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; |
|||
} |
@ -0,0 +1,98 @@ |
|||
{config, pkgs, ...}: |
|||
{ |
|||
# Home Manager needs a bit of information about you and the |
|||
# paths it should manage. |
|||
home.username = "junikim"; |
|||
home.homeDirectory = "/home/junikim"; |
|||
|
|||
# This value determines the Home Manager release that your |
|||
# configuration is compatible with. This helps avoid breakage |
|||
# when a new Home Manager release introduces backwards |
|||
# incompatible changes. |
|||
# |
|||
# You can update Home Manager without changing this value. See |
|||
# the Home Manager release notes for a list of state version |
|||
# changes in each release. |
|||
home.stateVersion = "22.05"; |
|||
|
|||
# Let Home Manager install and manage itself. |
|||
programs.home-manager.enable = true; |
|||
|
|||
programs.starship.enable = true; |
|||
|
|||
home.packages = with pkgs; [ |
|||
xclip neofetch pfetch tmux |
|||
fff |
|||
nodejs shellcheck |
|||
dash |
|||
wget brave |
|||
bspwm sxhkd polybarFull kitty nitrogen dmenu rofi picom eww |
|||
nfs-utils gcc gnumake pulsemixer |
|||
ncmpcpp |
|||
ranger ueberzug sxiv |
|||
zathura |
|||
]; |
|||
|
|||
programs.neovim = { |
|||
enable = true; |
|||
viAlias = true; |
|||
vimAlias = true; |
|||
plugins = with pkgs.vimPlugins; [ |
|||
coc-nvim |
|||
neovim-sensible |
|||
vim-airline |
|||
vim-airline-themes |
|||
vim-nix |
|||
]; |
|||
extraConfig = builtins.readFile ./dotfiles/init.vim; |
|||
}; |
|||
|
|||
programs.git = { |
|||
enable = true; |
|||
userName = "Juni Kim"; |
|||
userEmail = "junikimm717@gmail.com"; |
|||
}; |
|||
|
|||
programs.zsh = { |
|||
oh-my-zsh = { |
|||
enable = true; |
|||
theme = "robbyrussell"; |
|||
}; |
|||
shellAliases = { |
|||
"gac" = "git add . && git commit"; |
|||
"v" = "nvim"; |
|||
"c" = "clear"; |
|||
"s" = "ls"; |
|||
"e" = "exit"; |
|||
"sy" = "systemctl"; |
|||
"cp" = "cp -r"; |
|||
"r" = "source ranger"; |
|||
}; |
|||
}; |
|||
|
|||
home.file = { |
|||
# shell-related |
|||
".tmux.conf".source = ./dotfiles/tmux.conf; |
|||
".zshrc".source = ./dotfiles/zshrc; |
|||
".config/nixpkgs/config.nix".source = ./dotfiles/config.nix; |
|||
|
|||
# rice configuration |
|||
".xinitrc".source = ./dotfiles/bspwm/xinitrc; |
|||
".config/bspwm/bspwmrc".source = ./dotfiles/bspwm/bspwmrc; |
|||
".config/bspwm/kill.sh".source = ./dotfiles/bspwm/kill.sh; |
|||
".config/sxhkd/sxhkdrc".source = ./dotfiles/bspwm/sxhkdrc; |
|||
".config/polybar" = {source = ./dotfiles/bspwm/polybar; recursive = true;}; |
|||
".config/picom/picom.conf".source = ./dotfiles/picom.conf; |
|||
|
|||
# application configuration |
|||
".config/kitty/kitty.conf".source = ./dotfiles/kitty.conf; |
|||
".config/ranger" = {source = ./dotfiles/ranger; recursive = true;}; |
|||
".config/rofi" = {source = ./dotfiles/rofi; recursive = true;}; |
|||
".config/eww" = {source = ./dotfiles/eww; recursive = true;}; |
|||
|
|||
# music |
|||
".config/mpd/mpd.conf".source = ./dotfiles/mpd.conf; |
|||
".config/ncmpcpp/config".source = ./dotfiles/ncmpcpp.conf; |
|||
|
|||
}; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue