mirror of
https://github.com/Foltik/dotfiles
synced 2025-02-19 15:12:09 -05:00
13 Sep 2022 21:38:06
This commit is contained in:
parent
a7f5c5c247
commit
52f31290bf
43
.config/alacritty/alacritty.yml
Normal file
43
.config/alacritty/alacritty.yml
Normal file
@ -0,0 +1,43 @@
|
||||
window:
|
||||
opacity: 0.85
|
||||
|
||||
font:
|
||||
size: 11.0
|
||||
|
||||
# Catppuccin!
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x1E1D2F'
|
||||
foreground: '0xD9E0EE'
|
||||
|
||||
# Colors the cursor will use if `custom_cursor_colors` is true
|
||||
cursor:
|
||||
text: '0x1E1D2F'
|
||||
cursor: '0xF5E0DC'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x6E6C7E'
|
||||
red: '0xF28FAD'
|
||||
green: '0xABE9B3'
|
||||
yellow: '0xFAE3B0'
|
||||
blue: '0x96CDFB'
|
||||
magenta: '0xF5C2E7'
|
||||
cyan: '0x89DCEB'
|
||||
white: '0xD9E0EE'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x988BA2'
|
||||
red: '0xF28FAD'
|
||||
green: '0xABE9B3'
|
||||
yellow: '0xFAE3B0'
|
||||
blue: '0x96CDFB'
|
||||
magenta: '0xF5C2E7'
|
||||
cyan: '0x89DCEB'
|
||||
white: '0xD9E0EE'
|
||||
|
||||
indexed_colors:
|
||||
- { index: 16, color: '0xF8BD96' }
|
||||
- { index: 17, color: '0xF5E0DC' }
|
53
.config/fontconfig/fonts.conf
Normal file
53
.config/fontconfig/fonts.conf
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<match target="pattern">
|
||||
<test name="family" qual="any">
|
||||
<string>sans-serif</string>
|
||||
</test>
|
||||
<edit binding="strong" mode="prepend" name="family">
|
||||
<string>SF Pro Text</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test name="family" qual="any">
|
||||
<string>serif</string>
|
||||
</test>
|
||||
<edit binding="strong" mode="prepend" name="family">
|
||||
<string>SF Pro Text</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test name="family" qual="any">
|
||||
<string>monospace</string>
|
||||
</test>
|
||||
<edit binding="strong" mode="prepend" name="family">
|
||||
<string>GoMono Nerd Font Mono</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="rgba">
|
||||
<const>rgb</const>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="hinting">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="hintstyle">
|
||||
<const>hintslight</const>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="antialias">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="lcdfilter">
|
||||
<const>lcddefault</const>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
109
.config/i3/config
Normal file
109
.config/i3/config
Normal file
@ -0,0 +1,109 @@
|
||||
set $mod Mod1
|
||||
|
||||
set $mon_primary DP-2
|
||||
set $mon_right DP-1
|
||||
|
||||
bindsym $mod+Shift+r restart
|
||||
bindsym $mod+Shift+Ctrl+e exit
|
||||
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym $mod+d exec --no-startup-id rofi -show drun
|
||||
bindsym $mod+Shift+d exec --no-startup-id rofi -show run
|
||||
bindsym $mod+backslash exec --no-startup-id alacritty
|
||||
bindsym $mod+Shift+e exec --no-startup-id ~/.emacs.d/bin/doom everywhere
|
||||
|
||||
bindsym $mod+q layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
floating_modifier $mod
|
||||
bindsym $mod+semicolon focus mode_toggle
|
||||
bindsym $mod+Shift+semicolon floating toggle
|
||||
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
bindsym $mod+period focus output left
|
||||
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
bindsym $mod+minus split vertical
|
||||
bindsym $mod+equal split horizontal
|
||||
|
||||
set $ws0 "0:"
|
||||
set $ws1 "1:"
|
||||
set $ws2 "2:"
|
||||
set $ws3 "3:4"
|
||||
set $ws4 "4:5"
|
||||
set $ws5 "5:6"
|
||||
set $ws6 "6:"
|
||||
set $ws7 "7:ﭮ"
|
||||
set $ws8 "8:"
|
||||
set $ws9 "9:ﱘ"
|
||||
|
||||
workspace $ws6 output $mon_right
|
||||
workspace $ws7 output $mon_right
|
||||
workspace $ws8 output $mon_right
|
||||
workspace $ws9 output $mon_right
|
||||
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
bindsym $mod+1 workspace $ws0
|
||||
bindsym $mod+2 workspace $ws1
|
||||
bindsym $mod+3 workspace $ws2
|
||||
bindsym $mod+4 workspace $ws3
|
||||
bindsym $mod+5 workspace $ws4
|
||||
bindsym $mod+6 workspace $ws5
|
||||
bindsym $mod+7 workspace $ws6
|
||||
bindsym $mod+8 workspace $ws7
|
||||
bindsym $mod+9 workspace $ws8
|
||||
bindsym $mod+0 workspace $ws9
|
||||
|
||||
bindsym $mod+Shift+1 move container to workspace $ws0
|
||||
bindsym $mod+Shift+2 move container to workspace $ws1
|
||||
bindsym $mod+Shift+3 move container to workspace $ws2
|
||||
bindsym $mod+Shift+4 move container to workspace $ws3
|
||||
bindsym $mod+Shift+5 move container to workspace $ws4
|
||||
bindsym $mod+Shift+6 move container to workspace $ws5
|
||||
bindsym $mod+Shift+7 move container to workspace $ws6
|
||||
bindsym $mod+Shift+8 move container to workspace $ws7
|
||||
bindsym $mod+Shift+9 move container to workspace $ws8
|
||||
bindsym $mod+Shift+0 move container to workspace $ws9
|
||||
bindsym $mod+Shift+period move workspace to output left
|
||||
|
||||
mode resize {
|
||||
bindsym h resize shrink width 10px or 10ppt
|
||||
bindsym j resize shrink height 10px or 10ppt
|
||||
bindsym k resize grow height 10px or 10ppt
|
||||
bindsym l resize grow width 10px or 10ppt
|
||||
|
||||
bindsym $mod+r mode default
|
||||
}
|
||||
bindsym $mod+r mode resize
|
||||
|
||||
focus_follows_mouse no
|
||||
|
||||
font pango:monospace 14px
|
||||
default_border pixel 1
|
||||
|
||||
set $main #f5c2e7
|
||||
set $urgent #fae3b0
|
||||
# class border backgr. text indicator child_border
|
||||
client.focused #575268 #575268 $main $main #575268
|
||||
client.focused_inactive #1e1e2e #1e1e2e #888888 $main #222222
|
||||
client.unfocused #1e1e2e #1e1e2e #888888 $main #222222
|
||||
client.urgent #1e1e2e #1e1e2e $urgent $main #900000
|
||||
client.placeholder #1e1e2e #1e1e2e #888888 $main #222222
|
||||
client.background #1e1e2e
|
||||
|
||||
for_window [title="Emacs Everywhere"] floating enable
|
||||
|
||||
exec --no-startup-id picom
|
||||
exec --no-startup-id clipit
|
||||
exec_always --no-startup-id ~/.config/polybar/launch.sh
|
||||
exec_always --no-startup-id feh --bg-scale ~/.config/i3/wallpaper.jpg
|
BIN
.config/i3/wallpaper.jpg
Normal file
BIN
.config/i3/wallpaper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 MiB |
52
.config/polybar/config.ini
Normal file
52
.config/polybar/config.ini
Normal file
@ -0,0 +1,52 @@
|
||||
[bar/bar1]
|
||||
monitor = DP-2
|
||||
height = 28
|
||||
padding-right = 1
|
||||
font-0 = monospace:size=11;3
|
||||
font-1 = monospace:size=16;3
|
||||
background = #1e1e2e
|
||||
foreground = #d9e0ee
|
||||
modules-left = i3
|
||||
modules-center = spotify
|
||||
modules-right = date
|
||||
|
||||
[bar/bar2]
|
||||
monitor = DP-0
|
||||
height = 30
|
||||
padding-right = 1
|
||||
font-0 = monospace:size=12;2
|
||||
font-1 = monospace:size=16;3
|
||||
background = #1e1e2e
|
||||
foreground = #d9e0ee
|
||||
modules-left = i3
|
||||
modules-center = spotify
|
||||
modules-right = date
|
||||
|
||||
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
exec = python ~/.config/polybar/spotify.py -f '{artist}: {song}'
|
||||
exec-if = pgrep spotify
|
||||
interval = 1
|
||||
format = %{T2}ﱘ%{T-} <label>
|
||||
click-left = playerctl --player=spotify play-pause
|
||||
click-right = playerctl --player=spotify next
|
||||
click-middle = playerctl --player=spotify previous
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
strip-wsnumbers = true
|
||||
label-unfocused = %{T2}%{F-}%name%%{T-}
|
||||
label-unfocused-padding = 1
|
||||
label-visible = %{T2}%{F-}%name%%{F-}%{T-}
|
||||
label-visible-padding = 1
|
||||
label-focused = %{T2}%{F#f5c2e7}%name%%{T-}
|
||||
label-focused-padding = 1
|
||||
label-urgent = %{T2}%{F#fae3b0}%name%%{F-}%{T-}
|
||||
label-urgent-padding = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %%{T2}%%{T-} %a %d %%{T2}%%{T-} %R
|
4
.config/polybar/launch.sh
Executable file
4
.config/polybar/launch.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
killall polybar
|
||||
polybar bar1 & disown
|
||||
polybar bar2 & disown
|
141
.config/polybar/spotify.py
Normal file
141
.config/polybar/spotify.py
Normal file
@ -0,0 +1,141 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import dbus
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'-t',
|
||||
'--trunclen',
|
||||
type=int,
|
||||
metavar='trunclen'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-f',
|
||||
'--format',
|
||||
type=str,
|
||||
metavar='custom format',
|
||||
dest='custom_format'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-p',
|
||||
'--playpause',
|
||||
type=str,
|
||||
metavar='play-pause indicator',
|
||||
dest='play_pause'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--font',
|
||||
type=str,
|
||||
metavar='the index of the font to use for the main label',
|
||||
dest='font'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--playpause-font',
|
||||
type=str,
|
||||
metavar='the index of the font to use to display the playpause indicator',
|
||||
dest='play_pause_font'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-q',
|
||||
'--quiet',
|
||||
action='store_true',
|
||||
help="if set, don't show any output when the current song is paused",
|
||||
dest='quiet',
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
def fix_string(string):
|
||||
# corrects encoding for the python version used
|
||||
if sys.version_info.major == 3:
|
||||
return string
|
||||
else:
|
||||
return string.encode('utf-8')
|
||||
|
||||
|
||||
def truncate(name, trunclen):
|
||||
if len(name) > trunclen:
|
||||
name = name[:trunclen]
|
||||
name += '...'
|
||||
if ('(' in name) and (')' not in name):
|
||||
name += ')'
|
||||
return name
|
||||
|
||||
|
||||
|
||||
# Default parameters
|
||||
output = fix_string(u'{play_pause} {artist}: {song}')
|
||||
trunclen = 35
|
||||
play_pause = fix_string(u'\u25B6,\u23F8') # first character is play, second is paused
|
||||
|
||||
label_with_font = '%{{T{font}}}{label}%{{T-}}'
|
||||
font = args.font
|
||||
play_pause_font = args.play_pause_font
|
||||
|
||||
quiet = args.quiet
|
||||
|
||||
# parameters can be overwritten by args
|
||||
if args.trunclen is not None:
|
||||
trunclen = args.trunclen
|
||||
if args.custom_format is not None:
|
||||
output = args.custom_format
|
||||
if args.play_pause is not None:
|
||||
play_pause = args.play_pause
|
||||
|
||||
try:
|
||||
session_bus = dbus.SessionBus()
|
||||
spotify_bus = session_bus.get_object(
|
||||
'org.mpris.MediaPlayer2.spotify',
|
||||
'/org/mpris/MediaPlayer2'
|
||||
)
|
||||
|
||||
spotify_properties = dbus.Interface(
|
||||
spotify_bus,
|
||||
'org.freedesktop.DBus.Properties'
|
||||
)
|
||||
|
||||
metadata = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'Metadata')
|
||||
status = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'PlaybackStatus')
|
||||
|
||||
# Handle play/pause label
|
||||
|
||||
play_pause = play_pause.split(',')
|
||||
|
||||
if status == 'Playing':
|
||||
play_pause = play_pause[0]
|
||||
elif status == 'Paused':
|
||||
play_pause = play_pause[1]
|
||||
else:
|
||||
play_pause = str()
|
||||
|
||||
if play_pause_font:
|
||||
play_pause = label_with_font.format(font=play_pause_font, label=play_pause)
|
||||
|
||||
# Handle main label
|
||||
|
||||
artist = fix_string(metadata['xesam:artist'][0]) if metadata['xesam:artist'] else ''
|
||||
song = fix_string(metadata['xesam:title']) if metadata['xesam:title'] else ''
|
||||
album = fix_string(metadata['xesam:album']) if metadata['xesam:album'] else ''
|
||||
|
||||
if (quiet and status == 'Paused') or (not artist and not song and not album):
|
||||
print('')
|
||||
else:
|
||||
if font:
|
||||
artist = label_with_font.format(font=font, label=artist)
|
||||
song = label_with_font.format(font=font, label=song)
|
||||
album = label_with_font.format(font=font, label=album)
|
||||
|
||||
# Add 4 to trunclen to account for status symbol, spaces, and other padding characters
|
||||
print(truncate(output.format(artist=artist,
|
||||
song=song,
|
||||
play_pause=play_pause,
|
||||
album=album), trunclen + 4))
|
||||
|
||||
except Exception as e:
|
||||
if isinstance(e, dbus.exceptions.DBusException):
|
||||
print('')
|
||||
else:
|
||||
print(e)
|
82
.config/tmux/tmux.conf
Normal file
82
.config/tmux/tmux.conf
Normal file
@ -0,0 +1,82 @@
|
||||
# Use fish
|
||||
set-option -g default-shell /bin/fish
|
||||
|
||||
# Index windows and panes starting at 1
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# Sane mouse behavior
|
||||
set -g mouse on
|
||||
|
||||
# Don't rename windows unless I tell it
|
||||
set-option -g allow-rename off
|
||||
|
||||
# Quiet down
|
||||
set -g visual-activity off
|
||||
set -g visual-bell off
|
||||
set -g visual-silence off
|
||||
setw -g monitor-activity off
|
||||
set -g bell-action none
|
||||
|
||||
|
||||
|
||||
# Remap prefix key
|
||||
unbind C-b
|
||||
set-option -g prefix C-s
|
||||
bind-key C-s send-prefix
|
||||
|
||||
# Config reload
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
# Pane switching
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Splits
|
||||
unbind '"'
|
||||
unbind %
|
||||
bind = split-window -h
|
||||
bind - split-window -v
|
||||
|
||||
|
||||
|
||||
# Use xclip for modifying the clipboard instead of escape sequences
|
||||
#set-option -s set-clipboard off
|
||||
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -se c -i"
|
||||
|
||||
# Style
|
||||
set-option -g clock-mode-colour '#57557f'
|
||||
set-option -g message-command-style 'bg=#262626,fg=#b2b2b2'
|
||||
set-option -g message-style 'bg=#262626,fg=#b2b2b2'
|
||||
set-option -g mode-style 'bg=#444444,fg=#b2b2b2'
|
||||
set-option -g pane-border-style 'fg=#111111'
|
||||
set-option -g pane-active-border-style 'fg=#111111'
|
||||
set-option -g status-left ' #S '
|
||||
set-option -g status-left-style 'bg=#fdab08,fg=#121212'
|
||||
set-option -g status-right ' #[bg=#57557f] %Y/%m/%d %a %H:%M '
|
||||
set-option -g status-right-style 'bg=#121212,fg=#b2b2b2'
|
||||
set-option -g status-style 'bg=#121212,fg=#b2b2b2'
|
||||
set-option -g window-status-activity-style 'bg=#121212,fg=#d75fd7'
|
||||
set-option -g window-status-current-format ' #I#F| #W '
|
||||
set-option -g window-status-current-style 'bg=#57557f,fg=#b2b2b2'
|
||||
set-option -g window-status-format '#[fg=#585858] #I |#[fg=default] #W '
|
||||
set-option -g window-status-separator ''
|
||||
set-option -g window-status-style 'bg=#121212,fg=#b2b2b2'
|
||||
|
||||
# Plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
set -g @yank_selection 'clipboard'
|
||||
set -g @yank_selection_mouse 'clipboard'
|
||||
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
Loading…
Reference in New Issue
Block a user