feat: change to leftwm

This commit is contained in:
jabuxas 2025-01-15 21:26:31 -03:00
parent 554e5e9424
commit 962fc10ef1
10 changed files with 145 additions and 43 deletions

View File

@ -1,18 +1,14 @@
if status --is-login if status --is-login
fish_add_path ~/.local/bin fish_add_path ~/.local/bin
fish_add_path "$HOME/.cargo/bin" fish_add_path "$HOME/.cargo/bin"
source "$HOME/.cargo/env.fish"
bass source /etc/profile
set -gx BAT_THEME "Solarized (light)" set -gx BAT_THEME "Solarized (light)"
set -gx SOLARIZED true set -gx SOLARIZED true
set -gx EDITOR "nvim" set -gx EDITOR "nvim"
if test -z "$WAYLAND_DISPLAY" && test "$XDG_VTNR" -eq 1
set -gx XDG_CURRENT_DESKTOP "sway"
WLR_NO_HARDWARE_CURSORS=1 sway
end end
bass source /etc/profile
end
if status is-interactive if status is-interactive
alias cb="~/repos/cports/cbuild" alias cb="~/repos/cports/cbuild"
alias g="git" alias g="git"
@ -26,7 +22,7 @@ if status is-interactive
alias feh="imv" alias feh="imv"
alias lg="lazygit" alias lg="lazygit"
alias cpr="cd ~/repos/cports-docker && docker compose run --build --rm cports" alias cpr="cd ~/repos/cports-docker && docker compose run --build --rm cports"
alias cop="wl-copy" alias cop="xclip -sel clip"
alias poweroff="systemctl poweroff" alias poweroff="systemctl poweroff"
alias cat="bat" alias cat="bat"

View File

