leftwm : removed

This commit is contained in:
2024-12-26 17:12:49 +09:00
parent e28bea766c
commit ed95c3a26a
11 changed files with 0 additions and 683 deletions

View File

@ -1,3 +0,0 @@
#!/bin/bash
xrandr --output HDMI-1 --primary --mode 2560x1440 --rotate normal
export AAA="aaaa"

View File

@ -1,137 +0,0 @@
// _ ___ ___ _
// | | / __)_ / __|_)
// | | ____| |__| |_ _ _ _ ____ ____ ___ ____ | |__ _ ____ ____ ___ ____
// | |/ _ ) __) _) | | | \ / ___) _ \| _ \| __) |/ _ | / ___) _ \| _ \
// | ( (/ /| | | |_| | | | | | | ( (__| |_| | | | | | | ( ( | |_| | | |_| | | | |
// |_|\____)_| \___)____|_|_|_| \____)___/|_| |_|_| |_|\_|| (_)_| \___/|_| |_|
// A WindowManager for Adventurers (____/
// For info about configuration please visit https://github.com/leftwm/leftwm/wiki
// For defining the window rules check the class with this command xprop | grep 'CLASS'
#![enable(implicit_some)]
(
modkey: "Mod4",
mousekey: "Mod4",
workspaces: [],
tags: [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
],
max_window_width: None,
layouts: [
MainAndVertStack,
LeftWiderRightStack,
MainAndHorizontalStack,
CenterMainBalanced,
GridHorizontal,
/* MainAndDeck, */
/* EvenHorizontal, */
/* EvenVertical, */
/* Fibonacci, */
/* LeftMain, */
/* CenterMain, */
/* CenterMainFluid, */
/* Monocle, */
/* RightWiderLeftStack, */
],
layout_mode: Workspace,
insert_behavior: Bottom,
scratchpad: [
(name: "Alacritty", value: "alacritty", x: 400, y: 300, height: 400, width: 1200),
],
window_rules: [
( window_class: "Navigator", spawn_on_tag: 1 ),
( window_class: "Mailspring", spawn_on_tag: 8 ),
( window_title: "Qv2ray", spawn_on_tag: 9 ),
( window_class: "Zotero", spawn_on_tag: 3 ),
( window_class: "frog", spawn_floating: true ),
( window_class: "krita", spawn_on_tag: 5 ),
( window_class: "Blender", spawn_on_tag: 5 ),
( window_class: "Inkscape", spawn_on_tag: 5 ),
( window_class: "resolve", spawn_on_tag: 6 ),
( window_class: "libreoffice", spawn_on_tag: 4 ),
( window_class: "easyeffects", spawn_on_tag: 6 ),
( window_class: "gnome-calculator", spawn_floating: true ),
],
disable_current_tag_swap: false,
disable_tile_drag: false,
disable_window_snap: true,
focus_behaviour: Sloppy,
focus_new_windows: true,
single_window_border: true,
sloppy_mouse_follows_focus: true,
keybind: [
( command: Execute, value: "~/.config/leftwm/scripts/brightness_up.sh", modifier: [], key: "XF86XK_MonBrightnessUp" ),
( command: Execute, value: "~/.config/leftwm/scripts/brightness_down.sh", modifier: [], key: "XF86XK_MonBrightnessDown" ),
( command: Execute, value: "amixer -q set Master 5%+", modifier: [], key: "XF86XK_AudioRaiseVolume" ),
( command: Execute, value: "amixer -q set Master 5%-", modifier: [], key: "XF86XK_AudioLowerVolume" ),
( command: Execute, value: "amixer set Master toggle", modifier: [], key: "XF86XK_AudioMute" ),
( command: Execute, value: "import -window root ~/Pictures/$(date '+%Y%m%d-%H%M%S').png", modifier: [], key: "Print" ),
(command: Execute, value: "rofi -show drun", modifier: ["modkey"], key: "p"),
(command: Execute, value: "rofi -show run", modifier: ["modkey"], key: "e"),
(command: Execute, value: "rofi -show ssh", modifier: ["modkey"], key: "s"),
(command: Execute, value: "rofi -show", modifier: ["modkey"], key: "Tab"),
(command: Execute, value: "alacritty", modifier: ["modkey", "Shift"], key: "Return"),
(command: CloseWindow, value: "", modifier: ["modkey", "Shift"], key: "q"),
(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: "slock", modifier: ["modkey", "Control"], key: "l"),
(command: MoveToLastWorkspace, value: "", modifier: ["modkey", "Shift"], key: "w"),
(command: SwapTags, value: "", modifier: ["modkey"], key: "w"),
(command: MoveWindowUp, value: "", modifier: ["modkey", "Shift"], key: "k"),
(command: MoveWindowDown, value: "", modifier: ["modkey", "Shift"], key: "j"),
(command: MoveWindowTop, value: "", modifier: ["modkey"], key: "Return"),
(command: FocusWindowUp, value: "", modifier: ["modkey"], key: "k"),
(command: FocusWindowDown, value: "", modifier: ["modkey"], key: "j"),
(command: NextLayout, value: "", modifier: ["modkey", "Control"], key: "k"),
(command: PreviousLayout, value: "", modifier: ["modkey", "Control"], key: "j"),
(command: FocusWorkspaceNext, value: "", modifier: ["modkey"], key: "l"),
(command: FocusWorkspacePrevious, value: "", modifier: ["modkey"], key: "h"),
(command: MoveWindowUp, value: "", modifier: ["modkey", "Shift"], key: "Up"),
(command: MoveWindowDown, value: "", modifier: ["modkey", "Shift"], key: "Down"),
(command: FocusWindowUp, value: "", modifier: ["modkey"], key: "Up"),
(command: FocusWindowDown, value: "", modifier: ["modkey"], key: "Down"),
(command: NextLayout, value: "", modifier: ["modkey", "Control"], key: "Up"),
(command: PreviousLayout, value: "", modifier: ["modkey", "Control"], key: "Down"),
(command: FocusWorkspaceNext, value: "", modifier: ["modkey"], key: "Right"),
(command: FocusWorkspacePrevious, value: "", modifier: ["modkey"], key: "Left"),
(command: ToggleFloating, modifier: ["modkey", "Control"], key: "f"),
(command: TileToFloating, modifier: ["modkey", "Shift"], key: "f"),
(command: FloatingToTile, modifier: ["modkey", "Shift"], key: "t"),
(command: GotoTag, value: "1", modifier: ["modkey"], key: "1"),
(command: GotoTag, value: "2", modifier: ["modkey"], key: "2"),
(command: GotoTag, value: "3", modifier: ["modkey"], key: "3"),
(command: GotoTag, value: "4", modifier: ["modkey"], key: "4"),
(command: GotoTag, value: "5", modifier: ["modkey"], key: "5"),
(command: GotoTag, value: "6", modifier: ["modkey"], key: "6"),
(command: GotoTag, value: "7", modifier: ["modkey"], key: "7"),
(command: GotoTag, value: "8", modifier: ["modkey"], key: "8"),
(command: GotoTag, value: "9", modifier: ["modkey"], key: "9"),
(command: MoveToTag, value: "1", modifier: ["modkey", "Shift"], key: "1"),
(command: MoveToTag, value: "2", modifier: ["modkey", "Shift"], key: "2"),
(command: MoveToTag, value: "3", modifier: ["modkey", "Shift"], key: "3"),
(command: MoveToTag, value: "4", modifier: ["modkey", "Shift"], key: "4"),
(command: MoveToTag, value: "5", modifier: ["modkey", "Shift"], key: "5"),
(command: MoveToTag, value: "6", modifier: ["modkey", "Shift"], key: "6"),
(command: MoveToTag, value: "7", modifier: ["modkey", "Shift"], key: "7"),
(command: MoveToTag, value: "8", modifier: ["modkey", "Shift"], key: "8"),
(command: MoveToTag, value: "9", modifier: ["modkey", "Shift"], key: "9"),
(command: FocusPreviousTag, modifier: ["Control", "Alt"], key: "Left"),
(command: FocusNextTag, modifier: ["Control", "Alt"], key: "Right"),
(command: FocusPreviousTag, modifier: ["Control", "Alt"], key: "h"),
(command: FocusNextTag, modifier: ["Control", "Alt"], key: "l"),
(command: ToggleFullScreen, modifier: ["modkey"], key: "f"),
(command: ToggleScratchPad, value: "Alacritty", modifier: ["modkey", "Shift"], key: "p"),
],
state_path: None,
)

