From d755d93ea96d90054984b7266d693b3eb0cfbdf1 Mon Sep 17 00:00:00 2001 From: koehr Date: Tue, 2 Jan 2024 00:05:49 +0100 Subject: [PATCH] general update to fedora sway based setup --- README.md | 21 +- dot.Xdefaults | 134 ---- dot.config/cvimrc | 90 --- dot.config/dunst/dunstrc | 266 ++----- dot.config/foot/foot.ini | 190 +---- dot.config/helix/config.toml | 41 + dot.config/kak-lsp/kak-lsp.toml | 404 ---------- dot.config/kak/autoload/autoload | 1 - dot.config/kak/autoload/stuff.kak | 32 - dot.config/kak/autoload/svelte.kak | 1 - dot.config/kak/colors/catppuccin_mocha.kak | 83 -- dot.config/kak/colors/penumbra.kak | 84 -- dot.config/kak/colors/warm-pastel.kak | 49 -- dot.config/kak/filetypes.kak | 19 - dot.config/kak/kakrc | 3 - dot.config/kak/personalization.kak | 75 -- dot.config/kak/plugins.kak | 55 -- dot.config/kitty/base16-atelier-heath.conf | 46 -- dot.config/kitty/kitty.conf | 393 ---------- dot.config/kitty/mario-plays-the-blues.conf | 59 -- dot.config/macchina/ascii/archlinux.ascii | 15 + dot.config/macchina/ascii/fedora.ascii | 20 + dot.config/macchina/ascii/fedoralinux.ascii | 16 + dot.config/macchina/ascii/rust.ascii | 17 + dot.config/macchina/themes/Beryllium.toml | 26 + dot.config/macchina/themes/Helium.toml | 53 ++ dot.config/macchina/themes/Hydrogen.toml | 53 ++ dot.config/macchina/themes/Lithium.toml | 59 ++ dot.config/macchina/themes/koehr.toml | 59 ++ dot.config/neofetch/config.conf | 82 -- dot.config/picomrc | 63 -- dot.config/sway/config | 137 ++-- .../sway/config.d/50-rules-browser.conf | 17 + .../sway/config.d/50-rules-pavucontrol.conf | 12 + .../config.d/50-rules-policykit-agent.conf | 4 + .../sway/config.d/60-bindings-brightness.conf | 18 + .../sway/config.d/60-bindings-media.conf | 17 + .../sway/config.d/60-bindings-screenshot.conf | 20 + .../sway/config.d/60-bindings-volume.conf | 21 + .../sway/config.d/65-mode-passthrough.conf | 6 + dot.config/sway/config.d/90-bar.conf | 10 + dot.config/sway/config.d/90-swayidle.conf | 30 + .../95-autostart-policykit-agent.conf | 8 + .../config.d/95-xdg-desktop-autostart.conf | 14 + .../sway/config.d/95-xdg-user-dirs.conf | 9 + dot.config/swaylock/config | 14 +- dot.config/waybar/config | 179 ++--- dot.config/waybar/style.css | 146 ++-- {dot.zsh => dot.config/zsh}/koehr.theme.zsh | 20 +- dot.config/zsh/zshrc | 28 + dot.profile | 6 +- dot.tmux.conf | 90 +-- dot.zsh/kitty.compl.zsh | 12 - dot.zshrc | 40 +- dwm/config.h | 147 ---- dwm/config.mk | 38 - .../dwm-status2d-20200508-60bb3df.diff | 180 ----- .../dwm-status2d-swap-save-restore-6.2.diff | 44 -- dwm/patches/dwm-systray-20200914-61bb8b2.diff | 727 ------------------ slock/config.h | 12 - slock/config.mk | 33 - st/config.h | 472 ------------ st/config.mk | 35 - 63 files changed, 889 insertions(+), 4166 deletions(-) delete mode 100644 dot.Xdefaults delete mode 100644 dot.config/cvimrc create mode 100644 dot.config/helix/config.toml delete mode 100644 dot.config/kak-lsp/kak-lsp.toml delete mode 120000 dot.config/kak/autoload/autoload delete mode 100644 dot.config/kak/autoload/stuff.kak delete mode 120000 dot.config/kak/autoload/svelte.kak delete mode 100644 dot.config/kak/colors/catppuccin_mocha.kak delete mode 100644 dot.config/kak/colors/penumbra.kak delete mode 100644 dot.config/kak/colors/warm-pastel.kak delete mode 100644 dot.config/kak/filetypes.kak delete mode 100644 dot.config/kak/kakrc delete mode 100644 dot.config/kak/personalization.kak delete mode 100644 dot.config/kak/plugins.kak delete mode 100644 dot.config/kitty/base16-atelier-heath.conf delete mode 100644 dot.config/kitty/kitty.conf delete mode 100644 dot.config/kitty/mario-plays-the-blues.conf create mode 100644 dot.config/macchina/ascii/archlinux.ascii create mode 100644 dot.config/macchina/ascii/fedora.ascii create mode 100644 dot.config/macchina/ascii/fedoralinux.ascii create mode 100644 dot.config/macchina/ascii/rust.ascii create mode 100644 dot.config/macchina/themes/Beryllium.toml create mode 100644 dot.config/macchina/themes/Helium.toml create mode 100644 dot.config/macchina/themes/Hydrogen.toml create mode 100644 dot.config/macchina/themes/Lithium.toml create mode 100644 dot.config/macchina/themes/koehr.toml delete mode 100644 dot.config/neofetch/config.conf delete mode 100644 dot.config/picomrc create mode 100644 dot.config/sway/config.d/50-rules-browser.conf create mode 100644 dot.config/sway/config.d/50-rules-pavucontrol.conf create mode 100644 dot.config/sway/config.d/50-rules-policykit-agent.conf create mode 100644 dot.config/sway/config.d/60-bindings-brightness.conf create mode 100644 dot.config/sway/config.d/60-bindings-media.conf create mode 100644 dot.config/sway/config.d/60-bindings-screenshot.conf create mode 100644 dot.config/sway/config.d/60-bindings-volume.conf create mode 100644 dot.config/sway/config.d/65-mode-passthrough.conf create mode 100644 dot.config/sway/config.d/90-bar.conf create mode 100644 dot.config/sway/config.d/90-swayidle.conf create mode 100644 dot.config/sway/config.d/95-autostart-policykit-agent.conf create mode 100644 dot.config/sway/config.d/95-xdg-desktop-autostart.conf create mode 100644 dot.config/sway/config.d/95-xdg-user-dirs.conf rename {dot.zsh => dot.config/zsh}/koehr.theme.zsh (73%) create mode 100644 dot.config/zsh/zshrc delete mode 100644 dot.zsh/kitty.compl.zsh delete mode 100644 dwm/config.h delete mode 100644 dwm/config.mk delete mode 100644 dwm/patches/dwm-status2d-20200508-60bb3df.diff delete mode 100644 dwm/patches/dwm-status2d-swap-save-restore-6.2.diff delete mode 100644 dwm/patches/dwm-systray-20200914-61bb8b2.diff delete mode 100644 slock/config.h delete mode 100644 slock/config.mk delete mode 100644 st/config.h delete mode 100644 st/config.mk diff --git a/README.md b/README.md index 9905742..358e1a8 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,25 @@ System configuration files Here you can find all relevant configurations. This is thought equally as public viewport and backup. I appreciate suggestions, rants and bug reports :) -requirements ------------- +Requirements & Usage +-------------------- -My zshrc expects the zgen repository checked out in `~/src/pkg/`: +My zshrc expects the zgenom repository checked out in `~/src/pkg/`: ```sh mkdir -p ~/src/pkg -git clone https://github.com/tarjoilija/zgen.git ~/src/pkg/zgen +git clone https://github.com/jandamm/zgenom.git ~/src/pkg/zgenom ``` -Wayland -------- +Most things can be simply copied over, but I used a special naming scheme where hidden (dot) files start with `dot`, like `.profile` becomes `dot.profile`, to ensure visibility. -For a while I used wayland and sway. You can check out [this reddit post](https://www.reddit.com/r/unixporn/comments/d0fuc1/sway_mario_plays_the_blues/) for some pretty imagery. My current setup is back to X11 because I needed some things that don't work on a pure wayland setup yet. +I also brought the zsh and tmux config into the config folder, but still use the original config files (`~/.zshrc` and `~/.tmux.conf` respectively) to load the actual configs. This feels more consistent in my opinion. -If you want to check out the wayland config (which is most probably very outdated after so many years), you can find [the wayland branch on github](https://github.com/nkoehring/configs/tree/wayland). +My ZSH prompt is written by myself and uses [Powerline Extra Symbols](https://github.com/ryanoasis/powerline-extra-symbols), so make sure to install a compatible font. I would suggest checking out [Nerdfonts](https://www.nerdfonts.com/). +Wayland vs X11 +-------------- + +I used to have seperate branches for Wayland and X11 based setups, but all issues I had with Wayland are gone now, so there is no need for me to keep X11 configs around. You can still find them in the commit tree, though. + +You can check out my old setup on [this reddit post](https://www.reddit.com/r/unixporn/comments/d0fuc1/sway_mario_plays_the_blues/). diff --git a/dot.Xdefaults b/dot.Xdefaults deleted file mode 100644 index 3b9a2aa..0000000 --- a/dot.Xdefaults +++ /dev/null @@ -1,134 +0,0 @@ -! ~/.Xdefaults - Norman Köhring -! with ideas from: -! http://galois.com/~emertens/Xresources -! and http://dotfiles.org/~tenebrous/.Xdefaults -! and others - -! general settings: -Xft.antialias: 1 -Xft.autohint: 0 -Xft.lcdfilter: lcddefault -Xft.hintstyle: hintfull -Xft.hinting: 1 -Xft.rgba: rgb -Xft.dpi: 96 - -*font: xft:MonofurNerdFont-14 -*faceName: xft:MonofurNerdFont-14 - -! --- ~/.Xresources ------------------------------------------------------------ -! ------------------------------------------------------------------------------ -! --- generated with 4bit Terminal Color Scheme Designer ----------------------- -! ------------------------------------------------------------------------------ -! --- http://ciembor.github.com/4bit ------------------------------------------- -! ------------------------------------------------------------------------------ - -! --- special colors --- - -*background: #271512 -*foreground: #d9e6f2 - -! --- standard colors --- - -! black -*color0: #232323 - -! bright_black -*color8: #353535 - -! red -*color1: #af8384 - -! bright_red -*color9: #d7c1c1 - -! green -*color2: #84af83 - -! bright_green -*color10: #c1d7c1 - -! yellow -*color3: #afae83 - -! bright_yellow -*color11: #d7d7c1 - -! blue -*color4: #8384af - -! bright_blue -*color12: #c1c1d7 - -! magenta -*color5: #ae83af - -! bright_magenta -*color13: #d7c1d7 - -! cyan -*color6: #83afae - -! bright_cyan -*color14: #c1d7d7 - -! white -*color7: #c6c6c6 - -! bright_white -*color15: #e4e4e4 - - -! ------------------------------------------------------------------------------ -! --- end of terminal colors section ------------------------------------------- -! ------------------------------------------------------------------------------ - -! xmessage settings: -.xmessage.form.okay.shapeStyle: round -.xmessage.form.okay.background: #333333 -.xmessage.form.okay.foreground: snow -.xmessage.message.font: -*-proggyclean-*-*-*-*-*-*-*-*-*-*-*-* -.xmessage.message.background: #333333 -.xmessage.form.background: #333333 -.xmessage.defaultButton: - - -!CursorFoo -Xcursor.theme: Chameleon-Anthracite-Regular -Xcursor.size: 16 - -!TerminalFoo -Rxvt*termName: rxvt-256color -Rxvt*title: terminal -Rxvt*name: terminal -Rxvt*geometry: 106x52 -Rxvt*background: black -Rxvt*foreground: white -Rxvt*scrollBar: False -Rxvt*visualBell: True -Rxvt*urgentOnBell: True -URxvt*transparent: False -URxvt*fading: 80 -URxvt*fadeColor: #101010 -!URxvt*shading: 20 -!URxvt*blurRadius: 24 -! URL FOO -URxvt.perl-ext: default,selection,mark-yank-urls -URxvt.perl-ext-common: default,matcher -URxvt*colorUL: #86A2BE -URxvt.keysym.M-u: perl:mark-yank-urls:activate_mark_mode -URxvt.underlineURLs: true -urxvt.urlLauncher: /usr/bin/vimprobable2 - -urxvt.scrollstyle: plain -urxvt.scrollBar: false - -URxvt*matcher.button: 3 -!URxvt.keysym.C-minus: command:\033]50;xft:Monospace:size=10:antialias=true\007 -URxvt.keysym.C-minus: perl:mark-yank-urls:activate_mark_mode - -rofi.pid: /home/nk/.cache/rofi.pid -rofi.modi: run,calc,emoji,drun -rofi.font: Monofur Nerdfont 14 -rofi.theme: Monokai -rofi.fuzzy: false diff --git a/dot.config/cvimrc b/dot.config/cvimrc deleted file mode 100644 index e4911e1..0000000 --- a/dot.config/cvimrc +++ /dev/null @@ -1,90 +0,0 @@ -" Settings -set nohud -set smoothscroll -set noautofocus " The opposite of autofocus; this setting stops - " sites from focusing on an input box when they load -set typelinkhints -let searchlimit = 30 -let scrollstep = 70 -let barposition = "bottom" - -let locale = "uk" " Current choices are 'jp' and 'uk'. This allows cVim to use sites like google.co.uk - " or google.co.jp to search rather than google.com. Support is currently limited. - " Let me know if you need a different locale for one of the completion/search engines -let hintcharacters = "asdfgqwertzxcvb12345" - -let searchengine dogpile = "https://duckduckgo.com/?q=" " If you leave out the '%s' at the end of the URL, - " your query will be appended to the link. - " Otherwise, your query will replace the '%s'. - -" This will do the same thing as above, except typing ':tabnew withbase' into to command bar -" without any search parameters will open 'http://www.dogpile.com' -let searchengine withbase = ["https://duckduckgo.com", "https://duckduckgo.com/?q=%s"] - -let completionengines = ["duckduckgo", "amazon", "imdb", "dogpile"] - -let searchalias ddg = "duckduckgo" " Create a shortcut for search engines. - " For example, typing ':tabnew g example' - " would act the same way as ':tabnew google example' - -" Open all of these in a tab with `gnb` or open one of these with goa where -" let qmark a = ["http://www.reddit.com", "http://www.google.com", "http://twitter.com"] - -" let blacklists = ["https://mail.google.com/*", "*://mail.google.com/*", "@https://mail.google.com/mail/*"] -" blacklists prefixed by '@' act as a whitelist - -let mapleader = "," - -" Mappings - -map r reloadTabUncached -" map x :restore - -" This remaps the default 'j' mapping -map j scrollUp - -" You can use , which is interpreted as a -" literal " " character, to enter buffer completion mode -map b :buffer -map B :bookmarks - -" This remaps the default 'f' mapping to the current 'F' mapping -" map f F - -" Toggle the current HUD display value -" map :set hud! - -" Switch between alphabetical hint characters and numeric hints -" map :set numerichints! - -" Create a variable that can be used/referenced in the command bar -" let @@reddit_prog = 'http://www.reddit.com/r/programming' -" let @@top_all = 'top?sort=top&t=all' -" let @@top_day = 'top?sort=top&t=day' - -" TA binding opens 'http://www.reddit.com/r/programming/top?sort=top&t=all' in a new tab -" map TA :tabnew @@reddit_prog/@@top_all -" map TD :tabnew @@reddit_prog/@@top_day - -" Use paste buffer in mappings -map T :tabnew wikipedia @" - -" Code blocks (see below for more info) -getIP() -> {{ -httpRequest({url: 'http://api.ipify.org/?format=json', json: true}, - function(res) { Status.setMessage('IP: ' + res.ip); }); -}} -" Displays your public IP address in the status bar -map ci :call getIP - -" Script hints -echo(link) -> {{ - alert(link.href); -}} -map createScriptHint(echo) - -let configpath = '~/.config/cvimrc' -set localconfig " Update settings via a local file (and the `:source` command) rather - " than the default options page in chrome -" As long as localconfig is set in the .cvimrc file. cVim will continue to read -" settings from there diff --git a/dot.config/dunst/dunstrc b/dot.config/dunst/dunstrc index f2eba5f..746a00d 100644 --- a/dot.config/dunst/dunstrc +++ b/dot.config/dunst/dunstrc @@ -1,3 +1,5 @@ +# See dunst(5) for all configuration options + [global] ### Display ### @@ -15,105 +17,45 @@ # # If this option is set to mouse or keyboard, the monitor option # will be ignored. - follow = mouse - - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "300x5-20+40" - - # Show how many messages are currently hidden (because of geometry). - indicate_hidden = yes + follow = none - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = yes + ### Geometry ### + width = (300, 900) + height = 600 + origin = top-center + offset = 10x50 - # The transparency of the window. Range: [0; 100]. - # This option will only work if a compositing window manager is - # present (e.g. xcompmgr, compiz, etc.). - transparency = 0 + # Scale factor. It is auto-detected if value is 0. + scale = 0 - # The height of the entire notification. If the height is smaller - # than the font height and padding combined, it will be raised - # to the font height and padding. - notification_height = 0 + # Maximum number of notification (0 means no limit) + notification_limit = 20 - # Draw a line of "separator_height" pixel height between two - # notifications. - # Set to 0 to disable. - separator_height = 2 + ### Progress bar ### + progress_bar = true + progress_bar_height = 6 + progress_bar_frame_width = 1 + progress_bar_min_width = 150 + progress_bar_max_width = 900 + progress_bar_corner_radius = 0 + icon_corner_radius = 0 - # Padding between text and separator. + indicate_hidden = yes + transparency = 0 + separator_height = 2 padding = 8 - - # Horizontal padding. horizontal_padding = 8 - - # Defines width in pixels of frame around the notification window. - # Set to 0 to disable. + text_icon_padding = 0 frame_width = 3 - - # Defines color of the frame around the notification window. frame_color = "#aaaaaa" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. + gap_size = 0 + separator_color = auto sort = yes - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - # A client can set the 'transient' hint to bypass this. See the rules - # section for how to disable this if necessary - idle_threshold = 120 + idle_threshold = 60 ### Text ### - - font = Monospace 10 - - # The spacing between lines. If the height is smaller than the - # font height, it will get raised to the font height. - line_height = 0 - - # Possible values are: - # full: Allow a small subset of html markup in notifications: - # bold - # italic - # strikethrough - # underline - # - # For a complete reference see - # . - # - # strip: This setting is provided for compatibility with some broken - # clients that send markup even though it's not enabled on the - # server. Dunst will try to strip the markup but the parsing is - # simplistic so using this option outside of matching rules for - # specific applications *IS GREATLY DISCOURAGED*. - # - # no: Disable markup parsing, incoming notifications will be treated as - # plain text. Dunst will not advertise that it has the body-markup - # capability if this is set as a global setting. - # - # It's important to note that markup inside the format option will be parsed - # regardless of what this is set to. + font = Monofur Nerd Font 14 + line_height = 16 markup = full # The format of the message. Possible variables are: @@ -127,93 +69,53 @@ # %% Literal % # Markup is allowed format = "%s\n%b" - - # Alignment of message text. - # Possible values are "left", "center" and "right". alignment = center + vertical_alignment = center + show_age_threshold = 30 - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = 60 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # When word_wrap is set to no, specify where to make an ellipsis in long lines. + # Specify where to make an ellipsis in long lines. # Possible values are "start", "middle" and "end". ellipsize = middle - # Ignore newlines '\n' in notifications. ignore_newline = no - - # Stack together notifications with the same content stack_duplicates = true - - # Hide the count of stacked notifications with the same content hide_duplicate_count = false - - # Display indicators for URLs (U) and actions (A). show_indicators = yes ### Icons ### - - # Align icons left/right/off + enable_recursive_icon_lookup = true + icon_theme = Adwaita + # You can also set multiple icon themes, with the leftmost one being used first. + # icon_theme = "Adwaita, breeze" icon_position = left - - # Scale larger icons down to this size, set to 0 to disable + min_icon_size = 32 max_icon_size = 128 - # Paths to default icons. - icon_path = /usr/share/icons/AwOkenDark/clear/128x128/status/:/usr/share/icons/AwOkenDark/clear/128x128/devices/:/usr/share/icons/AwOkenDark/clear/128x128/emotes/ + # Paths to default icons (only neccesary when not using recursive icon lookup) + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ ### History ### - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. sticky_history = yes - - # Maximum amount of notifications kept in history history_length = 20 ### Misc/Advanced ### - - # dmenu path. dmenu = /usr/bin/dmenu -p dunst: - - # Browser for opening urls in context menu. - browser = /usr/bin/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed + browser = /usr/bin/xdg-open always_run_script = true - - # Define the title of the windows spawned by dunst title = Dunst - - # Define the class of the windows spawned by dunst class = Dunst + corner_radius = 1 + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # Manage dunst's desire for talking - # Can be one of the following values: - # crit: Critical features. Dunst aborts - # warn: Only non-fatal warnings - # mesg: Important Messages - # info: all unimportant stuff - # debug: all less than unimportant stuff - verbosity = mesg - - # Define the corner radius of the notification window - # in pixel size. If the radius is 0, you have no rounded - # corners. - # The radius will be automatically lowered if it exceeds half of the - # notification height to avoid clipping text and/or icons. - corner_radius = 0 + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false ### Legacy @@ -229,15 +131,21 @@ ### mouse - # Defines action of mouse event + # Defines list of actions for each mouse event # Possible values are: # * none: Don't do anything. - # * do_action: If the notification has exactly one action, or one is marked as default, - # invoke it. If there are multiple and no default, open the context menu. + # * do_action: Invoke the action determined by the action_name rule. If there is no + # such action, open the context menu. + # * open_url: If the notification has exactly one url, open it. If there are multiple + # ones, open the context menu. # * close_current: Close current notification. # * close_all: Close all notifications. + # * context: Open context menu for the notification. + # * context_all: Open context menu for all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. mouse_left_click = close_current - mouse_middle_click = do_action + mouse_middle_click = do_action, close_current mouse_right_click = close_all # Experimental features that may or may not work correctly. Do not expect them @@ -248,53 +156,32 @@ # dunst will attempt to calculate an appropriate dpi value for each monitor # using the resolution and physical size. This might be useful in setups # where there are multiple screens with very different dpi values. - per_monitor_dpi = true - -[shortcuts] - - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. + per_monitor_dpi = false - # Close notification. - close = ctrl+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". Make sure this key actually exists on your keyboard layout, - # e.g. check output of 'xmodmap -pke' - history = ctrl+grave - - # Context menu. - context = ctrl+shift+period [urgency_low] # IMPORTANT: colors have to be defined in quotation marks. # Otherwise the "#" and following would be interpreted as a comment. - background = "#334466" - foreground = "#aaaaaa" + background = "#222222" + foreground = "#888888" timeout = 10 # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon + #default_icon = /path/to/icon [urgency_normal] - background = "#222222" + background = "#285577" foreground = "#ffffff" timeout = 10 # Icon for notifications with normal urgency, uncomment to enable - #icon = /path/to/icon + #default_icon = /path/to/icon [urgency_critical] - background = "#600000" + background = "#900000" foreground = "#ffffff" - frame_color = "#dd3333" + frame_color = "#ff0000" timeout = 0 # Icon for notifications with critical urgency, uncomment to enable - #icon = /path/to/icon + #default_icon = /path/to/icon # Every section that isn't one of the above is interpreted as a rules to # override settings for certain messages. @@ -319,8 +206,17 @@ # new_icon # set_stack_tag # set_transient +# set_category # timeout # urgency +# icon_position +# skip_display +# history_ignore +# action_name +# word_wrap +# ellipsize +# alignment +# hide_text # # Shell-like globbing will get expanded. # @@ -335,8 +231,6 @@ # script appname summary body icon urgency # where urgency can be "LOW", "NORMAL" or "CRITICAL". # -# NOTE: if you don't want a notification to be displayed, set the format -# to "". # NOTE: It might be helpful to run dunst -print in a terminal in order # to find fitting options for rules. @@ -375,7 +269,7 @@ #[ignore] # # This notification will not be displayed # summary = "foobar" -# format = "" +# skip_display = true #[history-ignore] # # This notification will not be saved in history diff --git a/dot.config/foot/foot.ini b/dot.config/foot/foot.ini index bc2f4ef..8b9fe26 100644 --- a/dot.config/foot/foot.ini +++ b/dot.config/foot/foot.ini @@ -1,186 +1,4 @@ -# -*- conf -*- - -# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) -# term=foot (or xterm-256color if built with -Dterminfo=disabled) -# login-shell=no - -# app-id=foot -# title=foot -# locked-title=no - -font=Monofur Nerd Font:size=11:antialias=true:autohint=true -# font-bold= -# font-italic= -# font-bold-italic= -# line-height= -# letter-spacing=0 -# horizontal-letter-offset=0 -# vertical-letter-offset=0 -# underline-offset= -# box-drawings-uses-font-glyphs=no -# dpi-aware=auto - -# initial-window-size-pixels=700x500 # Or, -# initial-window-size-chars= -initial-window-mode=maximized -# pad=2x2 # optionally append 'center' -# resize-delay-ms=100 - -# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} - -# bold-text-in-bright=no -# word-delimiters=,│`|:"'()[]{}<> -# selection-target=primary -# workers= - -[bell] -# urgent=no -# notify=no -# command= -# command-focused=no - -[scrollback] -# lines=1000 -# multiplier=3.0 -# indicator-position=relative -# indicator-format= - -[url] -# launch=xdg-open ${url} -# label-letters=sadfjklewcmpgh -# osc8-underline=url-mode -# protocols=http, https, ftp, ftps, file, gemini, gopher -# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] - -[cursor] -# style=block -# color= -# blink=no -# beam-thickness=1.5 -# underline-thickness= - -[mouse] -# hide-when-typing=no -# alternate-scroll-mode=yes - -[colors] -# alpha=1.0 -# foreground=dcdccc -# background=111111 - -## Normal/regular colors (color palette 0-7) -# regular0=222222 # black -# regular1=cc9393 # red -# regular2=7f9f7f # green -# regular3=d0bf8f # yellow -# regular4=6ca0a3 # blue -# regular5=dc8cc3 # magenta -# regular6=93e0e3 # cyan -# regular7=dcdccc # white - -## Bright colors (color palette 8-15) -# bright0=666666 # bright black -# bright1=dca3a3 # bright red -# bright2=bfebbf # bright green -# bright3=f0dfaf # bright yellow -# bright4=8cd0d3 # bright blue -# bright5=fcace3 # bright magenta -# bright6=b3ffff # bright cyan -# bright7=ffffff # bright white - -## dimmed colors (see foot.ini(5) man page) -# dim0= -# ... -# dim7= - -## The remaining 256-color palette -# 16 = <256-color palette #16> -# ... -# 255 = <256-color palette #255> - -## Misc colors -# selection-foreground= -# selection-background= -# jump-labels= -# urls= -# scrollback-indicator= - -[csd] -preferred=none -# size=26 -# font= -# color= -# hide-when-typing=no -# border-width=0 -# border-color= -# button-width=26 -# button-color= -# button-minimize-color= -# button-maximize-color= -# button-close-color= - -[key-bindings] -# scrollback-up-page=Shift+Page_Up -# scrollback-up-half-page=none -# scrollback-up-line=none -# scrollback-down-page=Shift+Page_Down -# scrollback-down-half-page=none -# scrollback-down-line=none -# clipboard-copy=Control+Shift+c XF86Copy -# clipboard-paste=Control+Shift+v XF86Paste -# primary-paste=Shift+Insert -# search-start=Control+Shift+r -# font-increase=Control+plus Control+equal Control+KP_Add -# font-decrease=Control+minus Control+KP_Subtract -# font-reset=Control+0 Control+KP_0 -# spawn-terminal=Control+Shift+n -# minimize=none -# maximize=none -fullscreen=F11 -# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none -# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none -# pipe-selected=[xargs -r firefox] none -# show-urls-launch=Control+Shift+u -# show-urls-copy=none -# show-urls-persistent=none -# noop=none - -[search-bindings] -# cancel=Control+g Control+c Escape -# commit=Return -# find-prev=Control+r -# find-next=Control+s -# cursor-left=Left Control+b -# cursor-left-word=Control+Left Mod1+b -# cursor-right=Right Control+f -# cursor-right-word=Control+Right Mod1+f -# cursor-home=Home Control+a -# cursor-end=End Control+e -# delete-prev=BackSpace -# delete-prev-word=Mod1+BackSpace Control+BackSpace -# delete-next=Delete -# delete-next-word=Mod1+d Control+Delete -# extend-to-word-boundary=Control+w -# extend-to-next-whitespace=Control+Shift+w -# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste -# primary-paste=Shift+Insert - -[url-bindings] -# cancel=Control+g Control+c Control+d Escape -# toggle-url-visible=t - -[text-bindings] -# \x03=Mod4+c # Map Super+c -> Ctrl+c - -[mouse-bindings] -# selection-override-modifiers=Shift -# primary-paste=BTN_MIDDLE -# select-begin=BTN_LEFT -# select-begin-block=Control+BTN_LEFT -# select-extend=BTN_RIGHT -# select-extend-character-wise=Control+BTN_RIGHT -# select-word=BTN_LEFT-2 -# select-word-whitespace=Control+BTN_LEFT-2 -# select-row=BTN_LEFT-3 - -# vim: ft=dosini +font=Monofur Nerd Font:style=Regular:size=16 +font-bold=Monofur Nerd Font:style=Bold:size=16 +font-italic=Monofur Nerd Font:style=Italic:size=16 +shell=tmux new -A -s 0 diff --git a/dot.config/helix/config.toml b/dot.config/helix/config.toml new file mode 100644 index 0000000..258f073 --- /dev/null +++ b/dot.config/helix/config.toml @@ -0,0 +1,41 @@ +theme = "pop-dark" + +[editor] +line-number = "absolute" +mouse = true +bufferline = "multiple" +text-width = 120 +cursorline = true +rulers = [120] + +[editor.cursor-shape] +insert = "bar" +normal = "block" +select = "underline" + +[editor.indent-guides] +character = "╎" +render = true + +[editor.lsp] +auto-signature-help = true +display-messages = true + +[editor.file-picker] +hidden = false + +[editor.statusline] +left = ["mode", "spinner", "version-control", "file-name"] + +[keys.normal] +"A-," = "goto_previous_buffer" +"A-." = "goto_next_buffer" +"A-w" = ":buffer-close" +"A-/" = "repeat_last_motion" + +A-x = "extend_to_line_bounds" +X = ["extend_line_up", "extend_to_line_bounds"] + +[keys.select] +A-x = "extend_to_line_bounds" +X = ["extend_line_up", "extend_to_line_bounds"] diff --git a/dot.config/kak-lsp/kak-lsp.toml b/dot.config/kak-lsp/kak-lsp.toml deleted file mode 100644 index f21463d..0000000 --- a/dot.config/kak-lsp/kak-lsp.toml +++ /dev/null @@ -1,404 +0,0 @@ -snippet_support = false -verbosity = 2 - -[server] -# exit session if no requests were received during given period in seconds -# works only in unix sockets mode (-s/--session) -# set to 0 to disable -timeout = 1800 # seconds = 30 minutes - -[language.bash] -filetypes = ["sh"] -roots = [".git", ".hg"] -command = "bash-language-server" -args = ["start"] - -[language.c_cpp] -filetypes = ["c", "cpp"] -roots = ["compile_commands.json", ".clangd", ".git", ".hg"] -command = "clangd" - -[language.crystal] -filetypes = ["crystal"] -roots = ["shard.yml"] -command = "scry" - -[language.css] -filetypes = ["css"] -roots = ["package.json", ".git", ".hg"] -command = "css-languageserver" -args = ["--stdio"] - -[language.less] -filetypes = ["less"] -roots = ["package.json", ".git", ".hg"] -command = "css-languageserver" -args = ["--stdio"] - -[language.scss] -filetypes = ["scss"] -roots = ["package.json", ".git", ".hg"] -command = "css-languageserver" -args = ["--stdio"] - -[language.d] -filetypes = ["d", "di"] -roots = [".git", "dub.sdl", "dub.json"] -command = "dls" - -[language.dart] -# start shell to find path to dart analysis server source -filetypes = ["dart"] -roots = ["pubspec.yaml", ".git", ".hg"] -command = "sh" -args = ["-c", "dart $(dirname $(command -v dart))/snapshots/analysis_server.dart.snapshot --lsp"] - -[language.elixir] -filetypes = ["elixir"] -roots = ["mix.exs"] -command = "elixir-ls" -settings_section = "elixirLS" -[language.elixir.settings.elixirLS] -# See https://github.com/elixir-lsp/elixir-ls/blob/master/apps/language_server/lib/language_server/server.ex -# dialyzerEnable = true - -[language.elm] -filetypes = ["elm"] -roots = ["elm.json"] -command = "elm-language-server" -args = ["--stdio"] -settings_section = "elmLS" -[language.elm.settings.elmLS] -# See https://github.com/elm-tooling/elm-language-server#server-settings -runtime = "node" -elmPath = "elm" -elmFormatPath = "elm-format" -elmTestPath = "elm-test" - -[language.erlang] -filetypes = ["erlang"] -# See https://github.com/erlang-ls/erlang_ls.git for more information and -# how to configure. This default config should work in most cases though. -roots = ["rebar.config", "erlang.mk", ".git", ".hg"] -command = "erlang_ls" - -[language.go] -filetypes = ["go"] -roots = ["Gopkg.toml", "go.mod", ".git", ".hg"] -command = "gopls" -settings_section = "gopls" -[language.go.settings.gopls] -# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md -# "build.buildFlags" = [] - -[language.haskell] -filetypes = ["haskell"] -roots = ["Setup.hs", "stack.yaml", "*.cabal"] -command = "haskell-language-server-wrapper" -args = ["--lsp"] -settings_section = "_" -[language.haskell.settings._] -# See https://haskell-language-server.readthedocs.io/en/latest/configuration.html -# haskell.formattingProvider = "ormolu" - -[language.html] -filetypes = ["html"] -roots = ["package.json"] -command = "html-languageserver" -args = ["--stdio"] - -[language.svelte] -filetypes = ["svelte"] -roots = ["package.json"] -command = "svelteserver" -args = ["--stdio"] - -# # Commented out by default because you still need to set the paths in the JDT -# # Language Server arguments below before this can become a valid configuration. -# [language.java] -# filetypes = ["java"] -# roots = [".git", "mvnw", "gradlew"] -# command = "java" -# args = [ -# "-Declipse.application=org.eclipse.jdt.ls.core.id1", -# "-Dosgi.bundles.defaultStartLevel=4", -# "-Declipse.product=org.eclipse.jdt.ls.core.product", -# "-Dlog.level=ALL", -# "-Dfile.encoding=utf-8", -# "--add-modules=ALL-SYSTEM", -# "--add-opens", -# "java.base/java.util=ALL-UNNAMED", -# "--add-opens", -# "java.base/java.lang=ALL-UNNAMED", -# "-noverify", -# "-Xmx1G", -# "-jar", -# "/path/to/eclipse.jdt.ls/repository/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar", -# "-configuration", -# "/path/to/eclipse.jdt.ls/repository/config_linux", -# "-data", -# "/path/to/eclipse-workspace", -# ] -# [language.java.settings] -# # See https://github.dev/eclipse/eclipse.jdt.ls -# # "java.format.insertSpaces" = true - -# [language.javascript] -# filetypes = ["javascript"] -# roots = [".flowconfig"] -# command = "flow" -# args = ["lsp"] - -[language.json] -filetypes = ["json"] -roots = ["package.json"] -command = "json-languageserver" -args = ["--stdio"] - -# Requires Julia package "LanguageServer" -# Run: `julia --project=@kak-lsp -e 'import Pkg; Pkg.add("LanguageServer")'` to install it -# Configuration adapted from https://github.com/neovim/nvim-lspconfig/blob/bcebfac7429cd8234960197dca8de1767f3ef5d3/lua/lspconfig/julials.lua -[language.julia] -filetypes = ["julia"] -roots = ["Project.toml", ".git", ".hg"] -command = "julia" -args = [ - "--startup-file=no", - "--history-file=no", - "-e", - """ - ls_install_path = joinpath(get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")), "environments", "kak-lsp"); - pushfirst!(LOAD_PATH, ls_install_path); - using LanguageServer; - popfirst!(LOAD_PATH); - depot_path = get(ENV, "JULIA_DEPOT_PATH", ""); - buffer_file = ENV["kak_buffile"]; - project_path = let - dirname(something( - # 1. Check if there is an explicitly set project - Base.load_path_expand(( - p = get(ENV, "JULIA_PROJECT", nothing); - p === nothing ? nothing : isempty(p) ? nothing : p - )), - # 2. Check for Project.toml in current working directory - Base.current_project(pwd()), - # 3. Check for Project.toml from buffer's full file path excluding the file name - Base.current_project(dirname(buffer_file)), - # 4. Fallback to global environment - Base.active_project() - )) - end - server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path); - server.runlinter = true; - run(server); - """, -] -[language.julia.settings] -# See https://github.com/julia-vscode/LanguageServer.jl/blob/master/src/requests/workspace.jl -# Format options. See https://github.com/julia-vscode/DocumentFormat.jl/blob/master/src/DocumentFormat.jl -# "julia.format.indent" = 4 -# Lint options. See https://github.com/julia-vscode/StaticLint.jl/blob/master/src/linting/checks.jl -# "julia.lint.call" = true -# Other options, see https://github.com/julia-vscode/LanguageServer.jl/blob/master/src/requests/workspace.jl -# "julia.lint.run" = "true" - -[language.latex] -filetypes = ["latex"] -roots = [".git", ".hg"] -command = "texlab" -settings_section = "texlab" -[language.latex.settings.texlab] -# See https://github.com/latex-lsp/texlab/blob/master/docs/options.md -# -# Preview configuration for zathura with SyncTeX search. -# For other PDF viewers see https://github.com/latex-lsp/texlab/blob/master/docs/previewing.md -forwardSearch.executable = "zathura" -forwardSearch.args = [ - "%p", - "--synctex-forward", # Support texlab-forward-search - "%l:1:%f", - "--synctex-editor-command", # Inverse search: use Control+Left-Mouse-Button to jump to source. - """ - sh -c ' - echo " - evaluate-commands -client %opt{texlab_client} %{ - evaluate-commands -try-client %opt{jumpclient} %{ - edit -- %{input} %{line} - } - } - " | kak -p $kak_session - ' - """, -] - -[language.lua] -filetypes = ["lua"] -roots = [".git", ".hg"] -command = "lua-language-server" -[language.lua.settings.Lua] -# See https://github.com/sumneko/vscode-lua/blob/master/setting/schema.json -# diagnostics.enable = true - -[language.nim] -filetypes = ["nim"] -roots = ["*.nimble", ".git", ".hg"] -command = "nimlsp" - -[language.nix] -filetypes = ["nix"] -roots = ["flake.nix", "shell.nix", ".git", ".hg"] -command = "rnix-lsp" - -[language.ocaml] -filetypes = ["ocaml"] -roots = ["Makefile", "opam", "*.opam", "dune"] -command = "ocamllsp" - -[language.php] -filetypes = ["php"] -roots = [".htaccess", "composer.json"] -command = "intelephense" -args = ["--stdio"] -settings_section = "intelephense" -[language.php.settings] -intelephense.storagePath = "/tmp/intelephense" - -[language.python] -filetypes = ["python"] -roots = ["requirements.txt", "setup.py", ".git", ".hg"] -command = "pylsp" -settings_section = "_" -[language.python.settings._] -# See https://github.com/python-lsp/python-lsp-server#configuration -# pylsp.configurationSources = ["flake8"] - -[language.r] -filetypes = ["r"] -roots = ["DESCRIPTION", ".git", ".hg"] -command = "R" -args = ["--slave", "-e", "languageserver::run()"] - -[language.racket] -filetypes = ["racket"] -roots = ["info.rkt"] -command = "racket" -args = ["-l", "racket-langserver"] - -[language.reason] -filetypes = ["reason"] -roots = ["package.json", "Makefile", ".git", ".hg"] -command = "ocamllsp" - -[language.ruby] -filetypes = ["ruby"] -roots = ["Gemfile"] -command = "solargraph" -args = ["stdio"] -[language.ruby.settings] -# See https://github.com/castwide/solargraph/blob/master/lib/solargraph/language_server/host.rb -# "solargraph.completion" = true - -[language.rust] -filetypes = ["rust"] -roots = ["Cargo.toml"] -command = "sh" -args = [ - "-c", - """ - if path=$(rustup which rls 2>/dev/null); then - "$path" - else - rls - fi - """, -] -[language.rust.settings.rust] -# See https://github.com/rust-lang/rls#configuration -# features = [] - -# [language.rust] -# filetypes = ["rust"] -# roots = ["Cargo.toml"] -# command = "sh" -# args = [ -# "-c", -# """ -# if path=$(rustup which rust-analyzer 2>/dev/null); then -# "$path" -# else -# rust-analyzer -# fi -# """, -# ] -# settings_section = "rust-analyzer" -# [language.rust.settings.rust-analyzer] -# # See https://rust-analyzer.github.io/manual.html#configuration -# hoverActions.enable = false # kak-lsp doesn't support this at the moment -# # cargo.features = [] - -[language.terraform] -filetypes = ["terraform"] -roots = ["*.tf"] -command = "terraform-ls" -args = ["serve"] -[language.terraform.settings.terraform-ls] -# See https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md -# rootModulePaths = [] - -[language.typescript] -filetypes = ["typescript", "javascript"] -roots = ["package.json", "tsconfig.json", ".git", ".hg"] -command = "typescript-language-server" -args = ["--stdio"] - -# [language.typescript] -# filetypes = ["typescript"] -# roots = ["package.json", "tsconfig.json", ".git", ".hg"] -# command = "deno" -# args = ["lsp"] -# [language.typescript.settings.deno] -# enable = true -# lint = true - -[language.vue] -filetypes = ["vue"] -roots = [".git", ".hg", ".env", "package.json", "tsconfig.json", "jsconfig.json", "vite.config.ts", "vue.config.js", "nuxt.config.ts"] -command = "vls" - -[language.yaml] -filetypes = ["yaml"] -roots = [".git", ".hg"] -command = "yaml-language-server" -args = ["--stdio"] -[language.yaml.settings] -# See https://github.com/redhat-developer/yaml-language-server#language-server-settings -# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts -# yaml.format.enable = true - -[language.zig] -filetypes = ["zig"] -roots = ["build.zig"] -command = "zls" - -# Semantic tokens support -# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens -# for the default list of tokens and modifiers. -# However, many language servers implement their own values. -# Make sure to check the output of `lsp-capabilities` and each server's documentation and source code as well. -# Examples: -# - TypeScript: https://github.com/microsoft/vscode-languageserver-node/blob/main/client/src/common/semanticTokens.ts -# - Rust Analyzer: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs -[semantic_tokens] -faces = [ - {face="documentation", token="comment", modifiers=["documentation"]}, - {face="comment", token="comment"}, - {face="function", token="function"}, - {face="keyword", token="keyword"}, - {face="module", token="namespace"}, - {face="operator", token="operator"}, - {face="string", token="string"}, - {face="type", token="type"}, - {face="default+d", token="variable", modifiers=["readonly"]}, - {face="default+d", token="variable", modifiers=["constant"]}, - {face="variable", token="variable"}, -] diff --git a/dot.config/kak/autoload/autoload b/dot.config/kak/autoload/autoload deleted file mode 120000 index 9decbd0..0000000 --- a/dot.config/kak/autoload/autoload +++ /dev/null @@ -1 +0,0 @@ -/usr/share/kak/rc/ \ No newline at end of file diff --git a/dot.config/kak/autoload/stuff.kak b/dot.config/kak/autoload/stuff.kak deleted file mode 100644 index 556b316..0000000 --- a/dot.config/kak/autoload/stuff.kak +++ /dev/null @@ -1,32 +0,0 @@ -# hooks to show line numbers, whitespaces and matching brackets -hook -group DefaultHighlights global WinCreate .* %{ - add-highlighter window/ show-whitespaces - add-highlighter window/ show-matching - add-highlighter window/ regex '\h+$' 0:default,red # highlight trailing whitepaces - add-highlighter window/ dynregex '%reg{/}' 0:+u 1:+b - set-face window Whitespace rgb:555555+b -} - -hook -group markdown-highlight global WinSetOption filetype=markdown %{ - add-highlighter window/ wrap -word -width 80 - add-highlighter window/ number-lines -hlcursor -separator ' ' -} -hook global WinSetOption filetype=(?!markdown).* %{ - add-highlighter window/ number-lines -hlcursor -separator ' ' -} - -hook global WinSetOption filetype=(javascript|ecmascript) %{ - set window formatcmd 'prettier-standard' - #hook window BufWritePre .* format -} -hook global WinSetOption filetype=rust %{ - racer-enable-autocomplete - set window formatcmd 'rustfmt' - hook window BufWritePre .* format - set buffer tabstop 4 - set buffer indentwidth 4 -} -hook global WinSetOption filetype=json %{ - set window formatcmd 'jq --indent 2 .' - hook window BufWritePre .* format -} diff --git a/dot.config/kak/autoload/svelte.kak b/dot.config/kak/autoload/svelte.kak deleted file mode 120000 index 31ea059..0000000 --- a/dot.config/kak/autoload/svelte.kak +++ /dev/null @@ -1 +0,0 @@ -/home/nk/src/koehr/kakoune-svelte/svelte.kak \ No newline at end of file diff --git a/dot.config/kak/colors/catppuccin_mocha.kak b/dot.config/kak/colors/catppuccin_mocha.kak deleted file mode 100644 index 6191160..0000000 --- a/dot.config/kak/colors/catppuccin_mocha.kak +++ /dev/null @@ -1,83 +0,0 @@ -# Catppuccin theme for Kakoune - -# Color palette -declare-option str rosewater 'rgb:f5e0dc' -declare-option str red 'rgb:f38ba8' -declare-option str mauve 'rgb:cba6f7' -declare-option str maroon 'rgb:eba0ac' -declare-option str pink 'rgb:f5c2e7' -declare-option str cyan 'rgb:74c7ec' -declare-option str yellow 'rgb:f9e2af' -declare-option str green 'rgb:a6e3a1' -declare-option str white 'rgb:cdd6f4' -declare-option str blue 'rgb:89b4fa' -declare-option str sky 'rgb:89dceb' -declare-option str lavender 'rgb:b4befe' -declare-option str black1 'rgb:181825' -declare-option str black2 'rgb:1e1e2e' -declare-option str black3 'rgb:313244' -declare-option str orange 'rgb:fab387' -declare-option str teal 'rgb:94e2d5' -declare-option str gray0 'rgb:585b70' -declare-option str gray1 'rgb:6c7086' -declare-option str bright_red %opt{red} -declare-option str bright_green %opt{green} -declare-option str bright_yellow %opt{yellow} -declare-option str bright_blue %opt{blue} -declare-option str bright_cyan %opt{cyan} -declare-option str bright_white %opt{white} -declare-option str foreground %opt{white} -declare-option str background %opt{black2} - -# Markup -set-face global title "%opt{rosewater}" -set-face global header "%opt{bright_red}" -set-face global bold "%opt{mauve}" -set-face global italic "%opt{lavender}" -set-face global mono "%opt{green}" -set-face global block "%opt{cyan}" -set-face global link "%opt{green}" -set-face global bullet "%opt{green}" -set-face global list "%opt{white}" - -# Builtins -set-face global Default "%opt{white},%opt{background}" -set-face global PrimarySelection "%opt{gray0},%opt{lavender}" -set-face global SecondarySelection "%opt{lavender},%opt{gray0}" -set-face global PrimaryCursor "%opt{background},%opt{rosewater}" -set-face global SecondaryCursor "%opt{black1},%opt{teal}" -set-face global PrimaryCursorEol "%opt{gray0},%opt{mauve}" -set-face global SecondaryCursorEol "%opt{gray0},%opt{maroon}" -set-face global LineNumbers "%opt{gray1},%opt{background}" -set-face global LineNumberCursor "%opt{lavender},%opt{gray0}+b" -set-face global LineNumbersWrapped "%opt{teal},%opt{black1}+i" -set-face global MenuForeground "%opt{white},%opt{gray0}+b" -set-face global MenuBackground "%opt{white},%opt{black3}" -set-face global MenuInfo "%opt{black1},%opt{blue}" -set-face global Information "%opt{black1},%opt{lavender}" -set-face global Error "%opt{red},%opt{black2}" -set-face global StatusLine "%opt{white},%opt{black1}" -set-face global StatusLineMode "%opt{black2},%opt{yellow}" -set-face global StatusLineInfo "%opt{background},%opt{green}" -set-face global StatusLineValue "%opt{orange},%opt{gray0}" -set-face global StatusCursor "%opt{black1},%opt{lavender}" -set-face global Prompt "%opt{green},%opt{black2}" -set-face global MatchingChar "%opt{maroon},%opt{black2}" -set-face global Whitespace "%opt{gray1},%opt{background}+f" -set-face global WrapMarker Whitespace -set-face global BufferPadding "%opt{background},%opt{background}" - -# Code -set-face global value "%opt{orange}" -set-face global type "%opt{rosewater}" -set-face global variable "%opt{white}" -set-face global module "%opt{maroon}" -set-face global function "%opt{sky}" -set-face global string "%opt{green}" -set-face global keyword "%opt{blue}" -set-face global operator "%opt{blue}" -set-face global attribute "%opt{green}" -set-face global comment "%opt{gray1}" -set-face global documentation comment -set-face global meta "%opt{pink}" -set-face global builtin "%opt{lavender}+b" diff --git a/dot.config/kak/colors/penumbra.kak b/dot.config/kak/colors/penumbra.kak deleted file mode 100644 index eb45c6c..0000000 --- a/dot.config/kak/colors/penumbra.kak +++ /dev/null @@ -1,84 +0,0 @@ -# Catppuccin theme for Kakoune - -# Color palette -declare-option str rosewater 'rgb:CB7459' -declare-option str red 'rgb:CA7081' -declare-option str mauve 'rgb:CA736C' -declare-option str maroon 'rgb:F2E6D4' -declare-option str pink 'rgb:BD72A8' -declare-option str cyan 'rgb:00A0BE' -declare-option str yellow 'rgb:A38F2D' -declare-option str green 'rgb:46A473' -declare-option str white 'rgb:BEBEBE' -declare-option str blue 'rgb:7E87D6' -declare-option str sky 'rgb:6E8DD5' -declare-option str lavender 'rgb:BC73A4' -declare-option str black1 'rgb:24272B' -declare-option str black2 'rgb:2F3339' -declare-option str black3 'rgb:3E4044' -declare-option str orange 'rgb:C27D40' -declare-option str teal 'rgb:00A2AF' -declare-option str gray0 'rgb:585b70' -declare-option str gray1 'rgb:6c7086' -declare-option str bright_red %opt{red} -declare-option str bright_green %opt{green} -declare-option str bright_yellow %opt{yellow} -declare-option str bright_blue %opt{blue} -declare-option str bright_cyan %opt{cyan} -declare-option str bright_white 'rgb:FFF7ED' -declare-option str foreground %opt{white} -declare-option str background %opt{black2} - -# Markup -set-face global title "%opt{rosewater}" -set-face global header "%opt{bright_red}" -set-face global bold "%opt{mauve}" -set-face global italic "%opt{lavender}" -set-face global mono "%opt{green}" -set-face global block "%opt{cyan}" -set-face global link "%opt{green}" -set-face global bullet "%opt{green}" -set-face global list "%opt{white}" - -# Builtins -set-face global Default "%opt{white},%opt{background}" -set-face global PrimarySelection "%opt{bright_white},%opt{rosewater}" -set-face global SecondarySelection "%opt{lavender},%opt{gray0}" -set-face global PrimaryCursor "%opt{background},%opt{rosewater}" -set-face global SecondaryCursor "%opt{black1},%opt{teal}" -set-face global PrimaryCursorEol "%opt{gray0},%opt{mauve}" -set-face global SecondaryCursorEol "%opt{gray0},%opt{maroon}" -set-face global LineNumbers "%opt{gray1},%opt{background}" -set-face global LineNumberCursor "%opt{rosewater},%opt{background}+b" -set-face global LineNumbersWrapped "%opt{teal},%opt{black1}+i" -set-face global MenuForeground "%opt{white},%opt{gray0}+b" -set-face global MenuBackground "%opt{white},%opt{black3}" -set-face global MenuInfo "%opt{black1},%opt{blue}" -set-face global Information "%opt{black1},%opt{blue}" -set-face global Error "%opt{red},%opt{black2}" -set-face global StatusLine "%opt{white},%opt{black1}" -set-face global StatusLineMode "%opt{black2},%opt{yellow}" -set-face global StatusLineInfo "%opt{background},%opt{green}" -set-face global StatusLineValue "%opt{orange},%opt{gray0}" -set-face global StatusCursor "%opt{black1},%opt{lavender}" -set-face global Prompt "%opt{green},%opt{black2}" -set-face global MatchingChar "%opt{maroon},%opt{black2}" -set-face global Whitespace "%opt{gray1},%opt{background}+f" -set-face global WrapMarker Whitespace -set-face global BufferPadding "%opt{background},%opt{background}" -set-face global MatchingChar "%opt{bright_white},%opt{black1}+b" - -# Code -set-face global value "%opt{orange}" -set-face global type "%opt{mauve}" -set-face global variable "%opt{white}" -set-face global module "%opt{maroon}" -set-face global function "%opt{sky}" -set-face global string "%opt{green}" -set-face global keyword "%opt{blue}" -set-face global operator "%opt{blue}" -set-face global attribute "%opt{green}" -set-face global comment "%opt{gray1}" -set-face global documentation comment -set-face global meta "%opt{pink}" -set-face global builtin "%opt{lavender}+b" diff --git a/dot.config/kak/colors/warm-pastel.kak b/dot.config/kak/colors/warm-pastel.kak deleted file mode 100644 index 2ee5581..0000000 --- a/dot.config/kak/colors/warm-pastel.kak +++ /dev/null @@ -1,49 +0,0 @@ -# code -face global value rgb:fa9672,default -face global type rgb:bfbfab,default -face global identifier rgb:fa9672,default -face global variable rgb:fa9672,default -face global module rgb:fa9672,default -face global function rgb:fa9672,default -face global string rgb:fa8072,default -face global error default,rgb:ffffff -face global keyword rgb:bfabab,default+b -face global operator rgb:dedede,default -face global attribute rgb:ccb4a3,default -face global comment rgb:787878,default+i -face global meta rgb:fa9672,default - -# text -face global title rgb:ccb4a3,default+b -face global header rgb:ccb4a3,default -face global bold rgb:ccb4a3,default+b -face global italic rgb:ccb4a3,default+i -face global mono rgb:cccccc,rgb:212121 -face global block rgb:cccccc,rgb:212121 -face global link rgb:acacbf,default -face global bullet rgb:ccb4a3,default -face global list rgb:dedede,default - -# kakoune UI -face global Default rgb:ccb4a3,rgb:272020 -face global PrimarySelection default,rgba:CC8E5760 -face global SecondarySelection default,rgba:CC8E5730 -face global PrimaryCursor rgb:000000,rgb:ffffff+b -face global SecondaryCursor rgb:121212,rgb:dedede+b -face global MatchingChar rgb:ffff00,default+b -face global Search default,rgb:333333 -face global Whitespace default,rgb:333333 -face global BufferPadding rgb:333333,default -face global LineNumbers rgb:383333,default -face global LineNumberCursor rgb:666666,default -face global MenuForeground rgb:bfbfbf,rgb:594a4a+b -face global MenuBackground default,rgb:403a3a -face global MenuInfo rgb:bfbfbf,rgb:594a4a -face global Information default,rgb:4d4242 -face global Error rgb:121212,rgb:dedede -face global StatusLine rgb:cccccc,rgb:20252d -face global StatusLineMode rgb:bfbfbf,rgb:594a4a -face global StatusLineInfo rgb:ffddcc,rgb:20252d -face global StatusLineValue rgb:fffacc,rgb:20252d -face global StatusCursor default,rgb:787878 -face global Prompt rgb:ababbf,rgb:474747 diff --git a/dot.config/kak/filetypes.kak b/dot.config/kak/filetypes.kak deleted file mode 100644 index 4bc2ce8..0000000 --- a/dot.config/kak/filetypes.kak +++ /dev/null @@ -1,19 +0,0 @@ -hook -group markdown-highlight global WinSetOption filetype=markdown %{ - add-highlighter window/ wrap -word -width 80 - add-highlighter window/ number-lines -hlcursor -separator ' ' -} -hook global WinSetOption filetype=(?!markdown).* %{ - add-highlighter window/ number-lines -hlcursor -separator ' ' -} - -hook global WinSetOption filetype=rust %{ - racer-enable-autocomplete - set window formatcmd 'rustfmt' - hook window BufWritePre .* format - set buffer tabstop 4 - set buffer indentwidth 4 -} -hook global WinSetOption filetype=json %{ - set window formatcmd 'jq --indent 2 .' - hook window BufWritePre .* format -} diff --git a/dot.config/kak/kakrc b/dot.config/kak/kakrc deleted file mode 100644 index bccda28..0000000 --- a/dot.config/kak/kakrc +++ /dev/null @@ -1,3 +0,0 @@ -source "%val{config}/personalization.kak" -source "%val{config}/filetypes.kak" -source "%val{config}/plugins.kak" diff --git a/dot.config/kak/personalization.kak b/dot.config/kak/personalization.kak deleted file mode 100644 index f65aa80..0000000 --- a/dot.config/kak/personalization.kak +++ /dev/null @@ -1,75 +0,0 @@ -colorscheme penumbra -set-option global scrolloff 5,5 -set-option global incsearch true -set-option global aligntab true -set-option global ui_options terminal_assistant=dilbert -set-option -add global ui_options terminal_change_colors=true -set-option global grepcmd 'rg --with-filename --line-number --column' -set-option global tabstop 2 -set-option global indentwidth 2 - -# hooks to show line numbers, whitespaces and matching brackets -hook -group DefaultHighlights global WinCreate .* %{ - add-highlighter window/ show-whitespaces - add-highlighter window/ show-matching - add-highlighter window/ regex '\h+$' 0:default,red # highlight trailing whitepaces - add-highlighter window/ dynregex '%reg{/}' 0:+u 1:+b - set-face window Whitespace rgb:555555+b -} - -# with inspiration from -# https://github.com/Delapouite/dotfiles/blob/master/link/kak/kakrc -set global modelinefmt %{ - %val{bufname} [%opt{filetype}] -· %val{cursor_line}:%val{cursor_char_column} -· {{context_info}} {{mode_info}} -} - -# spaces instead tabs -hook global InsertChar \t %{ try %{ - execute-keys -draft "h\A\h+\z;%opt{indentwidth}@" -}} -hook global InsertDelete ' ' %{ try %{ - execute-keys -draft 'h\A\h+\zi' -}} - -# Bring back S-x (kind of) -map global normal X 'Jx' - -# editorconfig support -hook global BufCreate .* %{editorconfig-load} - -# kak-lsp -eval %sh{kak-lsp --kakoune -s $kak_session} # Not needed if you load it with plug.kak. -hook global WinSetOption filetype=(rust|html|css|svelte|javascript|typescript|c|cpp) %{ - lsp-enable-window - lsp-auto-hover-enable - lsp-auto-signature-help-enable - set-option global lsp_hover_anchor true - map global user l ': enter-user-mode lsp' -docstring 'lsp' -} - -# theme config for kak-lsp info box -face global InfoDefault Information -face global InfoBlock Information -face global InfoBlockQuote Information -face global InfoBullet Information -face global InfoHeader Information -face global InfoLink Information -face global InfoLinkMono Information -face global InfoMono Information -face global InfoRule Information -face global InfoDiagnosticError Information -face global InfoDiagnosticHint Information -face global InfoDiagnosticInformation Information -face global InfoDiagnosticWarning Information - - -# Show various characters -# https://unicode-table.com -add-highlighter -override global/U+2013 regex '–' '0:green+f' -add-highlighter -override global/U+2014 regex '—' '0:green+bf' -add-highlighter -override global/math-symbols regex '[−×]' '0:cyan+f' - -# Show the Unicode value under the cursor. -map -docstring 'Unicode' global user u ': echo -markup "{Information}U+%sh{printf ''%04x'' ""$kak_cursor_char_value""}"' diff --git a/dot.config/kak/plugins.kak b/dot.config/kak/plugins.kak deleted file mode 100644 index f2e6ace..0000000 --- a/dot.config/kak/plugins.kak +++ /dev/null @@ -1,55 +0,0 @@ -evaluate-commands %sh{ - plugins="$kak_config/plugins" - mkdir -p "$plugins" - [ ! -e "$plugins/plug.kak" ] && \ - git clone -q https://github.com/andreyorst/plug.kak.git "$plugins/plug.kak" - printf "%s\n" "source '$plugins/plug.kak/rc/plug.kak'" -} -plug "andreyorst/plug.kak" noload - -########################################################### -# kakoune-buffers # -# sets former b (word-back) to q and makes b a global key # -# for the new buffers command. I don't use macros anyway. # -########################################################### -plug 'delapouite/kakoune-buffers' config %{ - map global normal ^ q - map global normal Q - map global normal q b - map global normal Q B - map global normal - map global normal - map global normal b ': enter-buffers-mode' -docstring 'buffers' - map global normal B ': enter-user-mode -lock buffers' -docstring 'buffers (lock)' -} - -plug "andreyorst/kaktree" defer kaktree %{ - set-option global kaktree_double_click_duration '0.5' - set-option global kaktree_indentation 1 - set-option global kaktree_dir_icon_open '▾ 🗁 ' - set-option global kaktree_dir_icon_close '▸ 🗀 ' - set-option global kaktree_file_icon '⠀⠀🖺' - map global normal ': kaktree-toggle' -docstring 'toggle filetree' -} config %{ - hook global WinSetOption filetype=kaktree %{ - remove-highlighter buffer/numbers - remove-highlighter buffer/matching - remove-highlighter buffer/wrap - remove-highlighter buffer/show-whitespaces - } - kaktree-enable -} - -plug "ABuffSeagull/kakoune-vue" - -plug "schemar/kak-jsts" config %{ - hook global WinSetOption filetype=(javascript|typescript|ecmascript) %{ - map window user l -docstring 'lint' ': lint' - map window user f -docstring 'format' ': format-prettier' - hook window BufWritePre .* %{ - evaluate-commands -no-hooks %{ - format-prettier - } - } - } -} diff --git a/dot.config/kitty/base16-atelier-heath.conf b/dot.config/kitty/base16-atelier-heath.conf deleted file mode 100644 index ee6d54d..0000000 --- a/dot.config/kitty/base16-atelier-heath.conf +++ /dev/null @@ -1,46 +0,0 @@ -active_border_color #776977 -inactive_border_color #333 -bell_border_color #ff5a00 -inactive_text_alpha 0.5 - -tab_bar_edge bottom -tab_bar_margin_width 0.0 -tab_bar_style fade -#: The tab bar style, can be one of: fade or separator. - -tab_fade 0.2 0.5 0.8 1 -# tab_separator " ┇" - -active_tab_foreground #1b181b -active_tab_background #ab9bab -active_tab_font_style normal -inactive_tab_foreground #ab9bab -inactive_tab_background #1b181b -inactive_tab_font_style normal - -background_opacity 1.0 -dynamic_background_opacity no -dim_opacity 0.5 -selection_foreground #000000 -selection_background #bb8a35 - -foreground #ab9bab -background #1b181b -cursor #ab9bab - -color0 #1b181b -color8 #776977 -color1 #ca402b -color9 #ca402b -color2 #918b3b -color10 #918b3b -color3 #bb8a35 -color11 #bb8a35 -color4 #516aec -color12 #516aec -color5 #7b59c0 -color13 #7b59c0 -color6 #159393 -color14 #159393 -color7 #ab9bab -color15 #f7f3f7 diff --git a/dot.config/kitty/kitty.conf b/dot.config/kitty/kitty.conf deleted file mode 100644 index 35b34c0..0000000 --- a/dot.config/kitty/kitty.conf +++ /dev/null @@ -1,393 +0,0 @@ -font_family monofur -bold_font auto -italic_font auto -bold_italic_font auto -font_size 11.0 - -# adjust_line_height 0 -# adjust_column_width 0 - -# symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 PowerlineSymbols -# box_drawing_scale 0.001, 1, 1.5, 2 - -cursor #aca4a1 -cursor_text_color background -cursor_shape block - -# cursor_blink_interval 0.5 -# cursor_stop_blinking_after 15.0 - -# scrollback_lines 2000 -# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER - -# wheel_scroll_multiplier 5.0 - -url_color #0087BD -url_style curly -#: can be one of: none, single, double, curly - -# open_url_modifiers kitty_mod -# open_url_with default - -copy_on_select yes -# rectangle_select_modifiers ctrl+alt -# select_by_word_characters :@-./_~?&=%+# - -click_interval 0.3 -mouse_hide_wait 2.0 -focus_follows_mouse yes - -repaint_delay 16 -#: Delay between screen updates. (16ms ~ 60FPS) - -input_delay 3 -#: Delay (in ms) before program input is processed. - -sync_to_monitor yes - -enable_audio_bell no -visual_bell_duration 0.0 -window_alert_on_bell yes -bell_on_tab no - -remember_window_size no -initial_window_width 90c -initial_window_height 40c - -enabled_layouts tall:bias=60,fat:bias=70,stack - -# window_resize_step_cells 2 -# window_resize_step_lines 2 -window_border_width 3.0 -draw_minimal_borders yes -window_margin_width 0.0 -# single_window_margin_width -1000.0 -window_padding_width 4.0 - -include base16-atelier-heath.conf - -shell . -editor . -close_on_child_death no -allow_remote_control yes - -# env -#: Specify environment variables to set in all child processes. - -# startup_session none -# clipboard_control write-clipboard write-primary - -#: Allow programs running in kitty to read and write from the -#: clipboard. You can control exactly which actions are allowed. The -#: set of possible actions is: write-clipboard read-clipboard write- -#: primary read-primary The default is to allow writing to the -#: clipboard and primary selection. Note that enabling the read -#: functionality is a security risk as it means that any program, even -#: one running on a remote server via SSH can read your clipboard. - -# term xterm-kitty - -#: The value of the TERM environment variable to set. Changing this -#: can break many terminal programs, only change it if you know what -#: you are doing, not because you read some advice on Stack Overflow -#: to change it. - -# macos_titlebar_color system -# macos_hide_titlebar no -# x11_hide_window_decorations no -# macos_option_as_alt yes -# macos_hide_from_tasks no -# macos_quit_when_last_window_closed no -# macos_window_resizable yes - -#: For a list of key names, see: GLFW keys -#: . The name to use -#: is the part after the GLFW_KEY_ prefix. For a list of modifier -#: names, see: GLFW mods -#: - -#: On Linux you can also use XKB key names to bind keys that are not -#: supported by GLFW. See XKB keys -#: for a list of key names. The name to use is the part -#: after the XKB_KEY_ prefix. Note that you should only use an XKB key -#: name for keys that are not present in the list of GLFW keys. - -#: Finally, you can use raw system key codes to map keys. To see the -#: system key code for a key, start kitty with the kitty --debug- -#: keyboard option. Then kitty will output some debug text for every -#: key event. In that text look for ``native_code`` the value of that -#: becomes the key name in the shortcut. For example: - -#: .. code-block:: none - -#: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a' - -#: Here, the key name for the A key is 0x61 and you can use it with:: - -#: map ctrl+0x61 something - -#: to map ctrl+a to something. - -#: You can use the special action no_op to unmap a keyboard shortcut -#: that is assigned in the default configuration. - -#: You can combine multiple actions to be triggered by a single -#: shortcut, using the syntax below:: - -#: map key combine action1 action2 action3 ... - -#: For example:: - -#: map kitty_mod+e combine : new_window : next_layout - -#: this will create a new window and switch to the next available -#: layout - -#: You can use multi-key shortcuts using the syntax shown below:: - -#: map key1>key2>key3 action - -#: For example:: - -#: map ctrl+f>2 set_font_size 20 - -# kitty_mod ctrl+shift - -#: The value of kitty_mod is used as the modifier for all default -#: shortcuts, you can change it in your kitty.conf to change the -#: modifiers for all the default shortcuts. - -# clear_all_shortcuts no - -#: You can have kitty remove all shortcut definition seen up to this -#: point. Useful, for instance, to remove the default shortcuts. - -#: Clipboard {{{ - -# map kitty_mod+c copy_to_clipboard -# map kitty_mod+v paste_from_clipboard -# map kitty_mod+s paste_from_selection -# map shift+insert paste_from_selection -# map kitty_mod+o pass_selection_to_program - -#: You can also pass the contents of the current selection to any -#: program using pass_selection_to_program. By default, the system's -#: open program is used, but you can specify your own, for example:: - -#: map kitty_mod+o pass_selection_to_program firefox - -#: You can pass the current selection to a terminal program running in -#: a new kitty window, by using the @selection placeholder:: - -#: map kitty_mod+y new_window less @selection - -#: }}} - -#: Scrolling {{{ - -# map kitty_mod+up scroll_line_up -# map kitty_mod+k scroll_line_up -# map kitty_mod+down scroll_line_down -# map kitty_mod+j scroll_line_down -# map kitty_mod+page_up scroll_page_up -# map kitty_mod+page_down scroll_page_down -# map kitty_mod+home scroll_home -# map kitty_mod+end scroll_end -# map kitty_mod+h show_scrollback - -#: You can send the contents of the current screen + history buffer as -#: stdin to an arbitrary program using the placeholders @text (which -#: is the plain text) and @ansi (which includes text styling escape -#: codes). For only the current screen, use @screen or @ansi_screen. -#: For example, the following command opens the scrollback buffer in -#: less in a new window:: - -#: map kitty_mod+y new_window @ansi less +G -R - -#: }}} - -#: Window management {{{ - -# map kitty_mod+enter new_window - -#: You can open a new window running an arbitrary program, for -#: example:: - -#: map kitty_mod+y new_window mutt - -#: You can open a new window with the current working directory set to -#: the working directory of the current window using:: - -#: map ctrl+alt+enter new_window_with_cwd - -#: You can open a new window that is allowed to control kitty via the -#: kitty remote control facility by prefixing the command line with @. -#: Any programs running in that window will be allowed to control -#: kitty. For example:: - -#: map ctrl+enter new_window @ some_program - -map kitty_mod+n new_os_window -map kitty_mod+w close_window -map kitty_mod+left next_window -map kitty_mod+right previous_window -map kitty_mod+alt+left move_window_forward -map kitty_mod+alt+right move_window_backward -map kitty_mod+` move_window_to_top -map kitty_mod+r start_resizing_window -map kitty_mod+1 first_window -map kitty_mod+2 second_window -map kitty_mod+3 third_window -map kitty_mod+4 fourth_window -map kitty_mod+5 fifth_window -map kitty_mod+6 sixth_window -map kitty_mod+7 seventh_window -map kitty_mod+8 eighth_window -map kitty_mod+9 ninth_window -map kitty_mod+0 tenth_window -#: }}} - -#: Tab management {{{ - -map kitty_mod+t new_tab -map kitty_mod+q close_tab -map kitty_mod+] next_tab -map kitty_mod+[ previous_tab -map kitty_mod+{ move_tab_forward -map kitty_mod+} move_tab_backward -map kitty_mod+alt+t set_tab_title - -#: You can also create shortcuts to go to specific tabs, with 1 being -#: the first tab:: - -#: map ctrl+alt+1 goto_tab 1 -#: map ctrl+alt+2 goto_tab 2 - -#: Just as with new_window above, you can also pass the name of -#: arbitrary commands to run when using new_tab and use -#: new_tab_with_cwd. -#: }}} - -#: Layout management {{{ - -# map kitty_mod+l next_layout - -#: You can also create shortcuts to switch to specific layouts:: - -#: map ctrl+alt+t goto_layout tall -#: map ctrl+alt+s goto_layout stack -#: }}} - -#: Font sizes {{{ - -#: You can change the font size for all top-level kitty windows at a -#: time or only the current one. - -# map kitty_mod+equal change_font_size all +2.0 -# map kitty_mod+minus change_font_size all -2.0 -# map kitty_mod+backspace change_font_size all 0 - -#: To setup shortcuts for specific font sizes:: - -#: map kitty_mod+f6 change_font_size all 10.0 - -#: To setup shortcuts to change only the current window's font size:: - -#: map kitty_mod+f6 change_font_size current 10.0 -#: }}} - -#: Select and act on visible text {{{ - -#: Use the hints kitten to select text and either pass it to an -#: external program or insert it into the terminal or copy it to the -#: clipboard. - -# map kitty_mod+e kitten hints - -#: Open a currently visible URL using the keyboard. The program used -#: to open the URL is specified in open_url_with. - -# map kitty_mod+p>f kitten hints --type path --program - - -#: Select a path/filename and insert it into the terminal. Useful, for -#: instance to run git commands on a filename output from a previous -#: git command. - -# map kitty_mod+p>shift+f kitten hints --type path - -#: Select a path/filename and open it with the default open program. - -# map kitty_mod+p>l kitten hints --type line --program - - -#: Select a line of text and insert it into the terminal. Use for the -#: output of things like: ls -1 - -# map kitty_mod+p>w kitten hints --type word --program - - -#: Select words and insert into terminal. - -# map kitty_mod+p>h kitten hints --type hash --program - - -#: Select something that looks like a hash and insert it into the -#: terminal. Useful with git, which uses sha1 hashes to identify -#: commits - - -#: The hints kitten has many more modes of operation that you can map -#: to different shortcuts. For a full description see kittens/hints. -#: }}} - -#: Miscellaneous {{{ - -# map kitty_mod+f11 toggle_fullscreen -# map kitty_mod+u kitten unicode_input -# map kitty_mod+f2 edit_config_file -# map kitty_mod+escape kitty_shell window - -#: Open the kitty shell in a new window/tab/overlay/os_window to -#: control kitty using commands. - -# map kitty_mod+a>m set_background_opacity +0.1 -# map kitty_mod+a>l set_background_opacity -0.1 -# map kitty_mod+a>1 set_background_opacity 1 -# map kitty_mod+a>d set_background_opacity default -# map kitty_mod+delete clear_terminal reset active - -#: You can create shortcuts to clear/reset the terminal. For example:: - -#: map kitty_mod+f9 clear_terminal reset active -#: map kitty_mod+f10 clear_terminal clear active -#: map kitty_mod+f11 clear_terminal scrollback active - -#: These will reset screen/clear screen/clear screen+scrollback -#: respectively. If you want to operate on all windows instead of just -#: the current one, use all instead of :italic`active`. - - -#: You can tell kitty to send arbitrary (UTF-8) encoded text to the -#: client program when pressing specified shortcut keys. For example:: - -#: map ctrl+alt+a send_text all Special text - -#: This will send "Special text" when you press the ctrl+alt+a key -#: combination. The text to be sent is a python string literal so you -#: can use escapes like \x1b to send control codes or \u21fb to send -#: unicode characters (or you can just input the unicode characters -#: directly as UTF-8 text). The first argument to send_text is the -#: keyboard modes in which to activate the shortcut. The possible -#: values are normal or application or kitty or a comma separated -#: combination of them. The special keyword all means all modes. The -#: modes normal and application refer to the DECCKM cursor key mode -#: for terminals, and kitty refers to the special kitty extended -#: keyboard protocol. - -#: Another example, that outputs a word and then moves the cursor to -#: the start of the line (same as pressing the Home key):: - -#: map ctrl+alt+a send_text normal Word\x1b[H -#: map ctrl+alt+a send_text application Word\x1bOH - -#: }}} - -# }}} diff --git a/dot.config/kitty/mario-plays-the-blues.conf b/dot.config/kitty/mario-plays-the-blues.conf deleted file mode 100644 index 98ff3b7..0000000 --- a/dot.config/kitty/mario-plays-the-blues.conf +++ /dev/null @@ -1,59 +0,0 @@ -active_border_color #3f2e26 -inactive_border_color #333 -bell_border_color #ff5a00 -inactive_text_alpha 0.5 - -tab_bar_edge bottom -tab_bar_margin_width 0.0 -tab_bar_style fade -#: The tab bar style, can be one of: fade or separator. - -tab_fade 0.2 0.5 0.8 1 -# tab_separator " ┇" - -active_tab_foreground #aca4a1 -active_tab_background #3f2e26 -active_tab_font_style bold-italic -inactive_tab_foreground #3f2e26 -inactive_tab_background #2a180e -inactive_tab_font_style normal - -background #2a180e -foreground #aca4a1 -background_opacity 1.0 -dynamic_background_opacity no -dim_opacity 0.5 -selection_foreground #000000 -selection_background #FFFACD - -# black -color0 #2b2b2b -color8 #424242 - -# red -color1 #ba9897 -color9 #d0b9b9 - -# green -color2 #97ba98 -color10 #b9d0b9 - -# yellow -color3 #b9ba97 -color11 #d0d0b9 - -# blue -color4 #9897ba -color12 #b9b9d0 - -# magenta -color5 #ba97b9 -color13 #d0b9d0 - -# cyan -color6 #97b9ba -color14 #b9d0d0 - -# white -color7 #d2d2d2 -color15 #ffffff diff --git a/dot.config/macchina/ascii/archlinux.ascii b/dot.config/macchina/ascii/archlinux.ascii new file mode 100644 index 0000000..3032e57 --- /dev/null +++ b/dot.config/macchina/ascii/archlinux.ascii @@ -0,0 +1,15 @@ +              ..              +              cl              +             :ooc             +            ;oooo:            +           .looooo:           +          ;c;:looooc          +         :ooooooooooc         +        :ooooooooooool        +       coooool;;loooool.      +     .looooo'    .oooooo.     +    .ooooooc      ;oooocl'    +   'ooooooo:      'ooooo:,    +  ,oool:,..        ..,:looo;  + :c,.                    .,c: +..                          .' diff --git a/dot.config/macchina/ascii/fedora.ascii b/dot.config/macchina/ascii/fedora.ascii new file mode 100644 index 0000000..d52176a --- /dev/null +++ b/dot.config/macchina/ascii/fedora.ascii @@ -0,0 +1,20 @@ + + + +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣦⡀⠒⢶⣄⠀⠀⠀⠀⠀⠀⠀ +⠀⢰⣶⣷⣶⣶⣤⣄⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⡆⠀⠀⠀⠀⠀⠀ +⠀⢿⣿⣿⣿⣿⡟⢁⣄⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀ +⠀⠘⣿⣿⣿⣿⣧⡈⠻⢷⣦⣄⡉⠛⠿⢿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠈⠻⣿⣿⣿⣿⣶⣄⡈⠙⠻⢷⣶⣤⣄⣈⡉⠛⠛⠛⠃⢠⣀⣀⡀⠀⠀⠀ +⠀⠀⠀⠀⠈⠙⠻⢿⣿⣿⣿⣿⣶⣦⣤⣍⣉⠙⠛⠛⠛⠿⠃⢸⣿⣿⣿⣷⡀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⠿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣶⣾⣿⣿⣿⣿⣿⣧⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠛⠻⠏⠀⠉⠻⢿⣿⣿⣿⣿⠿⠋⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + + +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ diff --git a/dot.config/macchina/ascii/fedoralinux.ascii b/dot.config/macchina/ascii/fedoralinux.ascii new file mode 100644 index 0000000..de63c74 --- /dev/null +++ b/dot.config/macchina/ascii/fedoralinux.ascii @@ -0,0 +1,16 @@ + .:-======-:. + :=++++++++++++=-. + -++++++++++++++++++- + .+++++++++++=:::-=+++++. + .+++++++++++. .. :+++++. + =++++++++++- +++= =+++++ +:+++++++++++: .++++:.=+++++: +-++++++++==+- .===+++++++++= +=+++++- -- .+++++++++= +=++++. -==+- .==++++++++++- +=+++- +++++- .++++++++++++ +=+++= -++++. :+++++++++++. +=++++- .. .+++++++++++: +=++++++-:..:=++++++++++= +-++++++++++++++++++++-. + :=+++++++++++++=-:. diff --git a/dot.config/macchina/ascii/rust.ascii b/dot.config/macchina/ascii/rust.ascii new file mode 100644 index 0000000..6bdff8f --- /dev/null +++ b/dot.config/macchina/ascii/rust.ascii @@ -0,0 +1,17 @@ +                                                   +                                                   +                     .. .,  .                      +                  c,'cc;cc::cc.;c                  +               c::ccccccccccccccc:cc         .     + .  ,,      :::ccccccccccccccccccccc:c.    ,c:  ;  + c: .cc   ''cccccccccccccccccccccccccc;'. .cc:.;;  +  cc:cc   :ccccccccccccccccccccccccccccc,  .ccc    +    .c,  ccccccccccccOc.:cccdx.;ccccccccc;.',      +       ';ccccccccccc'o' .cc,'l  ccccccccccc'       +      'c;.:ccccccccc:...;ccc'..;ccccccc:.;'c,      +       'c  .     ::cccccc'.'cccc::.     . ;,       +         ..                              '         +           .                            .          +                                                   +                                                   +                                                   diff --git a/dot.config/macchina/themes/Beryllium.toml b/dot.config/macchina/themes/Beryllium.toml new file mode 100644 index 0000000..df0ba58 --- /dev/null +++ b/dot.config/macchina/themes/Beryllium.toml @@ -0,0 +1,26 @@ +# Beryllium + +spacing = 3 +hide_ascii = true +key_color = "#7067CF" +separator = "" + +[box] +border = "plain" +visible = true + +[palette] +glyph = "○ " +visible = true + +[bar] +glyph = "○" +hide_delimiters = true +visible = true + +[box.inner_margin] +x = 2 +y = 1 + +[custom_ascii] +color = "#FF7001" diff --git a/dot.config/macchina/themes/Helium.toml b/dot.config/macchina/themes/Helium.toml new file mode 100644 index 0000000..fd27e40 --- /dev/null +++ b/dot.config/macchina/themes/Helium.toml @@ -0,0 +1,53 @@ +# Helium + +hide_ascii = false +spacing = 2 +padding = 0 +separator = "->" +key_color = "Blue" +separator_color = "Yellow" + +[bar] +glyph = "o" +symbol_open = "(" +symbol_close = ")" +hide_delimiters = false +visible = false + +[box] +title = " Helium " +border = "rounded" +visible = false + +[box.inner_margin] +x = 2 +y = 1 + +[custom_ascii] +color = "Yellow" + +[randomize] +key_color = false +separator_color = false + +[keys] +host = "Host" +kernel = "Kernel" +battery = "Battery" +os = "OS" +de = "DE" +wm = "WM" +distro = "Distro" +terminal = "Terminal" +shell = "Shell" +packages = "Packages" +uptime = "Uptime" +memory = "Memory" +machine = "Machine" +local_ip = "IP" +backlight = "Brightness" +resolution = "Resolution" +cpu_load = "CPU Load" +cpu = "CPU" +gpu = "GPU" +disk_space = "Disk Space" diff --git a/dot.config/macchina/themes/Hydrogen.toml b/dot.config/macchina/themes/Hydrogen.toml new file mode 100644 index 0000000..268a579 --- /dev/null +++ b/dot.config/macchina/themes/Hydrogen.toml @@ -0,0 +1,53 @@ +# Hydrogen + +spacing = 2 +padding = 0 +hide_ascii = true +separator = ">" +key_color = "Cyan" +separator_color = "White" + +[palette] +type = "Full" +visible = false + +[bar] +glyph = "ߋ" +symbol_open = '[' +symbol_close = ']' +hide_delimiters = true +visible = true + +[box] +border = "plain" +visible = true + +[box.inner_margin] +x = 1 +y = 0 + +[randomize] +key_color = false +separator_color = false + +[keys] +host = "Host" +kernel = "Kernel" +battery = "Battery" +os = "OS" +de = "DE" +wm = "WM" +distro = "Distro" +terminal = "Terminal" +shell = "Shell" +packages = "Packages" +uptime = "Uptime" +memory = "Memory" +machine = "Machine" +local_ip = "Local IP" +backlight = "Brightness" +resolution = "Resolution" +cpu_load = "CPU Load" +cpu = "CPU" +gpu = "GPU" +disk_space = "Disk Space" diff --git a/dot.config/macchina/themes/Lithium.toml b/dot.config/macchina/themes/Lithium.toml new file mode 100644 index 0000000..9d62533 --- /dev/null +++ b/dot.config/macchina/themes/Lithium.toml @@ -0,0 +1,59 @@ +# Lithium + +spacing = 1 +padding = 0 +hide_ascii = true +separator = " " +key_color = "Yellow" +separator_color = "Yellow" + +[palette] +type = "Light" +glyph = " ● " +visible = true + +[bar] +glyph = "●" +symbol_open = '(' +symbol_close = ')' +visible = false +hide_delimiters = true + +[box] +title = " " +border = "plain" +visible = false + +[box.inner_margin] +x = 2 +y = 1 + +[custom_ascii] +color = "Yellow" + +[randomize] +key_color = false +separator_color = false +pool = "base" + +[keys] +host = "Host" +kernel = "Kernel" +battery = "Battery" +os = "OS" +de = "DE" +wm = "WM" +distro = "Distro" +terminal = "Terminal" +shell = "Shell" +packages = "Packages" +uptime = "Uptime" +memory = "Memory" +machine = "Machine" +local_ip = "IP" +backlight = "Brightness" +resolution = "Resolution" +cpu_load = "CPU Load" +cpu = "CPU" +gpu = "GPU" +disk_space = "Disk Space" diff --git a/dot.config/macchina/themes/koehr.toml b/dot.config/macchina/themes/koehr.toml new file mode 100644 index 0000000..3902e6f --- /dev/null +++ b/dot.config/macchina/themes/koehr.toml @@ -0,0 +1,59 @@ +# koehr + +hide_ascii = false +spacing = 2 +padding = 0 +separator = "" +key_color = "Blue" +separator_color = "Yellow" + +[palette] +type = "Full" +glyph = "" +visible = true + +[bar] +glyph = "󱗝" +symbol_open = "" +symbol_close = "" +hide_delimiters = false +visible = true + +[box] +title = " KPPM - koehr's private portable machine " +border = "rounded" +visible = true + +[box.inner_margin] +x = 1 +y = 0 + +[custom_ascii] +path = "~/.config/macchina/ascii/fedora.ascii" +color = "Blue" + +[randomize] +key_color = false +separator_color = false + +[keys] +host = "Host" +kernel = "Kernel" +battery = "Battery" +os = "OS" +de = "DE" +wm = "WM" +distro = "Distro" +terminal = "Terminal" +shell = "Shell" +packages = "Packages" +uptime = "Uptime" +memory = "Memory" +machine = "Machine" +local_ip = "IP" +backlight = "Brightness" +resolution = "Resolution" +cpu_load = "CPU Load" +cpu = "CPU" +gpu = "GPU" +disk_space = "Disk Space" diff --git a/dot.config/neofetch/config.conf b/dot.config/neofetch/config.conf deleted file mode 100644 index b1b9cfe..0000000 --- a/dot.config/neofetch/config.conf +++ /dev/null @@ -1,82 +0,0 @@ -# See this wiki page for more info: -# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info -print_info() { - info title - info underline - - info "OS" distro - info "Host" model - info "Kernel" kernel - info "Uptime" uptime - info "Packages" packages - info "Shell" shell - info "Resolution" resolution - info "WM" wm - info "WM Theme" wm_theme - info "Terminal" term - info "Terminal Font" term_font - info "CPU" cpu - info "GPU" gpu - info "Memory" memory - info "Disk" disk - info "Battery" battery - info "Locale" locale - info cols -} - -kernel_shorthand="on" -distro_shorthand="off" -os_arch="on" -uptime_shorthand="on" -memory_percent="off" -package_managers="off" -shell_path="off" -shell_version="on" -speed_type="bios_limit" # Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. -speed_shorthand="on" -cpu_brand="on" -cpu_speed="on" -cpu_cores="logical" -cpu_temp="off" -gpu_brand="on" -gpu_type="all" -refresh_rate="on" -gtk_shorthand="off" -gtk2="off" -gtk3="off" -disk_show=('/' '/home') -disk_subtitle="mount" -colors=(4 6 4 4 4 7) # title, @, underline, subtitle, colon, info -bold="on" -underline_enabled="on" -underline_char="=" -separator=":" -block_range=(0 15) -color_blocks="on" -block_width=3 -block_height=1 -bar_char_elapsed="#" -bar_char_total="." -bar_border="on" -bar_length=15 -bar_color_elapsed="distro" -bar_color_total="distro" -cpu_display="bar" # bar, infobar, barinfo, off -memory_display="bar" -battery_display="bar" -disk_display="bar" -image_backend="kitty" # ascii, caca, chafa, jp2a, iterm2, off, termpix, pixterm, tycat, w3m, kitty -image_source="/home/nk/Media/voidlinux.png" -ascii_distro="auto" -ascii_colors=(distro) -ascii_bold="on" -image_loop="off" -thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" -crop_mode="fit" # normal, fit, fill -crop_offset="center" -image_size="auto" -gap=3 -yoffset=0 -xoffset=0 -background_color= -stdout="off" diff --git a/dot.config/picomrc b/dot.config/picomrc deleted file mode 100644 index 42a18ac..0000000 --- a/dot.config/picomrc +++ /dev/null @@ -1,63 +0,0 @@ -# shadows? -shadow = false; - -# Opacity -# menu-opacity = 0.8; -inactive-opacity = 0.8; -# active-opacity = 0.8; -frame-opacity = 0.7; -inactive-opacity-override = false; -inactive-dim = 0.2; -# inactive-dim-fixed = true; -blur-background = true; -# blur-background-frame = true; -blur-kern = "7x7box" -# blur-background-fixed = true; -blur-background-exclude = [ - #"window_type = 'dock'", - "window_type = 'desktop'", - "_GTK_FRAME_EXTENTS@:c" -]; -opacity-rule = [ "90:class_g = 'st-256color'", "80:name = 'rofi'" ]; - -# Fading -fading = true; -fade-delta = 5; -fade-in-step = 0.03; -fade-out-step = 0.03; -# no-fading-openclose = true; -# no-fading-destroyed-argb = true; -fade-exclude = [ ]; - -# Other -backend = "xrender" -mark-wmwin-focused = true; -mark-ovredir-focused = true; -# use-ewmh-active-win = true; -detect-rounded-corners = true; -detect-client-opacity = true; -refresh-rate = 60; -vsync = false; -dbe = false; -# sw-opti = true; -# unredir-if-possible = true; -# unredir-if-possible-delay = 5000; -# unredir-if-possible-exclude = [ ]; -focus-exclude = [ "class_g = 'Cairo-clock'" ]; -detect-transient = true; -detect-client-leader = true; -invert-color-include = [ ]; -# resize-damage = 1; - -# GLX backend -glx-no-stencil = true; -glx-copy-from-front = false; -glx-use-copysubbuffermesa = true; -# glx-no-rebind-pixmap = true; -use-damage = true; - -# Window type settings -wintypes: -{ - tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; }; -}; diff --git a/dot.config/sway/config b/dot.config/sway/config index 3a84178..2382ef0 100644 --- a/dot.config/sway/config +++ b/dot.config/sway/config @@ -1,9 +1,10 @@ -# sway / i3 configuration file -# v1 (2019) by koehr +# sway configuration file +# v2 (2023) by koehr set $mod Mod4 -set $term kitty -set $editor kak +set $term foot +set $editor hx +set $rofi_cmd rofi -terminal '$term' -show drun set $black #000000 set $darkgray #212121 @@ -25,7 +26,7 @@ set $transparent #00000000 set $ws1 "1:  " set $ws2 "2:  " -set $ws3 "3:  " +set $ws3 "3: ⚂ " set $ws4 "4: ⚃ " set $ws5 "5: ⚄ " set $ws6 "6: ⚅ " @@ -33,15 +34,33 @@ set $ws7 "7: 7 " set $ws8 "8: 8 " set $ws9 "9: 9 " set $ws10 "10: 10 " - -output "*" bg ~/Media/wallpaper.jpg fit +set $ws11 "11: 11 " +set $ws12 "12: 12 " +set $ws13 "13: 13 " +set $ws14 "14: 14 " +set $ws15 "15: 15 " +set $ws16 "16: 16 " +set $ws17 "17: 17 " +set $ws18 "18: 18 " +set $ws19 "19: 19 " +set $ws20 "20: 20 " output eDP-1 { - resolution 3200x1800 - pos 0 0 - scale 2 + res 2880x1800@120Hz + pos 0,0 + scale 1.5 + render_bit_depth 10 + adaptive_sync on + bg $HOME/Wallpapers/desktop.jpg fill +} +output DP-1 { + res 2880x864@120Hz + pos 0,1200 + scale 1.5 + render_bit_depth 10 + adaptive_sync on + bg #000000 solid_color } - input type:keyboard { xkb_layout us xkb_variant alt-intl-unicode @@ -54,14 +73,20 @@ input type:touchpad { click_method clickfinger scroll_method two_finger natural_scroll disabled - dwt disabled + dwt enabled } gaps inner 2 gaps outer 0 +default_border pixel 1 +default_floating_border normal 2 +titlebar_border_thickness 0 +hide_edge_borders --i3 smart +smart_borders on +smart_gaps on workspace_auto_back_and_forth yes -font Monofur Nerd Font 14 +font monospace 0 # BORDER BACKGROUND TEXT INDICATOR CHILD_BORDER client.focused $yellow $yellow $black $yellow $yellow @@ -70,11 +95,17 @@ client.focused_inactive $black $black $white $black $darkyellow client.urgent $darkred $darkred $black $darkred $darkred client.background $black +#bar { +# font Monofur Nerd Font 14 +# output eDP-1 +# position top +#} + # window management -floating_modifier $mod +floating_modifier $mod normal bindsym $mod+Return exec $term bindsym $mod+q kill -bindsym $mod+p exec --no-startup-id rofi -show run +bindsym $mod+p exec --no-startup-id $rofi_cmd bindsym $mod+Left focus left bindsym $mod+Right focus right @@ -112,6 +143,20 @@ bindsym $mod+7 workspace $ws7 bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 + +bindsym $mod+Ctrl+1 workspace $ws11 +bindsym $mod+Ctrl+2 workspace $ws12 +bindsym $mod+Ctrl+3 workspace $ws13 +bindsym $mod+Ctrl+4 workspace $ws14 +bindsym $mod+Ctrl+5 workspace $ws15 +bindsym $mod+Ctrl+6 workspace $ws16 +bindsym $mod+Ctrl+7 workspace $ws17 +bindsym $mod+Ctrl+8 workspace $ws18 +bindsym $mod+Ctrl+9 workspace $ws19 +bindsym $mod+Ctrl+0 workspace $ws20 + +bindgesture swipe:right workspace prev +bindgesture swipe:left workspace next bindsym $mod+Tab workspace back_and_forth # move workspaces between monitors @@ -138,64 +183,28 @@ bindsym $mod+backspace scratchpad show # make fullscreen window sticky and floating on the top right corner of the screen bindsym $mod+y fullscreen disable; floating enable; resize set 400 300; sticky enable; move window to position 1180 20 +bindsym $mod+l exec /home/n/.local/bin/lock + # reload config / restart bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart +bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' # MULTIMEDIA CONTROL KEYS -bindsym XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -5 -bindsym XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +5 -bindsym XF86AudioMute exec --no-startup-id pulsemixer --toggle-mute +#bindsym XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -5 +#bindsym XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +5 +#bindsym XF86AudioMute exec --no-startup-id pulsemixer --toggle-mute -bindsym XF86MonBrightnessDown exec --no-startup-id sudo light -U 10 -bindsym XF86MonBrightnessUp exec --no-startup-id sudo light -A 10 +#bindsym XF86MonBrightnessDown exec --no-startup-id sudo light -U 10 +#bindsym XF86MonBrightnessUp exec --no-startup-id sudo light -A 10 # SCREENSHOTS - bindsym --release Print exec --no-startup-id "grim -t jpeg $HOME/Media/Screenshots/scrot-$(date +%Y%m%d%H%M%S).jpg" bindsym --release Shift+Print exec --no-startup-id "grim -t jpeg -g $(slurp) $HOME/Media/Screenshots/scrot-$(date +%Y%m%d%H%M%S).jpg" -# fancy mode stuff -set $mode_power power lock exit suspend reboot poweroff -mode --pango_markup "$mode_power" { - bindsym l mode "default", exec --no-startup-id swaylock - bindsym e mode "default", exec --no-startup-id swaymsg exit - bindsym s mode "default", exec --no-startup-id zzz - bindsym h mode "default", exec --no-startup-id ZZZ - bindsym r mode "default", exec --no-startup-id shutdown -r now - bindsym p mode "default", exec --no-startup-id shutdown -P now - - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+l exec swaylock -bindsym $mod+Control+l mode "$mode_power" - -default_border none - -for_window [window_role="pop-up"] floating enable -for_window [window_role="bubble"] floating enable -for_window [window_role="task_dialog"] floating enable -for_window [window_role="Preferences"] floating enable -for_window [window_type="dialog"] floating enable -for_window [window_type="menu"] floating enable - -for_window [class="(?i)blueman"] floating enable -for_window [class="(?i)gsimplecal"] floating enable, move position mouse - -assign [class="(?i)firefox"] $ws2 -assign [class="(?i)chrome"] $ws3 - -bar { - tray_output eDP-1 - swaybar_command waybar -} +exec swayidle -w \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + before-sleep 'swaylock -f -c 000000' -# AUTOSTART -exec --no-startup-id blueman-applet & # bluetooth applet -# the next line is necessary for mako, see https://github.com/emersion/mako -exec --no-startup-id dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus & -exec --no-startup-id mako & # notifications -# exec --no-startup-id dunst & # old notifications -exec --no-startup-id kanshi & # automatic screen config -exec swayidle -w timeout 150 'swaylock' timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' +include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")' diff --git a/dot.config/sway/config.d/50-rules-browser.conf b/dot.config/sway/config.d/50-rules-browser.conf new file mode 100644 index 0000000..19c2879 --- /dev/null +++ b/dot.config/sway/config.d/50-rules-browser.conf @@ -0,0 +1,17 @@ +# apply mark for Xwayland and wayland native browser windows +for_window [class="Chromium-browser"] mark Browser +for_window [class="Brave-browser"] mark Browser +for_window [class="firefox"] mark Browser +for_window [app_id="Chromium-browser"] mark Browser +for_window [app_id="brave-browser"] mark Browser +for_window [app_id="firefox"] mark Browser + +# inhibit scrensaver for fullscreen browser windows +for_window [con_mark="Browser"] { + inhibit_idle fullscreen +} + +# firefox wayland screensharing indicator +for_window [app_id="firefox" title="Firefox — Sharing Indicator"] { + floating enable +} diff --git a/dot.config/sway/config.d/50-rules-pavucontrol.conf b/dot.config/sway/config.d/50-rules-pavucontrol.conf new file mode 100644 index 0000000..cb2ea43 --- /dev/null +++ b/dot.config/sway/config.d/50-rules-pavucontrol.conf @@ -0,0 +1,12 @@ +# Display PulseAudio volume control application (both GTK and Qt varieties) +# as a floating window. + +for_window [app_id="pavucontrol"] { + floating enable + move position center +} + +for_window [app_id="pavucontrol-qt"] { + floating enable + move position center +} diff --git a/dot.config/sway/config.d/50-rules-policykit-agent.conf b/dot.config/sway/config.d/50-rules-policykit-agent.conf new file mode 100644 index 0000000..88ff754 --- /dev/null +++ b/dot.config/sway/config.d/50-rules-policykit-agent.conf @@ -0,0 +1,4 @@ +for_window [app_id="lxqt-policykit-agent"] { + floating enable + move position center +} diff --git a/dot.config/sway/config.d/60-bindings-brightness.conf b/dot.config/sway/config.d/60-bindings-brightness.conf new file mode 100644 index 0000000..0e53ec2 --- /dev/null +++ b/dot.config/sway/config.d/60-bindings-brightness.conf @@ -0,0 +1,18 @@ +# Key bindings for brightness control using `light`. +# Displays a notification with the current value if /usr/bin/notify-send is available +# +# Brightness increase/decrease step can be customized by setting the `$brightness_step` +# variable to a numeric value before including the file. +# +# Requires: light +# Recommends: libnotify + +set $brightness_notification_cmd command -v notify-send >/dev/null && \ + VALUE=$(light) && VALUE=${VALUE%%.*} && \ + notify-send -e -h string:x-canonical-private-synchronous:brightness \ + -h "int:value:$VALUE" -t 800 "Brightness: ${VALUE}%" + +bindsym XF86MonBrightnessDown exec \ + 'STEP="$brightness_step" && light -U ${STEP:-5} && $brightness_notification_cmd' +bindsym XF86MonBrightnessUp exec \ + 'STEP="$brightness_step" && light -A ${STEP:-5} && $brightness_notification_cmd' diff --git a/dot.config/sway/config.d/60-bindings-media.conf b/dot.config/sway/config.d/60-bindings-media.conf new file mode 100644 index 0000000..1e2f59f --- /dev/null +++ b/dot.config/sway/config.d/60-bindings-media.conf @@ -0,0 +1,17 @@ +# Key bindings for media player control via MPRIS D-Bus interface +# +# Requires: playerctl + +# Allow Play and Stop bindings even if the screen is locked +bindsym --locked { + XF86AudioPlay exec playerctl play-pause + XF86AudioStop exec playerctl stop +} + +bindsym { + XF86AudioForward exec playerctl position +10 + XF86AudioNext exec playerctl next + XF86AudioPause exec playerctl pause + XF86AudioPrev exec playerctl previous + XF86AudioRewind exec playerctl position -10 +} diff --git a/dot.config/sway/config.d/60-bindings-screenshot.conf b/dot.config/sway/config.d/60-bindings-screenshot.conf new file mode 100644 index 0000000..16b1cd9 --- /dev/null +++ b/dot.config/sway/config.d/60-bindings-screenshot.conf @@ -0,0 +1,20 @@ +# Key bindings for taking screenshots +# +# The image files will be written to XDG_SCREENSHOTS_DIR if this is set +# or defined in user-dirs.dir, or to a fallback location XDG_PICTURES_DIR. +# +# Copy the file to ~/.config/sway/config.d/60-bindings-screenshot.conf (or to +# your $XDG_CONFIG_HOME location if set differently) to be able to overwrite +# existing shortcuts. +# Check 'man grimshot' for additional commands that you may find useful. +# +# Requires: grimshot + +bindsym { + # Capture the currently active output + Print exec grimshot save output + # Capture the currently active window + Alt+Print exec grimshot save active + # Select and capture a custom rectangular area + Ctrl+Print exec grimshot save area +} diff --git a/dot.config/sway/config.d/60-bindings-volume.conf b/dot.config/sway/config.d/60-bindings-volume.conf new file mode 100644 index 0000000..85575f2 --- /dev/null +++ b/dot.config/sway/config.d/60-bindings-volume.conf @@ -0,0 +1,21 @@ +# Key bindings to control pipewire or pulseaudio volume with pactl. +# Displays a notification with the current state if /usr/bin/notify-send is available +# +# Volume increase/decrease step can be customized by setting the `$volume_step` +# variable to a numeric value before including the file. +# Maximum volume boost level can be set with the `$volume_limit` variable. +# +# Requires: pulseaudio-utils +# Recommends: libnotify + +set $volume_helper_cmd /usr/libexec/sway/volume-helper + +# Allow volume controls even if the screen is locked +bindsym --locked { + XF86AudioRaiseVolume exec \ + $volume_helper_cmd --limit "$volume_limit" --increase "$volume_step" + XF86AudioLowerVolume exec \ + $volume_helper_cmd --limit "$volume_limit" --decrease "$volume_step" + XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && $volume_helper_cmd + XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +} diff --git a/dot.config/sway/config.d/65-mode-passthrough.conf b/dot.config/sway/config.d/65-mode-passthrough.conf new file mode 100644 index 0000000..ce298f8 --- /dev/null +++ b/dot.config/sway/config.d/65-mode-passthrough.conf @@ -0,0 +1,6 @@ +# A special mode for passing any keybindings to the focused application + +mode "passthrough" { + bindsym $mod+Pause mode default +} +bindsym $mod+Pause mode "passthrough" diff --git a/dot.config/sway/config.d/90-bar.conf b/dot.config/sway/config.d/90-bar.conf new file mode 100644 index 0000000..0b2f71f --- /dev/null +++ b/dot.config/sway/config.d/90-bar.conf @@ -0,0 +1,10 @@ +# Status Bar: waybar +# +# Read `man 5 sway-bar` for more information about this section. +# +# Requires: waybar + +bar { + position top + swaybar_command waybar +} diff --git a/dot.config/sway/config.d/90-swayidle.conf b/dot.config/sway/config.d/90-swayidle.conf new file mode 100644 index 0000000..2f37112 --- /dev/null +++ b/dot.config/sway/config.d/90-swayidle.conf @@ -0,0 +1,30 @@ +# Idle and lock configuration +# +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 60 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. +# The timeouts can be customized via `$lock_timeout` and `$screen_timeout` +# variables. For a predictable behavior, keep the `$screen_timeout` value +# lesser than the `$lock_timeout`. +# +# You can also lock the screen manually by running `loginctl lock-session` or +# add a binding for the command. Example: +# bindsym $mod+Shift+Escape exec loginctl lock-session +# +# Note that all swaylock customizations are handled via /etc/swaylock/config and +# can be overridden via $XDG_CONFIG_HOME/swaylock/config (~/.config/swaylock/config). +# +# Requires: swayidle +# Requires: swaylock +# Requires: /usr/bin/pkill, /usr/bin/pgrep + +exec LT="$lock_timeout" ST="$screen_timeout" LT=${LT:-300} ST=${ST:-60} && \ + swayidle -w \ + timeout $LT 'swaylock -f' \ + timeout $((LT + ST)) 'swaymsg "output * power off"' \ + resume 'swaymsg "output * power on"' \ + timeout $ST 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power off"' \ + resume 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power on"' \ + before-sleep 'swaylock -f' \ + lock 'swaylock -f' \ + unlock 'pkill -xu "$USER" -SIGUSR1 swaylock' diff --git a/dot.config/sway/config.d/95-autostart-policykit-agent.conf b/dot.config/sway/config.d/95-autostart-policykit-agent.conf new file mode 100644 index 0000000..10b529b --- /dev/null +++ b/dot.config/sway/config.d/95-autostart-policykit-agent.conf @@ -0,0 +1,8 @@ +# Start graphical authentication agent for PolicyKit. +# +# Certain applications may require this to request elevated privileges: +# GParted, virt-manager, anything that uses pkexec +# +# Requires: lxqt-policykit + +exec /usr/libexec/lxqt-policykit-agent diff --git a/dot.config/sway/config.d/95-xdg-desktop-autostart.conf b/dot.config/sway/config.d/95-xdg-desktop-autostart.conf new file mode 100644 index 0000000..56cc4fb --- /dev/null +++ b/dot.config/sway/config.d/95-xdg-desktop-autostart.conf @@ -0,0 +1,14 @@ +# Wait until a StatusNotifierItem tray implementation is available and +# process XDG autostart entries. +# +# This horror has to exist because +# +# - SNI spec mandates that if `IsStatusNotifierHostRegistered` is not set, +# the client should fall back to the Freedesktop System Tray specification +# (XEmbed). +# - There are actual implementations that take this seriously and implement +# a fallback *even if* StatusNotifierWatcher is already DBus-activated. +# - https://github.com/systemd/systemd/issues/3750 +# +exec /usr/libexec/sway-systemd/wait-sni-ready && \ + systemctl --user start sway-xdg-autostart.target diff --git a/dot.config/sway/config.d/95-xdg-user-dirs.conf b/dot.config/sway/config.d/95-xdg-user-dirs.conf new file mode 100644 index 0000000..e7d5beb --- /dev/null +++ b/dot.config/sway/config.d/95-xdg-user-dirs.conf @@ -0,0 +1,9 @@ +# Create or update XDG user dir configuration +# +# See also: +# - /etc/xdg/autostart/xdg-user-dirs.desktop +# - https://github.com/systemd/systemd/issues/18791 +# +# Recommends: xdg-user-dirs + +exec /usr/bin/xdg-user-dirs-update diff --git a/dot.config/swaylock/config b/dot.config/swaylock/config index 3f3d9e1..15a8d73 100644 --- a/dot.config/swaylock/config +++ b/dot.config/swaylock/config @@ -1,13 +1,3 @@ color=000000 -image=~/Media/lock.jpg -ignore-empty-password -hide-keyboard-layout -indicator-caps-lock -tiling -indicator-radius=300 -indicator-thickness=3 -inside-color=00000000 -key-hl-color=FFFFFF88 -bs-hl-color=000000AA -line-color=000000 -ring-color=88888888 +image=eDP-1:$HOME/Wallpapers/lock.png +scaling=fill diff --git a/dot.config/waybar/config b/dot.config/waybar/config index e9f3f36..d1ed268 100644 --- a/dot.config/waybar/config +++ b/dot.config/waybar/config @@ -1,127 +1,114 @@ -{ - "layer": "top", // Waybar at top layer - "position": "top", // Waybar position (top|bottom|left|right) - "height": 22, // Waybar height (to be removed for auto height) - // "width": 1280, // Waybar width +[{ + "output": "eDP-1", + "layer": "bottom", + "mode": "dock", + "spacing": 16, + "modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"], + "modules-center": ["sway/window"], + "modules-right": ["privacy", "wlr/taskbar"], - // Choose the order of the modules - "modules-left": ["sway/workspaces", "sway/mode", "sway/window"], - "modules-center": [ - "custom/left-arrow", "clock#1", "custom/left-arrow-inverse", - "custom/left-arrow", "clock#2", "custom/right-arrow", - "custom/right-arrow-inverse", "clock#3", "custom/right-arrow" - ], - "modules-right": ["idle_inhibitor", "network", "temperature", "backlight", "battery", "tray"], - - "custom/left-arrow": { - "format": "", - "tooltip": false - }, - "custom/left-arrow-inverse": { - "format": "", - "tooltip": false - }, - "custom/right-arrow": { - "format": "", - "tooltip": false - }, - "custom/right-arrow-inverse": { - "format": "", - "tooltip": false - }, - - "sway/workspaces": { - "disable-scroll": true, - "all-outputs": true, - "format": "{name}" - }, "sway/mode": { "format": "{}" }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - } + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", " "], + "tooltip": true, + "tooltip-format": "{app}: {title}" }, + "wlr/taskbar": { + "icon-size": 24, + "active-first": true, + "format": "{icon} ", + "tooltip": true, + "tooltip-format": "{name}", + }, + "sway/window": { + "icon": false, + "format": "{title} ({app_id}) ", + }, + "privacy": { + "icon-spacing": 4, + "icon-size": 24, + "transition-duration": 350, + }, +}, { + "output": "DP-1", + "layer": "top", + "mode": "dock", + "position": "bottom", + "spacing": 16, + "modules-left": ["sway/workspaces", "custom/media"], + "modules-center": ["clock"], + "modules-right": ["idle_inhibitor", "pulseaudio", "network", "keyboard-state", "sway/language", "battery", "tray"], "tray": { "icon-size": 24, - "spacing": 10 + "spacing": 6, }, - "clock#1": { - "format": "{:%a}", - "tooltip-format": "{:%Y-%m-%d, it is %A, %H:%M}" - }, - "clock#2": { - "format": "{:%H:%M}", - "tooltip-format": "{:%Y-%m-%d, it is %A, %H:%M}" - }, - "clock#3": { - "format": "{:%b %d}", - "tooltip-format": "{:%Y-%m-%d, it is %A, %H:%M}" - }, - "cpu": { - "format": "{usage}% ", - "tooltip": false - }, - "memory": { - "format": "{}% " + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": " ", + "unlocked": " " + } }, - "temperature": { - // "thermal-zone": 2, - // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", - "critical-threshold": 80, - // "format-critical": "{temperatureC}°C {icon}", - "format": "{temperatureC}°C {icon}", - "format-icons": ["", "", ""] + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": " ", + "deactivated": " " + } }, - "backlight": { - // "device": "acpi_video1", - "format": "{percent}% {icon}", - "format-icons": ["", ""] + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{calendar}", + "format": "{:%A — %F — %H:%M}", + "format-alt": "{:%A — %F — %H:%M (Day %j, Week %W, %z / %Z)}", }, "battery": { - "format": "{icon}", - "format-icons": ["", "", "", "", ""], "states": { - "good": 75, - "medium": 50, + // "good": 95, "warning": 30, "critical": 15 }, "format": "{capacity}% {icon}", - "format-charging": "{capacity}% ", - "format-plugged": "{capacity}% ", - "format-plugged-full": "", + "format-charging": "{capacity}% 󰂄", + "format-plugged": "{capacity}% 󱟢", "format-alt": "{time} {icon}", - "format-icons": ["", "", "", "", ""] + // "format-good": "", // An empty format will hide the module + // "format-full": "", + // "format-icons": [" ", " ", " ", " ", " "] + "format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"], }, "network": { // "interface": "wlp2*", // (Optional) To force the use of this interface - "format-wifi": "{essid} ({signalStrength}%) ", - "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", - "format-linked": "{ifname} (No IP) ", - "format-disconnected": "Disconnected ⚠", + "format-wifi": "{essid} ({signalStrength}%) 󰖩 ", + "format-ethernet": "{ipaddr}/{cidr} 󰩠 ", + "tooltip-format": "{ifname} via {gwaddr} 󰩠 ", + "format-linked": "{ifname} (No IP) 󰛵 ", + "format-disconnected": "󰖪 ", "format-alt": "{ifname}: {ipaddr}/{cidr}" }, "pulseaudio": { // "scroll-step": 1, // %, can be a float "format": "{volume}% {icon} {format_source}", "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": " {format_source}", - "format-source": "{volume}% ", - "format-source-muted": "", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}%  ", + "format-source-muted": " ", "format-icons": { - "headphones": "", - "handsfree": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", + "headphone": "󰋋 ", + "hands-free": "󰋎 ", + "headset": "󰋎 ", + "phone": " ", + "portable": " ", + "car": " ", "default": ["", "", ""] }, "on-click": "pavucontrol" - } -} + }, +}] diff --git a/dot.config/waybar/style.css b/dot.config/waybar/style.css index 335e94f..7db609b 100644 --- a/dot.config/waybar/style.css +++ b/dot.config/waybar/style.css @@ -1,138 +1,78 @@ * { - border: none; - border-radius: 0; - font-family: monofur; - font-size: 13px; - min-height: 0; + font-family: "Monofur Nerd Font", monospace; } +window.eDP-1 * { font-size: 14px; } +window.DP-1 * { font-size: 16px; } window#waybar { - background-color: transparent; - color: #eeeeee; + color: #ffffff; } - -#custom-left-arrow-inverse, -#custom-right-arrow-inverse { - background-color: rgba(255, 255, 255, .1); - color: rgba(0, 0, 0, .15); +window#waybar.eDP-1 { + background-color: rgba(0, 0, 0, 0.7); + border: none; } - -#custom-left-arrow, -#custom-right-arrow { - border-top: 4px solid transparent; - border-bottom: 4px solid transparent; - color: rgba(255, 255, 255, .1); +window#waybar.DP-1 { + background-color: rgba(42, 42, 42, 0.7); + border-bottom: 3px solid rgba(115, 115, 115, 0.5); + transition-property: background-color; + transition-duration: .5s; } -#custom-left-arrow { - border-right: 4px solid rgba(255, 255, 255, .1); + +window#waybar.hidden { + opacity: 0.2; } -#custom-right-arrow { - border-left: 4px solid rgba(255, 255, 255, .1); + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; } - -/* -window#waybar.hidden { opacity: 0.2; } -window#waybar.empty { background-color: transparent; } -window#waybar.solo { background-color: #FFFFFF; } - -window#waybar.chromium { - background-color: #000000; - border: none; +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; + box-shadow: inset 0 -3px #ffffff; } -*/ #workspaces button { padding: 0 5px; + background-color: transparent; color: #ffffff; } -/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ #workspaces button:hover { background: rgba(0, 0, 0, 0.2); - box-shadow: none; - border-bottom: 3px solid #ffffff; } #workspaces button.focused { - background-color: #64727D; - border-bottom: 3px solid #ffffff; + background-color: #000; + box-shadow: inset 0 -3px #FABD2F; + color: #FABD2F; } #workspaces button.urgent { background-color: #eb4d4b; } -#mode { - background-color: #64727D; - border-bottom: 3px solid #ffffff; -} - -#workspaces button, -#clock, -#battery, -#cpu, -#memory, -#temperature, -#backlight, -#network, -#pulseaudio, -#custom-media, -#tray, -#mode, -#idle_inhibitor { - padding: 0 10px; - margin: 0 4px; - color: #ffffff; - background-color: rgba(255, 255, 255, .1); - border-bottom: 3px solid rgba(255, 255, 255, .2); -} - -#workspaces button:first-child { - margin-left: 0; +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; } -#clock { - padding: 0 0; - margin: 0 0; -} -#clock:not(.2) { - border-bottom: none; +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; } -#tray { - margin-right: 0; +/* If window-title is the rightmost module, give it some extra right margin */ +#sway-window { + margin-right: 1em; + color: green; } -#battery:not(.charging) { - border-bottom: 3px solid green; -} -#battery.good:not(.charging) { - border-bottom: 3px solid #26A65B; -} -#battery.medium:not(.charging) { - border-bottom: 3px solid yellow; -} -#battery.warning:not(.charging) { - border-bottom: 3px solid orange; -} -#battery.charging { - border-bottom: 3px solid #26A65B; -} - -@keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } -} - -#battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; +#privacy { + color: white; + background-color: #eb4d4b; } diff --git a/dot.zsh/koehr.theme.zsh b/dot.config/zsh/koehr.theme.zsh similarity index 73% rename from dot.zsh/koehr.theme.zsh rename to dot.config/zsh/koehr.theme.zsh index 360cf66..f639c33 100644 --- a/dot.zsh/koehr.theme.zsh +++ b/dot.config/zsh/koehr.theme.zsh @@ -43,9 +43,9 @@ CC_GRAY3='240' CC_BLACK='232' CC_WHITE='255' -CC_CPROMPT="%k%f%F{$CC_ORANGE}" -CC_CRPROMPT="%k%f%F{$CC_ORANGE}" -CC_CGITPROMPT="%k%f%F{$CC_GRAY3}" +CC_CPROMPT="%k%f%K{$CC_GRAY3}%F{$CC_ORANGE}" +CC_CRPROMPT="%k%f%K{$CC_GRAY3}%F{$CC_ORANGE}" +CC_CGITPROMPT="%k%f%K{$CC_GRAY3}%F{$CC_BLACK}" CC_CWARN="%k%f%F{$CC_RED}" CC_WRITE_IN_RED="%f%F{$CC_RED}" @@ -59,13 +59,17 @@ CC_SYMBOL_RIGHT_ARROW=$'\ue0b0' CC_SYMBOL_RIGHT_LIGHT_ARROW=$'\ue0b1' CC_SYMBOL_LEFT_ARROW=$'\ue0b2' CC_SYMBOL_LEFT_LIGHT_ARROW=$'\ue0b3' +CC_SYMBOL_RIGHT_BOXES=$'\ue0c6' +CC_SYMBOL_RIGHT_LIGHT_BOXES=$'\ue0c4' +CC_SYMBOL_LEFT_BOXES=$'\ue0c7' +CC_SYMBOL_LEFT_LIGHT_BOXES=$'\ue0c5' CC_SYMBOL_HOME=$'\uf015' CC_SYMBOL_WORK=$'\uf0f7' CC_SYMBOL_SERVER=$'\uf233' ZSH_THEME_GIT_PROMPT_PREFIX="$CC_CGITPROMPT " -ZSH_THEME_GIT_PROMPT_SUFFIX=" $CC_WRITE_IN_GRAY$CC_SYMBOL_LEFT_LIGHT_ARROW" +ZSH_THEME_GIT_PROMPT_SUFFIX=" $CC_DRAW_IN_BLACK" ZSH_THEME_GIT_PROMPT_DIRTY="$CC_WRITE_IN_RED✗" ZSH_THEME_GIT_PROMPT_CLEAN="$CC_WRITE_IN_GREEN✓" @@ -80,5 +84,9 @@ if [ "$CC_HOSTNAME" = 'nkwd' ]; then CC_HOSTNAME=$CC_SYMBOL_HOME fi -RPROMPT='$(git_prompt_info)'"$CC_CRPROMPT $(_collapsed_path)%{$reset_color%}" -PROMPT="%(?.$CC_CPROMPT$CC_HOSTNAME .$CC_CWARN·%?·)$CC_WRITE_IN_GRAY$CC_SYMBOL_RIGHT_LIGHT_ARROW%f"'%{$reset_color%} ' #$CC_CURRENT_PATH "'$(git_prompt)'" $CC_DRAW_IN_GRAY$CC_SYMBOL_RIGHT_ARROW%f " +if [ "$CC_HOSTNAME" = 'phi' ]; then + CC_HOSTNAME=$CC_SYMBOL_HOME +fi + +RPROMPT="%k$CC_WRITE_IN_GRAY$CC_SYMBOL_LEFT_BOXES %K{$CC_GRAY3}"'$(git_prompt_info)'"$CC_CRPROMPT $(_collapsed_path) %{$reset_color%}" +PROMPT="%(?.$CC_CPROMPT$CC_HOSTNAME .$CC_CWARN·%?·)%k$CC_WRITE_IN_GRAY$CC_SYMBOL_RIGHT_BOXES%f"'%{$reset_color%} ' #$CC_CURRENT_PATH "'$(git_prompt)'" $CC_DRAW_IN_GRAY$CC_SYMBOL_RIGHT_ARROW%f " diff --git a/dot.config/zsh/zshrc b/dot.config/zsh/zshrc new file mode 100644 index 0000000..5fb0026 --- /dev/null +++ b/dot.config/zsh/zshrc @@ -0,0 +1,28 @@ +bindkey -v +source ~/pkg/zgenom/zgenom.zsh + +zgenom autoupdate + +if ! zgenom saved; then + echo "one-time plugin initialization..." + + zgenom ohmyzsh + zgenom oh-my-zsh plugins/extract + + zgenom load zsh-users/zsh-syntax-highlighting + zgenom load zsh-users/zaw + zgenom load zsh-users/zsh-completions src + + # generate the init script from plugins above + zgenom save + zgenom compile "$HOME/.zshrc" +fi + +source ~/.config/zsh/koehr.theme.zsh +setopt HIST_IGNORE_DUPS + +COMPLETION_WAITING_DOTS="true" +ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) +ZSH_HIGHLIGHT_PATTERNS+=('rm -fr*' 'fg=white,bold,bg=red') + +source ~/.profile diff --git a/dot.profile b/dot.profile index 0135b74..6c5ae84 100644 --- a/dot.profile +++ b/dot.profile @@ -1,6 +1,6 @@ source /etc/profile -export EDITOR=kak +export EDITOR=hx export FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:darkening-parameters=500,300,1000,200,1500,100,2000,0 autofitter:warping=1" export INFINALITY_FT_FILTER_PARAMS='10 35 40 35 10' alias wttr="curl wttr.in" @@ -22,15 +22,13 @@ if [[ "$TTY" == "/dev/tty"* ]] then setfont drdos8x14 fi -. "$HOME/.cargo/env" -export CARGO_HOME=$HOME/.cargo export PNPM_HOME="$HOME/.local/share/pnpm" export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -export PATH=$HOME/.local/bin:$HOME/.yarn/bin:$PNPM_HOME:$GOPATH/bin:$CARGO_HOME/bin:$PATH +export PATH=$HOME/.local/bin:$PATH export MANPATH=$HOME/.local/share/man:/usr/share/man:/usr/local/share/man TODO="$HOME/TODO/`date '+%Y%m%d'`.todo.txt" diff --git a/dot.tmux.conf b/dot.tmux.conf index 4459802..a5b8afe 100644 --- a/dot.tmux.conf +++ b/dot.tmux.conf @@ -1,89 +1 @@ -set -g default-terminal "st-256color" -set -ga terminal-overrides ",st-256color:Tc" -set -g escape-time 0 -set -g mouse on - -unbind C-b -unbind C-a -unbind Space -unbind C-Space -unbind r -unbind Tab - -set -g prefix C-a -bind C-a send-prefix - -bind-key C-a last-window -bind-key Space next-window -bind-key C-Space previous-window - -bind-key Tab select-pane -t :.+ \; swap-pane -U - -bind r source-file ~/.tmux.conf - -# set inactive/active window styles -set -g window-style 'fg=colour247,bg=colour233' -set -g window-active-style 'fg=colour244,bg=colour234' - -set-window-option -g xterm-keys on -# allow set-titles to change the window title under st -# http://opennomad.com/content/goodbye-screen-hello-tmux -# http://stackoverflow.com/questions/15195624 -set-option -ga terminal-overrides ',st-256color:smkx=\E=' - - -# status bar -set -g status-style fg=colour208,bg=colour237 -# set-option -g status-attr default -set-option -g status-position bottom -set-option -g status-interval 60 -set-option -g status-bg default -set-option -g status-fg white - -# Left side of status bar -set-option -g status-left-length 10 -#set-option -g status-left "#[fg=brightwhite,bg=colour234] #S #[fg=default,bg=default] " -set-option -g status-left '#{?client_prefix,#[bg=colour62]  ,#[bg=colour234] #S }#[fg=default,bg=default] ' - -# Window status -set-option -g window-status-format "#[fg=white,bg=colour234] #I #[fg=white,bg=colour234] #W " -set-option -g window-status-current-format "#[fg=brightwhite,bg=colour62] #I #[fg=brightwhite,bg=colour234] #W " -set-option -g window-status-separator " " -set-option -g status-justify left - -# Right side of status bar -set-option -g status-right-length 80 -WEATHER='#(curl -s wttr.in/Berlin\?format\="%%t+%%C+%%w+%%m")' -set-option -g status-right "#[fg=brightwhite,bg=colour62]🌡 BER #[fg=brightwhite,bg=colour234] $WEATHER #[fg=brightwhite,bg=colour62]  #[fg=brightwhite,bg=colour234] #(whoami)@#h " - -# pane border -set -g pane-border-style fg=colour238,bg=colour235 -set -g pane-active-border-style fg=colour62,bg=colour236 - -# Pane number indicator -set-option -g display-panes-colour colour234 -set-option -g display-panes-active-colour brightwhite - -# Clock mode -# set-option -g clock-mode-colour white -# set-option -g clock-mode-style 24 - -# Message -set -g message-style fg=default,bg=default - -# Activity -set-option -g monitor-activity on -set-option -g monitor-silence 0 -set-option -g monitor-bell on -set-option -g activity-action other -set-option -g visual-activity on - -# Window numbering -set-option -g base-index 1 -set-option -g pane-base-index 1 -set-option -g renumber-windows on - -# select default layout -set-option -g main-pane-width 65 -set-option -g main-pane-height 65 -bind Enter select-layout main-vertical +source-file ~/.config/tmux/config diff --git a/dot.zsh/kitty.compl.zsh b/dot.zsh/kitty.compl.zsh deleted file mode 100644 index baf1c17..0000000 --- a/dot.zsh/kitty.compl.zsh +++ /dev/null @@ -1,12 +0,0 @@ - -_kitty() { - local src - # Send all words up to the word the cursor is currently on - src=$(printf "%s -" "${(@)words[1,$CURRENT]}" | kitty +complete zsh) - if [[ $? == 0 ]]; then - eval ${src} - fi -} -compdef _kitty kitty - diff --git a/dot.zshrc b/dot.zshrc index a30cb1d..55186d2 100644 --- a/dot.zshrc +++ b/dot.zshrc @@ -1,39 +1 @@ -bindkey -v -source ~/pkg/zgen/zgen.zsh -source ~/.zsh/kitty.compl.zsh - -if ! zgen saved; then - echo "running zgen" - - zgen oh-my-zsh - zgen oh-my-zsh plugins/extract - zgen oh-my-zsh plugins/pj - zgen oh-my-zsh plugins/encode64 - zgen oh-my-zsh plugins/urltools - zgen oh-my-zsh plugins/nvm - - zgen load zsh-users/zsh-syntax-highlighting - zgen load zsh-users/zaw - zgen load zsh-users/zsh-completions src - - zgen save -fi -source ~/.zsh/koehr.theme.zsh -setopt HIST_IGNORE_DUPS - -COMPLETION_WAITING_DOTS="true" -ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) -ZSH_HIGHLIGHT_PATTERNS+=('rm -fr*' 'fg=white,bold,bg=red') -ZSH_HIGHLIGHT_PATTERNS+=('rm -rf*' 'fg=white,bold,bg=red') - -PROJECT_PATHS=(~/src/Spenoki ~/src/koehr ~/src/pkg/) - -# The next line updates PATH for the Google Cloud SDK. -if [ -f '/home/nk/src/pkg/google-cloud-sdk/path.zsh.inc' ]; then . '/home/nk/src/pkg/google-cloud-sdk/path.zsh.inc'; fi - -# The next line enables shell command completion for gcloud. -if [ -f '/home/nk/src/pkg/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/nk/src/pkg/google-cloud-sdk/completion.zsh.inc'; fi - -source ~/.profile - -export PATH="/home/nk/.local/opt/deta/bin:$PATH" +source ~/.config/zsh/zshrc diff --git a/dwm/config.h b/dwm/config.h deleted file mode 100644 index 1f71166..0000000 --- a/dwm/config.h +++ /dev/null @@ -1,147 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#include - -/* appearance */ -static const unsigned int borderpx = 1; /* border pixel of windows */ -static const unsigned int snap = 32; /* snap pixel */ -static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ -static const unsigned int systrayspacing = 2; /* systray spacing */ -static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ -static const int showsystray = 1; /* 0 means no systray */ -static const int showbar = 1; /* 0 means no bar */ -static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = { "Monofur Nerd Font:size=14" }; -static const char dmenufont[] = "Monofur Nerd Font:size=14"; -static const char col_gray1[] = "#222222"; -static const char col_gray2[] = "#444444"; -static const char col_gray3[] = "#bbbbbb"; -static const char col_gray4[] = "#eeeeee"; -static const char col_highlight[] = "#5f5fd7"; -static const char *colors[][3] = { - /* fg bg border */ - [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, - [SchemeSel] = { col_gray4, col_highlight, col_highlight }, -}; - -/* tagging */ -static const char *tags[] = { "", "", "", "▱", "▱", "▱", "▱", "▱", "▱" }; - -static const Rule rules[] = { - /* xprop(1): - * WM_CLASS(STRING) = instance, class - * WM_NAME(STRING) = title - */ - /* class instance title tags mask isfloating monitor */ - { "Gimp", NULL, NULL, 0, 1, -1 }, - { "Firefox", NULL, NULL, 1 << 1, 0, -1 }, - { "Chromium", NULL, NULL, 1 << 2, 0, -1 }, -}; - -/* layout(s) */ -static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ -static const int nmaster = 1; /* number of clients in master area */ -static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ - -static const Layout layouts[] = { - /* symbol arrange function */ - { "⊏≡", tile }, /* first entry is default */ - { "", NULL }, /* no layout function means floating behavior */ - { "", monocle }, -}; - -/* key definitions */ -#define MODKEY Mod4Mask -#define TAGKEYS(KEY,TAG) \ - { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ - { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, - -/* helper for spawning shell commands in the pre dwm-5.0 fashion */ -#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } - -/* commands */ -static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -// static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_highlight, "-sf", col_gray4, NULL }; -static const char *dmenucmd[] = { "rofi", "-show", "run", NULL }; -static const char *calccmd[] = { "rofi", "-show", "calc", "-modi", "calc", "-no-show-match", "-no-sort", NULL }; -static const char *pwdcmd[] = { "bwmenu", NULL }; -static const char *termcmd[] = { "st", "-f", dmenufont, "-e", "tmux", "new-session", "-A", NULL }; -static const char *lockcmd[] = { "slock", NULL }; -static const char *sleepcmd[] = { "sudo", "zzz", NULL }; -static const char *backlightInc[] = { "xbacklight", "-inc", "10", NULL }; -static const char *backlightDec[] = { "xbacklight", "-dec", "10", NULL }; -static const char *volumeInc[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+1500", NULL }; -static const char *volumeDec[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-1500", NULL }; -static const char *volumeMute[] = { "pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL }; - -static Key keys[] = { - /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_p, spawn, {.v = pwdcmd } }, - { MODKEY, XK_c, spawn, {.v = calccmd } }, - { MODKEY, XK_Return, spawn, {.v = termcmd } }, - { MODKEY, XK_Escape, spawn, {.v = lockcmd } }, - - { 0, XF86XK_Sleep, spawn, {.v = sleepcmd } }, - { 0, XF86XK_MonBrightnessUp, spawn, {.v = backlightInc} }, - { 0, XF86XK_MonBrightnessDown, spawn, {.v = backlightDec} }, - { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volumeInc} }, - { 0, XF86XK_AudioLowerVolume, spawn, {.v = volumeDec} }, - { 0, XF86XK_AudioMute, spawn, {.v = volumeMute} }, - - { MODKEY, XK_b, togglebar, {0} }, - { MODKEY, XK_Left, focusstack, {.i = +1 } }, - { MODKEY, XK_Right, focusstack, {.i = -1 } }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, - { MODKEY, XK_d, incnmaster, {.i = -1 } }, - { MODKEY, XK_Down, setmfact, {.f = -0.10} }, - { MODKEY, XK_Up, setmfact, {.f = +0.10} }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, - { MODKEY|ShiftMask, XK_Return, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY|ShiftMask, XK_c, killclient, {0} }, - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, - TAGKEYS( XK_1, 0) - TAGKEYS( XK_2, 1) - TAGKEYS( XK_3, 2) - TAGKEYS( XK_4, 3) - TAGKEYS( XK_5, 4) - TAGKEYS( XK_6, 5) - TAGKEYS( XK_7, 6) - TAGKEYS( XK_8, 7) - TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_r, quit, {1} }, // restart dwm - { MODKEY|ShiftMask, XK_q, quit, {0} }, // quit dwm -}; - -/* button definitions */ -/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ -static Button buttons[] = { - /* click event mask button function argument */ - { ClkLtSymbol, 0, Button1, setlayout, {0} }, - { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, - { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, - { ClkClientWin, MODKEY, Button1, movemouse, {0} }, - { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, - { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, - { ClkTagBar, 0, Button1, view, {0} }, - { ClkTagBar, 0, Button3, toggleview, {0} }, - { ClkTagBar, MODKEY, Button1, tag, {0} }, - { ClkTagBar, MODKEY, Button3, toggletag, {0} }, -}; - diff --git a/dwm/config.mk b/dwm/config.mk deleted file mode 100644 index 7724b60..0000000 --- a/dwm/config.mk +++ /dev/null @@ -1,38 +0,0 @@ -# dwm version -VERSION = 6.2-nk5-patched - -# Customize below to fit your system - -# paths -PREFIX = ${HOME}/.local -MANPREFIX = ${PREFIX}/share/man - -X11INC = /usr/include/xorg -X11LIB = /usr/lib/xorg - -# Xinerama, comment if you don't want it -XINERAMALIBS = -lXinerama -XINERAMAFLAGS = -DXINERAMA - -# freetype -FREETYPELIBS = -lfontconfig -lXft -FREETYPEINC = /usr/include/freetype2 -# OpenBSD (uncomment) -#FREETYPEINC = ${X11INC}/freetype2 - -# includes and libs -INCS = -I${X11INC} -I${FREETYPEINC} -LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} - -# flags -CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} -CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} -LDFLAGS = ${LIBS} - -# Solaris -#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" -#LDFLAGS = ${LIBS} - -# compiler and linker -CC = cc diff --git a/dwm/patches/dwm-status2d-20200508-60bb3df.diff b/dwm/patches/dwm-status2d-20200508-60bb3df.diff deleted file mode 100644 index 6f353fd..0000000 --- a/dwm/patches/dwm-status2d-20200508-60bb3df.diff +++ /dev/null @@ -1,180 +0,0 @@ -From 60bb3dfaf91227eb02e828d74e6f4758b2c56542 Mon Sep 17 00:00:00 2001 -From: cultab -Date: Fri, 8 May 2020 13:56:08 +0300 -Subject: [PATCH] fix status2d to work after ed3ab6 - -ed3ab6 changed the name of the variable sw to tw, now the patch won't apply nor work. -This patch updates the variable name to the new one. ---- - dwm.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 114 insertions(+), 6 deletions(-) - -diff --git a/dwm.c b/dwm.c -index 9fd0286..71e18be 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -163,6 +163,7 @@ static void detachstack(Client *c); - static Monitor *dirtomon(int dir); - static void drawbar(Monitor *m); - static void drawbars(void); -+static int drawstatusbar(Monitor *m, int bh, char* text); - static void enternotify(XEvent *e); - static void expose(XEvent *e); - static void focus(Client *c); -@@ -237,7 +238,7 @@ static void zoom(const Arg *arg); - - /* variables */ - static const char broken[] = "broken"; --static char stext[256]; -+static char stext[1024]; - static int screen; - static int sw, sh; /* X display screen geometry width, height */ - static int bh, blw = 0; /* bar geometry */ -@@ -485,7 +486,7 @@ cleanup(void) - cleanupmon(mons); - for (i = 0; i < CurLast; i++) - drw_cur_free(drw, cursor[i]); -- for (i = 0; i < LENGTH(colors); i++) -+ for (i = 0; i < LENGTH(colors) + 1; i++) - free(scheme[i]); - XDestroyWindow(dpy, wmcheckwin); - drw_free(drw); -@@ -693,6 +694,114 @@ dirtomon(int dir) - return m; - } - -+int -+drawstatusbar(Monitor *m, int bh, char* stext) { -+ int ret, i, w, x, len; -+ short isCode = 0; -+ char *text; -+ char *p; -+ -+ len = strlen(stext) + 1 ; -+ if (!(text = (char*) malloc(sizeof(char)*len))) -+ die("malloc"); -+ p = text; -+ memcpy(text, stext, len); -+ -+ /* compute width of the status text */ -+ w = 0; -+ i = -1; -+ while (text[++i]) { -+ if (text[i] == '^') { -+ if (!isCode) { -+ isCode = 1; -+ text[i] = '\0'; -+ w += TEXTW(text) - lrpad; -+ text[i] = '^'; -+ if (text[++i] == 'f') -+ w += atoi(text + ++i); -+ } else { -+ isCode = 0; -+ text = text + i + 1; -+ i = -1; -+ } -+ } -+ } -+ if (!isCode) -+ w += TEXTW(text) - lrpad; -+ else -+ isCode = 0; -+ text = p; -+ -+ w += 2; /* 1px padding on both sides */ -+ ret = x = m->ww - w; -+ -+ drw_setscheme(drw, scheme[LENGTH(colors)]); -+ drw->scheme[ColFg] = scheme[SchemeNorm][ColFg]; -+ drw->scheme[ColBg] = scheme[SchemeNorm][ColBg]; -+ drw_rect(drw, x, 0, w, bh, 1, 1); -+ x++; -+ -+ /* process status text */ -+ i = -1; -+ while (text[++i]) { -+ if (text[i] == '^' && !isCode) { -+ isCode = 1; -+ -+ text[i] = '\0'; -+ w = TEXTW(text) - lrpad; -+ drw_text(drw, x, 0, w, bh, 0, text, 0); -+ -+ x += w; -+ -+ /* process code */ -+ while (text[++i] != '^') { -+ if (text[i] == 'c') { -+ char buf[8]; -+ memcpy(buf, (char*)text+i+1, 7); -+ buf[7] = '\0'; -+ drw_clr_create(drw, &drw->scheme[ColFg], buf); -+ i += 7; -+ } else if (text[i] == 'b') { -+ char buf[8]; -+ memcpy(buf, (char*)text+i+1, 7); -+ buf[7] = '\0'; -+ drw_clr_create(drw, &drw->scheme[ColBg], buf); -+ i += 7; -+ } else if (text[i] == 'd') { -+ drw->scheme[ColFg] = scheme[SchemeNorm][ColFg]; -+ drw->scheme[ColBg] = scheme[SchemeNorm][ColBg]; -+ } else if (text[i] == 'r') { -+ int rx = atoi(text + ++i); -+ while (text[++i] != ','); -+ int ry = atoi(text + ++i); -+ while (text[++i] != ','); -+ int rw = atoi(text + ++i); -+ while (text[++i] != ','); -+ int rh = atoi(text + ++i); -+ -+ drw_rect(drw, rx + x, ry, rw, rh, 1, 0); -+ } else if (text[i] == 'f') { -+ x += atoi(text + ++i); -+ } -+ } -+ -+ text = text + i + 1; -+ i=-1; -+ isCode = 0; -+ } -+ } -+ -+ if (!isCode) { -+ w = TEXTW(text) - lrpad; -+ drw_text(drw, x, 0, w, bh, 0, text, 0); -+ } -+ -+ drw_setscheme(drw, scheme[SchemeNorm]); -+ free(p); -+ -+ return ret; -+} -+ - void - drawbar(Monitor *m) - { -@@ -704,9 +813,7 @@ drawbar(Monitor *m) - - /* draw status first so it can be overdrawn by tags later */ - if (m == selmon) { /* status is only drawn on selected monitor */ -- drw_setscheme(drw, scheme[SchemeNorm]); -- tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */ -- drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0); -+ tw = m->ww - drawstatusbar(m, bh, stext); - } - - for (c = m->clients; c; c = c->next) { -@@ -1568,7 +1675,8 @@ setup(void) - cursor[CurResize] = drw_cur_create(drw, XC_sizing); - cursor[CurMove] = drw_cur_create(drw, XC_fleur); - /* init appearance */ -- scheme = ecalloc(LENGTH(colors), sizeof(Clr *)); -+ scheme = ecalloc(LENGTH(colors) + 1, sizeof(Clr *)); -+ scheme[LENGTH(colors)] = drw_scm_create(drw, colors[0], 3); - for (i = 0; i < LENGTH(colors); i++) - scheme[i] = drw_scm_create(drw, colors[i], 3); - /* init bars */ --- -2.26.2 - diff --git a/dwm/patches/dwm-status2d-swap-save-restore-6.2.diff b/dwm/patches/dwm-status2d-swap-save-restore-6.2.diff deleted file mode 100644 index b4b60ec..0000000 --- a/dwm/patches/dwm-status2d-swap-save-restore-6.2.diff +++ /dev/null @@ -1,44 +0,0 @@ -From dfd158c8dea87a0a4dbc5b2eda7c096069d1484a Mon Sep 17 00:00:00 2001 -From: tdu -Date: Wed, 26 Aug 2020 18:50:09 +0300 -Subject: [PATCH] Add the following tags for the status2d patch: ^w^ - - Swaps bg/fg color. ^v^ - Saves the current fg/bg color. ^t^ - Restores - the previously saved bg/fg color. - ---- - dwm.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/dwm.c b/dwm.c -index 931044f..de07b66 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -699,6 +699,7 @@ drawstatusbar(Monitor *m, int bh, char* stext) { - short isCode = 0; - char *text; - char *p; -+ Clr oldbg, oldfg; - - len = strlen(stext) + 1 ; - if (!(text = (char*) malloc(sizeof(char)*len))) -@@ -769,6 +770,17 @@ drawstatusbar(Monitor *m, int bh, char* stext) { - } else if (text[i] == 'd') { - drw->scheme[ColFg] = scheme[SchemeNorm][ColFg]; - drw->scheme[ColBg] = scheme[SchemeNorm][ColBg]; -+ } else if (text[i] == 'w') { -+ Clr swp; -+ swp = drw->scheme[ColFg]; -+ drw->scheme[ColFg] = drw->scheme[ColBg]; -+ drw->scheme[ColBg] = swp; -+ } else if (text[i] == 'v') { -+ oldfg = drw->scheme[ColFg]; -+ oldbg = drw->scheme[ColBg]; -+ } else if (text[i] == 't') { -+ drw->scheme[ColFg] = oldfg; -+ drw->scheme[ColBg] = oldbg; - } else if (text[i] == 'r') { - int rx = atoi(text + ++i); - while (text[++i] != ','); --- -2.28.0 - diff --git a/dwm/patches/dwm-systray-20200914-61bb8b2.diff b/dwm/patches/dwm-systray-20200914-61bb8b2.diff deleted file mode 100644 index b2a4d57..0000000 --- a/dwm/patches/dwm-systray-20200914-61bb8b2.diff +++ /dev/null @@ -1,727 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 1c0b587..2d824d1 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -3,6 +3,10 @@ - /* appearance */ - static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ -+static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ -+static const unsigned int systrayspacing = 2; /* systray spacing */ -+static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ -+static const int showsystray = 1; /* 0 means no systray */ - static const int showbar = 1; /* 0 means no bar */ - static const int topbar = 1; /* 0 means bottom bar */ - static const char *fonts[] = { "monospace:size=10" }; -diff --git a/dwm.c b/dwm.c -index 664c527..abce13d 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -57,12 +57,30 @@ - #define TAGMASK ((1 << LENGTH(tags)) - 1) - #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) - -+#define SYSTEM_TRAY_REQUEST_DOCK 0 -+ -+/* XEMBED messages */ -+#define XEMBED_EMBEDDED_NOTIFY 0 -+#define XEMBED_WINDOW_ACTIVATE 1 -+#define XEMBED_FOCUS_IN 4 -+#define XEMBED_MODALITY_ON 10 -+ -+#define XEMBED_MAPPED (1 << 0) -+#define XEMBED_WINDOW_ACTIVATE 1 -+#define XEMBED_WINDOW_DEACTIVATE 2 -+ -+#define VERSION_MAJOR 0 -+#define VERSION_MINOR 0 -+#define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR -+ - /* enums */ - enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ - enum { SchemeNorm, SchemeSel }; /* color schemes */ - enum { NetSupported, NetWMName, NetWMState, NetWMCheck, -+ NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz, - NetWMFullscreen, NetActiveWindow, NetWMWindowType, - NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ -+enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */ - enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */ - enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, - ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ -@@ -141,6 +159,12 @@ typedef struct { - int monitor; - } Rule; - -+typedef struct Systray Systray; -+struct Systray { -+ Window win; -+ Client *icons; -+}; -+ - /* function declarations */ - static void applyrules(Client *c); - static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); -@@ -172,6 +196,7 @@ static void focusstack(const Arg *arg); - static Atom getatomprop(Client *c, Atom prop); - static int getrootptr(int *x, int *y); - static long getstate(Window w); -+static unsigned int getsystraywidth(); - static int gettextprop(Window w, Atom atom, char *text, unsigned int size); - static void grabbuttons(Client *c, int focused); - static void grabkeys(void); -@@ -189,13 +214,16 @@ static void pop(Client *); - static void propertynotify(XEvent *e); - static void quit(const Arg *arg); - static Monitor *recttomon(int x, int y, int w, int h); -+static void removesystrayicon(Client *i); - static void resize(Client *c, int x, int y, int w, int h, int interact); -+static void resizebarwin(Monitor *m); - static void resizeclient(Client *c, int x, int y, int w, int h); - static void resizemouse(const Arg *arg); -+static void resizerequest(XEvent *e); - static void restack(Monitor *m); - static void run(void); - static void scan(void); --static int sendevent(Client *c, Atom proto); -+static int sendevent(Window w, Atom proto, int m, long d0, long d1, long d2, long d3, long d4); - static void sendmon(Client *c, Monitor *m); - static void setclientstate(Client *c, long state); - static void setfocus(Client *c); -@@ -207,6 +235,7 @@ static void seturgent(Client *c, int urg); - static void showhide(Client *c); - static void sigchld(int unused); - static void spawn(const Arg *arg); -+static Monitor *systraytomon(Monitor *m); - static void tag(const Arg *arg); - static void tagmon(const Arg *arg); - static void tile(Monitor *); -@@ -224,18 +253,23 @@ static int updategeom(void); - static void updatenumlockmask(void); - static void updatesizehints(Client *c); - static void updatestatus(void); -+static void updatesystray(void); -+static void updatesystrayicongeom(Client *i, int w, int h); -+static void updatesystrayiconstate(Client *i, XPropertyEvent *ev); - static void updatetitle(Client *c); - static void updatewindowtype(Client *c); - static void updatewmhints(Client *c); - static void view(const Arg *arg); - static Client *wintoclient(Window w); - static Monitor *wintomon(Window w); -+static Client *wintosystrayicon(Window w); - static int xerror(Display *dpy, XErrorEvent *ee); - static int xerrordummy(Display *dpy, XErrorEvent *ee); - static int xerrorstart(Display *dpy, XErrorEvent *ee); - static void zoom(const Arg *arg); - - /* variables */ -+static Systray *systray = NULL; - static const char broken[] = "broken"; - static char stext[256]; - static int screen; -@@ -258,9 +292,10 @@ static void (*handler[LASTEvent]) (XEvent *) = { - [MapRequest] = maprequest, - [MotionNotify] = motionnotify, - [PropertyNotify] = propertynotify, -+ [ResizeRequest] = resizerequest, - [UnmapNotify] = unmapnotify - }; --static Atom wmatom[WMLast], netatom[NetLast]; -+static Atom wmatom[WMLast], netatom[NetLast], xatom[XLast]; - static int running = 1; - static Cur *cursor[CurLast]; - static Clr **scheme; -@@ -440,7 +475,7 @@ buttonpress(XEvent *e) - arg.ui = 1 << i; - } else if (ev->x < x + blw) - click = ClkLtSymbol; -- else if (ev->x > selmon->ww - (int)TEXTW(stext)) -+ else if (ev->x > selmon->ww - (int)TEXTW(stext) - getsystraywidth()) - click = ClkStatusText; - else - click = ClkWinTitle; -@@ -483,6 +518,11 @@ cleanup(void) - XUngrabKey(dpy, AnyKey, AnyModifier, root); - while (mons) - cleanupmon(mons); -+ if (showsystray) { -+ XUnmapWindow(dpy, systray->win); -+ XDestroyWindow(dpy, systray->win); -+ free(systray); -+ } - for (i = 0; i < CurLast; i++) - drw_cur_free(drw, cursor[i]); - for (i = 0; i < LENGTH(colors); i++) -@@ -513,9 +553,57 @@ cleanupmon(Monitor *mon) - void - clientmessage(XEvent *e) - { -+ XWindowAttributes wa; -+ XSetWindowAttributes swa; - XClientMessageEvent *cme = &e->xclient; - Client *c = wintoclient(cme->window); - -+ if (showsystray && cme->window == systray->win && cme->message_type == netatom[NetSystemTrayOP]) { -+ /* add systray icons */ -+ if (cme->data.l[1] == SYSTEM_TRAY_REQUEST_DOCK) { -+ if (!(c = (Client *)calloc(1, sizeof(Client)))) -+ die("fatal: could not malloc() %u bytes\n", sizeof(Client)); -+ if (!(c->win = cme->data.l[2])) { -+ free(c); -+ return; -+ } -+ c->mon = selmon; -+ c->next = systray->icons; -+ systray->icons = c; -+ if (!XGetWindowAttributes(dpy, c->win, &wa)) { -+ /* use sane defaults */ -+ wa.width = bh; -+ wa.height = bh; -+ wa.border_width = 0; -+ } -+ c->x = c->oldx = c->y = c->oldy = 0; -+ c->w = c->oldw = wa.width; -+ c->h = c->oldh = wa.height; -+ c->oldbw = wa.border_width; -+ c->bw = 0; -+ c->isfloating = True; -+ /* reuse tags field as mapped status */ -+ c->tags = 1; -+ updatesizehints(c); -+ updatesystrayicongeom(c, wa.width, wa.height); -+ XAddToSaveSet(dpy, c->win); -+ XSelectInput(dpy, c->win, StructureNotifyMask | PropertyChangeMask | ResizeRedirectMask); -+ XReparentWindow(dpy, c->win, systray->win, 0, 0); -+ /* use parents background color */ -+ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; -+ XChangeWindowAttributes(dpy, c->win, CWBackPixel, &swa); -+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_EMBEDDED_NOTIFY, 0 , systray->win, XEMBED_EMBEDDED_VERSION); -+ /* FIXME not sure if I have to send these events, too */ -+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_FOCUS_IN, 0 , systray->win, XEMBED_EMBEDDED_VERSION); -+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0 , systray->win, XEMBED_EMBEDDED_VERSION); -+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_MODALITY_ON, 0 , systray->win, XEMBED_EMBEDDED_VERSION); -+ XSync(dpy, False); -+ resizebarwin(selmon); -+ updatesystray(); -+ setclientstate(c, NormalState); -+ } -+ return; -+ } - if (!c) - return; - if (cme->message_type == netatom[NetWMState]) { -@@ -568,7 +656,7 @@ configurenotify(XEvent *e) - for (c = m->clients; c; c = c->next) - if (c->isfullscreen) - resizeclient(c, m->mx, m->my, m->mw, m->mh); -- XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); -+ resizebarwin(m); - } - focus(NULL); - arrange(NULL); -@@ -653,6 +741,11 @@ destroynotify(XEvent *e) - - if ((c = wintoclient(ev->window))) - unmanage(c, 1); -+ else if ((c = wintosystrayicon(ev->window))) { -+ removesystrayicon(c); -+ resizebarwin(selmon); -+ updatesystray(); -+ } - } - - void -@@ -696,19 +789,23 @@ dirtomon(int dir) - void - drawbar(Monitor *m) - { -- int x, w, tw = 0; -+ int x, w, tw = 0, stw = 0; - int boxs = drw->fonts->h / 9; - int boxw = drw->fonts->h / 6 + 2; - unsigned int i, occ = 0, urg = 0; - Client *c; - -+ if(showsystray && m == systraytomon(m)) -+ stw = getsystraywidth(); -+ - /* draw status first so it can be overdrawn by tags later */ - if (m == selmon) { /* status is only drawn on selected monitor */ - drw_setscheme(drw, scheme[SchemeNorm]); -- tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */ -- drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0); -+ tw = TEXTW(stext) - lrpad / 2 + 2; /* 2px right padding */ -+ drw_text(drw, m->ww - tw - stw, 0, tw, bh, lrpad / 2 - 2, stext, 0); - } - -+ resizebarwin(m); - for (c = m->clients; c; c = c->next) { - occ |= c->tags; - if (c->isurgent) -@@ -729,7 +826,7 @@ drawbar(Monitor *m) - drw_setscheme(drw, scheme[SchemeNorm]); - x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); - -- if ((w = m->ww - tw - x) > bh) { -+ if ((w = m->ww - tw - stw - x) > bh) { - if (m->sel) { - drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); -@@ -740,7 +837,7 @@ drawbar(Monitor *m) - drw_rect(drw, x, 0, w, bh, 1, 1); - } - } -- drw_map(drw, m->barwin, 0, 0, m->ww, bh); -+ drw_map(drw, m->barwin, 0, 0, m->ww - stw, bh); - } - - void -@@ -777,8 +874,11 @@ expose(XEvent *e) - Monitor *m; - XExposeEvent *ev = &e->xexpose; - -- if (ev->count == 0 && (m = wintomon(ev->window))) -+ if (ev->count == 0 && (m = wintomon(ev->window))) { - drawbar(m); -+ if (m == selmon) -+ updatesystray(); -+ } - } - - void -@@ -863,10 +963,17 @@ getatomprop(Client *c, Atom prop) - unsigned long dl; - unsigned char *p = NULL; - Atom da, atom = None; -+ /* FIXME getatomprop should return the number of items and a pointer to -+ * the stored data instead of this workaround */ -+ Atom req = XA_ATOM; -+ if (prop == xatom[XembedInfo]) -+ req = xatom[XembedInfo]; - -- if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM, -+ if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, req, - &da, &di, &dl, &dl, &p) == Success && p) { - atom = *(Atom *)p; -+ if (da == xatom[XembedInfo] && dl == 2) -+ atom = ((Atom *)p)[1]; - XFree(p); - } - return atom; -@@ -900,6 +1007,16 @@ getstate(Window w) - return result; - } - -+unsigned int -+getsystraywidth() -+{ -+ unsigned int w = 0; -+ Client *i; -+ if(showsystray) -+ for(i = systray->icons; i; w += i->w + systrayspacing, i = i->next) ; -+ return w ? w + systrayspacing : 1; -+} -+ - int - gettextprop(Window w, Atom atom, char *text, unsigned int size) - { -@@ -1004,7 +1121,7 @@ killclient(const Arg *arg) - { - if (!selmon->sel) - return; -- if (!sendevent(selmon->sel, wmatom[WMDelete])) { -+ if (!sendevent(selmon->sel->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0 , 0, 0)) { - XGrabServer(dpy); - XSetErrorHandler(xerrordummy); - XSetCloseDownMode(dpy, DestroyAll); -@@ -1092,6 +1209,12 @@ maprequest(XEvent *e) - { - static XWindowAttributes wa; - XMapRequestEvent *ev = &e->xmaprequest; -+ Client *i; -+ if ((i = wintosystrayicon(ev->window))) { -+ sendevent(i->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0, systray->win, XEMBED_EMBEDDED_VERSION); -+ resizebarwin(selmon); -+ updatesystray(); -+ } - - if (!XGetWindowAttributes(dpy, ev->window, &wa)) - return; -@@ -1216,6 +1339,16 @@ propertynotify(XEvent *e) - Window trans; - XPropertyEvent *ev = &e->xproperty; - -+ if ((c = wintosystrayicon(ev->window))) { -+ if (ev->atom == XA_WM_NORMAL_HINTS) { -+ updatesizehints(c); -+ updatesystrayicongeom(c, c->w, c->h); -+ } -+ else -+ updatesystrayiconstate(c, ev); -+ resizebarwin(selmon); -+ updatesystray(); -+ } - if ((ev->window == root) && (ev->atom == XA_WM_NAME)) - updatestatus(); - else if (ev->state == PropertyDelete) -@@ -1266,6 +1399,20 @@ recttomon(int x, int y, int w, int h) - return r; - } - -+void -+removesystrayicon(Client *i) -+{ -+ Client **ii; -+ -+ if (!showsystray || !i) -+ return; -+ for (ii = &systray->icons; *ii && *ii != i; ii = &(*ii)->next); -+ if (ii) -+ *ii = i->next; -+ free(i); -+} -+ -+ - void - resize(Client *c, int x, int y, int w, int h, int interact) - { -@@ -1273,6 +1420,14 @@ resize(Client *c, int x, int y, int w, int h, int interact) - resizeclient(c, x, y, w, h); - } - -+void -+resizebarwin(Monitor *m) { -+ unsigned int w = m->ww; -+ if (showsystray && m == systraytomon(m)) -+ w -= getsystraywidth(); -+ XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, w, bh); -+} -+ - void - resizeclient(Client *c, int x, int y, int w, int h) - { -@@ -1345,6 +1500,19 @@ resizemouse(const Arg *arg) - } - } - -+void -+resizerequest(XEvent *e) -+{ -+ XResizeRequestEvent *ev = &e->xresizerequest; -+ Client *i; -+ -+ if ((i = wintosystrayicon(ev->window))) { -+ updatesystrayicongeom(i, ev->width, ev->height); -+ resizebarwin(selmon); -+ updatesystray(); -+ } -+} -+ - void - restack(Monitor *m) - { -@@ -1434,26 +1602,36 @@ setclientstate(Client *c, long state) - } - - int --sendevent(Client *c, Atom proto) -+sendevent(Window w, Atom proto, int mask, long d0, long d1, long d2, long d3, long d4) - { - int n; -- Atom *protocols; -+ Atom *protocols, mt; - int exists = 0; - XEvent ev; - -- if (XGetWMProtocols(dpy, c->win, &protocols, &n)) { -- while (!exists && n--) -- exists = protocols[n] == proto; -- XFree(protocols); -+ if (proto == wmatom[WMTakeFocus] || proto == wmatom[WMDelete]) { -+ mt = wmatom[WMProtocols]; -+ if (XGetWMProtocols(dpy, w, &protocols, &n)) { -+ while (!exists && n--) -+ exists = protocols[n] == proto; -+ XFree(protocols); -+ } -+ } -+ else { -+ exists = True; -+ mt = proto; - } - if (exists) { - ev.type = ClientMessage; -- ev.xclient.window = c->win; -- ev.xclient.message_type = wmatom[WMProtocols]; -+ ev.xclient.window = w; -+ ev.xclient.message_type = mt; - ev.xclient.format = 32; -- ev.xclient.data.l[0] = proto; -- ev.xclient.data.l[1] = CurrentTime; -- XSendEvent(dpy, c->win, False, NoEventMask, &ev); -+ ev.xclient.data.l[0] = d0; -+ ev.xclient.data.l[1] = d1; -+ ev.xclient.data.l[2] = d2; -+ ev.xclient.data.l[3] = d3; -+ ev.xclient.data.l[4] = d4; -+ XSendEvent(dpy, w, False, mask, &ev); - } - return exists; - } -@@ -1467,7 +1645,7 @@ setfocus(Client *c) - XA_WINDOW, 32, PropModeReplace, - (unsigned char *) &(c->win), 1); - } -- sendevent(c, wmatom[WMTakeFocus]); -+ sendevent(c->win, wmatom[WMTakeFocus], NoEventMask, wmatom[WMTakeFocus], CurrentTime, 0, 0, 0); - } - - void -@@ -1556,6 +1734,10 @@ setup(void) - wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False); - netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); - netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); -+ netatom[NetSystemTray] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_S0", False); -+ netatom[NetSystemTrayOP] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_OPCODE", False); -+ netatom[NetSystemTrayOrientation] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION", False); -+ netatom[NetSystemTrayOrientationHorz] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION_HORZ", False); - netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); - netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False); - netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False); -@@ -1563,6 +1745,9 @@ setup(void) - netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); - netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False); - netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False); -+ xatom[Manager] = XInternAtom(dpy, "MANAGER", False); -+ xatom[Xembed] = XInternAtom(dpy, "_XEMBED", False); -+ xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False); - /* init cursors */ - cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr); - cursor[CurResize] = drw_cur_create(drw, XC_sizing); -@@ -1571,6 +1756,8 @@ setup(void) - scheme = ecalloc(LENGTH(colors), sizeof(Clr *)); - for (i = 0; i < LENGTH(colors); i++) - scheme[i] = drw_scm_create(drw, colors[i], 3); -+ /* init system tray */ -+ updatesystray(); - /* init bars */ - updatebars(); - updatestatus(); -@@ -1704,7 +1891,18 @@ togglebar(const Arg *arg) - { - selmon->showbar = !selmon->showbar; - updatebarpos(selmon); -- XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); -+ resizebarwin(selmon); -+ if (showsystray) { -+ XWindowChanges wc; -+ if (!selmon->showbar) -+ wc.y = -bh; -+ else if (selmon->showbar) { -+ wc.y = 0; -+ if (!selmon->topbar) -+ wc.y = selmon->mh - bh; -+ } -+ XConfigureWindow(dpy, systray->win, CWY, &wc); -+ } - arrange(selmon); - } - -@@ -1799,11 +1997,18 @@ unmapnotify(XEvent *e) - else - unmanage(c, 0); - } -+ else if ((c = wintosystrayicon(ev->window))) { -+ /* KLUDGE! sometimes icons occasionally unmap their windows, but do -+ * _not_ destroy them. We map those windows back */ -+ XMapRaised(dpy, c->win); -+ updatesystray(); -+ } - } - - void - updatebars(void) - { -+ unsigned int w; - Monitor *m; - XSetWindowAttributes wa = { - .override_redirect = True, -@@ -1814,10 +2019,15 @@ updatebars(void) - for (m = mons; m; m = m->next) { - if (m->barwin) - continue; -- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen), -+ w = m->ww; -+ if (showsystray && m == systraytomon(m)) -+ w -= getsystraywidth(); -+ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, w, bh, 0, DefaultDepth(dpy, screen), - CopyFromParent, DefaultVisual(dpy, screen), - CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); - XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor); -+ if (showsystray && m == systraytomon(m)) -+ XMapRaised(dpy, systray->win); - XMapRaised(dpy, m->barwin); - XSetClassHint(dpy, m->barwin, &ch); - } -@@ -1993,6 +2203,121 @@ updatestatus(void) - if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) - strcpy(stext, "dwm-"VERSION); - drawbar(selmon); -+ updatesystray(); -+} -+ -+void -+updatesystrayicongeom(Client *i, int w, int h) -+{ -+ if (i) { -+ i->h = bh; -+ if (w == h) -+ i->w = bh; -+ else if (h == bh) -+ i->w = w; -+ else -+ i->w = (int) ((float)bh * ((float)w / (float)h)); -+ applysizehints(i, &(i->x), &(i->y), &(i->w), &(i->h), False); -+ /* force icons into the systray dimensions if they don't want to */ -+ if (i->h > bh) { -+ if (i->w == i->h) -+ i->w = bh; -+ else -+ i->w = (int) ((float)bh * ((float)i->w / (float)i->h)); -+ i->h = bh; -+ } -+ } -+} -+ -+void -+updatesystrayiconstate(Client *i, XPropertyEvent *ev) -+{ -+ long flags; -+ int code = 0; -+ -+ if (!showsystray || !i || ev->atom != xatom[XembedInfo] || -+ !(flags = getatomprop(i, xatom[XembedInfo]))) -+ return; -+ -+ if (flags & XEMBED_MAPPED && !i->tags) { -+ i->tags = 1; -+ code = XEMBED_WINDOW_ACTIVATE; -+ XMapRaised(dpy, i->win); -+ setclientstate(i, NormalState); -+ } -+ else if (!(flags & XEMBED_MAPPED) && i->tags) { -+ i->tags = 0; -+ code = XEMBED_WINDOW_DEACTIVATE; -+ XUnmapWindow(dpy, i->win); -+ setclientstate(i, WithdrawnState); -+ } -+ else -+ return; -+ sendevent(i->win, xatom[Xembed], StructureNotifyMask, CurrentTime, code, 0, -+ systray->win, XEMBED_EMBEDDED_VERSION); -+} -+ -+void -+updatesystray(void) -+{ -+ XSetWindowAttributes wa; -+ XWindowChanges wc; -+ Client *i; -+ Monitor *m = systraytomon(NULL); -+ unsigned int x = m->mx + m->mw; -+ unsigned int w = 1; -+ -+ if (!showsystray) -+ return; -+ if (!systray) { -+ /* init systray */ -+ if (!(systray = (Systray *)calloc(1, sizeof(Systray)))) -+ die("fatal: could not malloc() %u bytes\n", sizeof(Systray)); -+ systray->win = XCreateSimpleWindow(dpy, root, x, m->by, w, bh, 0, 0, scheme[SchemeSel][ColBg].pixel); -+ wa.event_mask = ButtonPressMask | ExposureMask; -+ wa.override_redirect = True; -+ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; -+ XSelectInput(dpy, systray->win, SubstructureNotifyMask); -+ XChangeProperty(dpy, systray->win, netatom[NetSystemTrayOrientation], XA_CARDINAL, 32, -+ PropModeReplace, (unsigned char *)&netatom[NetSystemTrayOrientationHorz], 1); -+ XChangeWindowAttributes(dpy, systray->win, CWEventMask|CWOverrideRedirect|CWBackPixel, &wa); -+ XMapRaised(dpy, systray->win); -+ XSetSelectionOwner(dpy, netatom[NetSystemTray], systray->win, CurrentTime); -+ if (XGetSelectionOwner(dpy, netatom[NetSystemTray]) == systray->win) { -+ sendevent(root, xatom[Manager], StructureNotifyMask, CurrentTime, netatom[NetSystemTray], systray->win, 0, 0); -+ XSync(dpy, False); -+ } -+ else { -+ fprintf(stderr, "dwm: unable to obtain system tray.\n"); -+ free(systray); -+ systray = NULL; -+ return; -+ } -+ } -+ for (w = 0, i = systray->icons; i; i = i->next) { -+ /* make sure the background color stays the same */ -+ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; -+ XChangeWindowAttributes(dpy, i->win, CWBackPixel, &wa); -+ XMapRaised(dpy, i->win); -+ w += systrayspacing; -+ i->x = w; -+ XMoveResizeWindow(dpy, i->win, i->x, 0, i->w, i->h); -+ w += i->w; -+ if (i->mon != m) -+ i->mon = m; -+ } -+ w = w ? w + systrayspacing : 1; -+ x -= w; -+ XMoveResizeWindow(dpy, systray->win, x, m->by, w, bh); -+ wc.x = x; wc.y = m->by; wc.width = w; wc.height = bh; -+ wc.stack_mode = Above; wc.sibling = m->barwin; -+ XConfigureWindow(dpy, systray->win, CWX|CWY|CWWidth|CWHeight|CWSibling|CWStackMode, &wc); -+ XMapWindow(dpy, systray->win); -+ XMapSubwindows(dpy, systray->win); -+ /* redraw background */ -+ XSetForeground(dpy, drw->gc, scheme[SchemeNorm][ColBg].pixel); -+ XFillRectangle(dpy, systray->win, drw->gc, 0, 0, w, bh); -+ XSync(dpy, False); - } - - void -@@ -2060,6 +2385,16 @@ wintoclient(Window w) - return NULL; - } - -+Client * -+wintosystrayicon(Window w) { -+ Client *i = NULL; -+ -+ if (!showsystray || !w) -+ return i; -+ for (i = systray->icons; i && i->win != w; i = i->next) ; -+ return i; -+} -+ - Monitor * - wintomon(Window w) - { -@@ -2113,6 +2448,22 @@ xerrorstart(Display *dpy, XErrorEvent *ee) - return -1; - } - -+Monitor * -+systraytomon(Monitor *m) { -+ Monitor *t; -+ int i, n; -+ if(!systraypinning) { -+ if(!m) -+ return selmon; -+ return m == selmon ? m : NULL; -+ } -+ for(n = 1, t = mons; t && t->next; n++, t = t->next) ; -+ for(i = 1, t = mons; t && t->next && i < systraypinning; i++, t = t->next) ; -+ if(systraypinningfailfirst && n < systraypinning) -+ return mons; -+ return t; -+} -+ - void - zoom(const Arg *arg) - { diff --git a/slock/config.h b/slock/config.h deleted file mode 100644 index 9855e21..0000000 --- a/slock/config.h +++ /dev/null @@ -1,12 +0,0 @@ -/* user and group to drop privileges to */ -static const char *user = "nobody"; -static const char *group = "nogroup"; - -static const char *colorname[NUMCOLS] = { - [INIT] = "black", /* after initialization */ - [INPUT] = "#005577", /* during input */ - [FAILED] = "#CC3333", /* wrong password */ -}; - -/* treat a cleared input like a wrong password (color) */ -static const int failonclear = 1; diff --git a/slock/config.mk b/slock/config.mk deleted file mode 100644 index 32f1962..0000000 --- a/slock/config.mk +++ /dev/null @@ -1,33 +0,0 @@ -# slock version -VERSION = 1.4 - -# Customize below to fit your system - -# paths -PREFIX = ${HOME}/.local -MANPREFIX = ${PREFIX}/share/man - -X11INC = /usr/include/xorg -X11LIB = /usr/lib/xorg -PIXMANINC = /usr/include/pixman-1 - -# includes and libs -INCS = -I. -I/usr/include -I${X11INC} -I${PIXMANINC} -LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext -lXrandr - -# flags -CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -DHAVE_SHADOW_H -CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} -LDFLAGS = -s ${LIBS} -COMPATSRC = explicit_bzero.c - -# On OpenBSD and Darwin remove -lcrypt from LIBS -#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXext -lXrandr -# On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS -# On NetBSD add -D_NETBSD_SOURCE to CPPFLAGS -#CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_NETBSD_SOURCE -# On OpenBSD set COMPATSRC to empty -#COMPATSRC = - -# compiler and linker -CC = cc diff --git a/st/config.h b/st/config.h deleted file mode 100644 index 99675eb..0000000 --- a/st/config.h +++ /dev/null @@ -1,472 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -/* - * appearance - * - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html - */ -static char *font = "Monofur Nerd Font:size=14:antialias=true:autohint=true"; -static int borderpx = 2; - -/* - * What program is execed by st depends of these precedence rules: - * 1: program passed with -e - * 2: scroll and/or utmp - * 3: SHELL environment variable - * 4: value of shell in /etc/passwd - * 5: value of shell in config.h - */ -static char *shell = "/bin/sh"; -char *utmp = NULL; -/* scroll program: to enable use a string like "scroll" */ -char *scroll = NULL; -char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; - -/* identification sequence returned in DA and DECID */ -char *vtiden = "\033[?6c"; - -/* Kerning / character bounding-box multipliers */ -static float cwscale = 1.0; -static float chscale = 1.0; - -/* - * word delimiter string - * - * More advanced example: L" `'\"()[]{}" - */ -wchar_t *worddelimiters = L" `'\"()[]{}"; - -/* selection timeouts (in milliseconds) */ -static unsigned int doubleclicktimeout = 300; -static unsigned int tripleclicktimeout = 600; - -/* alt screens */ -int allowaltscreen = 1; - -/* allow certain non-interactive (insecure) window operations such as: - setting the clipboard text */ -int allowwindowops = 0; - -/* - * draw latency range in ms - from new content/keypress/etc until drawing. - * within this range, st draws when content stops arriving (idle). mostly it's - * near minlatency, but it waits longer for slow updates to avoid partial draw. - * low minlatency will tear/flicker more, as it can "detect" idle too early. - */ -static double minlatency = 8; -static double maxlatency = 33; - -/* - * blinking timeout (set to 0 to disable blinking) for the terminal blinking - * attribute. - */ -static unsigned int blinktimeout = 800; - -/* - * thickness of underline and bar cursors - */ -static unsigned int cursorthickness = 2; - -/* - * bell volume. It must be a value between -100 and 100. Use 0 for disabling - * it - */ -static int bellvolume = 0; - -/* default TERM value */ -char *termname = "st-256color"; - -/* - * spaces per tab - * - * When you are changing this value, don't forget to adapt the »it« value in - * the st.info and appropriately install the st.info in the environment where - * you use this st version. - * - * it#$tabspaces, - * - * Secondly make sure your kernel is not expanding tabs. When running `stty - * -a` »tab0« should appear. You can tell the terminal to not expand tabs by - * running following command: - * - * stty tabs - */ -unsigned int tabspaces = 8; - -/* Terminal colors (16 first used in escape sequence) */ -static const char *colorname[] = { - /* 8 normal colors */ - "#232323", - "#af8384", - "#84af83", - "#afae83", - "#8384af", - "#ae83af", - "#83afae", - "#c6c6c6", - - /* 8 bright colors */ - "#353535", - "#d7c1c1", - "#c1d7c1", - "#d7d7c1", - "#c1c1d7", - "#d7c1d7", - "#c1d7d7", - "#c6c6c6", - - [255] = 0, - - /* more colors can be added after 255 to use with DefaultXX */ - "#d9e6f2", - "#1c1c1c", -}; - - -/* - * Default colors (colorname index) - * foreground, background, cursor, reverse cursor - */ -unsigned int defaultfg = 256; -unsigned int defaultbg = 257; -static unsigned int defaultcs = 7; -static unsigned int defaultrcs = 0; - -/* - * Default shape of cursor - * 2: Block ("█") - * 4: Underline ("_") - * 6: Bar ("|") - * 7: Snowman ("☃") - */ -static unsigned int cursorshape = 2; - -/* - * Default columns and rows numbers - */ - -static unsigned int cols = 80; -static unsigned int rows = 24; - -/* - * Default colour and shape of the mouse cursor - */ -static unsigned int mouseshape = XC_xterm; -static unsigned int mousefg = 256; -static unsigned int mousebg = 257; - -/* - * Color used to display font attributes when fontconfig selected a font which - * doesn't match the ones requested. - */ -static unsigned int defaultattr = 11; - -/* - * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forcemousemod = ShiftMask; - -/* - * Internal mouse shortcuts. - * Beware that overloading Button1 will disable the selection. - */ -static MouseShortcut mshortcuts[] = { - /* mask button function argument release */ - { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, - { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, - { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, - { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, - { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, -}; - -/* Internal keyboard shortcuts. */ -#define MODKEY Mod1Mask -#define TERMMOD (ControlMask|ShiftMask) - -static Shortcut shortcuts[] = { - /* mask keysym function argument */ - { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, - { ControlMask, XK_Print, toggleprinter, {.i = 0} }, - { ShiftMask, XK_Print, printscreen, {.i = 0} }, - { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, - { TERMMOD, XK_Prior, zoom, {.f = +1} }, - { TERMMOD, XK_Next, zoom, {.f = -1} }, - { TERMMOD, XK_Home, zoomreset, {.f = 0} }, - { TERMMOD, XK_C, clipcopy, {.i = 0} }, - { TERMMOD, XK_V, clippaste, {.i = 0} }, - { TERMMOD, XK_Y, selpaste, {.i = 0} }, - { ShiftMask, XK_Insert, selpaste, {.i = 0} }, - { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, -}; - -/* - * Special keys (change & recompile st.info accordingly) - * - * Mask value: - * * Use XK_ANY_MOD to match the key no matter modifiers state - * * Use XK_NO_MOD to match the key alone (no modifiers) - * appkey value: - * * 0: no value - * * > 0: keypad application mode enabled - * * = 2: term.numlock = 1 - * * < 0: keypad application mode disabled - * appcursor value: - * * 0: no value - * * > 0: cursor application mode enabled - * * < 0: cursor application mode disabled - * - * Be careful with the order of the definitions because st searches in - * this table sequentially, so any XK_ANY_MOD must be in the last - * position for a key. - */ - -/* - * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) - * to be mapped below, add them to this array. - */ -static KeySym mappedkeys[] = { -1 }; - -/* - * State bits to ignore when matching key or button events. By default, - * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. - */ -static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; - -/* - * This is the huge key array which defines all compatibility to the Linux - * world. Please decide about changes wisely. - */ -static Key key[] = { - /* keysym mask string appkey appcursor */ - { XK_KP_Home, ShiftMask, "\033[2J", 0, -1}, - { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1}, - { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1}, - { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1}, - { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0}, - { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1}, - { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1}, - { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0}, - { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1}, - { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1}, - { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0}, - { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1}, - { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1}, - { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0}, - { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1}, - { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1}, - { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0}, - { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, - { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0}, - { XK_KP_End, ControlMask, "\033[J", -1, 0}, - { XK_KP_End, ControlMask, "\033[1;5F", +1, 0}, - { XK_KP_End, ShiftMask, "\033[K", -1, 0}, - { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0}, - { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0}, - { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0}, - { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0}, - { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0}, - { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0}, - { XK_KP_Insert, ControlMask, "\033[L", -1, 0}, - { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0}, - { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, - { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, - { XK_KP_Delete, ControlMask, "\033[M", -1, 0}, - { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, - { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, - { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, - { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, - { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, - { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0}, - { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0}, - { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0}, - { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0}, - { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0}, - { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0}, - { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0}, - { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0}, - { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0}, - { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0}, - { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0}, - { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0}, - { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0}, - { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0}, - { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0}, - { XK_Up, ShiftMask, "\033[1;2A", 0, 0}, - { XK_Up, Mod1Mask, "\033[1;3A", 0, 0}, - { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0}, - { XK_Up, ControlMask, "\033[1;5A", 0, 0}, - { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0}, - { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0}, - { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0}, - { XK_Up, XK_ANY_MOD, "\033[A", 0, -1}, - { XK_Up, XK_ANY_MOD, "\033OA", 0, +1}, - { XK_Down, ShiftMask, "\033[1;2B", 0, 0}, - { XK_Down, Mod1Mask, "\033[1;3B", 0, 0}, - { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0}, - { XK_Down, ControlMask, "\033[1;5B", 0, 0}, - { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0}, - { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0}, - { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0}, - { XK_Down, XK_ANY_MOD, "\033[B", 0, -1}, - { XK_Down, XK_ANY_MOD, "\033OB", 0, +1}, - { XK_Left, ShiftMask, "\033[1;2D", 0, 0}, - { XK_Left, Mod1Mask, "\033[1;3D", 0, 0}, - { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0}, - { XK_Left, ControlMask, "\033[1;5D", 0, 0}, - { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0}, - { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0}, - { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0}, - { XK_Left, XK_ANY_MOD, "\033[D", 0, -1}, - { XK_Left, XK_ANY_MOD, "\033OD", 0, +1}, - { XK_Right, ShiftMask, "\033[1;2C", 0, 0}, - { XK_Right, Mod1Mask, "\033[1;3C", 0, 0}, - { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0}, - { XK_Right, ControlMask, "\033[1;5C", 0, 0}, - { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0}, - { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0}, - { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0}, - { XK_Right, XK_ANY_MOD, "\033[C", 0, -1}, - { XK_Right, XK_ANY_MOD, "\033OC", 0, +1}, - { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0}, - { XK_Return, Mod1Mask, "\033\r", 0, 0}, - { XK_Return, XK_ANY_MOD, "\r", 0, 0}, - { XK_Insert, ShiftMask, "\033[4l", -1, 0}, - { XK_Insert, ShiftMask, "\033[2;2~", +1, 0}, - { XK_Insert, ControlMask, "\033[L", -1, 0}, - { XK_Insert, ControlMask, "\033[2;5~", +1, 0}, - { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, - { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, - { XK_Delete, ControlMask, "\033[M", -1, 0}, - { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, - { XK_Delete, ShiftMask, "\033[2K", -1, 0}, - { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, - { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, - { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, - { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, - { XK_BackSpace, Mod1Mask, "\033\177", 0, 0}, - { XK_Home, ShiftMask, "\033[2J", 0, -1}, - { XK_Home, ShiftMask, "\033[1;2H", 0, +1}, - { XK_Home, XK_ANY_MOD, "\033[H", 0, -1}, - { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1}, - { XK_End, ControlMask, "\033[J", -1, 0}, - { XK_End, ControlMask, "\033[1;5F", +1, 0}, - { XK_End, ShiftMask, "\033[K", -1, 0}, - { XK_End, ShiftMask, "\033[1;2F", +1, 0}, - { XK_End, XK_ANY_MOD, "\033[4~", 0, 0}, - { XK_Prior, ControlMask, "\033[5;5~", 0, 0}, - { XK_Prior, ShiftMask, "\033[5;2~", 0, 0}, - { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, - { XK_Next, ControlMask, "\033[6;5~", 0, 0}, - { XK_Next, ShiftMask, "\033[6;2~", 0, 0}, - { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0}, - { XK_F1, XK_NO_MOD, "\033OP" , 0, 0}, - { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0}, - { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0}, - { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0}, - { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0}, - { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0}, - { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0}, - { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0}, - { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0}, - { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0}, - { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0}, - { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0}, - { XK_F3, XK_NO_MOD, "\033OR" , 0, 0}, - { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0}, - { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0}, - { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0}, - { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0}, - { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0}, - { XK_F4, XK_NO_MOD, "\033OS" , 0, 0}, - { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0}, - { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0}, - { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0}, - { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0}, - { XK_F5, XK_NO_MOD, "\033[15~", 0, 0}, - { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0}, - { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0}, - { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0}, - { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0}, - { XK_F6, XK_NO_MOD, "\033[17~", 0, 0}, - { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0}, - { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0}, - { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0}, - { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0}, - { XK_F7, XK_NO_MOD, "\033[18~", 0, 0}, - { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0}, - { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0}, - { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0}, - { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0}, - { XK_F8, XK_NO_MOD, "\033[19~", 0, 0}, - { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0}, - { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0}, - { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0}, - { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0}, - { XK_F9, XK_NO_MOD, "\033[20~", 0, 0}, - { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0}, - { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0}, - { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0}, - { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0}, - { XK_F10, XK_NO_MOD, "\033[21~", 0, 0}, - { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0}, - { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0}, - { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0}, - { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0}, - { XK_F11, XK_NO_MOD, "\033[23~", 0, 0}, - { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0}, - { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0}, - { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0}, - { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0}, - { XK_F12, XK_NO_MOD, "\033[24~", 0, 0}, - { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0}, - { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0}, - { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0}, - { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0}, - { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0}, - { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0}, - { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0}, - { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0}, - { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0}, - { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0}, - { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0}, - { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0}, - { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0}, - { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0}, - { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0}, - { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0}, - { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0}, - { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0}, - { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0}, - { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0}, - { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0}, - { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0}, - { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0}, - { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0}, - { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, - { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, - { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, -}; - -/* - * Selection types' masks. - * Use the same masks as usual. - * Button1Mask is always unset, to make masks match between ButtonPress. - * ButtonRelease and MotionNotify. - * If no match is found, regular selection is used. - */ -static uint selmasks[] = { - [SEL_RECTANGULAR] = Mod1Mask, -}; - -/* - * Printable characters in ASCII, used to estimate the advance width - * of single wide characters. - */ -static char ascii_printable[] = - " !\"#$%&'()*+,-./0123456789:;<=>?" - "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" - "`abcdefghijklmnopqrstuvwxyz{|}~"; diff --git a/st/config.mk b/st/config.mk deleted file mode 100644 index 7484701..0000000 --- a/st/config.mk +++ /dev/null @@ -1,35 +0,0 @@ -# st version -VERSION = 0.8.4 - -# Customize below to fit your system - -# paths -PREFIX = ${HOME}/.local -MANPREFIX = $(PREFIX)/share/man - -X11INC = /usr/include/xorg -X11LIB = /usr/lib/xorg - -PKG_CONFIG = pkg-config - -# includes and libs -INCS = -I$(X11INC) \ - `$(PKG_CONFIG) --cflags fontconfig` \ - `$(PKG_CONFIG) --cflags freetype2` -LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ - `$(PKG_CONFIG) --libs fontconfig` \ - `$(PKG_CONFIG) --libs freetype2` - -# flags -STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) -STLDFLAGS = $(LIBS) $(LDFLAGS) - -# OpenBSD: -#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \ -# `$(PKG_CONFIG) --libs fontconfig` \ -# `$(PKG_CONFIG) --libs freetype2` - -# compiler and linker -# CC = c99