@ -21,20 +21,20 @@
], ],
max_window_width: None, max_window_width: None,
layouts: [ layouts: [
MainAndVertStack, "MainAndVertStack",
Monocle, "Monocle",
MainAndHorizontalStack, "MainAndHorizontalStack",
// MainAndDeck, // // MainAndDeck,
GridHorizontal, "GridHorizontal",
EvenHorizontal, "EvenHorizontal",
// EvenVertical, // // EvenVertical,
Fibonacci, "Fibonacci",
LeftMain, "LeftMain",
CenterMain, "CenterMain",
// CenterMainBalanced, // // CenterMainBalanced,
// CenterMainFluid, // // CenterMainFluid,
// RightWiderLeftStack, // // RightWiderLeftStack,
// LeftWiderRightStack, // // LeftWiderRightStack,
], ],
layout_mode: Tag, layout_mode: Tag,
insert_behavior: Bottom, insert_behavior: Bottom,
@ -74,7 +74,7 @@
(window_class: "obs", spawn_on_tag: 5), (window_class: "obs", spawn_on_tag: 5),
(window_class: "krita", spawn_on_tag: 5), (window_class: "krita", spawn_on_tag: 5),
(window_class: "obsidian", spawn_on_tag: 3), (window_class: "obsidian", spawn_on_tag: 3),
(window_class: "parsecd", spawn_on_tag: 5, spawn_fullscreen: true), (window_class: "parsecd", spawn_on_tag: 5),
(window_class: "Dbeaver", spawn_on_tag: 3), (window_class: "Dbeaver", spawn_on_tag: 3),
(window_class: "Chromium-browser", spawn_on_tag: 10), (window_class: "Chromium-browser", spawn_on_tag: 10),
(window_class: "steam", spawn_on_tag: 8), (window_class: "steam", spawn_on_tag: 8),
@ -109,7 +109,7 @@
auto_derive_workspaces: true, auto_derive_workspaces: true,
keybind: [ keybind: [
(command: Execute, value: "rofi -show drun", modifier: ["modkey", "Shift"], key: "Return"), (command: Execute, value: "rofi -show drun", modifier: ["modkey", "Shift"], key: "Return"),
(command: Execute, value: "~/.local/bin/wezterm-gui", modifier: ["modkey"], key: "Return"), (command: Execute, value: "alacritty", modifier: ["modkey"], key: "Return"),
(command: CloseWindow, value: "", modifier: ["modkey", "Shift"], key: "c"), (command: CloseWindow, value: "", modifier: ["modkey", "Shift"], key: "c"),
(command: SoftReload, value: "", modifier: ["modkey", "Shift"], key: "r"), (command: SoftReload, value: "", modifier: ["modkey", "Shift"], key: "r"),
(command: Execute, value: "loginctl kill-session $XDG_SESSION_ID", modifier: ["modkey", "Shift"], key: "x"), (command: Execute, value: "loginctl kill-session $XDG_SESSION_ID", modifier: ["modkey", "Shift"], key: "x"),
@ -166,13 +166,14 @@
(command: ToggleFullScreen, modifier: ["modkey"], key: "f"), (command: ToggleFullScreen, modifier: ["modkey"], key: "f"),
// apps // apps
(command: Execute, value: "flameshot full", modifier: [], key: "Print"), (command: Execute, value: "~/scripts/x-print.sh p", modifier: [], key: "XF86Calculator"),
(command: Execute, value: "flameshot gui", modifier: ["Shift"], key: "Print"), (command: Execute, value: "~/scripts/x-print.sh s", modifier: ["Shift"], key: "XF86Calculator"),
(command: Execute, value: "~/.local/bin/print-tmp.sh", modifier: ["Control", "Shift"], key: "Print"), (command: Execute, value: "~/scripts/x-print.sh m", modifier: ["Control", "Shift"], key: "XF86Calculator"),
(command: Execute, value: "~/.local/bin/print-window.sh", modifier: ["Control"], key: "Print"), (command: Execute, value: "~/scripts/x-print.sh w", modifier: ["Control"], key: "XF86Calculator"),
(command: Execute, value: "flameshot screen", modifier: ["Control", "Alt"], key: "Print"), (command: Execute, value: "~/scripts/x-print.sh t", modifier: ["modkey"], key: "XF86Calculator"),
(command: Execute, value: "firefox", modifier: ["modkey"], key: "b"),
(command: Execute, value: "steam --noverifyfiles -cef-enable-debugging", modifier: ["modkey", "Shift"], key: "s"), (command: Execute, value: "~/.local/share/AppImage/ZenBrowser.AppImage", modifier: ["modkey"], key: "b"),
(command: Execute, value: "steam", modifier: ["modkey", "Shift"], key: "s"),
(command: Execute, value: "pcmanfm", modifier: ["modkey"], key: "e"), (command: Execute, value: "pcmanfm", modifier: ["modkey"], key: "e"),
(command: Execute, value: "~/scripts/macro.sh", modifier: ["Control", "Shift"], key: "m"), (command: Execute, value: "~/scripts/macro.sh", modifier: ["Control", "Shift"], key: "m"),
(command: Execute, value: "flatpak run --env=XL_SECRET_PROVIDER=file dev.goats.xivlauncher", modifier: ["modkey", "Alt"], key: "x"), (command: Execute, value: "flatpak run --env=XL_SECRET_PROVIDER=file dev.goats.xivlauncher", modifier: ["modkey", "Alt"], key: "x"),

View File

@ -1 +1 @@
/yang/.config/leftwm/themes/everforest /yang/.config/leftwm/themes/rose

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
leftwm-command "UnloadTheme"
pkill polybar
pkill picom

View File

@ -0,0 +1,9 @@
#![enable(implicit_some)]
(
border_width : 2,
margin : 5,
workspace_margin : 4,
default_border_color : "#242b2e",
floating_border_color : "#242b2e",
focused_border_color : "#e57474",
)

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
#down the last running theme
if [ -f "/tmp/leftwm-theme-down" ]; then
/tmp/leftwm-theme-down
rm /tmp/leftwm-theme-down
fi
ln -s $SCRIPTPATH/down /tmp/leftwm-theme-down
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
WALLPAPER_PATH=~/pics/wallpapers
sh ~/scripts/screenlayout.sh
setxkbmap us intl ctrl:nocaps
gsettings set org.gnome.desktop.interface gtk-theme "Material-Black-Blueberry-LA"
gsettings set org.gnome.desktop.interface cursor-theme 'Simp1e'
gsettings set org.gnome.desktop.interface font-name 'Terminess Nerd Font 12'
gsettings set org.gnome.desktop.interface icon-theme "We10X-black-dark"
echo rose > ~/colorscheme
pkill nitrogen; nitrogen --restore &
bash ~/.config/polybar/launch.sh
~/.local/bin/picom-ibhagwan -b --experimental-backends &

View File

@ -1,11 +1,11 @@
[colors] [colors]
background = #1e2326 background = #141b1e
background-alt = background-alt = #242b2e
foreground = #93b259 foreground = #e57474
primary = #a7c080 primary = #e57474
secondary = #93b259 secondary = #c96666
alert = #394522 alert = #c57fd6
disabled = #d3c6aa disabled = #b3b9b8
[bar/bar0] [bar/bar0]
width = 100% width = 100%
@ -27,10 +27,10 @@ padding-right = 2
module-margin = 1 module-margin = 1
font-0 = CartographCF Nerd Font;2 font-0 = Terminess Nerd Font;2
font-1 = SauceCodePro Nerd Font:size=16;3 font-1 = SauceCodePro Nerd Font:size=16;3
modules-left = xworkspaces spotify-title spotify-prev spotify-playpause spotify-next modules-left = xworkspaces
modules-right = tray xwindow pulseaudio modules-right = tray xwindow pulseaudio
modules-center = date modules-center = date
@ -81,6 +81,7 @@ format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume> format-volume = <label-volume>
label-volume = %percentage%% label-volume = %percentage%%
click-right = pavucontrol
label-muted = muted label-muted = muted
label-muted-foreground = ${colors.disabled} label-muted-foreground = ${colors.disabled}

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
xrandr --output DisplayPort-0 --off --output DisplayPort-1 --mode 1920x1080 --pos 2560x1080 --rotate normal --output DisplayPort-2 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --primary --mode 2560x1080 --pos 0x1080 --rotate normal xrandr --output DisplayPort-0 --off --output DisplayPort-2 --mode 2560x1080 --pos 2560x0 --rotate normal --output HDMI-A-0 --mode 2560x1080 --pos 0x0 --rotate normal --primary

View File

@ -0,0 +1,65 @@
#!/usr/bin/env sh
save_dir="$HOME/pics/screenshots"
save_file="screenshot-$(date -Iseconds | cut -d '+' -f1).png"
temp_screenshot="/tmp/screenshot.png"
mkdir -p "$save_dir"
upload() {
curl -F'file=@'"${temp_screenshot}" \
-Fsecret= \
-H "X-Auth: $(cat ~/.key)" \
https://paste.jabuxas.xyz | xclip -selection clipboard
}
print_error() {
cat << "EOF"
./x-print.sh <action>
...valid actions are...
p : print all screens
s : snip current screen
m : print focused monitor
t : tmp print
w : current window
EOF
}
case $1 in
p) # print all screens
maim "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
s) # select area to screenshot
maim -s "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
m) # screenshot focused monitor
focused_monitor=$(xrandr --query | grep " connected primary" | cut -d" " -f1)
maim -g "$(xrandr --query | grep "$focused_monitor" | grep -oP '\d+x\d+\+\d+\+\d+')" "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
t) # upload to paste
maim -s "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot" && \
upload
;;
w) # current window
active_window=$(xdotool getactivewindow)
maim -i "$active_window" "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
*) # invalid option
print_error
exit 1
;;
esac
# Save and cleanup
cp "$temp_screenshot" "${save_dir}/${save_file}"
rm "$temp_screenshot"

View File

@ -45,7 +45,7 @@ fi
if [ -n "$failsafe" ]; then if [ -n "$failsafe" ]; then
export GTK_THEME="Everforest-Dark-BL" export GTK_THEME="Everforest-Dark-BL"
export XDG_SESSION_TYPE="x11" export XDG_SESSION_TYPE="x11"
exec dbus-launch --exit-with-session leftwm > ~/leftwm.log exec leftwm > ~/leftwm.log
else else
exec $command exec $command
fi fi