Compare commits
3 Commits
6511ef9860
...
45ed3a8081
| Author | SHA1 | Date | |
|---|---|---|---|
| 45ed3a8081 | |||
| eebfbdf622 | |||
| 508bdeb553 |
@ -1,6 +1,3 @@
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
set -gx XDG_CONFIG_HOME /home/joe/.config
|
||||
set -gx XDG_DATA_HOME /home/joe/.local/share
|
||||
set -gx XDG_CACHE_HOME /home/joe/.cache
|
||||
@ -76,12 +73,13 @@ end
|
||||
|
||||
fish_ssh_agent
|
||||
# The next line updates PATH for the Google Cloud SDK.
|
||||
if [ -f '/home/joe/Downloads/google-cloud-sdk/path.fish.inc' ]; . '/home/joe/Downloads/google-cloud-sdk/path.fish.inc'; end
|
||||
# if [ -f '/home/joe/Downloads/google-cloud-sdk/path.fish.inc' ]; . '/home/joe/Downloads/google-cloud-sdk/path.fish.inc'; end
|
||||
|
||||
# opam configuration
|
||||
source /home/joe/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
|
||||
# source /home/joe/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
|
||||
|
||||
if test -e "/home/joe/Repositories/emsdk/emsdk_env.fish"
|
||||
source "/home/joe/Repositories/emsdk/emsdk_env.fish"
|
||||
set -gx EMSDK_QUIET 1
|
||||
end
|
||||
alias claude="/home/joe/.claude/local/claude"
|
||||
|
||||
@ -15,7 +15,7 @@ SETUVAR WINEPREFIX:/home/joe/\x2elocal/share/wine
|
||||
SETUVAR XDG_CACHE_HOME:/home/joe/\x2ecache
|
||||
SETUVAR XDG_CONFIG_HOME:/home/joe/\x2econfig
|
||||
SETUVAR XDG_DATA_HOME:/home/joe/\x2elocal/share
|
||||
SETUVAR __fish_initialized:3400
|
||||
SETUVAR __fish_initialized:3800
|
||||
SETUVAR _fisher_ankitsumitg_2F_docker_2D_fish_2D_completions_files:/home/joe/\x2econfig/fish/completions/docker\x2efish
|
||||
SETUVAR _fisher_plugins:ankitsumitg/docker\x2dfish\x2dcompletions
|
||||
SETUVAR fish_color_autosuggestion:969896
|
||||
@ -36,7 +36,7 @@ SETUVAR fish_color_operator:00a6b2
|
||||
SETUVAR fish_color_param:81a2be
|
||||
SETUVAR fish_color_quote:b5bd68
|
||||
SETUVAR fish_color_redirection:8abeb7
|
||||
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
|
||||
@ -84,6 +84,34 @@ def new_client(client):
|
||||
y = client.group.screen.height - client.height - padding - 22
|
||||
client.set_position_floating(x,y)
|
||||
|
||||
def move_to_corner(corner: str) -> Callable:
|
||||
def _inner(qtile) -> None:
|
||||
win = qtile.current_window
|
||||
if win is None:
|
||||
return
|
||||
|
||||
if not win.floating:
|
||||
win.toggle_floating()
|
||||
|
||||
screen = qtile.current_screen
|
||||
padding = 0
|
||||
bar_height = 24
|
||||
|
||||
w = win.width
|
||||
h = win.height
|
||||
sw = screen.width
|
||||
sh = screen.height
|
||||
|
||||
positions = {
|
||||
"top-left": (padding, bar_height + padding),
|
||||
"top-right": (sw - w - padding, bar_height + padding),
|
||||
"bottom-left": (padding, sh - h - padding),
|
||||
"bottom-right": (sw - w - padding, sh - h - padding),
|
||||
}
|
||||
x, y = positions[corner]
|
||||
win.set_position_floating(x, y)
|
||||
return _inner
|
||||
|
||||
keys = [
|
||||
# A list of available commands that can be bound to keys can be found
|
||||
# at https://docs.qtile.org/en/latest/manual/config/lazy.html
|
||||
@ -91,8 +119,8 @@ keys = [
|
||||
# .when(wm_class != 'kitty')
|
||||
# Key([mod], "h", lazy.function(move_focus, direction='left'), desc="Move focus to left"),
|
||||
Key([mod], "h", lazy.layout.left().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
|
||||
Key([mod], "j", lazy.layout.down().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
|
||||
Key([mod], "k", lazy.layout.up().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
|
||||
# Key([mod], "j", lazy.layout.down().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
|
||||
# Key([mod], "k", lazy.layout.up().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
|
||||
Key([mod], "l", lazy.layout.right().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
|
||||
# Key([alt], "tab", lazy.layout.next(), desc="Move window focus to other window"),
|
||||
|
||||
@ -161,19 +189,25 @@ keys = [
|
||||
),
|
||||
Key([mod], "t", lazy.window.toggle_floating(), desc="Toggle floating on the focused window"),
|
||||
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
|
||||
Key([mod, "shift"], "r", lazy.spawn("reload_wm.sh"), desc="Kill Unity"),
|
||||
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
|
||||
Key([mod, alt], "space", lazy.function(toggle_language), desc="Toggle Language Layout"),
|
||||
Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
|
||||
Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master 5%-")),
|
||||
Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer sset Master 5%+")),
|
||||
Key([], "XF86Launch1", lazy.spawn("playerctl play-pause")),
|
||||
Key([], "XF86AudioMicMute", lazy.spawn("playerctl play-pause")),
|
||||
Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")),
|
||||
Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 5%-")),
|
||||
Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +5%")),
|
||||
# This uses discrete values
|
||||
Key([], "XF86KbdBrightnessDown", lazy.function(kbd_brightness_down)),
|
||||
Key([], "XF86KbdBrightnessUp", lazy.function(kbd_brightness_up)),
|
||||
Key([mod, "control", "shift", alt], "1", lazy.window.set_position_floating(5, 28), desc="Put the window in the corner"),
|
||||
|
||||
Key([mod, alt, "control", "shift"], "q", lazy.function(move_to_corner("top-left")), desc="Move float to top-left"),
|
||||
Key([mod, alt, "control", "shift"], "w", lazy.function(move_to_corner("top-right")), desc="Move float to top-right"),
|
||||
Key([mod, alt, "control", "shift"], "a", lazy.function(move_to_corner("bottom-left")), desc="Move float to bottom-left"),
|
||||
Key([mod, alt, "control", "shift"], "s", lazy.function(move_to_corner("bottom-right")), desc="Move float to bottom-right"),
|
||||
]
|
||||
|
||||
pape_dir = '/home/joe/Pictures/Wallpapers/'
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
#!/bin/bash
|
||||
BATTERY_LEVEL=$(upower -i $(upower -e | grep 'BAT') | grep -E "percentage" | awk '{print $2}' | sed 's/%//')
|
||||
|
||||
AC_POWER=$(cat /sys/class/power_supply/AC0/online)
|
||||
if [ $AC_POWER -eq 1 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $BATTERY_LEVEL -le 5 ]; then
|
||||
notify-send "Low Battery" "Battery level is ${BATTERY_LEVEL}%" -u critical
|
||||
exit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user