View File

@ -1,8 +0,0 @@
#!/bin/bash
brightness=$(cat /sys/class/backlight/intel_backlight/brightness)
new_brightness=$(($brightness - 200))
if [[ $new_brightness -gt 0 ]]; then
echo $new_brightness > /sys/class/backlight/intel_backlight/brightness
fi

View File

@ -1,9 +0,0 @@
#!/bin/bash
brightness=$(cat /sys/class/backlight/intel_backlight/brightness)
max_brightness=$(cat /sys/class/backlight/intel_backlight/max_brightness)
new_brightness=$(($brightness + 200))
if [[ $new_brightness -lt $max_brightness ]]; then
echo $new_brightness > /sys/class/backlight/intel_backlight/brightness
fi

View File

@ -1,2 +0,0 @@
#!/usr/bin/env bash
leftwm-command "SendWorkspaceToTag $1 $2"

View File

@ -1,16 +0,0 @@
#!/bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
#set background
if [ -x "$(command -v feh)" ]; then
feh --bg-scale $SCRIPTPATH/down.jpg
fi
leftwm-command "UnloadTheme"
pkill picom
pkill polybar
pkill flameshot
kill $(ps aux | grep "layout.sh" | grep -v grep | awk '{print $2}')

View File

@ -1,408 +0,0 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #1a1b26
foreground = #c0caf5
background-alt = #a9b1d6
foreground-alt = #8e94d0
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/mainbar0]
inherit = bar/barbase
modules-left = workspace0
[module/workspace0]
type = custom/script
height = 20
exec = leftwm-state -w 0 -t $SCRIPTPATH/template.liquid
tail = true
[bar/mainbar1]
inherit = bar/barbase
modules-left = workspace1
[module/workspace1]
type = custom/script
exec = leftwm-state -w 1 -t $SCRIPTPATH/template.liquid
tail = true
[bar/mainbar2]
inherit = bar/barbase
modules-left = workspace2
[module/workspace2]
type = custom/script
exec = leftwm-state -w 2 -t $SCRIPTPATH/template.liquid
tail = true
[bar/mainbar3]
inherit = bar/barbase
modules-left = workspace3
[module/workspace3]
type = custom/script
exec = leftwm-state -w 3 -t $SCRIPTPATH/template.liquid
tail = true
[bar/barbase]
width = ${env:width}
offset-x = ${env:offsetx}
monitor = ${env:monitor}
height = 27
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 0
border-color = #000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = JetBrainsMono Nerd Font Mono:pixelsize=12;1
modules-center =
modules-right = filesystem xbacklight pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu
tray-position = right
tray-padding = 2
cursor-click = pointer
cursor-scroll = ns-resize
[module/ewmh]
type = internal/xworkspaces
label-active = " %icon% %name% "
label-active-foreground = ${colors.foreground-alt}
label-active-background = ${colors.background-alt}
label-active-underline = ${colors.primary}
label-occupied = " %icon% %name% "
label-occupied-underline = ${colors.secondary}
label-urgent = " %icon% %name% "
label-urgent-foreground = ${colors.foreground}
label-urgent-background = ${colors.background}
label-urgent-underline = ${colors.alert}
label-empty = " %icon% %name% "
label-empty-foreground = ${colors.foreground}
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 0
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
; Separator in between workspaces
; label-separator = |
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = ""
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
type = internal/network
interface-type = wireless
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-disconnected =
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 直
ramp-signal-3 = 直
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface-type = wired
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
[module/date]
type = internal/date
interval = 5
date = "%Y-%m-%d"
date-alt = "%A, %B %d, %Y"
time = "%H:%M"
time-alt = "%H:%M:%S"
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted =  muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close = ﰸ
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = 
menu-0-0-exec = menu-open-1
menu-0-1 = 
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true

