Compare commits
11 Commits
61ffaffeee
...
354e44f713
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
354e44f713 | ||
|
|
7856bd42bc | ||
|
|
77afc69650 | ||
|
|
255c44ee92 | ||
|
|
cb5df40b40 | ||
|
|
ba845c0675 | ||
|
|
6973d5e562 | ||
|
|
fb8f2726b9 | ||
|
|
568b05f1e5 | ||
|
|
009dbc73ae | ||
| 5005d3a4ad |
7
.aliases
7
.aliases
@@ -24,7 +24,14 @@ alias which-command=whence
|
|||||||
alias copy="xclip -selection clipboard"
|
alias copy="xclip -selection clipboard"
|
||||||
alias mkcdir='f() { md $1; cd $1 }; f'
|
alias mkcdir='f() { md $1; cd $1 }; f'
|
||||||
|
|
||||||
|
alias sctl='systemctl'
|
||||||
|
alias userctl='systemctl --user'
|
||||||
|
alias uctl='userctl'
|
||||||
|
|
||||||
alias kdiff="kitten diff"
|
alias kdiff="kitten diff"
|
||||||
alias kssh="kitten ssh"
|
alias kssh="kitten ssh"
|
||||||
|
alias mssh="mosh --ssh='kitten ssh'"
|
||||||
|
alias mussh="mosh --ssh='kitten ssh -o StrictHostKeyChecking=no'"
|
||||||
alias gf2="/usr/bin/gf2 &> /dev/null &"
|
alias gf2="/usr/bin/gf2 &> /dev/null &"
|
||||||
alias qemu-monitor="telnet 127.0.0.1 7777"
|
alias qemu-monitor="telnet 127.0.0.1 7777"
|
||||||
|
alias sudo="sudo "
|
||||||
120
.config/i3/config
Normal file
120
.config/i3/config
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
# i3 config file (v4)
|
||||||
|
#
|
||||||
|
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
|
|
||||||
|
set $mod Mod4
|
||||||
|
|
||||||
|
font pango:monospace 10
|
||||||
|
|
||||||
|
set $wallpaper ~/Pictures/backgrounds/clair-obscur-expedition-33-4k-p8.png
|
||||||
|
set $lockscreen ~/Pictures/backgrounds/co-lockscreen.png
|
||||||
|
|
||||||
|
exec --no-startup-id numlockx
|
||||||
|
exec --no-startup-id feh --bg-scale $wallpaper
|
||||||
|
|
||||||
|
# Start XDG autostart .desktop files using dex. See also
|
||||||
|
# https://wiki.archlinux.org/index.php/XDG_Autostart
|
||||||
|
exec --no-startup-id dex --autostart --environment i3
|
||||||
|
|
||||||
|
# Use pactl to adjust volume in PulseAudio.
|
||||||
|
set $refresh_i3status killall -SIGUSR1 i3status
|
||||||
|
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
|
||||||
|
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
|
||||||
|
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||||
|
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||||
|
bindsym XF86AudioPlay exec --no-startup-id playerctl -p spotify play-pause && $refresh_i3status
|
||||||
|
|
||||||
|
# Workspace config
|
||||||
|
include ./workspace.conf
|
||||||
|
|
||||||
|
# Floating window correction
|
||||||
|
include ./floating.conf
|
||||||
|
|
||||||
|
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||||
|
floating_modifier $mod
|
||||||
|
|
||||||
|
# move tiling windows via drag & drop by left-clicking into the title bar,
|
||||||
|
# or left-clicking anywhere into the window while holding the floating modifier.
|
||||||
|
tiling_drag modifier titlebar
|
||||||
|
|
||||||
|
# start kitty
|
||||||
|
bindsym $mod+Return exec kitty
|
||||||
|
|
||||||
|
# kill focused window
|
||||||
|
bindsym $mod+q kill
|
||||||
|
|
||||||
|
# start rofi
|
||||||
|
bindsym $mod+r exec --no-startup-id rofi -show drun
|
||||||
|
# rofi spotify
|
||||||
|
bindsym $mod+m exec --no-startup-id /home/womax/.config/scripts/rofi_spotify.sh
|
||||||
|
bindsym $mod+p exec --no-startup-id rofi -show window
|
||||||
|
|
||||||
|
# change focus
|
||||||
|
bindsym $mod+j focus down
|
||||||
|
bindsym $mod+k focus up
|
||||||
|
bindsym $mod+h focus left
|
||||||
|
bindsym $mod+l focus right
|
||||||
|
|
||||||
|
bindsym $mod+Down focus down
|
||||||
|
bindsym $mod+Up focus up
|
||||||
|
bindsym $mod+Left focus left
|
||||||
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
|
# move focused window
|
||||||
|
bindsym $mod+Shift+j move down
|
||||||
|
bindsym $mod+Shift+k move up
|
||||||
|
bindsym $mod+Shift+h move left
|
||||||
|
bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
|
bindsym $mod+Shift+Down move down
|
||||||
|
bindsym $mod+Shift+Up move up
|
||||||
|
bindsym $mod+Shift+Left move left
|
||||||
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
|
# split in horizontal orientation
|
||||||
|
bindsym $mod+g split h
|
||||||
|
|
||||||
|
# split in vertical orientation
|
||||||
|
bindsym $mod+v split v
|
||||||
|
|
||||||
|
# change container layout (stacked/tabbed/toggle split)
|
||||||
|
workspace_layout tabbed
|
||||||
|
|
||||||
|
bindsym $mod+s layout stacking
|
||||||
|
bindsym $mod+w layout tabbed
|
||||||
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
# hides border
|
||||||
|
hide_edge_borders smart
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
|
# enter fullscreen mode for the focused container
|
||||||
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
|
# reload configuration file
|
||||||
|
bindsym $mod+Shift+c reload
|
||||||
|
|
||||||
|
# restart i3 inplace
|
||||||
|
bindsym $mod+Shift+x restart
|
||||||
|
|
||||||
|
# lock screen
|
||||||
|
bindsym $mod+Control+l exec --no-startup-id "i3lock -kti $lockscreen && sleep 1"
|
||||||
|
|
||||||
|
# exit i3 (logout)
|
||||||
|
bindsym $mod+Shift+e exec --no-startup-id i3-msg exit
|
||||||
|
|
||||||
|
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||||
|
# finds out, if available)
|
||||||
|
bar {
|
||||||
|
status_command i3status
|
||||||
|
}
|
||||||
|
|
||||||
|
exec --no-startup-id /usr/bin/dunst
|
||||||
|
|
||||||
|
exec kitty
|
||||||
|
exec emacs
|
||||||
|
exec firefox
|
||||||
|
exec discord
|
||||||
|
exec spotify-launcher
|
||||||
2
.config/i3/floating.conf
Normal file
2
.config/i3/floating.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
for_window [title="Steam Settings"] floating enable
|
||||||
|
for_window [title="Paradox Launcher"] floating enable
|
||||||
63
.config/i3/workspace.conf
Normal file
63
.config/i3/workspace.conf
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# Define names for default workspaces for which we configure key bindings later on
|
||||||
|
set $ws1 "1"
|
||||||
|
set $ws2 "2"
|
||||||
|
set $ws3 "3"
|
||||||
|
set $ws4 "4"
|
||||||
|
set $ws5 "5"
|
||||||
|
set $ws6 "6"
|
||||||
|
set $ws7 "7"
|
||||||
|
set $ws8 "8"
|
||||||
|
set $ws9 "9"
|
||||||
|
set $ws10 "10"
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindsym $mod+1 workspace number $ws1
|
||||||
|
bindsym $mod+2 workspace number $ws2
|
||||||
|
bindsym $mod+3 workspace number $ws3
|
||||||
|
bindsym $mod+4 workspace number $ws4
|
||||||
|
bindsym $mod+5 workspace number $ws5
|
||||||
|
bindsym $mod+6 workspace number $ws6
|
||||||
|
bindsym $mod+7 workspace number $ws7
|
||||||
|
bindsym $mod+8 workspace number $ws8
|
||||||
|
bindsym $mod+9 workspace number $ws9
|
||||||
|
bindsym $mod+0 workspace number $ws10
|
||||||
|
|
||||||
|
# move focused container to worksapce
|
||||||
|
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||||
|
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||||
|
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||||
|
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||||
|
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||||
|
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||||
|
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||||
|
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||||
|
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||||
|
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||||
|
|
||||||
|
# Make DP-0 primary monitor
|
||||||
|
exec --no-startup-id xrandr --output "DP-0" --primary
|
||||||
|
|
||||||
|
# bind workspace 1 and 3 to primary monitor (DP-0)
|
||||||
|
workspace $ws1 output DP-0
|
||||||
|
workspace $ws3 output DP-0
|
||||||
|
workspace $ws5 output DP-0
|
||||||
|
|
||||||
|
# bind worksapce 2 and 4 to secondary monitor (HDMI-0)
|
||||||
|
workspace $ws2 output HDMI-0
|
||||||
|
workspace $ws4 output HDMI-0
|
||||||
|
|
||||||
|
# assign kitty, emacs to ws1
|
||||||
|
assign [class="kitty"] $ws1
|
||||||
|
assign [class="Emacs"] $ws1
|
||||||
|
|
||||||
|
# assign firefox to ws2
|
||||||
|
assign [class="firefox"] $ws2
|
||||||
|
|
||||||
|
# assign spotify to ws3
|
||||||
|
assign [class="Spotify"] $ws3
|
||||||
|
|
||||||
|
# assign discord to ws4
|
||||||
|
assign [class="discord"] $ws4
|
||||||
|
|
||||||
|
assign [class="Qemu-system-*"] $ws5
|
||||||
|
assign [class="steam"] $ws5
|
||||||
53
.config/i3status/config
Normal file
53
.config/i3status/config
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# i3status configuration file.
|
||||||
|
# see "man i3status" for documentation.
|
||||||
|
|
||||||
|
# It is important that this file is edited as UTF-8.
|
||||||
|
# The following line should contain a sharp s:
|
||||||
|
# ß
|
||||||
|
# If the above line is not correctly displayed, fix your editor first!
|
||||||
|
|
||||||
|
general {
|
||||||
|
colors = true
|
||||||
|
interval = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
# order += "ipv6"
|
||||||
|
# order += "wireless _first_"
|
||||||
|
order += "ethernet _first_"
|
||||||
|
# order += "battery all"
|
||||||
|
order += "disk /"
|
||||||
|
# order += "load"
|
||||||
|
order += "memory"
|
||||||
|
order += "tztime local"
|
||||||
|
|
||||||
|
wireless _first_ {
|
||||||
|
format_up = "W: (%quality at %essid) %ip"
|
||||||
|
format_down = "W: down"
|
||||||
|
}
|
||||||
|
|
||||||
|
ethernet _first_ {
|
||||||
|
format_up = "E: %ip (%speed)"
|
||||||
|
format_down = "E: down"
|
||||||
|
}
|
||||||
|
|
||||||
|
battery all {
|
||||||
|
format = "%status %percentage %remaining"
|
||||||
|
}
|
||||||
|
|
||||||
|
disk "/" {
|
||||||
|
format = "%avail"
|
||||||
|
}
|
||||||
|
|
||||||
|
load {
|
||||||
|
format = "%1min"
|
||||||
|
}
|
||||||
|
|
||||||
|
memory {
|
||||||
|
format = "%used | %available"
|
||||||
|
threshold_degraded = "1G"
|
||||||
|
format_degraded = "MEMORY < %available"
|
||||||
|
}
|
||||||
|
|
||||||
|
tztime local {
|
||||||
|
format = "%Y-%m-%d %H:%M:%S"
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ enable_audio_bell no
|
|||||||
|
|
||||||
# BEGIN_KITTY_FONTS
|
# BEGIN_KITTY_FONTS
|
||||||
font_family family="Iosevka"
|
font_family family="Iosevka"
|
||||||
font_size 18.0
|
font_size 14.0
|
||||||
bold_font auto
|
bold_font auto
|
||||||
italic_font auto
|
italic_font auto
|
||||||
bold_italic_font auto
|
bold_italic_font auto
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
configuration {
|
configuration {
|
||||||
modes: "drun,filebrowser,ssh";
|
modes: "drun,filebrowser,ssh,window";
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
display-drun: " ";
|
display-drun: " ";
|
||||||
display-run: " ";
|
display-run: " ";
|
||||||
@@ -11,6 +11,7 @@ configuration {
|
|||||||
window-format: "{w}{t}";
|
window-format: "{w}{t}";
|
||||||
font: "JetBrainsMono 15";
|
font: "JetBrainsMono 15";
|
||||||
icon-theme: "Colloid";
|
icon-theme: "Colloid";
|
||||||
|
ssh-client: "kitten ssh";
|
||||||
|
|
||||||
filebrowser {
|
filebrowser {
|
||||||
directory: "~/";
|
directory: "~/";
|
||||||
@@ -18,6 +19,10 @@ configuration {
|
|||||||
directories-first: true;
|
directories-first: true;
|
||||||
show-hidden: false;
|
show-hidden: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kb-accept-alt: "";
|
||||||
|
kb-custom-1: "Shift+Return";
|
||||||
}
|
}
|
||||||
|
|
||||||
@theme "~/.config/rofi/themes/breeze-dracula.rasi"
|
//@theme "~/.config/rofi/themes/breeze-dracula.rasi"
|
||||||
|
@theme "~/.config/rofi/themes/dmenu.rasi"
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
joblib==1.5.1
|
diskcache==5.6.3
|
||||||
spotipy==2.25.1
|
spotipy==2.25.1
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
#!/home/womax/.config/rofi/scripts/.env/bin/python
|
#!/home/womax/.config/rofi/scripts/.env/bin/python
|
||||||
import joblib
|
from diskcache import Cache
|
||||||
from joblib import expires_after
|
|
||||||
import os
|
import os
|
||||||
import os.path as path
|
import os.path as path
|
||||||
import shutil
|
|
||||||
import spotipy
|
import spotipy
|
||||||
from spotipy.oauth2 import SpotifyPKCE
|
from spotipy.oauth2 import SpotifyPKCE
|
||||||
import sys
|
import sys
|
||||||
@@ -20,13 +18,9 @@ cache_dir = path.join(
|
|||||||
path.join(os.getenv("HOME"), ".cache")),
|
path.join(os.getenv("HOME"), ".cache")),
|
||||||
"rofi-spotify")
|
"rofi-spotify")
|
||||||
|
|
||||||
if path.exists(cache_dir) and not path.isdir(cache_dir):
|
track_cache = Cache(path.join(cache_dir, "track_cache"),
|
||||||
shutil.rmtree(cache_dir)
|
eviction_policy="least-recently-stored",
|
||||||
|
size_limit=int(10e6))
|
||||||
if not path.exists(cache_dir):
|
|
||||||
os.makedirs(cache_dir, mode=0o755)
|
|
||||||
|
|
||||||
memory = joblib.Memory(cache_dir, verbose=0)
|
|
||||||
|
|
||||||
scopes = ["user-top-read", "user-modify-playback-state"]
|
scopes = ["user-top-read", "user-modify-playback-state"]
|
||||||
|
|
||||||
@@ -39,67 +33,111 @@ sp = spotipy.Spotify(
|
|||||||
cache_path=path.join(cache_dir, "credentials"))
|
cache_path=path.join(cache_dir, "credentials"))
|
||||||
))
|
))
|
||||||
|
|
||||||
@memory.cache(cache_validation_callback=expires_after(days=30))
|
|
||||||
def get_top_tracks(limit=200):
|
def get_top_tracks(limit=200):
|
||||||
offset = 0
|
offset = 0
|
||||||
tracks = []
|
tracks = []
|
||||||
while offset < limit:
|
while offset < limit:
|
||||||
reading = min(50, limit-offset)
|
reading = min(50, limit-offset)
|
||||||
tracks += sp.current_user_top_tracks(
|
new_tracks = sp.current_user_top_tracks(
|
||||||
limit=reading,
|
limit=reading,
|
||||||
offset=offset)["items"]
|
offset=offset)["items"]
|
||||||
|
if len(new_tracks) == 0:
|
||||||
|
return tracks
|
||||||
|
tracks += new_tracks
|
||||||
offset += reading
|
offset += reading
|
||||||
return tracks
|
return tracks
|
||||||
|
|
||||||
def format_track(track):
|
def simplify_track_info(track):
|
||||||
track_format = "{title} - {artist}\0info\x1f{track_id}\n"
|
result = {}
|
||||||
return track_format.format(
|
result["id"] = track["id"]
|
||||||
title=track["name"],
|
result["fullname"] = f'{track["name"]} - {track["artists"][0]["name"]}'
|
||||||
artist=track["artists"][0]["name"],
|
return result
|
||||||
track_id=track["id"]
|
|
||||||
)
|
|
||||||
|
|
||||||
def display_default():
|
def get_cached_tracks():
|
||||||
liked_tracks = get_top_tracks()
|
if len(track_cache) == 0:
|
||||||
for item in liked_tracks:
|
tt = get_top_tracks(500)
|
||||||
print(format_track(item), end="")
|
for track in tt:
|
||||||
|
track_cache[track["id"]] = simplify_track_info(track)
|
||||||
|
return [track_cache[k] for k in track_cache]
|
||||||
|
|
||||||
def play_track(track_id: str):
|
def search_track(query: str):
|
||||||
try:
|
search_rs = sp.search(query, limit=10, type='track')["tracks"]["items"]
|
||||||
sp.add_to_queue(f"spotify:track:{track_id}")
|
return [simplify_track_info(t) for t in search_rs]
|
||||||
except spotipy.SpotifyException as err:
|
|
||||||
print(f"\0message\x1f{err.msg}")
|
def play_track(track_id: str, track_fullname: str, now=True):
|
||||||
|
if track_id == "":
|
||||||
return
|
return
|
||||||
|
try:
|
||||||
|
to_play = {
|
||||||
|
"id": track_id,
|
||||||
|
"fullname": track_fullname
|
||||||
|
}
|
||||||
|
sp.add_to_queue(f"spotify:track:{to_play['id']}")
|
||||||
|
track_cache[to_play['id']] = to_play
|
||||||
|
except spotipy.SpotifyException as err:
|
||||||
|
print(f"{err.msg}", file=sys.stderr)
|
||||||
|
return
|
||||||
|
if now:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
sp.next_track()
|
sp.next_track()
|
||||||
|
|
||||||
@memory.cache(cache_validation_callback=expires_after(seconds=180))
|
def format_track(track):
|
||||||
def search_track(query: str):
|
track_format = "{fullname}\0info\x1f{track_id}\n"
|
||||||
try:
|
return track_format.format(
|
||||||
query_res = sp.search(query, limit=30, type='track')["tracks"]["items"]
|
fullname=track["fullname"],
|
||||||
if len(query_res) == 0:
|
track_id=track["id"]
|
||||||
print("\0message\x1fNo result in search")
|
)
|
||||||
return
|
|
||||||
for result in query_res:
|
def display_track_list(track_list=None):
|
||||||
print(format_track(result), end="")
|
if track_list is None:
|
||||||
except spotipy.SpotifyException as err:
|
track_list = get_cached_tracks()
|
||||||
print(f"\0message\x1f{err.msg}")
|
for item in track_list:
|
||||||
return
|
print(format_track(item), end="")
|
||||||
|
|
||||||
|
controls = {
|
||||||
|
"Next": sp.next_track,
|
||||||
|
"Play": sp.start_playback,
|
||||||
|
"Pause": sp.pause_playback,
|
||||||
|
"Previous": sp.previous_track,
|
||||||
|
}
|
||||||
|
|
||||||
|
def display_controls():
|
||||||
|
for k, _ in controls.items():
|
||||||
|
print(k)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
match int(os.getenv("ROFI_RETV", default=-1)):
|
rofi_retv = int(os.getenv("ROFI_RETV", default=-1));
|
||||||
|
print(rofi_retv, file=sys.stderr)
|
||||||
|
match rofi_retv:
|
||||||
case 0:
|
case 0:
|
||||||
# Initial call
|
# Initial call
|
||||||
display_default()
|
# enable custom hot key
|
||||||
|
print("\0use-hot-keys\x1ftrue")
|
||||||
|
display_controls()
|
||||||
|
display_track_list()
|
||||||
case 1:
|
case 1:
|
||||||
# Selected entry
|
# Selected entry
|
||||||
play_track(os.getenv("ROFI_INFO", ""))
|
# Default behavior to play the track immediatly
|
||||||
exit(0)
|
if sys.argv[1] in controls.keys():
|
||||||
|
controls[sys.argv[1]]()
|
||||||
|
return
|
||||||
|
|
||||||
|
play_track(os.getenv("ROFI_INFO", ""), sys.argv[1])
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
# Custom entry
|
# Custom entry
|
||||||
track = sys.argv[1]
|
track = sys.argv[1]
|
||||||
search_track(track)
|
display_track_list(search_track(track))
|
||||||
memory.reduce_size(bytes_limit="10M")
|
|
||||||
|
case 10:
|
||||||
|
# Custom hot key 1
|
||||||
|
# Add entry to the queue
|
||||||
|
if sys.argv[1] in controls.keys():
|
||||||
|
return
|
||||||
|
|
||||||
|
play_track(os.getenv("ROFI_INFO", ""),
|
||||||
|
sys.argv[1],
|
||||||
|
now=False)
|
||||||
case _:
|
case _:
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|||||||
43
.config/rofi/themes/dmenu.rasi
Normal file
43
.config/rofi/themes/dmenu.rasi
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* ROFI Color theme
|
||||||
|
* User: Qball
|
||||||
|
* Copyright: Dave Davenport
|
||||||
|
*/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background-color: Black;
|
||||||
|
border-color: White;
|
||||||
|
text-color: White;
|
||||||
|
font: "Iosevka 16";
|
||||||
|
}
|
||||||
|
window {
|
||||||
|
anchor: south;
|
||||||
|
location: south;
|
||||||
|
width: 100%;
|
||||||
|
padding: 4px;
|
||||||
|
children: [ horibox ];
|
||||||
|
}
|
||||||
|
horibox {
|
||||||
|
orientation: horizontal;
|
||||||
|
children: [ prompt, entry, listview ];
|
||||||
|
}
|
||||||
|
listview {
|
||||||
|
layout: horizontal;
|
||||||
|
spacing: 5px;
|
||||||
|
lines: 100;
|
||||||
|
}
|
||||||
|
entry {
|
||||||
|
expand: false;
|
||||||
|
width: 10em;
|
||||||
|
}
|
||||||
|
element {
|
||||||
|
padding: 0px 2px;
|
||||||
|
}
|
||||||
|
element selected {
|
||||||
|
background-color: SteelBlue;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text, element-icon {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
* {
|
|
||||||
main-bg: #11111be6;
|
|
||||||
main-fg: #cdd6f4ff;
|
|
||||||
main-br: #cba6f7ff;
|
|
||||||
main-ex: #f5e0dcff;
|
|
||||||
select-bg: #b4befeff;
|
|
||||||
select-fg: #11111bff;
|
|
||||||
separatorcolor: transparent;
|
|
||||||
border-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
3
.config/scripts/rofi_spotify.sh
Executable file
3
.config/scripts/rofi_spotify.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rofi -modes "spotify" -show spotify -matching "glob" -normalize-match
|
||||||
88
.emacs
88
.emacs
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
;;; Appearance
|
;;; Appearance
|
||||||
|
|
||||||
(add-to-list 'default-frame-alist `(font . "Iosevka-16"))
|
(add-to-list 'default-frame-alist `(font . "Iosevka-12"))
|
||||||
|
|
||||||
(tool-bar-mode 0)
|
(tool-bar-mode 0)
|
||||||
(menu-bar-mode 0)
|
(menu-bar-mode 0)
|
||||||
@@ -193,9 +193,9 @@
|
|||||||
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
|
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
|
||||||
(global-set-key (kbd "C-S-n") 'mc/mark-next-like-this)
|
(global-set-key (kbd "C-S-n") 'mc/mark-next-like-this)
|
||||||
(global-set-key (kbd "C-S-p") 'mc/mark-previous-like-this)
|
(global-set-key (kbd "C-S-p") 'mc/mark-previous-like-this)
|
||||||
;(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
|
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
|
||||||
;(global-set-key (kbd "C-\"") 'mc/skip-to-next-like-this)
|
(global-set-key (kbd "C-!") 'mc/skip-to-next-like-this)
|
||||||
;(global-set-key (kbd "C-:") 'mc/skip-to-previous-like-this)
|
(global-set-key (kbd "C-:") 'mc/skip-to-previous-like-this)
|
||||||
|
|
||||||
;;; markdown
|
;;; markdown
|
||||||
(rc/require 'markdown-mode 'impatient-mode 'simple-httpd)
|
(rc/require 'markdown-mode 'impatient-mode 'simple-httpd)
|
||||||
@@ -293,7 +293,67 @@
|
|||||||
|
|
||||||
;;; Typescript
|
;;; Typescript
|
||||||
(rc/require 'typescript-mode)
|
(rc/require 'typescript-mode)
|
||||||
(add-to-list 'auto-mode-alist '("\\.mts\\'" . typescript-mode))
|
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))
|
||||||
|
|
||||||
|
(use-package treesit
|
||||||
|
:mode (("\\.tsx\\'" . tsx-ts-mode)
|
||||||
|
("\\.js\\'" . typescript-ts-mode)
|
||||||
|
("\\.mjs\\'" . typescript-ts-mode)
|
||||||
|
("\\.mts\\'" . typescript-ts-mode)
|
||||||
|
("\\.cjs\\'" . typescript-ts-mode)
|
||||||
|
("\\.ts\\'" . typescript-ts-mode)
|
||||||
|
("\\.jsx\\'" . tsx-ts-mode)
|
||||||
|
("\\.json\\'" . json-ts-mode)
|
||||||
|
("\\.Dockerfile\\'" . dockerfile-ts-mode)
|
||||||
|
("\\.prisma\\'" . prisma-ts-mode)
|
||||||
|
;; More modes defined here...
|
||||||
|
)
|
||||||
|
:preface
|
||||||
|
(defun os/setup-install-grammars ()
|
||||||
|
"Install Tree-sitter grammars if they are absent."
|
||||||
|
(interactive)
|
||||||
|
(dolist (grammar
|
||||||
|
'((css . ("https://github.com/tree-sitter/tree-sitter-css" "v0.20.0"))
|
||||||
|
(bash "https://github.com/tree-sitter/tree-sitter-bash")
|
||||||
|
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.20.1"))
|
||||||
|
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.21.2" "src"))
|
||||||
|
(json . ("https://github.com/tree-sitter/tree-sitter-json" "v0.20.2"))
|
||||||
|
(python . ("https://github.com/tree-sitter/tree-sitter-python" "v0.20.4"))
|
||||||
|
(go "https://github.com/tree-sitter/tree-sitter-go" "v0.20.0")
|
||||||
|
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
||||||
|
(make "https://github.com/alemuller/tree-sitter-make")
|
||||||
|
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
|
||||||
|
(cmake "https://github.com/uyha/tree-sitter-cmake")
|
||||||
|
(toml "https://github.com/tree-sitter/tree-sitter-toml")
|
||||||
|
(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "tsx/src"))
|
||||||
|
(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "typescript/src"))
|
||||||
|
(yaml . ("https://github.com/ikatyang/tree-sitter-yaml" "v0.5.0"))
|
||||||
|
(prisma "https://github.com/victorhqc/tree-sitter-prisma")))
|
||||||
|
(add-to-list 'treesit-language-source-alist grammar)
|
||||||
|
;; Only install `grammar' if we don't already have it
|
||||||
|
;; installed. However, if you want to *update* a grammar then
|
||||||
|
;; this obviously prevents that from happening.
|
||||||
|
(unless (treesit-language-available-p (car grammar))
|
||||||
|
(treesit-install-language-grammar (car grammar)))))
|
||||||
|
|
||||||
|
;; Optional, but recommended. Tree-sitter enabled major modes are
|
||||||
|
;; distinct from their ordinary counterparts.
|
||||||
|
;;
|
||||||
|
;; You can remap major modes with `major-mode-remap-alist'. Note
|
||||||
|
;; that this does *not* extend to hooks! Make sure you migrate them
|
||||||
|
;; also
|
||||||
|
(dolist (mapping
|
||||||
|
'((css-mode . css-ts-mode)
|
||||||
|
(typescript-mode . typescript-ts-mode)
|
||||||
|
(js-mode . typescript-ts-mode)
|
||||||
|
(js2-mode . typescript-ts-mode)
|
||||||
|
(css-mode . css-ts-mode)
|
||||||
|
(json-mode . json-ts-mode)
|
||||||
|
(js-json-mode . json-ts-mode)))
|
||||||
|
(add-to-list 'major-mode-remap-alist mapping))
|
||||||
|
:config
|
||||||
|
(os/setup-install-grammars))
|
||||||
|
|
||||||
;;; Tide
|
;;; Tide
|
||||||
(rc/require 'tide)
|
(rc/require 'tide)
|
||||||
@@ -364,10 +424,20 @@
|
|||||||
'helm-xref)
|
'helm-xref)
|
||||||
|
|
||||||
(which-key-mode)
|
(which-key-mode)
|
||||||
(setq lsp-keymap-prefix "s-i")
|
(use-package lsp-mode
|
||||||
(add-hook 'c-mode-hook 'lsp)
|
:ensure t
|
||||||
(add-hook 'c++-mode-hook 'lsp)
|
:hook ((c-mode
|
||||||
(add-hook 'python-mode 'lsp)
|
c++-mode
|
||||||
|
python-mode
|
||||||
|
tsx-ts-mode
|
||||||
|
typescript-ts-mode
|
||||||
|
))
|
||||||
|
:custom
|
||||||
|
(lsp-keymap-prefix "s-i")
|
||||||
|
(lsp-keep-workspace-alive nil)
|
||||||
|
(lsp-enable-xref t)
|
||||||
|
(lsp-enable-on-type-formatting nil)
|
||||||
|
)
|
||||||
|
|
||||||
;;; zoxide
|
;;; zoxide
|
||||||
(rc/require 'zoxide)
|
(rc/require 'zoxide)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
(add-to-list 'package-archives
|
|
||||||
'("melpa" . "https://melpa.org/packages/") t)
|
|
||||||
;; (add-to-list 'package-archives
|
;; (add-to-list 'package-archives
|
||||||
;; '("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
;; '("melpa" . "https://melpa.org/packages/") t)
|
||||||
|
(add-to-list 'package-archives
|
||||||
|
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
||||||
|
|
||||||
(defvar rc/package-contents-refreshed nil)
|
(defvar rc/package-contents-refreshed nil)
|
||||||
|
|
||||||
|
|||||||
4
MANIFEST
4
MANIFEST
@@ -2,10 +2,14 @@
|
|||||||
.emacs.local|symlink|
|
.emacs.local|symlink|
|
||||||
.emacs.rc|symlink|
|
.emacs.rc|symlink|
|
||||||
.config/kitty|symlink|
|
.config/kitty|symlink|
|
||||||
|
.config/i3|symlink|
|
||||||
|
.config/i3status|symlink|
|
||||||
.config/rofi|symlink|
|
.config/rofi|symlink|
|
||||||
.config/kanata|symlink|
|
.config/kanata|symlink|
|
||||||
.config/kanata-tray|symlink|
|
.config/kanata-tray|symlink|
|
||||||
|
.config/scripts|symlink|
|
||||||
.zshrc|symlink|
|
.zshrc|symlink|
|
||||||
.p10k.omp.yml|symlink|
|
.p10k.omp.yml|symlink|
|
||||||
.zsh|symlink|
|
.zsh|symlink|
|
||||||
.aliases|symlink|
|
.aliases|symlink|
|
||||||
|
.vimrc|symlink|
|
||||||
|
|||||||
Reference in New Issue
Block a user