mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2025-07-04 11:19:06 +03:00
Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
17bd981dbe | |||
735f278b4f | |||
4e8fd092de | |||
565127dd1e | |||
34f2b6d057 | |||
b73d6d8218 | |||
5097686b8a | |||
d4ea79d054 | |||
17cfe1ba66 | |||
0cb129d95f | |||
be29a4b29a | |||
582418bbee | |||
6ed1448668 | |||
3c91c43fdf | |||
e030b16b8f | |||
328b1eb452 | |||
c0861925f2 | |||
072fa544e7 | |||
3eb28e0bdc | |||
c084dbb908 | |||
bc668fe422 | |||
c69fb12c58 | |||
3cc758d93a | |||
523d3f72ac | |||
897ffc6d1a | |||
fc991838ec | |||
9aaa3b9cb7 | |||
5f9ed3af89 | |||
29d0d36bde | |||
814452d840 | |||
ab71642867 | |||
620ca7b136 | |||
496529371b | |||
69cdb8c04e | |||
7874d509ef | |||
6d38905b4d | |||
2990b556e2 |
@ -126,8 +126,9 @@ env:
|
||||
# Font configuration
|
||||
font:
|
||||
normal:
|
||||
family: MesloLGS Nerd Font
|
||||
style: Regular
|
||||
family: FiraCode Nerd Font Mono
|
||||
#family: FantasqueSansM Nerd Font Mono
|
||||
style: regular
|
||||
|
||||
#font:
|
||||
# Normal (roman) font face
|
||||
|
22
.config/crontab
Normal file
22
.config/crontab
Normal file
@ -0,0 +1,22 @@
|
||||
# DISPLAY=:0
|
||||
XDG_RUNTIME_DIR=/run/user/1000
|
||||
|
||||
|
||||
# Example of job definition:
|
||||
# .---------------- minute (0 - 59)
|
||||
# | .------------- hour (0 - 23)
|
||||
# | | .---------- day of month (1 - 31)
|
||||
# | | | .------- month (1 - 12) OR Jan-Dec
|
||||
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR SUN-SAT
|
||||
# | | | | |
|
||||
# * * * * * user-name command to be executed
|
||||
|
||||
# * any value
|
||||
# , value list separator
|
||||
# - range of values
|
||||
# / step values
|
||||
|
||||
* * * * * /home/sahin/scripts/check-battery.sh 10
|
||||
|
||||
# at each hour, remove files older than 30 days in trash directory
|
||||
0 * * * * find /home/sahin/trash -maxdepth 1 -type f -mtime +30 | xargs -i readlink -f {} | xargs -i rm {}
|
3
.config/darkman/config.yaml
Normal file
3
.config/darkman/config.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
lat: 40.0
|
||||
lng: 29.0
|
||||
dbusserver: true
|
7
.config/darkman/scripts/desktop-notification.sh
Executable file
7
.config/darkman/scripts/desktop-notification.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# trigger a small, passive popup dialog to inform the user about darkman's activity
|
||||
# reference https://wiki.archlinux.org/title/Desktop_notifications#Usage_in_programming
|
||||
|
||||
theme=$(darkman get)
|
||||
notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "switching to $theme mode"
|
12
.config/darkman/scripts/examples/kde-global-theme.sh
Executable file
12
.config/darkman/scripts/examples/kde-global-theme.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Change the global Plasma Theme. On Manjaro you can use "org.manjaro.breath-dark.desktop"
|
||||
# or you can create your own global Plasma Theme with the "Plasma Look And Feel Explorer".
|
||||
# Reference: https://userbase.kde.org/Plasma/Create_a_Global_Theme_Package
|
||||
#
|
||||
# Since Plasma 5.26 the lookandfeeltool does not work anymore without "faking" the screen.
|
||||
# Reference: https://bugs.kde.org/show_bug.cgi?id=460643
|
||||
|
||||
lookandfeeltool -platform offscreen --apply "org.kde.breeze.desktop"
|
||||
# lookandfeeltool -platform offscreen --apply "org.kde.breezetwilight.desktop"
|
||||
# lookandfeeltool -platform offscreen --apply "org.kde.breezedark.desktop"
|
16
.config/darkman/scripts/examples/kde-gtk-theme.sh
Executable file
16
.config/darkman/scripts/examples/kde-gtk-theme.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# GTK apps are not affected by the Plasma Global Theme, which only applies to Qt based programs.
|
||||
# GTK themes can be installed here: Global Theme > Application Style > Configure GNOME/GTK Application Style.
|
||||
# Reference: https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
|
||||
|
||||
source "$HOME/scripts/common-vars.sh"
|
||||
if [ $theme == "dark" ]; then
|
||||
theme_string="Breeze-dark-gtk"
|
||||
else
|
||||
theme_string="Default"
|
||||
fi
|
||||
|
||||
echo "string:$theme_string"
|
||||
|
||||
dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:$theme_string"
|
3
.config/darkman/scripts/examples/mako.sh
Executable file
3
.config/darkman/scripts/examples/mako.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
makoctl set-mode dark
|
4
.config/darkman/scripts/gtk.sh
Executable file
4
.config/darkman/scripts/gtk.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
theme=$(darkman get)
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-$theme"
|
35
.config/darkman/scripts/terminal-stuff.sh
Executable file
35
.config/darkman/scripts/terminal-stuff.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# trigger a small, passive popup dialog to inform the user about darkman's activity
|
||||
# reference https://wiki.archlinux.org/title/Desktop_notifications#Usage_in_programming
|
||||
|
||||
|
||||
theme=$(darkman get)
|
||||
PATH="$HOME/.local/bin/:$PATH"
|
||||
|
||||
if [ "$theme" == "dark" ]; then
|
||||
sed -i 's/kanagawa_light.conf/kanagawa.conf/g' "$HOME/.config/kitty/kitty.conf"
|
||||
sed -i 's/tokyonight_day/tokyonight_storm/g' "$HOME/.config/kitty/kitty.conf"
|
||||
sed -i 's/Light/Origin/g' "$HOME/.config/bat/config"
|
||||
sed -i 's/flat-remix-light/tokyo-storm/g' "$HOME/.config/btop/btop.conf"
|
||||
sed -i "\$s/.*/include dark-256.theme/" "$HOME/.config/task/taskrc"
|
||||
else
|
||||
sed -i 's/kanagawa.conf/kanagawa_light.conf/g' "$HOME/.config/kitty/kitty.conf"
|
||||
sed -i 's/tokyonight_storm/tokyonight_day/g' "$HOME/.config/kitty/kitty.conf"
|
||||
sed -i 's/Origin/Light/g' "$HOME/.config/bat/config"
|
||||
sed -i 's/tokyo-storm/flat-remix-light/g' "$HOME/.config/btop/btop.conf"
|
||||
sed -i "\$s/.*/include light-256.theme/" "$HOME/.config/task/taskrc"
|
||||
fi
|
||||
|
||||
kill -SIGUSR1 $(pgrep kitty)
|
||||
tmux source-file "$HOME/.config/tmux/$theme.conf"
|
||||
|
||||
|
||||
# This uses the neovim-remote python package to control other neovim instances.
|
||||
# see: https://github.com/mhinz/neovim-remote
|
||||
# Further, it is assumed that toggling the background in neovim is enough.
|
||||
# Anything else should be handled by the set color scheme.
|
||||
|
||||
for server in $(nvr --serverlist); do
|
||||
nvr --servername "$server" -cc "set background=$theme"
|
||||
done
|
430
.config/hypr/hyprland.conf
Normal file
430
.config/hypr/hyprland.conf
Normal file
@ -0,0 +1,430 @@
|
||||
|
||||
########################################################################################
|
||||
AUTOGENERATED HYPR CONFIG.
|
||||
PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
|
||||
OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
|
||||
########################################################################################
|
||||
|
||||
#
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
#
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
#monitor=name,resolution,position,scale
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
|
||||
# centered
|
||||
# monitor=eDP-1,preferred,500x1107,2.0
|
||||
monitor=eDP-1,preferred,0x1107,2.0
|
||||
# monitor=HDMI-A-1,preferred,0x0,1.333333
|
||||
|
||||
|
||||
# monitor=eDP-1, disable
|
||||
# monitor=eDP-1,preferred,auto,1,mirror,HDMI-A-1
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Execute your favorite apps at launch
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
# exec-once = swaync
|
||||
exec-once = ags
|
||||
exec-once = /usr/libexec/kf5/polkit-kde-authentication-agent-1
|
||||
|
||||
exec-once = swaybg -i "$HOME/Pictures/Wallpapers/minimal.jpg"
|
||||
# Dim screen after 120 seconds of inactivity
|
||||
exec-once = swayidle -w timeout 120 'dim-screen &' resume 'undim-screen'
|
||||
# Lock screen after idle for 240s
|
||||
# exec-once = swayidle -w timeout 240 'lock-screen'
|
||||
# Dim screen 10 seconds after screen is locked. no -w option here.
|
||||
exec-once = swayidle timeout 10 'if pgrep -x swaylock; then dim-screen; fi' resume 'undim-screen'
|
||||
# Turn monitors off 30 seconds after screen is locked
|
||||
# exec-once = swayidle -w timeout 30 'if pgrep -x swaylock; then hyprctl dispatch dpms off; fi' resume 'hyprctl dispatch dpms on'
|
||||
|
||||
# exec-once = /usr/libexec/polkit-gnome-authentication-agent-1
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,24
|
||||
|
||||
# env = QT_QPA_PLATFORM,wayland,xcb
|
||||
# env = GDK_BACKEND,x11
|
||||
|
||||
# unscale XWayland
|
||||
# xwayland {
|
||||
# force_zero_scaling = false
|
||||
# }
|
||||
|
||||
# toolkit-specific scale
|
||||
env = GDK_SCALE,1
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = tr,us
|
||||
kb_variant = legacy-fix-ansi,
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
drag_lock = yes
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
device:apple-mtp-keyboard {
|
||||
kb_layout = tr,us
|
||||
kb_variant = legacy-fix-iso,
|
||||
kb_model =
|
||||
kb_options = altwin:alt_super_win,shift:both_capslock_cancel,lv3:ralt_switch,caps:ctrl_modifier
|
||||
kb_rules =
|
||||
}
|
||||
|
||||
device:compx-2.4g-receiver-mouse {
|
||||
sensitivity = -1 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 2
|
||||
gaps_out = 8
|
||||
border_size = 2
|
||||
# col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.active_border = rgba(F9DEA9ee) rgba(F2C294ee) 45deg
|
||||
# col.active_border = rgba(1affffee) rgba(ff0000ee) 45deg # was my config
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = master
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 10
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
}
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
|
||||
dim_inactive = true
|
||||
dim_strength = 0.05 # how much inactive windows should be dimmed, 0.0 - 1.0
|
||||
dim_around = 0.5 # how much the dimaround window rule should dim by. 0.0 - 1.0
|
||||
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
#
|
||||
# animation=NAME,ONOFF,SPEED,CURVE,STYLE or
|
||||
# animation=NAME,ONOFF,SPEED,CURVE
|
||||
# ONOFF can be either 0 or 1, 0 to disable, 1 to enable. note: if it’s 0, you can omit further args.
|
||||
# SPEED is the amount of ds (1ds = 100ms) the animation will take
|
||||
# CURVE is the bezier curve name, see curves.
|
||||
# STYLE (optional) is the animation style
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
bezier = overshot,0.05,0.9,0.1,1.1
|
||||
bezier = easeOutBack, 0.075, 0.82, 0.165, 1
|
||||
bezier = easeInBack,0.075, 0.82, 0.165, 1
|
||||
|
||||
animation = windows, 1, 5, default
|
||||
# animation = windows, 0
|
||||
animation = windowsIn,1,5,default,slide
|
||||
animation = windowsOut, 1, 4, easeInBack, slide
|
||||
animation = border, 1, 10, overshot
|
||||
animation = borderangle, 1, 10, default, once
|
||||
animation = fade, 1, 4, default
|
||||
# animation = fade, 0
|
||||
animation = workspaces, 1, 4, default, slide
|
||||
animation = specialWorkspace, 1, 3, easeOutBack, slidefadevert
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true
|
||||
allow_small_split = true
|
||||
always_center_master = false
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = on
|
||||
workspace_swipe_cancel_ratio = 0.20
|
||||
}
|
||||
|
||||
misc {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
force_default_wallpaper = -1 # Set to 0 to disable the anime mascot wallpapers
|
||||
# If true, will animate manual window resizes/moves
|
||||
# animate_manual_resizes = false
|
||||
# Enable window swallowing
|
||||
# enable_swallow = false
|
||||
# swallow_regex = str
|
||||
# focus_on_activate = false
|
||||
}
|
||||
|
||||
|
||||
binds {
|
||||
# If enabled, an attempt to switch to the currently focused workspace will
|
||||
# instead switch to the previous workspace. Akin to i3’s auto_back_and_forth.
|
||||
workspace_back_and_forth = true
|
||||
allow_workspace_cycles = true
|
||||
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
device:epic-mouse-v1 {
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
windowrulev2 = float,class:^(nm-connection-editor)$,
|
||||
windowrulev2 = float,title:^(Picture-in-Picture)$,
|
||||
windowrulev2 = pin,title:^(Picture-in-Picture)$,
|
||||
|
||||
windowrulev2=dimaround,class:^(pinentry-qt)$,
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mod = SUPER
|
||||
|
||||
bind = $mod, tab, workspace, previous
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
# bind = $mod, return, exec, open-kitty-or-focus
|
||||
bind = $mod, return, exec, kitty --single-instance
|
||||
bind = $mod, q, killactive,
|
||||
bind = $mod, c, exec, smart-exec
|
||||
bind = $mod control, q, exit,
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mod, w, togglespecialworkspace, magic
|
||||
bind = $mod SHIFT, w, movetoworkspace, special:magic
|
||||
|
||||
bind = $mod control, n, exec, lock-screen
|
||||
|
||||
|
||||
bind = $mod, e, exec, wofi --show drun --normal-window
|
||||
# bind = $mod, semicolon, exec, wofi --show drun --normal-window
|
||||
bind = $mod shift, p, exec, passmenu
|
||||
bind = $mod, o, togglefloating,
|
||||
bind = $mod, y, togglefloating
|
||||
bind = $mod, v, exec, rofi-wireguard --toggle
|
||||
bind = $mod, y, pin
|
||||
# bind = $mod, t, exec, smart-tab
|
||||
bind = $mod, t, togglegroup, # dwindle
|
||||
# bind = $mod, t, pseudo, # dwindle
|
||||
bind = $mod, s, togglesplit, # dwindle
|
||||
bind = $mod, m, fullscreen, 1
|
||||
|
||||
### master layout keybindings
|
||||
bind = $mod, semicolon, layoutmsg,swapwithmaster master
|
||||
bind = $mod, space, layoutmsg,orientationnext
|
||||
|
||||
bind = $mod SHIFT, m, fullscreen, 0
|
||||
bind = $mod SHIFT, b, fakefullscreen,
|
||||
bind = $mod shift, n, exec, swaync-client -t -sw
|
||||
# bindl = $mod SHIFT, L, exec, sleep 1 && hyprctl dispatch dpms off
|
||||
|
||||
# focus windows with mod + hjkl
|
||||
bind = $mod, h, movefocus, l
|
||||
bind = $mod, l, movefocus, r
|
||||
bind = $mod, k, movefocus, u
|
||||
bind = $mod, j, movefocus, d
|
||||
|
||||
# Move windows with mod + shift + hjkl
|
||||
bind = $mod shift, h, swapwindow, l
|
||||
bind = $mod shift, l, swapwindow, r
|
||||
bind = $mod shift, k, swapwindow, u
|
||||
bind = $mod shift, j, swapwindow, d
|
||||
|
||||
bind = $mod, left, movewindow, l
|
||||
bind = $mod, right, movewindow, r
|
||||
bind = $mod, down, movewindow, d
|
||||
bind = $mod, up, movewindow, u
|
||||
|
||||
# resize windows with mod + control + hjkl
|
||||
binde = $mod control, h, resizeactive, -20 0
|
||||
binde = $mod control, l, resizeactive, 20 0
|
||||
binde = $mod control, k, resizeactive, 0 -20
|
||||
binde = $mod control, j, resizeactive, 0 20
|
||||
|
||||
|
||||
|
||||
# Switch workspaces with mod + [0-9]
|
||||
|
||||
bind = $mod, p, workspace, e-1
|
||||
bind = $mod, n, workspace, e+1
|
||||
bind = $mod, a, workspace, 1
|
||||
bind = $mod, s, workspace, 2
|
||||
bind = $mod, d, workspace, 3
|
||||
bind = $mod, f, workspace, 4
|
||||
bind = $mod, g, workspace, 5
|
||||
bind = $mod, 1, workspace, 1
|
||||
bind = $mod, 2, workspace, 2
|
||||
bind = $mod, 3, workspace, 3
|
||||
bind = $mod, 4, workspace, 4
|
||||
bind = $mod, 5, workspace, 5
|
||||
bind = $mod, 6, workspace, 6
|
||||
bind = $mod, 7, workspace, 7
|
||||
bind = $mod, 8, workspace, 8
|
||||
bind = $mod, 9, workspace, 9
|
||||
# bind = $mod, 0, workspace, 10
|
||||
|
||||
bind = $mod, comma, swapnext, prev
|
||||
bind = $mod, period, swapnext
|
||||
|
||||
# Move active window to a workspace with mod + SHIFT + [0-9]
|
||||
bind = $mod SHIFT, a, movetoworkspace, 1
|
||||
bind = $mod SHIFT, s, movetoworkspace, 2
|
||||
bind = $mod SHIFT, d, movetoworkspace, 3
|
||||
bind = $mod SHIFT, f, movetoworkspace, 4
|
||||
bind = $mod SHIFT, g, movetoworkspace, 5
|
||||
bind = $mod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mod SHIFT, 9, movetoworkspace, 9
|
||||
# bind = $mod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
|
||||
bind = $mod, 0, togglespecialworkspace, magic2
|
||||
bind = $mod SHIFT, 0, movetoworkspace, special:magic2
|
||||
|
||||
|
||||
# Move/resize windows with mod + LMB/RMB and dragging
|
||||
bindm = $mod, mouse:272, movewindow
|
||||
bindm = $mod, mouse:273, resizewindow
|
||||
|
||||
# Scroll through existing workspaces with mod + scroll
|
||||
# doesn't seem to work with touchpad.
|
||||
# check and see if this works with mouse: yep, it works
|
||||
bind = $mod, mouse_down, workspace, e+1
|
||||
bind = $mod, mouse_up, workspace, e-1
|
||||
|
||||
|
||||
# screen
|
||||
bindle=,XF86MonBrightnessUp, exec, light -A 1; light -O
|
||||
bindle=,XF86MonBrightnessDown, exec, light -U 1; light -O
|
||||
# bindle=,XF86KbdBrightnessUp, exec, ags -r 'brightness.kbd++; indicator.kbd()'
|
||||
# bindle=,XF86KbdBrightnessDown, exec, ags -r 'brightness.kbd--; indicator.kbd()'
|
||||
#
|
||||
#
|
||||
bindle=,XF86AudioRaiseVolume, exec, volume up
|
||||
bindle=,XF86AudioLowerVolume, exec, volume down
|
||||
bindle=,XF86AudioMute, exec, volume toggle-mute
|
||||
|
||||
bindle=, F4, exec, grim -g "$(slurp)" - | swappy -f -
|
||||
bindle=$mod, x, exec, grim - | swappy -f -
|
||||
|
||||
# bindle=, XF86KbdBrightnessUp, exec, keyboard_backlight inc
|
||||
# bindle=, XF86KbdBrightnessDown, exec, keyboard_backlight dec
|
||||
|
||||
|
||||
# check switch name with hyprctl devices
|
||||
# lock screen when lid is closed or opened
|
||||
# bindl=,switch:Apple SMC power/lid events,exec,lock-screen
|
||||
|
||||
# trigger when the lid is opened
|
||||
bindl=,switch:off:Apple SMC power/lid events,exec,smart-switch open
|
||||
# trigger when the lid is closed
|
||||
bindl=,switch:on:Apple SMC power/lid events,exec,smart-switch close
|
||||
|
||||
windowrulev2 = stayfocused,class:(wofi)
|
||||
windowrulev2 = noborder,class:(wofi)
|
||||
|
||||
# # bind = $mod, Return, exec, st -e tmux new-session -A -s st
|
||||
# bind = $mod SHIFT, q, exec, xkill
|
||||
# binde = $mod CONTROL, s, exec, toggle-screenkey
|
||||
# bind = $mod, e, exec, rofimoji
|
||||
# bind = $mod, b, exec, rofi-bluetooth
|
||||
# # bind = SUPER, E, exec, [workspace 2 silent;float;noanim] st
|
||||
# bind = $mod, i, exec, dictionary
|
||||
# bind = $mod, r, swapnext,
|
||||
# bind = $mod, semicolon, exec, wofi --show drun
|
||||
# bind = $mod SHIFT, O, workspaceopt, allpseudo # dwindle
|
||||
# bind = $mod, space, exec, hypr-toggle-layout
|
||||
#
|
||||
#
|
||||
# bind = $mod SHIFT, Return, togglesplit, # dwindle
|
||||
#
|
||||
# # bind = $mod, j, changegroupactive, b
|
||||
# # bind = $mod, k, changegroupactive, f
|
||||
#
|
||||
#
|
||||
# # to switch between windows in a floating workspace
|
||||
# bind = SUPER,comma,cyclenext, # change focus to another window
|
||||
# bind = SUPER,comma,bringactivetotop, # bring it to the top
|
||||
# bind = SUPER,period,cyclenext, prev # change focus to another window
|
||||
# bind = SUPER,period,bringactivetotop, # bring it to the top
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# # bind=SUPER,mouse_down,workspace,e-1
|
||||
#
|
||||
# bindle=, Print, exec, grim -g "$(slurp)" - | swappy -f -
|
||||
# # bindr=SUPER, SUPER_L, exec, pkill wofi || wofi --show drun
|
||||
#
|
||||
#
|
||||
# # will switch to a submap called notifications
|
||||
# bind = $mod, n, submap, notifications
|
||||
#
|
||||
# # will start a submap called "notifications"
|
||||
# submap=notifications
|
||||
#
|
||||
# # sets repeatable binds for resizing the active window
|
||||
# binde=$mod, n, exec, dunstctl close
|
||||
# bind=$mod, n, submap, reset
|
||||
# binde=$mod, k, exec, dunstctl history-pop
|
||||
# binde=$mod, j, exec, dunstctl close
|
||||
# binde=$mod, m, exec, dunstctl context
|
||||
# bind=$mod, m, submap, reset
|
||||
# binde=$mod, p, exec, toggle-notifications
|
||||
# bind=$mod, p, submap, reset
|
||||
#
|
||||
# # use reset to go back to the global submap
|
||||
# bind=,escape,submap,reset
|
||||
#
|
||||
# # will reset the submap, meaning end the current one and return to the global one
|
||||
# submap=reset
|
||||
#
|
||||
# # keybinds further down will be global again...
|
47
.config/hypr/shaders/blue-light-v2.frag
Normal file
47
.config/hypr/shaders/blue-light-v2.frag
Normal file
@ -0,0 +1,47 @@
|
||||
precision mediump float;
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D tex;
|
||||
// 17.00 5600
|
||||
// 17.30 5300
|
||||
const float temperature = 2300.0;
|
||||
const float temperatureStrength = 1.0;
|
||||
|
||||
#define WithQuickAndDirtyLuminancePreservation
|
||||
const float LuminancePreservationFactor = 1.0;
|
||||
|
||||
// function from https://www.shadertoy.com/view/4sc3D7
|
||||
// valid from 1000 to 40000 K (and additionally 0 for pure full white)
|
||||
vec3 colorTemperatureToRGB(const in float temperature){
|
||||
// values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
|
||||
mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
|
||||
vec3(0.0, 1669.5803561666639, 2575.2827530017594),
|
||||
vec3(1.0, 1.3302673723350029, 1.8993753891711275)) :
|
||||
mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
|
||||
vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
|
||||
vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
|
||||
return mix(
|
||||
clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
|
||||
vec3(1.0),
|
||||
smoothstep(1000.0, 0.0, temperature)
|
||||
);
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec4 pixColor = texture2D(tex, v_texcoord);
|
||||
|
||||
// RGB
|
||||
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
|
||||
|
||||
#ifdef WithQuickAndDirtyLuminancePreservation
|
||||
color *= mix(1.0,
|
||||
dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
|
||||
LuminancePreservationFactor);
|
||||
#endif
|
||||
|
||||
color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
|
||||
|
||||
vec4 outCol = vec4(color, pixColor[3]);
|
||||
|
||||
gl_FragColor = outCol;
|
||||
}
|
||||
|
20
.config/hypr/shaders/blue-light.frag
Normal file
20
.config/hypr/shaders/blue-light.frag
Normal file
@ -0,0 +1,20 @@
|
||||
// vim: set ft=glsl:
|
||||
// blue light filter shader
|
||||
// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux
|
||||
|
||||
precision mediump float;
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 pixColor = texture2D(tex, v_texcoord);
|
||||
|
||||
// green
|
||||
pixColor[1] *= 0.855;
|
||||
|
||||
// blue
|
||||
pixColor[2] *= 0.725;
|
||||
|
||||
gl_FragColor = pixColor;
|
||||
}
|
16
.config/hypr/shaders/example.frag
Normal file
16
.config/hypr/shaders/example.frag
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// Example blue light filter shader.
|
||||
//
|
||||
|
||||
precision mediump float;
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 pixColor = texture2D(tex, v_texcoord);
|
||||
|
||||
pixColor[2] *= 0.8;
|
||||
|
||||
gl_FragColor = pixColor;
|
||||
}
|
18
.config/hypr/shaders/grayscale.frag
Normal file
18
.config/hypr/shaders/grayscale.frag
Normal file
@ -0,0 +1,18 @@
|
||||
//
|
||||
// Example grayscale shader.
|
||||
//
|
||||
|
||||
precision mediump float;
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
vec4 pixColor = texture2D(tex, v_texcoord);
|
||||
|
||||
gl_FragColor = vec4(
|
||||
pixColor[0] * 0.299 + pixColor[1] * 0.587 + pixColor[2] * 0.114,
|
||||
pixColor[0] * 0.299 + pixColor[1] * 0.587 + pixColor[2] * 0.114,
|
||||
pixColor[0] * 0.299 + pixColor[1] * 0.587 + pixColor[2] * 0.114,
|
||||
pixColor[3]
|
||||
);
|
||||
}
|
40
.config/hypr/shaders/vibrance.frag
Normal file
40
.config/hypr/shaders/vibrance.frag
Normal file
@ -0,0 +1,40 @@
|
||||
// vibrance for hyprland
|
||||
|
||||
precision mediump float;
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D tex;
|
||||
|
||||
// see https://github.com/CeeJayDK/SweetFX/blob/a792aee788c6203385a858ebdea82a77f81c67f0/Shaders/Vibrance.fx#L20-L30
|
||||
const vec3 VIB_RGB_BALANCE = vec3(1.0, 1.0, 1.0);
|
||||
const float VIB_VIBRANCE = 0.15;
|
||||
|
||||
|
||||
const vec3 VIB_coeffVibrance = VIB_RGB_BALANCE * -VIB_VIBRANCE;
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 pixColor = texture2D(tex, v_texcoord);
|
||||
|
||||
// RGB
|
||||
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
|
||||
|
||||
|
||||
// vec3 VIB_coefLuma = vec3(0.333333, 0.333334, 0.333333); // was for `if VIB_LUMA == 1`
|
||||
vec3 VIB_coefLuma = vec3(0.212656, 0.715158, 0.072186); // try both and see which one looks nicer.
|
||||
|
||||
float luma = dot(VIB_coefLuma, color);
|
||||
|
||||
float max_color = max(color[0], max(color[1], color[2]));
|
||||
float min_color = min(color[0], min(color[1], color[2]));
|
||||
|
||||
float color_saturation = max_color - min_color;
|
||||
|
||||
vec3 p_col = vec3(vec3(vec3(vec3(sign(VIB_coeffVibrance) * color_saturation) - 1.0) * VIB_coeffVibrance) + 1.0);
|
||||
|
||||
pixColor[0] = mix(luma, color[0], p_col[0]);
|
||||
pixColor[1] = mix(luma, color[1], p_col[1]);
|
||||
pixColor[2] = mix(luma, color[2], p_col[2]);
|
||||
|
||||
gl_FragColor = pixColor;
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
{"title":"MyCustom","rules":[{"description":"Change right alt + turkish char to right opt + turkish char","manipulators":[{"type":"basic","from":{"modifiers":{"mandatory":["right_gui"]},"key_code":"i"},"to":[{"repeat":true,"lazy":false,"key_code":"i","modifiers":["right_alt"]}]},{"type":"basic","from":{"modifiers":{"mandatory":["right_gui"]},"key_code":"o"},"to":[{"repeat":true,"key_code":"o","modifiers":["right_alt"]}]}]},{"description":"","manipulators":[{"type":"basic","from":{}}]}]}
|
@ -1,206 +0,0 @@
|
||||
{
|
||||
"profiles": [
|
||||
{
|
||||
"complex_modifications": {
|
||||
"rules": [
|
||||
{
|
||||
"description": "Change right_command+hjkl to arrow keys",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
"key_code": "h",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_alt"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "left_arrow" }],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "j",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_alt"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "down_arrow" }],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "k",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_alt"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "up_arrow" }],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "l",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_alt"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "right_arrow" }],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"devices": [
|
||||
{
|
||||
"identifiers": { "is_keyboard": true },
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "caps_lock" },
|
||||
"to": [{ "key_code": "left_control" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "grave_accent_and_tilde" },
|
||||
"to": [{ "key_code": "z" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "non_us_backslash" },
|
||||
"to": [{ "key_code": "grave_accent_and_tilde" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "x" },
|
||||
"to": [{ "key_code": "c" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "z" },
|
||||
"to": [{ "key_code": "x" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"fn_function_keys": [
|
||||
{
|
||||
"from": { "key_code": "f1" },
|
||||
"to": [{ "key_code": "f1" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f2" },
|
||||
"to": [{ "key_code": "f2" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f3" },
|
||||
"to": [{ "key_code": "f3" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f4" },
|
||||
"to": [{ "key_code": "f4" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f5" },
|
||||
"to": [{ "key_code": "f5" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f6" },
|
||||
"to": [{ "key_code": "f6" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f7" },
|
||||
"to": [{ "key_code": "f7" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f8" },
|
||||
"to": [{ "key_code": "f8" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f9" },
|
||||
"to": [{ "key_code": "f9" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f10" },
|
||||
"to": [{ "key_code": "f10" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f11" },
|
||||
"to": [{ "key_code": "f11" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f12" },
|
||||
"to": [{ "key_code": "f12" }]
|
||||
}
|
||||
],
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 1,
|
||||
"vendor_id": 16962
|
||||
}
|
||||
},
|
||||
{
|
||||
"fn_function_keys": [
|
||||
{
|
||||
"from": { "key_code": "f1" },
|
||||
"to": [{ "key_code": "f1" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f2" },
|
||||
"to": [{ "key_code": "f2" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f3" },
|
||||
"to": [{ "key_code": "f3" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f4" },
|
||||
"to": [{ "key_code": "f4" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f5" },
|
||||
"to": [{ "key_code": "f5" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f6" },
|
||||
"to": [{ "key_code": "f6" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f7" },
|
||||
"to": [{ "key_code": "f7" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f8" },
|
||||
"to": [{ "key_code": "f8" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f9" },
|
||||
"to": [{ "key_code": "f9" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f10" },
|
||||
"to": [{ "key_code": "f10" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f11" },
|
||||
"to": [{ "key_code": "f11" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f12" },
|
||||
"to": [{ "key_code": "f12" }]
|
||||
}
|
||||
],
|
||||
"identifiers": {
|
||||
"is_pointing_device": true,
|
||||
"product_id": 1,
|
||||
"vendor_id": 16962
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "Default profile",
|
||||
"selected": true,
|
||||
"virtual_hid_keyboard": {
|
||||
"country_code": 0,
|
||||
"keyboard_type_v2": "ansi"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
9
.config/kitty/get_layout.py
Normal file
9
.config/kitty/get_layout.py
Normal file
@ -0,0 +1,9 @@
|
||||
def main():
|
||||
pass
|
||||
|
||||
|
||||
def handle_result(args, result, target_window_id, boss):
|
||||
return boss.active_tab.current_layout.name
|
||||
|
||||
|
||||
handle_result.no_ui = True
|
@ -2,8 +2,7 @@
|
||||
|
||||
# map f1 show_kitty_env_vars
|
||||
|
||||
|
||||
kitty_mod cmd
|
||||
kitty_mod alt
|
||||
#: Special modifier key alias for default shortcuts. You can change
|
||||
#: the value of this option to alter all default shortcuts that use
|
||||
#: kitty_mod.
|
||||
@ -11,14 +10,14 @@ kitty_mod cmd
|
||||
clear_all_shortcuts yes
|
||||
#: Remove all shortcut definitions up to this point. Useful, for
|
||||
#: instance, to remove the default shortcuts.
|
||||
map ctrl+shift+f5 load_config_file
|
||||
|
||||
|
||||
# kitty-scrollback.nvim Kitten alias
|
||||
action_alias kitty_scrollback_nvim kitten $HOME/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
|
||||
|
||||
# include ./themes/themes/OneDark.conf
|
||||
# include ~/.local/share/nvim/lazy/tokyonight.nvim/extras/kitty/tokyonight_day.conf
|
||||
include ~/.local/share/nvim/lazy/kanagawa.nvim/extras/kitty/kanagawa.conf
|
||||
include ~/.local/share/nvim/lazy/kanagawa.nvim/extras/kanagawa_light.conf
|
||||
#include ./tokyonight.conf
|
||||
#Fonts {{{
|
||||
|
||||
@ -52,7 +51,7 @@ font_family FantasqueSansM Nerd Font Mono
|
||||
#: italic_font Operator Mono Book Italic
|
||||
#: bold_italic_font Operator Mono Medium Italic
|
||||
|
||||
font_size 18.0
|
||||
font_size 11.0
|
||||
|
||||
#: Font size (in pts)
|
||||
|
||||
@ -810,8 +809,8 @@ visual_bell_duration 0.05
|
||||
#: suffix of "c" on the width/height values to have them interpreted
|
||||
#: as number of cells instead of pixels.
|
||||
|
||||
# enabled_layouts tall, fat:bias=75, splits:split_axis=vertical, grid, vertical, horizontal, stack
|
||||
enabled_layouts fat:bias=75, tall, splits:split_axis=vertical, grid, stack
|
||||
# enabled_layouts *
|
||||
|
||||
#: The enabled window layouts. A comma separated list of layout names.
|
||||
#: The special value all means all layouts. The first listed layout
|
||||
#: will be used as the startup layout. Default configuration is all
|
||||
@ -899,7 +898,7 @@ inactive_text_alpha 0.7
|
||||
#: Fade the text in inactive windows by the specified amount (a number
|
||||
#: between zero and one, with zero being fully faded).
|
||||
|
||||
hide_window_decorations no
|
||||
hide_window_decorations yes
|
||||
|
||||
#: Hide the window decorations (title-bar and window borders) with
|
||||
#: yes. On macOS, titlebar-only and titlebar-and-corners can be used
|
||||
@ -995,7 +994,7 @@ visual_window_select_characters hjklfdsagtyrueiwoqpbnvmcxz
|
||||
#: The second number is the margin between the tab bar and the
|
||||
#: contents of the current tab.
|
||||
|
||||
tab_bar_style custom
|
||||
tab_bar_style powerline
|
||||
|
||||
#: The tab bar style, can be one of:
|
||||
|
||||
@ -1026,7 +1025,7 @@ tab_bar_align left
|
||||
#: The horizontal alignment of the tab bar, can be one of: left,
|
||||
#: center, right.
|
||||
|
||||
tab_bar_min_tabs 1
|
||||
# tab_bar_min_tabs 2
|
||||
|
||||
#: The minimum number of tabs that must exist before the tab bar is
|
||||
#: shown.
|
||||
@ -1113,8 +1112,7 @@ tab_title_template "{title}{fmt.bold}{' ' if num_windows > 1 and layout_name
|
||||
#: Note that for backward compatibility, if {bell_symbol} or
|
||||
#: {activity_symbol} are not present in the template, they are
|
||||
#: prepended to it.
|
||||
# active_tab_title_template "{" " if layout_name == "grid" else " " if layout_name == "stack" else " " if layout_name == "fat" else " " if layout_name == "tall" else " "}{fmt.fg.tab}{sub.index}:{title}"
|
||||
active_tab_title_template "{fmt.fg.tab}{index}:{title}"
|
||||
active_tab_title_template "{fmt.fg.tab}{index}{sup.layout_name[:2].lower()}:{title}"
|
||||
|
||||
#: Template to use for active tabs. If not specified falls back to
|
||||
#: tab_title_template.
|
||||
@ -1381,7 +1379,7 @@ dynamic_background_opacity yes
|
||||
#: control/#rc-custom-auth> for details.
|
||||
|
||||
allow_remote_control socket-only
|
||||
listen_on unix:/tmp/mykitty
|
||||
listen_on unix:@mykitty
|
||||
|
||||
#: Allow other programs to control kitty. If you turn this on, other
|
||||
#: programs can control all aspects of kitty, including sending text
|
||||
@ -1630,7 +1628,7 @@ startup_session sessions/example.session
|
||||
#: background_opacity. If you want to use both, you are probably
|
||||
#: better off just hiding the titlebar with hide_window_decorations.
|
||||
|
||||
macos_option_as_alt left
|
||||
# macos_option_as_alt no
|
||||
|
||||
#: Use the Option key as an Alt key on macOS. With this set to no,
|
||||
#: kitty will use the macOS native Option+Key to enter Unicode
|
||||
@ -1676,7 +1674,7 @@ macos_option_as_alt left
|
||||
#: Use the macOS traditional full-screen transition, that is faster,
|
||||
#: but less pretty.
|
||||
|
||||
macos_show_window_title_in none
|
||||
# macos_show_window_title_in all
|
||||
|
||||
#: Control where the window title is displayed on macOS. A value of
|
||||
#: window will show the title of the currently active window at the
|
||||
@ -1827,7 +1825,7 @@ map f1 launch_tab ${EDITOR}
|
||||
#: Copy to clipboard
|
||||
|
||||
map ctrl+c copy_and_clear_or_interrupt
|
||||
map cmd+c copy_to_clipboard
|
||||
# map cmd+c copy_to_clipboard
|
||||
|
||||
#:: There is also a copy_or_interrupt action that can be optionally
|
||||
#:: mapped to Ctrl+C. It will copy only if there is a selection and
|
||||
@ -1838,7 +1836,7 @@ map cmd+c copy_to_clipboard
|
||||
#: Paste from clipboard
|
||||
|
||||
map kitty_mod+v paste_from_clipboard
|
||||
map cmd+v paste_from_clipboard
|
||||
# map cmd+v paste_from_clipboard
|
||||
|
||||
#: Paste from selection
|
||||
|
||||
@ -1969,8 +1967,7 @@ map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
|
||||
|
||||
#: New window
|
||||
|
||||
map kitty_mod+c launch --cwd=current --location=vsplit
|
||||
map kitty_mod+shift+c launch --cwd=current --location=hsplit
|
||||
map kitty_mod+c launch --cwd=current
|
||||
# map cmd+enter new_window
|
||||
|
||||
#:: You can open a new kitty window running an arbitrary program, for
|
||||
@ -1994,6 +1991,7 @@ map kitty_mod+shift+c launch --cwd=current --location=hsplit
|
||||
#:: as the first window, with::
|
||||
|
||||
## new window beside
|
||||
map kitty_mod+b launch --location=neighbor
|
||||
map kitty_mod+f launch --location=first
|
||||
|
||||
#:: For more details, see launch
|
||||
@ -2539,4 +2537,3 @@ map kitty_mod+l send_text application \f
|
||||
|
||||
#: }}}
|
||||
|
||||
map kitty_mod+b launch --allow-remote-control kitty +kitten broadcast --match-tab state:focused
|
||||
|
106
.config/kitty/pass_keys.py
Normal file
106
.config/kitty/pass_keys.py
Normal file
@ -0,0 +1,106 @@
|
||||
import re
|
||||
|
||||
from kittens.tui.handler import result_handler
|
||||
from kitty.key_encoding import KeyEvent, parse_shortcut
|
||||
|
||||
|
||||
def is_window_vim(window, vim_id):
|
||||
from kittens.tui.loop import debug
|
||||
debug(vim_id)
|
||||
fp = window.child.foreground_processes
|
||||
return any(re.search(vim_id, p['cmdline'][0] if len(p['cmdline']) else '', re.I) for p in fp)
|
||||
|
||||
|
||||
def encode_key_mapping(window, key_mapping):
|
||||
mods, key = parse_shortcut(key_mapping)
|
||||
event = KeyEvent(
|
||||
mods=mods,
|
||||
key=key,
|
||||
shift=bool(mods & 1),
|
||||
alt=bool(mods & 2),
|
||||
ctrl=bool(mods & 4),
|
||||
super=bool(mods & 8),
|
||||
hyper=bool(mods & 16),
|
||||
meta=bool(mods & 32),
|
||||
).as_window_system_event()
|
||||
|
||||
return window.encoded_key(event)
|
||||
|
||||
def relative_resize_window(direction, amount, target_window_id, boss):
|
||||
window = boss.window_id_map.get(target_window_id)
|
||||
if window is None:
|
||||
return
|
||||
|
||||
neighbors = boss.active_tab.current_layout.neighbors_for_window(window, boss.active_tab.windows)
|
||||
current_window_id = boss.active_tab.active_window
|
||||
|
||||
left_neighbors = neighbors.get('left')
|
||||
right_neighbors = neighbors.get('right')
|
||||
top_neighbors = neighbors.get('top')
|
||||
bottom_neighbors = neighbors.get('bottom')
|
||||
|
||||
# has a neighbor on both sides
|
||||
if direction == 'left' and (left_neighbors and right_neighbors):
|
||||
boss.active_tab.resize_window('narrower', amount)
|
||||
# only has left neighbor
|
||||
elif direction == 'left' and left_neighbors:
|
||||
boss.active_tab.resize_window('wider', amount)
|
||||
# only has right neighbor
|
||||
elif direction == 'left' and right_neighbors:
|
||||
boss.active_tab.resize_window('narrower', amount)
|
||||
|
||||
# has a neighbor on both sides
|
||||
elif direction == 'right' and (left_neighbors and right_neighbors):
|
||||
boss.active_tab.resize_window('wider', amount)
|
||||
# only has left neighbor
|
||||
elif direction == 'right' and left_neighbors:
|
||||
boss.active_tab.resize_window('narrower', amount)
|
||||
# only has right neighbor
|
||||
elif direction == 'right' and right_neighbors:
|
||||
boss.active_tab.resize_window('wider', amount)
|
||||
|
||||
# has a neighbor above and below
|
||||
elif direction == 'up' and (top_neighbors and bottom_neighbors):
|
||||
boss.active_tab.resize_window('shorter', amount)
|
||||
# only has top neighbor
|
||||
elif direction == 'up' and top_neighbors:
|
||||
boss.active_tab.resize_window('taller', amount)
|
||||
# only has bottom neighbor
|
||||
elif direction == 'up' and bottom_neighbors:
|
||||
boss.active_tab.resize_window('shorter', amount)
|
||||
|
||||
# has a neighbor above and below
|
||||
elif direction == 'down' and (top_neighbors and bottom_neighbors):
|
||||
boss.active_tab.resize_window('taller', amount)
|
||||
# only has top neighbor
|
||||
elif direction == 'down' and top_neighbors:
|
||||
boss.active_tab.resize_window('shorter', amount)
|
||||
# only has bottom neighbor
|
||||
elif direction == 'down' and bottom_neighbors:
|
||||
boss.active_tab.resize_window('taller', amount)
|
||||
|
||||
|
||||
def main():
|
||||
pass
|
||||
|
||||
|
||||
@result_handler(no_ui=True)
|
||||
def handle_result(args, result, target_window_id, boss):
|
||||
window = boss.window_id_map.get(target_window_id)
|
||||
action = args[1]
|
||||
direction = args[2]
|
||||
key_mapping = args[3] if action == 'neighboring_window' else args[4]
|
||||
amount = int(args[3]) if action == 'relative_resize' else None
|
||||
vim_id_idx = 4 if action == 'neighboring_window' else 5
|
||||
vim_id = args[vim_id_idx] if len(args) > vim_id_idx else "n?vim"
|
||||
|
||||
if window is None:
|
||||
return
|
||||
if is_window_vim(window, vim_id):
|
||||
for keymap in key_mapping.split(">"):
|
||||
encoded = encode_key_mapping(window, keymap)
|
||||
window.write_to_child(encoded)
|
||||
elif action == 'neighboring_window':
|
||||
boss.active_tab.neighboring_window(direction)
|
||||
elif action == 'relative_resize':
|
||||
relative_resize_window(direction, amount, target_window_id, boss)
|
@ -1,89 +0,0 @@
|
||||
import math
|
||||
from kitty.fast_data_types import Screen, get_options
|
||||
from kitty.tab_bar import (
|
||||
DrawData,
|
||||
ExtraData,
|
||||
TabBarData,
|
||||
as_rgb,
|
||||
draw_tab_with_powerline,
|
||||
)
|
||||
|
||||
opts = get_options()
|
||||
|
||||
surface1 = as_rgb(int("45475A", 16))
|
||||
window_icon = ""
|
||||
layout_icon = ""
|
||||
|
||||
active_tab_layout_name = ""
|
||||
active_tab_num_windows = 1
|
||||
|
||||
layout_symbols = {
|
||||
"grid": " ",
|
||||
"stack": " ",
|
||||
"fat": " ",
|
||||
"tall": " ",
|
||||
"splits": " "
|
||||
}
|
||||
|
||||
def draw_tab(
|
||||
draw_data: DrawData,
|
||||
screen: Screen,
|
||||
tab: TabBarData,
|
||||
before: int,
|
||||
max_title_length: int,
|
||||
index: int,
|
||||
is_last: bool,
|
||||
extra_data: ExtraData,
|
||||
) -> int:
|
||||
global active_tab_layout_name
|
||||
global active_tab_num_windows
|
||||
if tab.is_active:
|
||||
active_tab_layout_name = tab.layout_name
|
||||
active_tab_num_windows = tab.num_windows
|
||||
end = draw_tab_with_powerline(
|
||||
draw_data, screen, tab, before, max_title_length, index, is_last, extra_data
|
||||
)
|
||||
_draw_right_status(
|
||||
screen,
|
||||
is_last,
|
||||
)
|
||||
return end
|
||||
|
||||
|
||||
def _draw_right_status(screen: Screen, is_last: bool) -> int:
|
||||
if not is_last:
|
||||
return screen.cursor.x
|
||||
|
||||
cells = [
|
||||
# layout name
|
||||
(surface1, screen.cursor.bg, " " + layout_symbols[active_tab_layout_name] + " "),
|
||||
(surface1, screen.cursor.bg, active_tab_layout_name + ('' if active_tab_num_windows == 1 else f" ({active_tab_num_windows} windows)")),
|
||||
]
|
||||
|
||||
# calculate leading spaces to separate tabs from right status
|
||||
right_status_length = 0
|
||||
for _, _, cell in cells:
|
||||
right_status_length += len(cell)
|
||||
leading_spaces = 0
|
||||
if opts.tab_bar_align == "center":
|
||||
leading_spaces = (
|
||||
math.ceil((screen.columns - screen.cursor.x) / 2) - right_status_length
|
||||
)
|
||||
elif opts.tab_bar_align == "left":
|
||||
leading_spaces = screen.columns - screen.cursor.x - right_status_length
|
||||
|
||||
# draw leading spaces
|
||||
if leading_spaces > 0:
|
||||
screen.draw(" " * leading_spaces)
|
||||
|
||||
# draw right status
|
||||
for fg, bg, cell in cells:
|
||||
screen.cursor.fg = fg
|
||||
screen.cursor.bg = bg
|
||||
screen.draw(cell)
|
||||
screen.cursor.fg = 0
|
||||
screen.cursor.bg = 0
|
||||
|
||||
# update cursor position
|
||||
screen.cursor.x = max(screen.cursor.x, screen.columns - right_status_length)
|
||||
return screen.cursor.x
|
Submodule .config/nvim updated: 8f895c096d...fce1f36161
@ -1,6 +0,0 @@
|
||||
Welcome ______ _____
|
||||
______back,__ ___ /____(_)______
|
||||
__ ___/ __ `/_ __ \_ /__ __ \
|
||||
_(__ )/ /_/ /_ / / / / _ / / /
|
||||
/____/ \__,_/ /_/ /_//_/ /_/ /_/
|
||||
|
53
.config/swaylock/config
Normal file
53
.config/swaylock/config
Normal file
@ -0,0 +1,53 @@
|
||||
ignore-empty-password
|
||||
#font=Ubuntu Mono Nerd Font
|
||||
|
||||
#clock
|
||||
#timestr=%R
|
||||
|
||||
image=~/Pictures/Wallpapers/kill-win.png
|
||||
|
||||
# fade-in=0.2
|
||||
|
||||
#effect-blur=15x2
|
||||
#effect-greyscale
|
||||
#effect-scale=0.1
|
||||
|
||||
# show-keyboard-layout
|
||||
# indicator
|
||||
indicator-radius=170
|
||||
indicator-thickness=10
|
||||
indicator-caps-lock
|
||||
indicator-x-position=1165
|
||||
indicator-y-position=625
|
||||
|
||||
key-hl-color=880033ff
|
||||
|
||||
separator-color=00000000
|
||||
|
||||
inside-color=01010133
|
||||
inside-clear-color=ffd20433
|
||||
inside-caps-lock-color=009ddc33
|
||||
inside-ver-color=d9d8d833
|
||||
inside-wrong-color=ee2e2433
|
||||
|
||||
ring-color=231f20D9
|
||||
ring-clear-color=231f20D9
|
||||
ring-caps-lock-color=231f20D9
|
||||
ring-ver-color=231f20D9
|
||||
ring-wrong-color=231f20D9
|
||||
|
||||
line-color=00000000
|
||||
line-clear-color=ffd204FF
|
||||
line-caps-lock-color=009ddcFF
|
||||
line-ver-color=d9d8d8FF
|
||||
line-wrong-color=ee2e24FF
|
||||
|
||||
text-color=dededeff
|
||||
text-clear-color=ffd204ff
|
||||
text-ver-color=000000ff
|
||||
text-wrong-color=ee2e24ff
|
||||
|
||||
bs-hl-color=ffd204ff
|
||||
caps-lock-key-hl-color=ffd204FF
|
||||
caps-lock-bs-hl-color=dededeFF
|
||||
text-caps-lock-color=009ddcff
|
@ -1 +1 @@
|
||||
import /Users/sahin/.config/timewarrior/holidays/holidays.tr-TR
|
||||
import /home/sahin/.config/timewarrior/holidays/holidays.tr-TR
|
||||
|
@ -130,7 +130,10 @@ bind-key C-j join-pane
|
||||
# status bar theme
|
||||
# set -g status 'on'
|
||||
set-option -g status-position bottom
|
||||
source-file ~/.config/tmux/dark.conf
|
||||
|
||||
if-shell '[ `darkman get` == "light" ]' \
|
||||
'source-file ~/.config/tmux/light.conf' \
|
||||
'source-file ~/.config/tmux/dark.conf'
|
||||
|
||||
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
" General Settings
|
||||
set update.lastchecktime 1746702576363
|
||||
set configversion 2.0
|
||||
set smoothscroll true
|
||||
set hintchars jklasdfghuioqwertynmzxcv
|
||||
|
||||
" Binds
|
||||
bind j scrollline 5
|
||||
bind h back
|
||||
bind l forward
|
||||
bind J tabnext
|
||||
bind K tabprev
|
||||
bind H scrollpx -50
|
||||
bind L scrollpx 50
|
||||
bind q back
|
||||
bind Q forward
|
||||
bindurl github.com gp open github.com/sahinakkaya
|
||||
bindurl github.com gc composite git_clone | clipboard yank
|
||||
bindurl github.com gC composite git_clone_ssh | clipboard yank
|
||||
bindurl github.com yr composite js "\"" + document.location.href.split('#')[0].split('/').slice(3, 5).join('/') + "\"" | clipboard yank
|
||||
bindurl gitlab.com gp open gitlab.com/sahinakkayadev
|
||||
bindurl gitlab.com gc composite git_clone | clipboard yank
|
||||
bindurl gitlab.com gC composite git_clone_ssh | clipboard yank
|
||||
bindurl gitlab.com yr composite js "\"" + document.location.href.split('#')[0].split('/').slice(3, 5).join('/') + "\"" | clipboard yank
|
||||
bindurl stackoverflow.com gp open stackoverflow.com/users/9608759/sahinakkaya
|
||||
bindurl youtube.com p composite get_current_url | mpvsafe
|
||||
bindurl youtube.com P hint -W mpvsafe
|
||||
|
||||
" Subconfig Settings
|
||||
seturl monkeytype.com allowautofocus true
|
||||
|
||||
" Aliases
|
||||
alias git_clone js "git clone " + document.location.href.split('#')[0].split('/').slice(0, 5).join('/') + " ;cd " + document.location.href.split('#')[0].split('/').at(4)
|
||||
alias git_clone_ssh js "git clone " + document.location.href.split('#')[0].split('/').slice(0, 5).join('/').replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") + " ;cd " + document.location.href.split('#')[0].split('/').at(4)
|
||||
alias get_current_url js document.location.href
|
||||
alias mpvsafe js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('mpv --no-terminal ' + url))
|
||||
|
||||
" Autocmds
|
||||
autocmd DocStart monkeytype.com mode ignore
|
||||
autocmd DocStart agar.io mode ignore
|
||||
|
||||
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
|
||||
" vim: set filetype=tridactyl
|
Binary file not shown.
Binary file not shown.
@ -1,26 +0,0 @@
|
||||
// Zed settings
|
||||
//
|
||||
// For information on how to configure Zed, see the Zed
|
||||
// documentation: https://zed.dev/docs/configuring-zed
|
||||
//
|
||||
// To see all of Zed's default settings without changing your
|
||||
// custom settings, run `zed: open default settings` from the
|
||||
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||
{
|
||||
"agent": {
|
||||
"model_parameters": [],
|
||||
"default_model": {
|
||||
"provider": "zed.dev",
|
||||
"model": "claude-3-7-sonnet-latest"
|
||||
},
|
||||
"version": "2"
|
||||
},
|
||||
"vim_mode": true,
|
||||
"ui_font_size": 16,
|
||||
"buffer_font_size": 16,
|
||||
"theme": {
|
||||
"mode": "system",
|
||||
"light": "One Light",
|
||||
"dark": "One Dark"
|
||||
}
|
||||
}
|
Submodule .config/zsh updated: 39b2d8c383...09c94608f1
19
.gitconfig
19
.gitconfig
@ -2,15 +2,16 @@
|
||||
email = sahin@sahinakkaya.dev
|
||||
name = Şahin Akkaya
|
||||
signingkey = sahin@sahinakkaya.dev
|
||||
|
||||
[include]
|
||||
path = ~/.gitconfig-work ;this file is ignored in dot files intentionally. create it if you are using work computer
|
||||
[includeIf "gitdir:~/.dots/"]
|
||||
path = ~/.gitconfig-personal
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[url "ssh://git@bitbucket.org/"]
|
||||
insteadOf = https://bitbucket.org/
|
||||
[url "ssh://git@github.com/"]
|
||||
insteadOf = https://github.com/
|
||||
|
||||
[diff]
|
||||
tool = kitty
|
||||
guitool = kitty.gui
|
||||
[difftool]
|
||||
prompt = false
|
||||
trustExitCode = true
|
||||
[difftool "kitty"]
|
||||
cmd = kitten diff $LOCAL $REMOTE
|
||||
[difftool "kitty.gui"]
|
||||
cmd = kitten diff $LOCAL $REMOTE
|
||||
|
@ -1,3 +0,0 @@
|
||||
[user]
|
||||
email = sahin@sahinakkaya.dev
|
||||
signingkey = sahinakkaya@scorpapp.com
|
36
.gitignore
vendored
36
.gitignore
vendored
@ -1,36 +0,0 @@
|
||||
Library
|
||||
Desktop
|
||||
Pictures
|
||||
OrbStack
|
||||
Music
|
||||
Movies
|
||||
Projects
|
||||
Public
|
||||
Documents
|
||||
Downloads
|
||||
.zsh_sessions
|
||||
.zsh_history
|
||||
.zlua*
|
||||
.vscode
|
||||
.theme
|
||||
.ssh
|
||||
.npm
|
||||
.orbstack
|
||||
.lesshst
|
||||
**.DS_Store
|
||||
.CFUserTextEncoding
|
||||
.aws
|
||||
.cache
|
||||
.dots
|
||||
.local
|
||||
.docker
|
||||
.gitconfig-work
|
||||
**automatic_backups/
|
||||
.config/github-copilot/
|
||||
navigate_kitty.py
|
||||
pass_keys.py
|
||||
uv-receipt.json
|
||||
.claude
|
||||
.claude.json
|
||||
.pyenv
|
||||
.yarnrc
|
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -1,16 +1,16 @@
|
||||
[submodule ".config/tmux/plugins/tpm"]
|
||||
path = .config/tmux/plugins/tpm
|
||||
url = https://github.com/tmux-plugins/tpm.git
|
||||
branch = master
|
||||
branch = master
|
||||
[submodule ".config/alacritty/themes"]
|
||||
path = .config/alacritty/themes
|
||||
url = https://github.com/alacritty/alacritty-theme.git
|
||||
branch = master
|
||||
branch = master
|
||||
[submodule ".config/nvim"]
|
||||
path = .config/nvim
|
||||
url = https://github.com/sahinakkaya/nvim-config.git
|
||||
branch = macos
|
||||
branch = linux
|
||||
[submodule ".config/zsh"]
|
||||
path = .config/zsh
|
||||
url = https://github.com/sahinakkaya/zsh-config.git
|
||||
branch = macos
|
||||
branch = linux
|
||||
|
35
.local/bin/passmenu
Executable file
35
.local/bin/passmenu
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
shopt -s nullglob globstar
|
||||
|
||||
typeit=0
|
||||
if [[ $1 == "--type" ]]; then
|
||||
typeit=1
|
||||
shift
|
||||
fi
|
||||
|
||||
if [[ -n $WAYLAND_DISPLAY ]]; then
|
||||
dmenu=wofi
|
||||
xdotool="ydotool type --file -"
|
||||
elif [[ -n $DISPLAY ]]; then
|
||||
dmenu=dmenu
|
||||
xdotool="xdotool type --clearmodifiers --file -"
|
||||
else
|
||||
echo "Error: No Wayland or X11 display detected" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
|
||||
password=$(printf '%s\n' "${password_files[@]}" | "$dmenu" --show dmenu --normal-window "$@")
|
||||
|
||||
[[ -n $password ]] || exit
|
||||
|
||||
if [[ $typeit -eq 0 ]]; then
|
||||
pass show -c "$password" 2>/dev/null
|
||||
else
|
||||
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool
|
||||
fi
|
3
.zshenv
3
.zshenv
@ -1,2 +1,3 @@
|
||||
export ZDOTDIR="$HOME/.config/zsh"
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
|
||||
export ZDOTDIR="${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}"
|
||||
export PATH="$HOME/scripts/:$HOME/.local/bin/:$PATH"
|
||||
|
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>dev.sahinakkaya.dark-mode-notify</string>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/Users/sahin/.dark-mode-notify-stderr.log</string>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/Users/sahin/.dark-mode-notify-stdout.log</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/Users/sahin/.local/bin/dark-mode-notify</string>
|
||||
<string>/Users/sahin/scripts/change-background</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
theme=$(defaults read -g AppleInterfaceStyle | tr '[:upper:]' '[:lower:]')
|
||||
else
|
||||
theme="$1"
|
||||
fi
|
||||
|
||||
PATH="/opt/homebrew/bin/:$PATH"
|
||||
|
||||
if [ "$theme" == "dark" ]; then
|
||||
gsed -i 's/kanagawa_light.conf/kanagawa.conf/g' "$HOME/.config/kitty/kitty.conf"
|
||||
gsed -i 's/tokyonight_day/tokyonight_storm/g' "$HOME/.config/kitty/kitty.conf"
|
||||
gsed -i 's/Light/Origin/g' "$HOME/.config/bat/config"
|
||||
gsed -i 's/flat-remix-light/tokyo-storm/g' "$HOME/.config/btop/btop.conf"
|
||||
gsed -i "\$s/.*/include dark-256.theme/" "$HOME/.config/task/taskrc"
|
||||
echo "dark" > "$HOME/.theme"
|
||||
else
|
||||
theme="light"
|
||||
gsed -i 's/kanagawa.conf/kanagawa_light.conf/g' "$HOME/.config/kitty/kitty.conf"
|
||||
gsed -i 's/tokyonight_storm/tokyonight_day/g' "$HOME/.config/kitty/kitty.conf"
|
||||
gsed -i 's/Origin/Light/g' "$HOME/.config/bat/config"
|
||||
gsed -i 's/tokyo-storm/flat-remix-light/g' "$HOME/.config/btop/btop.conf"
|
||||
gsed -i "\$s/.*/include light-256.theme/" "$HOME/.config/task/taskrc"
|
||||
echo "light" > "$HOME/.theme"
|
||||
fi
|
||||
|
||||
# pgrep -f kitty | xargs kill -SIGUSR1
|
||||
kill -SIGUSR1 $(pgrep -f kitty)
|
||||
# tmux source-file "$HOME/.config/tmux/$theme.conf"
|
||||
|
||||
|
||||
# This uses the neovim-remote python package to control other neovim instances.
|
||||
# see: https://github.com/mhinz/neovim-remote
|
||||
# Further, it is assumed that toggling the background in neovim is enough.
|
||||
# Anything else should be handled by the set color scheme.
|
||||
|
||||
for server in $(nvr --serverlist); do
|
||||
nvr --servername "$server" -cc "set background=$theme"
|
||||
done
|
20
scripts/check-battery.sh
Executable file
20
scripts/check-battery.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set limit to shell argument
|
||||
batteryLimit=$1
|
||||
fullAt=92
|
||||
|
||||
# Get the current battery level with acpi
|
||||
batteryLevel=$(acpi | cut -d ' ' -f 4 | tr -d '%|,| ')
|
||||
charging=$(acpi | cut -d ' ' -f 3 | tr -d ',| ')
|
||||
|
||||
echo $batteryLevel
|
||||
|
||||
if [[ "$batteryLevel" -le "$batteryLimit" ]] && [[ "$charging" == "Discharging" ]]; then
|
||||
/usr/bin/notify-send -a "Battery Warning" --urgency critical "Battery level at ${batteryLevel}%" -i abrt -t 10000
|
||||
/usr/bin/mpv /usr/share/sounds/Oxygen-Sys-Warning.ogg
|
||||
# /usr/bin/aplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
#elif [[ "$batteryLevel" -gt "$fullAt" ]] && [[ ! "$charging" == "Discharging" ]]; then
|
||||
# /usr/bin/notify-send -a "Battery Warning" "Battery is full: ${batteryLevel}" -i abrt -t 10000
|
||||
# /usr/bin/paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
fi
|
41
scripts/dim-screen
Executable file
41
scripts/dim-screen
Executable file
@ -0,0 +1,41 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Gradually decrease brightness level. Thanks ChatGPT
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
def set_brightness(brightness):
|
||||
subprocess.call(['light', '-S', str(brightness)])
|
||||
|
||||
def smooth_dimming(initial_brightness, final_brightness, duration, steps):
|
||||
brightness_step = (initial_brightness - final_brightness) / steps
|
||||
sleep_time = duration / steps
|
||||
|
||||
for i in range(steps + 1):
|
||||
current_brightness = round(initial_brightness - i * brightness_step,2)
|
||||
set_brightness(current_brightness)
|
||||
print(current_brightness)
|
||||
time.sleep(sleep_time)
|
||||
|
||||
set_brightness(final_brightness)
|
||||
|
||||
# Save brighness value for later
|
||||
subprocess.call(['light', '-O'])
|
||||
|
||||
initial_brightness = float(subprocess.getoutput('light'))
|
||||
if initial_brightness < 20:
|
||||
final_brightness = max(0, initial_brightness - 10)
|
||||
elif initial_brightness < 40:
|
||||
final_brightness = max(10, initial_brightness - 20)
|
||||
elif initial_brightness < 60:
|
||||
final_brightness = max(30, initial_brightness - 30)
|
||||
elif initial_brightness < 80:
|
||||
final_brightness = max(40, initial_brightness - 40)
|
||||
elif initial_brightness < 100:
|
||||
final_brightness = max(50, initial_brightness - 50)
|
||||
|
||||
|
||||
dimming_duration = 0.3 if initial_brightness < 20 else .5
|
||||
num_steps = 20 if initial_brightness < 20 else 50
|
||||
|
||||
smooth_dimming(initial_brightness, final_brightness, dimming_duration, num_steps)
|
3
scripts/lock-screen
Executable file
3
scripts/lock-screen
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
swaylock -f
|
22
scripts/smart-exec
Executable file
22
scripts/smart-exec
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the currently focused workspace
|
||||
current_workspace=$(hyprctl monitors -j | jq '.[] | .activeWorkspace.id' )
|
||||
|
||||
# Define preferred apps based on workspace
|
||||
case $current_workspace in
|
||||
1) app="kitty --single-instance";;
|
||||
2) app="default";;
|
||||
3) app="thunderbird";;
|
||||
4) app="firefox";;
|
||||
5) app="default";;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
if [[ "$app" == "default" ]]; then
|
||||
hyprctl dispatch exec "wofi --show drun --normal-window"
|
||||
else
|
||||
notify-send -t 500 "opening $app"
|
||||
hyprctl dispatch exec "$app"
|
||||
fi
|
21
scripts/smart-switch
Executable file
21
scripts/smart-switch
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
monitors=$(hyprctl monitors -j | jq '.[] | .name')
|
||||
edp=$(echo "$monitors" | grep eDP)
|
||||
hdmi=$(echo "$monitors" | grep HDMI)
|
||||
|
||||
if [[ "$1" == "close" ]]; then # lid is closing
|
||||
if [[ -n "$hdmi" ]]; then # -n means if string is not empty
|
||||
hyprctl keyword monitor "eDP-1, disable"
|
||||
else
|
||||
hyprctl dispatch exec lock-screen
|
||||
|
||||
fi
|
||||
else
|
||||
if [[ -z "$edp" ]]; then # -z means if string is empty
|
||||
hyprctl keyword monitor eDP-1,preferred,0x1107,2.0
|
||||
killall ags
|
||||
ags
|
||||
fi
|
||||
fi
|
||||
|
16
scripts/smart-tab
Executable file
16
scripts/smart-tab
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
focusedClient=$(hyprctl clients -j | jq '[.[] | select(.focusHistoryID|contains(0))][0]')
|
||||
|
||||
if [[ -n "$focusedClient" ]]; then
|
||||
clientClass=$(echo "$focusedClient" | jq '.class' )
|
||||
|
||||
case "$clientClass" in
|
||||
kitty) hyprctl pass "" # cannot pass arbitrary keys to applications atm. abort mission
|
||||
;;
|
||||
d|D) exit 0
|
||||
;;
|
||||
*) exit 1
|
||||
esac
|
||||
fi
|
||||
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
tmux split-window -h
|
||||
tmux split-window
|
||||
tmux resize-pane -U 14
|
||||
tmux resize-pane -R 5
|
||||
tmux send-keys -t0 "btop" Enter
|
||||
tmux send-keys -t1 "while true;do task next limit:5;sleep 2;done" Enter
|
||||
tmux send-keys -t2 "while true;do task burndown.daily;sleep 3;done" Enter
|
||||
|
||||
tmux rename-window "tasks"
|
||||
tmux new-window
|
||||
|
||||
|
||||
|
||||
|
24
scripts/tasks
Executable file
24
scripts/tasks
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
tasks_window=$(tmux list-windows | grep tasks | cut -d: -f1)
|
||||
if [[ -z "$tasks_window" ]]; then
|
||||
tmux create-window
|
||||
tmux split-window -h
|
||||
tmux split-window
|
||||
tmux resize-pane -U 14
|
||||
tmux resize-pane -R 5
|
||||
tmux send-keys -t0 "btop" Enter
|
||||
tmux send-keys -t1 "while true;do task next limit:5;sleep 2;done" Enter
|
||||
tmux send-keys -t2 "while true;do task burndown.daily;sleep 3;done" Enter
|
||||
|
||||
tmux rename-window "tasks"
|
||||
else
|
||||
tmux select-window -t $tasks_window
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
9
scripts/toggle-monitor
Executable file
9
scripts/toggle-monitor
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
monitor=$(hyprctl -j monitors | jq '.[] | select(.name == "eDP-1") | .id')
|
||||
|
||||
if [[ $monitor == "" ]]; then
|
||||
hyprctl keyword monitor eDP-1,preferred,0x1107,2.0
|
||||
else
|
||||
hyprctl keyword monitor eDP-1,disable
|
||||
fi
|
7
scripts/undim-screen
Executable file
7
scripts/undim-screen
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if pid=$(pgrep -x "dim-screen"); then
|
||||
kill $pid
|
||||
fi
|
||||
|
||||
light -I
|
59
scripts/volume
Executable file
59
scripts/volume
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
VOLUME_STEP=2
|
||||
|
||||
# Function to check if the audio is currently muted
|
||||
is_muted() {
|
||||
amixer sget Master | grep -q "\[off\]"
|
||||
}
|
||||
|
||||
# Function to toggle mute status
|
||||
toggle_mute() {
|
||||
amixer sset Master toggle
|
||||
}
|
||||
|
||||
# Function to increase volume
|
||||
increase_volume() {
|
||||
amixer sset Master "${VOLUME_STEP}%+"
|
||||
}
|
||||
|
||||
# Function to decrease volume
|
||||
decrease_volume() {
|
||||
amixer sset Master "${VOLUME_STEP}%-"
|
||||
}
|
||||
|
||||
# Main function
|
||||
main() {
|
||||
case "$1" in
|
||||
"up")
|
||||
if is_muted; then
|
||||
toggle_mute
|
||||
fi
|
||||
increase_volume
|
||||
;;
|
||||
"down")
|
||||
if is_muted; then
|
||||
toggle_mute
|
||||
fi
|
||||
decrease_volume
|
||||
;;
|
||||
"toggle-mute")
|
||||
toggle_mute
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {up|down|toggle-mute}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Display the current volume
|
||||
amixer get Master | grep -oE "[0-9]+%"
|
||||
}
|
||||
|
||||
# Check if an argument is provided
|
||||
if [ $# -eq 1 ]; then
|
||||
main "$1"
|
||||
else
|
||||
echo "Usage: $0 {up|down|toggle-mute}"
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user