View File

@ -1,3 +0,0 @@
{% for workspace in workspaces %}
{{workspace.w}} {{workspace.x}} {{workspace.y}}
{% endfor %}

View File

@ -1,26 +0,0 @@
{% for tag in workspace.tags %}
{% if tag.mine %}
%{A1:$SCRIPTPATH/change_to_tag {{workspace.index}} {{tag.index}}:}
%{F#000000}%{B#FFB52A} {{tag.name}} %{B-}%{F-}
%{A}
{% elsif tag.urgent %}
%{A1:$SCRIPTPATH/change_to_tag {{workspace.index}} {{tag.index}}:}
%{B#FF0000}%{F#000000} {{tag.name}} %{F-}%{B-}
%{A}
{% elsif tag.visible %}
%{A1:$SCRIPTPATH/change_to_tag {{workspace.index}} {{tag.index}}:}
%{F#000000}%{B#FFFFFF} {{tag.name}} %{B-}%{F-}
%{A}
{% elsif tag.busy %}
%{A1:$SCRIPTPATH/change_to_tag {{workspace.index}} {{tag.index}}:}
%{F#FFB52A} {{tag.name}} %{F-}
%{A}
{% else %}
%{A1:$SCRIPTPATH/change_to_tag {{workspace.index}} {{tag.index}}:}
%{F#FFFFFF} {{tag.name}} %{F-}
%{A}
{% endif %}
{% endfor %}
%{c}
{{ window_title }}

View File

@ -1,6 +0,0 @@
(border_width: Some(1),
margin: Some(4),
default_border_color: Some("#222222"),
floating_border_color: Some("#005500"),
focused_border_color: Some("#FFB53A"),
)

View File

@ -1,65 +0,0 @@
#!/bin/bash
##################################################
# DISPLAY
##################################################
# if [[ $JUPCID == "HOME-DESKTOP" ]]; then
# xrandr --output DP-4 --primary --mode 2560x1440 --rotate normal --output HDMI-0 --rotate right --right-of DP-4
# elif [[ $JUPCID == "HWDEV" ]]; then
# xrandr --output HDMI-1 --primary --mode 2560x1440 --rotate normal
# fi
wmname LG3D
export _JAVA_AWT_WM_NONREPARETING=1
##################################################
# THEME & POLYBAR
##################################################
export SCRIPTPATH="$( cd "$(dirname "$0")" || exit ; 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
#boot a polybar for each monitor
index=0
monitors="$(polybar -m | sed s/:.*//)"
leftwm-state -q -n -t "$SCRIPTPATH"/sizes.liquid | sed -r '/^\s*$/d' | while read -r width x y
do
let indextemp=index+1
monitor=$(sed "$indextemp!d" <<<"$monitors")
barname="mainbar$index"
monitor=$monitor offset=$x width=$width polybar -c "$SCRIPTPATH"/polybar.config $barname &> /dev/null &
let index=indextemp
done
#boot picom if it exists
if [ -x "$(command -v picom -b)" ]; then
picom &> /dev/null &
fi
# set the theme.ron config
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
# set the background
if [ -x "$(command -v feh)" ]; then
~/scripts/random_wallpaper.sh
fi
# start flameshot if exists
if [ -x "$(command -v flameshot)" ]; then
flameshot &> /dev/null &
fi
##################################################
# STARTUP APPLICATION
##################################################
killall nm-applet && nm-applet &
killall volumeicon && volumeicon &
echo "done"