├── .scrots ├── one.png ├── three.png └── two.png ├── README.md ├── betterlockscreenrc ├── bin ├── barr ├── borders ├── cdefs ├── lang.sh ├── light.sh ├── networkmanager_dmenu ├── poww ├── rofi-bluetooth ├── rofi-powermenu └── rofi-wifi-menu.sh ├── bspwm └── bspwmrc ├── cava └── config ├── conky └── Moo │ ├── Mmo.conf │ ├── Moo.conf │ ├── scripts │ ├── Greeting.sh │ └── weather.sh │ └── start.sh ├── dunst └── dunstrc ├── firefox ├── userChrome.css └── userContent.css ├── home ├── .XCompose ├── .Xmodmap ├── .Xresources ├── .xinitrc └── .xprofile ├── ncmpcpp └── config ├── picom └── picom.conf ├── polybar ├── config └── launch.sh ├── rofi ├── config.rasi └── poww.rasi ├── starship-prompt └── starship.toml ├── sxhkd └── sxhkdrc ├── zathura └── zathurarc └── zsh ├── .alias.zsh ├── .plugins.zsh └── .zshrc /.scrots/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudk1000/dotfiles/62ba74519ce759f5cf262e37abd7e4c3820ef5b9/.scrots/one.png -------------------------------------------------------------------------------- /.scrots/three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudk1000/dotfiles/62ba74519ce759f5cf262e37abd7e4c3820ef5b9/.scrots/three.png -------------------------------------------------------------------------------- /.scrots/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudk1000/dotfiles/62ba74519ce759f5cf262e37abd7e4c3820ef5b9/.scrots/two.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | █▀▀▀ ▀█▀ █ █▀▀ █▀▀ 3 | █▀▀ █ █ █▀▀ ▀▀█ 4 | ▀ ▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀ 5 | ``` 6 | 7 |
8 |

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 |

20 | 21 | --- 22 | 23 | ### Information 24 | 25 | - OS: [Arch Linux](https://archlinux.org//) 26 | - WM : [bspwm](https://wiki.archlinux.org/index.php/Bspwm) 27 | - Bar : [Polybar](https://github.com/polybar/polybar) 28 | - Menu : [dmenu](https://github.com/mahmoudk1000/dmenu) 29 | - Startpage : [flat](https://github.com/mahmoudk1000/flat-startpage) 30 | - Editor : [nvim](https://neovim.org/) 31 | - Font : [Iosevka](https://github.com/be5invis/Iosevka.git) 32 | - Terminal : [st](https://github.com/siduck76/st) 33 | - Shell : [zsh](https://wiki.archlinux.org/index.php/Zsh) 34 | 35 | --- 36 | 37 | ### Screenshots 38 | 39 | ![alt text](https://github.com/Mahmoudk1000/dotfiles/blob/master/.scrots/one.png) 40 | 41 | ![alt text](https://github.com/Mahmoudk1000/dotfiles/blob/master/.scrots/two.png) 42 | 43 | ![alt text](https://github.com/Mahmoudk1000/dotfiles/blob/master/.scrots/three.png) 44 | -------------------------------------------------------------------------------- /betterlockscreenrc: -------------------------------------------------------------------------------- 1 | # configuration file for betterlockscreen 2 | 3 | insidecolor=00000000 4 | ringcolor=161d25ff 5 | keyhlcolor=d7c1edff 6 | bshlcolor=d7d1edff 7 | separatorcolor=00000000 8 | insidevercolor=00000000 9 | insidewrongcolor=f28fad77 10 | ringvercolor=eeeeeeff 11 | ringwrongcolor=d7d1edff 12 | verifcolor=eeeeeeff 13 | timecolor=dcddedff 14 | datecolor=dcdded0ff 15 | loginbox=11171D77 16 | font="Iosevka" 17 | -------------------------------------------------------------------------------- /bin/barr: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | 3 | pkill polybar 4 | 5 | sleep 1; 6 | 7 | polybar sex & 8 | -------------------------------------------------------------------------------- /bin/borders: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # - borders 4 | # 5 | # double borders 6 | # stolen from: 7 | # https://github.com/6gk 8 | # 9 | 10 | . /home/mahmoud/.bin/cdefs 11 | 12 | outer="0x$bg1" # outer 13 | innr1="0x$grn" # focused 14 | innr2="0x$bg2" # normal 15 | 16 | trap 'bspc config border_width 0; kill -9 -$$' INT TERM 17 | 18 | targets() { 19 | case $1 in 20 | focused) bspc query -N -n .local.focused.\!fullscreen ;; 21 | normal) bspc query -N -n .\!focused.\!fullscreen ;; 22 | esac 23 | } 24 | 25 | bspc config border_width 10 26 | 27 | draw() { 28 | chwb2 -I "$inner" -O "$outer" -i "2" -o "8" $* 29 | } 30 | 31 | { 32 | echo 33 | bspc subscribe node_geometry node_focus 34 | } | 35 | while read -r _; do 36 | [ "$v" ] || v='abcdefg' 37 | inner=$innr1 draw $(targets focused) 38 | inner=$innr2 draw $(targets normal) 39 | done >/dev/null 2>&1 40 | -------------------------------------------------------------------------------- /bin/cdefs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # - cdefs 4 | # 5 | # colours for use in other stuff 6 | # 7 | 8 | #f/b 9 | fg0="$(sed '01q;d' "$HOME/var/col/current")" 10 | bg0="$(sed '02q;d' "$HOME/var/col/current")" 11 | crs="$(sed '03q;d' "$HOME/var/col/current")" 12 | # fg+ 13 | fg1="$(sed '19q;d' "$HOME/var/col/current")" 14 | fg2="$(sed '11q;d' "$HOME/var/col/current")" 15 | # bg+ 16 | bg1="$(sed '04q;d' "$HOME/var/col/current")" 17 | bg2="$(sed '12q;d' "$HOME/var/col/current")" 18 | # col 19 | red="$(sed '05q;d' "$HOME/var/col/current")" 20 | grn="$(sed '06q;d' "$HOME/var/col/current")" 21 | ylw="$(sed '07q;d' "$HOME/var/col/current")" 22 | blu="$(sed '08q;d' "$HOME/var/col/current")" 23 | mag="$(sed '09q;d' "$HOME/var/col/current")" 24 | cyn="$(sed '10q;d' "$HOME/var/col/current")" 25 | -------------------------------------------------------------------------------- /bin/lang.sh: -------------------------------------------------------------------------------- 1 | xkblayout-state print "Current layout: %s(%e)" | awk '{print toupper($3)}' | sed "s/([^)]*)//g" 2 | -------------------------------------------------------------------------------- /bin/light.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "$(light | cut -d. -f1)%" -------------------------------------------------------------------------------- /bin/networkmanager_dmenu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding:utf8 3 | """NetworkManager command line dmenu script. 4 | 5 | To add new connections or enable/disable networking requires policykit 6 | permissions setup per: 7 | https://wiki.archlinux.org/index.php/NetworkManager#Set_up_PolicyKit_permissions 8 | 9 | OR running the script as root 10 | 11 | Add dmenu formatting options and default terminal if desired to 12 | ~/.config/networkmanager-dmenu/config.ini 13 | 14 | """ 15 | import pathlib 16 | import struct 17 | import configparser 18 | import itertools 19 | import locale 20 | import os 21 | from os.path import expanduser 22 | import shlex 23 | import sys 24 | import uuid 25 | from subprocess import Popen, PIPE 26 | 27 | import gi 28 | gi.require_version('NM', '1.0') 29 | from gi.repository import GLib, NM # pylint: disable=wrong-import-position 30 | 31 | ENV = os.environ.copy() 32 | ENV['LC_ALL'] = 'C' 33 | ENC = locale.getpreferredencoding() 34 | 35 | CLIENT = NM.Client.new(None) 36 | LOOP = GLib.MainLoop() 37 | CONNS = CLIENT.get_connections() 38 | 39 | CONF = configparser.ConfigParser() 40 | CONF.read(expanduser("~/.config/networkmanager-dmenu/config.ini")) 41 | 42 | def dmenu_cmd(num_lines, prompt="Networks", active_lines=None): # pylint: disable=too-many-branches 43 | """Parse config.ini if it exists and add options to the dmenu command 44 | 45 | Args: args - num_lines: number of lines to display 46 | prompt: prompt to show 47 | Returns: command invocation (as a list of strings) for 48 | dmenu -l -p -i ... 49 | 50 | """ 51 | dmenu_command = "dmenu" 52 | if not CONF.sections(): 53 | res = [dmenu_command, "-c", "-h", "3" , "-l", str(num_lines), "-p", str(prompt)] 54 | res.extend(sys.argv[1:]) 55 | return res 56 | if CONF.has_section('dmenu'): 57 | args = CONF.items('dmenu') 58 | args_dict = dict(args) 59 | dmenu_args = [] 60 | if "dmenu_command" in args_dict: 61 | command = shlex.split(args_dict["dmenu_command"]) 62 | dmenu_command = command[0] 63 | dmenu_args = command[1:] 64 | del args_dict["dmenu_command"] 65 | if "p" in args_dict and prompt == "Networks": 66 | prompt = args_dict["p"] 67 | del args_dict["p"] 68 | elif "p" in args_dict: 69 | del args_dict["p"] 70 | if "rofi" in dmenu_command: 71 | lines = "-i -dmenu -lines" 72 | # rofi doesn't support 0 length line, it requires at least -lines=1 73 | # see https://github.com/DaveDavenport/rofi/issues/252 74 | num_lines = num_lines or 1 75 | else: 76 | lines = "-i -l" 77 | if "l" in args_dict: 78 | # rofi doesn't support 0 length line, it requires at least -lines=1 79 | # see https://github.com/DaveDavenport/rofi/issues/252 80 | if "rofi" in dmenu_command: 81 | args_dict['l'] = min(num_lines, int(args_dict['l'])) or 1 82 | lines = "{} {}".format(lines, args_dict['l']) 83 | del args_dict['l'] 84 | else: 85 | lines = "{} {}".format(lines, num_lines) 86 | if "pinentry" in args_dict: 87 | del args_dict["pinentry"] 88 | if "compact" in args_dict: 89 | del args_dict["compact"] 90 | if "wifi_chars" in args_dict: 91 | del args_dict["wifi_chars"] 92 | rofi_highlight = CONF.getboolean('dmenu', 'rofi_highlight', fallback=False) 93 | if CONF.has_option('dmenu', 'rofi_highlight'): 94 | del args_dict["rofi_highlight"] 95 | if rofi_highlight is True and "rofi" in dmenu_command: 96 | if active_lines: 97 | dmenu_args.extend(["-a", ",".join([str(num) 98 | for num in active_lines])]) 99 | if prompt == "Passphrase": 100 | if CONF.has_section('dmenu_passphrase'): 101 | args = CONF.items('dmenu_passphrase') 102 | args_dict.update(args) 103 | rofi_obscure = CONF.getboolean('dmenu_passphrase', 'rofi_obscure', fallback=True) 104 | if CONF.has_option('dmenu_passphrase', 'rofi_obscure'): 105 | del args_dict["rofi_obscure"] 106 | if rofi_obscure is True and "rofi" in dmenu_command: 107 | dmenu_args.extend(["-password"]) 108 | dmenu_password = CONF.getboolean('dmenu_passphrase', 'dmenu_password', fallback=False) 109 | if CONF.has_option('dmenu_passphrase', 'dmenu_password'): 110 | del args_dict["dmenu_password"] 111 | if dmenu_password is True: 112 | dmenu_args.extend(["-P"]) 113 | extras = (["-" + str(k), str(v)] for (k, v) in args_dict.items()) 114 | res = [dmenu_command, "-p", str(prompt)] 115 | res.extend(dmenu_args) 116 | res += list(itertools.chain.from_iterable(extras)) 117 | res[1:1] = lines.split() 118 | res = list(filter(None, res)) # Remove empty list elements 119 | res.extend(sys.argv[1:]) 120 | return res 121 | 122 | 123 | def choose_adapter(client): 124 | """If there is more than one wifi adapter installed, ask which one to use 125 | 126 | """ 127 | devices = client.get_devices() 128 | devices = [i for i in devices if i.get_device_type() == NM.DeviceType.WIFI] 129 | if not devices: # pylint: disable=no-else-return 130 | return None 131 | elif len(devices) == 1: 132 | return devices[0] 133 | device_names = "\n".join([d.get_iface() for d in devices]).encode(ENC) 134 | sel = Popen(dmenu_cmd(len(devices), "CHOOSE ADAPTER:"), 135 | stdin=PIPE, 136 | stdout=PIPE, 137 | env=ENV).communicate(input=device_names)[0].decode(ENC) 138 | if not sel.strip(): 139 | sys.exit() 140 | devices = [i for i in devices if i.get_iface() == sel.strip()] 141 | assert len(devices) == 1 142 | return devices[0] 143 | 144 | 145 | def is_modemmanager_installed(): 146 | """Check if ModemManager is installed""" 147 | with open(os.devnull) as devnull: 148 | try: 149 | Popen(["ModemManager"], stdout=devnull, stderr=devnull).communicate() 150 | except OSError: 151 | return False 152 | return True 153 | 154 | 155 | def bluetooth_get_enabled(): 156 | """Check if bluetooth is enabled via rfkill. 157 | 158 | Returns None if no bluetooth device was found. 159 | """ 160 | # See https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-class-rfkill 161 | for path in pathlib.Path('/sys/class/rfkill/').glob('rfkill*'): 162 | if (path / 'type').read_text().strip() == 'bluetooth': 163 | return (path / 'soft').read_text().strip() == '0' 164 | return None 165 | 166 | 167 | def create_other_actions(client): 168 | """Return list of other actions that can be taken 169 | 170 | """ 171 | networking_enabled = client.networking_get_enabled() 172 | networking_action = "Disable" if networking_enabled else "Enable" 173 | 174 | wifi_enabled = client.wireless_get_enabled() 175 | wifi_action = "Disable" if wifi_enabled else "Enable" 176 | 177 | bluetooth_enabled = bluetooth_get_enabled() 178 | bluetooth_action = "Disable" if bluetooth_enabled else "Enable" 179 | 180 | actions = [Action("{} Wifi".format(wifi_action), toggle_wifi, 181 | not wifi_enabled), 182 | Action("{} Networking".format(networking_action), 183 | toggle_networking, not networking_enabled)] 184 | if bluetooth_enabled is not None: 185 | actions.append(Action("{} Bluetooth".format(bluetooth_action), 186 | toggle_bluetooth, not bluetooth_enabled)) 187 | actions += [Action("Launch Connection Manager", launch_connection_editor), 188 | Action("Delete a Connection", delete_connection)] 189 | if wifi_enabled: 190 | actions.append(Action("Rescan Wifi Networks", rescan_wifi)) 191 | return actions 192 | 193 | 194 | def rescan_wifi(): 195 | """ 196 | Rescan Wifi Access Points 197 | """ 198 | for dev in CLIENT.get_devices(): 199 | if gi.repository.NM.DeviceWifi == type(dev): 200 | try: 201 | dev.request_scan_async(None, rescan_cb, None) 202 | LOOP.run() 203 | except gi.repository.GLib.Error as err: 204 | # Too frequent rescan error 205 | notify("Wifi rescan failed", urgency="critical") 206 | if not err.code == 6: # pylint: disable=no-member 207 | raise err 208 | 209 | 210 | def rescan_cb(dev, res, data): 211 | """Callback for rescan_wifi. Just for notifications 212 | 213 | """ 214 | if dev.request_scan_finish(res) is True: 215 | notify("Wifi scan complete") 216 | else: 217 | notify("Wifi scan failed", urgency="critical") 218 | LOOP.quit() 219 | 220 | 221 | def ssid_to_utf8(nm_ap): 222 | """ Convert binary ssid to utf-8 """ 223 | ssid = nm_ap.get_ssid() 224 | if not ssid: 225 | return "" 226 | ret = NM.utils_ssid_to_utf8(ssid.get_data()) 227 | return ret 228 | 229 | 230 | def prompt_saved(saved_cons): 231 | """Prompt for a saved connection.""" 232 | actions = create_saved_actions(saved_cons) 233 | sel = get_selection(actions) 234 | sel() 235 | 236 | 237 | def ap_security(nm_ap): 238 | """Parse the security flags to return a string with 'WPA2', etc. """ 239 | flags = nm_ap.get_flags() 240 | wpa_flags = nm_ap.get_wpa_flags() 241 | rsn_flags = nm_ap.get_rsn_flags() 242 | sec_str = "" 243 | if ((flags & getattr(NM, '80211ApFlags').PRIVACY) and 244 | (wpa_flags == 0) and (rsn_flags == 0)): 245 | sec_str += " WEP" 246 | if wpa_flags != 0: 247 | sec_str += " WPA1" 248 | if rsn_flags != 0: 249 | sec_str += " WPA2" 250 | if ((wpa_flags & getattr(NM, '80211ApSecurityFlags').KEY_MGMT_802_1X) or 251 | (rsn_flags & getattr(NM, '80211ApSecurityFlags').KEY_MGMT_802_1X)): 252 | sec_str += " 802.1X" 253 | 254 | # If there is no security use "--" 255 | if sec_str == "": 256 | sec_str = "--" 257 | return sec_str.lstrip() 258 | 259 | 260 | class Action(): # pylint: disable=too-few-public-methods 261 | """Helper class to execute functions from a string variable""" 262 | def __init__(self, 263 | name, 264 | func, 265 | args=None, 266 | active=False): 267 | self.name = name 268 | self.func = func 269 | self.is_active = active 270 | if args is None: 271 | self.args = None 272 | elif isinstance(args, list): 273 | self.args = args 274 | else: 275 | self.args = [args] 276 | 277 | def __str__(self): 278 | return self.name 279 | 280 | def __call__(self): 281 | if self.args is None: 282 | self.func() 283 | else: 284 | self.func(*self.args) 285 | 286 | 287 | def conn_matches_adapter(conn, adapter): 288 | """Return True if the connection is applicable for the given adapter. 289 | 290 | There seem to be two ways for a connection specify what interface it belongs 291 | to: 292 | 293 | - By setting 'mac-address' in [wifi] to the adapter's MAC 294 | - By setting 'interface-name` in [connection] to the adapter's name. 295 | 296 | Depending on how the connection was added, it seems like either 297 | 'mac-address', 'interface-name' or neither of both is set. 298 | """ 299 | # [wifi] mac-address 300 | setting_wireless = conn.get_setting_wireless() 301 | mac = setting_wireless.get_mac_address() 302 | if mac is not None: 303 | return mac == adapter.get_permanent_hw_address() 304 | 305 | # [connection] interface-name 306 | setting_connection = conn.get_setting_connection() 307 | interface = setting_connection.get_interface_name() 308 | if interface is not None: 309 | return interface == adapter.get_iface() 310 | 311 | # Neither is set, let's assume this connection is for multiple/all adapters. 312 | return True 313 | 314 | 315 | def process_ap(nm_ap, is_active, adapter): 316 | """Activate/Deactivate a connection and get password if required""" 317 | if is_active: 318 | CLIENT.deactivate_connection_async(nm_ap, None, deactivate_cb, nm_ap) 319 | else: 320 | conns_cur = [i for i in CONNS if 321 | i.get_setting_wireless() is not None and 322 | conn_matches_adapter(i, adapter)] 323 | con = nm_ap.filter_connections(conns_cur) 324 | if len(con) > 1: 325 | raise ValueError("There are multiple connections possible") 326 | 327 | if len(con) == 1: 328 | CLIENT.activate_connection_async(con[0], adapter, nm_ap.get_path(), 329 | None, activate_cb, nm_ap) 330 | else: 331 | if ap_security(nm_ap) != "--": 332 | password = get_passphrase() 333 | else: 334 | password = "" 335 | set_new_connection(nm_ap, password, adapter) 336 | LOOP.run() 337 | 338 | 339 | def activate_cb(dev, res, data): 340 | """Notification if activate connection completed successfully 341 | 342 | """ 343 | try: 344 | conn = dev.activate_connection_finish(res) 345 | except GLib.Error: 346 | conn = None 347 | if conn is not None: 348 | notify("Activated {}".format(conn.get_id())) 349 | else: 350 | notify("Problem activating {}".format(data.get_id()), 351 | urgency="critical") 352 | LOOP.quit() 353 | 354 | 355 | def deactivate_cb(dev, res, data): 356 | """Notification if deactivate connection completed successfully 357 | 358 | """ 359 | if dev.deactivate_connection_finish(res) is True: 360 | notify("Deactivated {}".format(data.get_id())) 361 | else: 362 | notify("Problem deactivating {}".format(data.get_id()), 363 | urgency="critical") 364 | LOOP.quit() 365 | 366 | 367 | def process_vpngsm(con, activate): 368 | """Activate/deactive VPN or GSM connections""" 369 | if activate: 370 | CLIENT.activate_connection_async(con, None, None, 371 | None, activate_cb, con) 372 | else: 373 | CLIENT.deactivate_connection_async(con, None, deactivate_cb, con) 374 | LOOP.run() 375 | 376 | 377 | def create_ap_actions(aps, active_ap, active_connection, adapter): # pylint: disable=too-many-locals 378 | """For each AP in a list, create the string and its attached function 379 | (activate/deactivate) 380 | 381 | """ 382 | active_ap_bssid = active_ap.get_bssid() if active_ap is not None else "" 383 | 384 | names = [ssid_to_utf8(ap) for ap in aps] 385 | max_len_name = max([len(name) for name in names]) if names else 0 386 | secs = [ap_security(ap) for ap in aps] 387 | max_len_sec = max([len(sec) for sec in secs]) if secs else 0 388 | 389 | ap_actions = [] 390 | 391 | for nm_ap, name, sec in zip(aps, names, secs): 392 | bars = NM.utils_wifi_strength_bars(nm_ap.get_strength()) 393 | wifi_chars = CONF.get("dmenu", "wifi_chars", fallback=False) 394 | if wifi_chars: 395 | bars = "".join([wifi_chars[i] for i, j in enumerate(bars) if j == '*']) 396 | is_active = nm_ap.get_bssid() == active_ap_bssid 397 | compact = CONF.getboolean("dmenu", "compact", fallback=False) 398 | if compact: 399 | action_name = u"{} {} {}".format(name, sec, bars) 400 | else: 401 | action_name = u"{:<{}s} {:<{}s} {}".format(name, max_len_name, sec, 402 | max_len_sec, bars) 403 | if is_active: 404 | ap_actions.append(Action(action_name, process_ap, 405 | [active_connection, True, adapter], 406 | active=True)) 407 | else: 408 | ap_actions.append(Action(action_name, process_ap, 409 | [nm_ap, False, adapter])) 410 | return ap_actions 411 | 412 | 413 | def create_vpn_actions(vpns, active): 414 | """Create the list of strings to display with associated function 415 | (activate/deactivate) for VPN connections. 416 | 417 | """ 418 | active_vpns = [i for i in active if i.get_vpn()] 419 | return _create_vpngsm_actions(vpns, active_vpns, "VPN") 420 | 421 | 422 | def create_wireguard_actions(wgs, active): 423 | """Create the list of strings to display with associated function 424 | (activate/deactivate) for Wireguard connections. 425 | 426 | """ 427 | active_wgs = [i for i in active if i.get_connection_type() == "wireguard"] 428 | return _create_vpngsm_actions(wgs, active_wgs, "Wireguard") 429 | 430 | 431 | def create_eth_actions(eths, active): 432 | """Create the list of strings to display with associated function 433 | (activate/deactivate) for Ethernet connections. 434 | 435 | """ 436 | active_eths = [i for i in active if 'ethernet' in i.get_connection_type()] 437 | return _create_vpngsm_actions(eths, active_eths, "Eth") 438 | 439 | 440 | def create_gsm_actions(gsms, active): 441 | """Create the list of strings to display with associated function 442 | (activate/deactivate) GSM connections.""" 443 | active_gsms = [i for i in active if 444 | i.get_connection() is not None and 445 | i.get_connection().is_type(NM.SETTING_GSM_SETTING_NAME)] 446 | return _create_vpngsm_actions(gsms, active_gsms, "GSM") 447 | 448 | 449 | def create_blue_actions(blues, active): 450 | """Create the list of strings to display with associated function 451 | (activate/deactivate) Bluetooth connections.""" 452 | active_blues = [i for i in active if 453 | i.get_connection() is not None and 454 | i.get_connection().is_type(NM.SETTING_BLUETOOTH_SETTING_NAME)] 455 | return _create_vpngsm_actions(blues, active_blues, "Bluetooth") 456 | 457 | 458 | def create_saved_actions(saved): 459 | """Create the list of strings to display with associated function 460 | (activate/deactivate) for VPN connections. 461 | 462 | """ 463 | return _create_vpngsm_actions(saved, [], "SAVED") 464 | 465 | 466 | def _create_vpngsm_actions(cons, active_cons, label): 467 | active_con_ids = [a.get_id() for a in active_cons] 468 | actions = [] 469 | for con in cons: 470 | is_active = con.get_id() in active_con_ids 471 | action_name = u"{}:{}".format(con.get_id(), label) 472 | if is_active: 473 | active_connection = [a for a in active_cons 474 | if a.get_id() == con.get_id()] 475 | if len(active_connection) != 1: 476 | raise ValueError(u"Multiple active connections match" 477 | " the connection: {}".format(con.get_id())) 478 | active_connection = active_connection[0] 479 | 480 | actions.append(Action(action_name, process_vpngsm, 481 | [active_connection, False], active=True)) 482 | else: 483 | actions.append(Action(action_name, process_vpngsm, 484 | [con, True])) 485 | return actions 486 | 487 | 488 | def create_wwan_actions(client): 489 | """Create WWWAN actions 490 | 491 | """ 492 | wwan_enabled = client.wwan_get_enabled() 493 | wwan_action = "Disable" if wwan_enabled else "Enable" 494 | return [Action("{} WWAN".format(wwan_action), toggle_wwan, not wwan_enabled)] 495 | 496 | 497 | def combine_actions(eths, aps, vpns, wgs, gsms, blues, wwan, others, saved): 498 | """Combine all given actions into a list of actions. 499 | 500 | Args: args - eths: list of Actions 501 | aps: list of Actions 502 | vpns: list of Actions 503 | gsms: list of Actions 504 | blues: list of Actions 505 | wwan: list of Actions 506 | others: list of Actions 507 | """ 508 | compact = CONF.getboolean("dmenu", "compact", fallback=False) 509 | empty_action = [Action('', None)] if not compact else [] 510 | all_actions = [] 511 | all_actions += eths + empty_action if eths else [] 512 | all_actions += aps + empty_action if aps else [] 513 | all_actions += vpns + empty_action if vpns else [] 514 | all_actions += wgs + empty_action if wgs else [] 515 | all_actions += gsms + empty_action if (gsms and wwan) else [] 516 | all_actions += blues + empty_action if blues else [] 517 | all_actions += wwan + empty_action if wwan else [] 518 | all_actions += others + empty_action if others else [] 519 | all_actions += saved + empty_action if saved else [] 520 | return all_actions 521 | 522 | 523 | def get_selection(all_actions): 524 | """Spawn dmenu for selection and execute the associated action.""" 525 | rofi_highlight = CONF.getboolean('dmenu', 'rofi_highlight', fallback=False) 526 | inp = [] 527 | 528 | if rofi_highlight is True: 529 | inp = [str(action) for action in all_actions] 530 | else: 531 | inp = [('== ' if action.is_active else ' ') + str(action) 532 | for action in all_actions] 533 | active_lines = [index for index, action in enumerate(all_actions) 534 | if action.is_active] 535 | 536 | inp_bytes = "\n".join(inp).encode(ENC) 537 | command = dmenu_cmd(len(inp), active_lines=active_lines) 538 | sel = Popen(command, stdin=PIPE, stdout=PIPE, 539 | env=ENV).communicate(input=inp_bytes)[0].decode(ENC) 540 | 541 | if not sel.rstrip(): 542 | sys.exit() 543 | 544 | if rofi_highlight is False: 545 | action = [i for i in all_actions 546 | if ((str(i).strip() == str(sel.strip()) 547 | and not i.is_active) or 548 | ('== ' + str(i) == str(sel.rstrip('\n')) 549 | and i.is_active))] 550 | else: 551 | action = [i for i in all_actions if str(i).strip() == sel.strip()] 552 | assert len(action) == 1, \ 553 | u"Selection was ambiguous: '{}'".format(str(sel.strip())) 554 | return action[0] 555 | 556 | 557 | def toggle_networking(enable): 558 | """Enable/disable networking 559 | 560 | Args: enable - boolean 561 | 562 | """ 563 | toggle = GLib.Variant.new_tuple(GLib.Variant.new_boolean(enable)) 564 | try: 565 | CLIENT.dbus_call(NM.DBUS_PATH, NM.DBUS_INTERFACE, "Enable", toggle, 566 | None, -1, None, None, None) 567 | except AttributeError: 568 | # Workaround for older versions of python-gobject 569 | CLIENT.networking_set_enabled(enable) 570 | notify("Networking {}".format("enabled" if enable is True else "disabled")) 571 | 572 | 573 | def toggle_wifi(enable): 574 | """Enable/disable Wifi 575 | 576 | Args: enable - boolean 577 | 578 | """ 579 | toggle = GLib.Variant.new_boolean(enable) 580 | try: 581 | CLIENT.dbus_set_property(NM.DBUS_PATH, NM.DBUS_INTERFACE, "WirelessEnabled", toggle, 582 | -1, None, None, None) 583 | except AttributeError: 584 | # Workaround for older versions of python-gobject 585 | CLIENT.wireless_set_enabled(enable) 586 | notify("Wifi {}".format("enabled" if enable is True else "disabled")) 587 | 588 | 589 | def toggle_wwan(enable): 590 | """Enable/disable WWAN 591 | 592 | Args: enable - boolean 593 | 594 | """ 595 | toggle = GLib.Variant.new_boolean(enable) 596 | try: 597 | CLIENT.dbus_set_property(NM.DBUS_PATH, NM.DBUS_INTERFACE, "WwanEnabled", toggle, 598 | -1, None, None, None) 599 | except AttributeError: 600 | # Workaround for older versions of python-gobject 601 | CLIENT.wwan_set_enabled(enable) 602 | notify("Wwan {}".format("enabled" if enable is True else "disabled")) 603 | 604 | 605 | def toggle_bluetooth(enable): 606 | """Enable/disable Bluetooth 607 | 608 | Args: enable - boolean 609 | 610 | References: 611 | https://github.com/blueman-project/blueman/blob/master/blueman/plugins/mechanism/RfKill.py 612 | https://www.kernel.org/doc/html/latest/driver-api/rfkill.html 613 | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/linux/rfkill.h?h=v5.8.9 614 | 615 | """ 616 | type_bluetooth = 2 617 | op_change_all = 3 618 | idx = 0 619 | soft_state = 0 if enable else 1 620 | hard_state = 0 621 | 622 | data = struct.pack("IBBBB", idx, type_bluetooth, op_change_all, 623 | soft_state, hard_state) 624 | 625 | try: 626 | with open('/dev/rfkill', 'r+b', buffering=0) as rff: 627 | rff.write(data) 628 | except PermissionError: 629 | notify("Lacking permission to write to /dev/rfkill.", 630 | "Maybe you need to add your user to the 'rfkill' group?", 631 | urgency="critical") 632 | else: 633 | notify("Bluetooth {}".format("enabled" if enable else "disabled")) 634 | 635 | 636 | def launch_connection_editor(): 637 | """Launch nmtui or the gui nm-connection-editor 638 | 639 | """ 640 | terminal = CONF.get("editor", "terminal", fallback="xterm") 641 | gui_if_available = CONF.getboolean("editor", "gui_if_available", fallback=True) 642 | if gui_if_available is True: 643 | try: 644 | Popen(["gnome-control-center", "network"]).communicate() 645 | except OSError: 646 | try: 647 | Popen(["nm-connection-editor"]).communicate() 648 | except OSError: 649 | Popen([terminal, "-e", "nmtui"]).communicate() 650 | else: 651 | Popen([terminal, "-e", "nmtui"]).communicate() 652 | 653 | 654 | def get_passphrase(): 655 | """Get a password 656 | 657 | Returns: string 658 | 659 | """ 660 | pinentry = CONF.get("dmenu", "pinentry", fallback=None) 661 | if pinentry: 662 | pin = "" 663 | out = Popen(pinentry, 664 | stdout=PIPE, 665 | stdin=PIPE).communicate(input=b'setdesc Get network password\ngetpin\n')[0] 666 | if out: 667 | res = out.decode(ENC).split("\n")[2] 668 | if res.startswith("D "): 669 | pin = res.split("D ")[1] 670 | return pin 671 | return Popen(dmenu_cmd(0, "Passphrase"), 672 | stdin=PIPE, stdout=PIPE).communicate()[0].decode(ENC) 673 | 674 | 675 | def delete_connection(): 676 | """Display list of NM connections and delete the selected one 677 | 678 | """ 679 | conn_acts = [Action(i.get_id(), i.delete_async, args=[None, delete_cb, None]) for i in CONNS] 680 | conn_names = "\n".join([str(i) for i in conn_acts]).encode(ENC) 681 | sel = Popen(dmenu_cmd(len(conn_acts), "CHOOSE CONNECTION TO DELETE:"), 682 | stdin=PIPE, 683 | stdout=PIPE, 684 | env=ENV).communicate(input=conn_names)[0].decode(ENC) 685 | if not sel.strip(): 686 | sys.exit() 687 | action = [i for i in conn_acts if str(i) == sel.rstrip("\n")] 688 | assert len(action) == 1, u"Selection was ambiguous: {}".format(str(sel)) 689 | action[0]() 690 | LOOP.run() 691 | 692 | 693 | def delete_cb(dev, res, data): 694 | """Notification if delete completed successfully 695 | 696 | """ 697 | if dev.delete_finish(res) is True: 698 | notify("Deleted {}".format(dev.get_id())) 699 | else: 700 | notify("Problem deleting {}".format(dev.get_id()), urgency="critical") 701 | LOOP.quit() 702 | 703 | 704 | def set_new_connection(nm_ap, nm_pw, adapter): 705 | """Setup a new NetworkManager connection 706 | 707 | Args: ap - NM.AccessPoint 708 | pw - string 709 | 710 | """ 711 | nm_pw = str(nm_pw).strip() 712 | profile = create_wifi_profile(nm_ap, nm_pw, adapter) 713 | CLIENT.add_and_activate_connection_async(profile, adapter, nm_ap.get_path(), 714 | None, verify_conn, profile) 715 | LOOP.run() 716 | 717 | 718 | def create_wifi_profile(nm_ap, password, adapter): 719 | # pylint: disable=C0301 720 | # From https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/gi/add_connection.py 721 | # and https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/dbus/add-wifi-psk-connection.py 722 | # pylint: enable=C0301 723 | """Create the NM profile given the AP and passphrase""" 724 | ap_sec = ap_security(nm_ap) 725 | profile = NM.SimpleConnection.new() 726 | 727 | s_con = NM.SettingConnection.new() 728 | s_con.set_property(NM.SETTING_CONNECTION_ID, ssid_to_utf8(nm_ap)) 729 | s_con.set_property(NM.SETTING_CONNECTION_UUID, str(uuid.uuid4())) 730 | s_con.set_property(NM.SETTING_CONNECTION_TYPE, "802-11-wireless") 731 | profile.add_setting(s_con) 732 | 733 | s_wifi = NM.SettingWireless.new() 734 | s_wifi.set_property(NM.SETTING_WIRELESS_SSID, nm_ap.get_ssid()) 735 | s_wifi.set_property(NM.SETTING_WIRELESS_MODE, 'infrastructure') 736 | s_wifi.set_property(NM.SETTING_WIRELESS_MAC_ADDRESS, adapter.get_permanent_hw_address()) 737 | profile.add_setting(s_wifi) 738 | 739 | s_ip4 = NM.SettingIP4Config.new() 740 | s_ip4.set_property(NM.SETTING_IP_CONFIG_METHOD, "auto") 741 | profile.add_setting(s_ip4) 742 | 743 | s_ip6 = NM.SettingIP6Config.new() 744 | s_ip6.set_property(NM.SETTING_IP_CONFIG_METHOD, "auto") 745 | profile.add_setting(s_ip6) 746 | 747 | if ap_sec != "--": 748 | s_wifi_sec = NM.SettingWirelessSecurity.new() 749 | if "WPA" in ap_sec: 750 | s_wifi_sec.set_property(NM.SETTING_WIRELESS_SECURITY_KEY_MGMT, 751 | "wpa-psk") 752 | s_wifi_sec.set_property(NM.SETTING_WIRELESS_SECURITY_AUTH_ALG, 753 | "open") 754 | s_wifi_sec.set_property(NM.SETTING_WIRELESS_SECURITY_PSK, password) 755 | elif "WEP" in ap_sec: 756 | s_wifi_sec.set_property(NM.SETTING_WIRELESS_SECURITY_KEY_MGMT, 757 | "None") 758 | s_wifi_sec.set_property(NM.SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, 759 | NM.WepKeyType.PASSPHRASE) 760 | s_wifi_sec.set_wep_key(0, password) 761 | profile.add_setting(s_wifi_sec) 762 | 763 | return profile 764 | 765 | 766 | def verify_conn(client, result, data): 767 | """Callback function for add_and_activate_connection_async 768 | 769 | Check if connection completes successfully. Delete the connection if there 770 | is an error. 771 | 772 | """ 773 | try: 774 | act_conn = client.add_and_activate_connection_finish(result) 775 | conn = act_conn.get_connection() 776 | if not all([conn.verify(), 777 | conn.verify_secrets(), 778 | data.verify(), 779 | data.verify_secrets()]): 780 | raise GLib.Error 781 | notify("Added {}".format(conn.get_id())) 782 | except GLib.Error: # pylint: disable=catching-non-exception 783 | try: 784 | notify("Connection to {} failed".format(conn.get_id()), 785 | urgency="critical") 786 | conn.delete_async(None, None, None) 787 | except UnboundLocalError: 788 | pass 789 | finally: 790 | LOOP.quit() 791 | 792 | 793 | def create_ap_list(adapter, active_connections): 794 | """Generate list of access points. Remove duplicate APs , keeping strongest 795 | ones and the active AP 796 | 797 | Args: adapter 798 | active_connections - list of all active connections 799 | Returns: aps - list of access points 800 | active_ap - active AP 801 | active_ap_con - active Connection 802 | adapter 803 | 804 | """ 805 | aps = [] 806 | ap_names = [] 807 | active_ap = adapter.get_active_access_point() 808 | aps_all = sorted(adapter.get_access_points(), 809 | key=lambda a: a.get_strength(), reverse=True) 810 | conns_cur = [i for i in CONNS if 811 | i.get_setting_wireless() is not None and 812 | conn_matches_adapter(i, adapter)] 813 | try: 814 | ap_conns = active_ap.filter_connections(conns_cur) 815 | active_ap_name = ssid_to_utf8(active_ap) 816 | active_ap_con = [active_conn for active_conn in active_connections 817 | if active_conn.get_connection() in ap_conns] 818 | except AttributeError: 819 | active_ap_name = None 820 | active_ap_con = [] 821 | if len(active_ap_con) > 1: 822 | raise ValueError("Multiple connection profiles match" 823 | " the wireless AP") 824 | active_ap_con = active_ap_con[0] if active_ap_con else None 825 | for nm_ap in aps_all: 826 | ap_name = ssid_to_utf8(nm_ap) 827 | if nm_ap != active_ap and ap_name == active_ap_name: 828 | # Skip adding AP if it's not active but same name as active AP 829 | continue 830 | if ap_name not in ap_names: 831 | ap_names.append(ap_name) 832 | aps.append(nm_ap) 833 | return aps, active_ap, active_ap_con, adapter 834 | 835 | 836 | def notify(message, details=None, urgency="low"): 837 | """Use notify-send if available for notifications 838 | 839 | """ 840 | args = ["-u", urgency, message] 841 | if details is not None: 842 | args.append(details) 843 | 844 | try: 845 | Popen(["notify-send"] + args, 846 | stdout=PIPE, stderr=PIPE).communicate() 847 | except FileNotFoundError: 848 | pass 849 | 850 | 851 | def run(): 852 | """Main script entrypoint""" 853 | active = CLIENT.get_active_connections() 854 | adapter = choose_adapter(CLIENT) 855 | if adapter: 856 | ap_actions = create_ap_actions(*create_ap_list(adapter, active)) 857 | else: 858 | ap_actions = [] 859 | 860 | vpns = [i for i in CONNS if i.is_type(NM.SETTING_VPN_SETTING_NAME)] 861 | try: 862 | wgs = [i for i in CONNS if i.is_type(NM.SETTING_WIREGUARD_SETTING_NAME)] 863 | except AttributeError: 864 | # Workaround for older versions of python-gobject with no wireguard support 865 | wgs = [] 866 | eths = [i for i in CONNS if i.is_type(NM.SETTING_WIRED_SETTING_NAME)] 867 | blues = [i for i in CONNS if i.is_type(NM.SETTING_BLUETOOTH_SETTING_NAME)] 868 | 869 | vpn_actions = create_vpn_actions(vpns, active) 870 | wg_actions = create_wireguard_actions(wgs, active) 871 | eth_actions = create_eth_actions(eths, active) 872 | blue_actions = create_blue_actions(blues, active) 873 | other_actions = create_other_actions(CLIENT) 874 | wwan_installed = is_modemmanager_installed() 875 | if wwan_installed: 876 | gsms = [i for i in CONNS if i.is_type(NM.SETTING_GSM_SETTING_NAME)] 877 | gsm_actions = create_gsm_actions(gsms, active) 878 | wwan_actions = create_wwan_actions(CLIENT) 879 | else: 880 | gsm_actions = [] 881 | wwan_actions = [] 882 | 883 | list_saved = CONF.getboolean('dmenu', 'list_saved', fallback=False) 884 | saved_cons = [i for i in CONNS if i not in vpns + wgs + eths + blues] 885 | if list_saved: 886 | saved_actions = create_saved_actions(saved_cons) 887 | else: 888 | saved_actions = [Action("Saved connections", prompt_saved, [saved_cons])] 889 | 890 | actions = combine_actions(eth_actions, ap_actions, vpn_actions, wg_actions, 891 | gsm_actions, blue_actions, wwan_actions, 892 | other_actions, saved_actions) 893 | sel = get_selection(actions) 894 | sel() 895 | 896 | 897 | if __name__ == '__main__': 898 | run() 899 | 900 | # vim: set et ts=4 sw=4 : 901 | -------------------------------------------------------------------------------- /bin/poww: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | menu=$(printf "Shutdown\nHibernate\nReboot\nLogout\nSuspend\nLock" | sort | dmenu -g 1) 3 | case $menu in 4 | "Shutdown") loginctl poweroff ;; 5 | "Reboot") loginctl reboot ;; 6 | "Suspend") loginctl suspend ;; 7 | "Hibernate") loginctl hibernate ;; 8 | "Logout") killall -u $USER ;; 9 | "Lock") betterlockscreen -l ;; 10 | *) exit ;; 11 | esac 12 | -------------------------------------------------------------------------------- /bin/rofi-bluetooth: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # __ _ _ _ _ _ _ 3 | # _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__ 4 | # | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \ 5 | # | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | | 6 | # |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_| 7 | # 8 | # Author: Nick Clyde (clydedroid) 9 | # 10 | # A script that generates a rofi menu that uses bluetoothctl to 11 | # connect to bluetooth devices and display status info. 12 | # 13 | # Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu) 14 | # Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl) 15 | # 16 | # Depends on: 17 | # Arch repositories: rofi, bluez-utils (contains bluetoothctl) 18 | 19 | # Checks if bluetooth controller is powered on 20 | power_on() { 21 | if bluetoothctl show | grep -q "Powered: yes"; then 22 | return 0 23 | else 24 | return 1 25 | fi 26 | } 27 | 28 | # Toggles power state 29 | toggle_power() { 30 | if power_on; then 31 | bluetoothctl power off 32 | else 33 | bluetoothctl power on 34 | fi 35 | } 36 | 37 | # Checks if controller is scanning for new devices 38 | scan_on() { 39 | if bluetoothctl show | grep -q "Discovering: yes"; then 40 | echo "Scan: on" 41 | return 0 42 | else 43 | echo "Scan: off" 44 | return 1 45 | fi 46 | } 47 | 48 | # Toggles scanning state 49 | toggle_scan() { 50 | if scan_on; then 51 | kill $(pgrep -f "bluetoothctl scan on") 52 | bluetoothctl scan off 53 | else 54 | bluetoothctl scan on & 55 | fi 56 | } 57 | 58 | # Checks if controller is able to pair to devices 59 | pairable_on() { 60 | if bluetoothctl show | grep -q "Pairable: yes"; then 61 | echo "Pairable: on" 62 | return 0 63 | else 64 | echo "Pairable: off" 65 | return 1 66 | fi 67 | } 68 | 69 | # Toggles pairable state 70 | toggle_pairable() { 71 | if pairable_on; then 72 | bluetoothctl pairable off 73 | else 74 | bluetoothctl pairable on 75 | fi 76 | } 77 | 78 | # Checks if controller is discoverable by other devices 79 | discoverable_on() { 80 | if bluetoothctl show | grep -q "Discoverable: yes"; then 81 | echo "Discoverable: on" 82 | return 0 83 | else 84 | echo "Discoverable: off" 85 | return 1 86 | fi 87 | } 88 | 89 | # Toggles discoverable state 90 | toggle_discoverable() { 91 | if discoverable_on; then 92 | bluetoothctl discoverable off 93 | else 94 | bluetoothctl discoverable on 95 | fi 96 | } 97 | 98 | # Checks if a device is connected 99 | device_connected() { 100 | device_info=$(bluetoothctl info "$1") 101 | if echo "$device_info" | grep -q "Connected: yes"; then 102 | return 0 103 | else 104 | return 1 105 | fi 106 | } 107 | 108 | # Toggles device connection 109 | toggle_connection() { 110 | if device_connected $1; then 111 | bluetoothctl disconnect $1 112 | else 113 | bluetoothctl connect $1 114 | fi 115 | } 116 | 117 | # Checks if a device is paired 118 | device_paired() { 119 | device_info=$(bluetoothctl info "$1") 120 | if echo "$device_info" | grep -q "Paired: yes"; then 121 | echo "Paired: yes" 122 | return 0 123 | else 124 | echo "Paired: no" 125 | return 1 126 | fi 127 | } 128 | 129 | # Toggles device paired state 130 | toggle_paired() { 131 | if device_paired $1; then 132 | bluetoothctl remove $1 133 | else 134 | bluetoothctl pair $1 135 | fi 136 | } 137 | 138 | # Checks if a device is trusted 139 | device_trusted() { 140 | device_info=$(bluetoothctl info "$1") 141 | if echo "$device_info" | grep -q "Trusted: yes"; then 142 | echo "Trusted: yes" 143 | return 0 144 | else 145 | echo "Trusted: no" 146 | return 1 147 | fi 148 | } 149 | 150 | # Toggles device connection 151 | toggle_trust() { 152 | if device_trusted $1; then 153 | bluetoothctl untrust $1 154 | else 155 | bluetoothctl trust $1 156 | fi 157 | } 158 | 159 | # Prints a short string with the current bluetooth status 160 | # Useful for status bars like polybar, etc. 161 | print_status() { 162 | if power_on; then 163 | printf '' 164 | 165 | mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2) 166 | counter=0 167 | 168 | for device in "${paired_devices[@]}"; do 169 | if device_connected $device; then 170 | device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-) 171 | 172 | if [ $counter -gt 0 ]; then 173 | printf ", %s" "$device_alias" 174 | else 175 | printf " %s" "$device_alias" 176 | fi 177 | 178 | ((counter++)) 179 | fi 180 | done 181 | 182 | if [ $counter -eq 0 ]; then 183 | printf " On" 184 | fi 185 | else 186 | echo " off" 187 | fi 188 | } 189 | 190 | # A submenu for a specific device that allows connecting, pairing, and trusting 191 | device_menu() { 192 | device=$1 193 | 194 | # Get device name and mac address 195 | device_name=$(echo $device | cut -d ' ' -f 3-) 196 | mac=$(echo $device | cut -d ' ' -f 2) 197 | 198 | # Build options 199 | if device_connected $mac; then 200 | connected="Connected: yes" 201 | else 202 | connected="Connected: no" 203 | fi 204 | paired=$(device_paired $mac) 205 | trusted=$(device_trusted $mac) 206 | options="$connected\n$paired\n$trusted" 207 | 208 | # Open rofi menu, read chosen option 209 | chosen="$(echo -e "$options" | $rofi_command "$device_name")" 210 | 211 | # Match chosen option to command 212 | case $chosen in 213 | "") 214 | echo "No option chosen." 215 | ;; 216 | $connected) 217 | toggle_connection $mac 218 | sleep 0.5 219 | show_menu 220 | ;; 221 | $paired) 222 | toggle_paired $mac 223 | sleep 0.5 224 | show_menu 225 | ;; 226 | $trusted) 227 | toggle_trust $mac 228 | sleep 0.5 229 | show_menu 230 | ;; 231 | esac 232 | } 233 | 234 | # Opens a rofi menu with current bluetooth status and options to connect 235 | show_menu() { 236 | # Get menu options 237 | if power_on; then 238 | power="Power: on" 239 | 240 | # Human-readable names of devices, one per line 241 | # If scan is off, will only list paired devices 242 | devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-) 243 | 244 | # Get controller flags 245 | scan=$(scan_on) 246 | pairable=$(pairable_on) 247 | discoverable=$(discoverable_on) 248 | divider="---------" 249 | 250 | # Options passed to rofi 251 | options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable" 252 | else 253 | power="Power: off" 254 | options="$power" 255 | fi 256 | 257 | # Open rofi menu, read chosen option 258 | chosen="$(echo -e "$options" | $rofi_command "Bluetooth")" 259 | 260 | # Match chosen option to command 261 | case $chosen in 262 | "" | $divider) 263 | echo "No option chosen." 264 | ;; 265 | $power) 266 | toggle_power 267 | sleep 0.5 268 | show_menu 269 | ;; 270 | $scan) 271 | toggle_scan 272 | sleep 0.5 273 | show_menu 274 | ;; 275 | $discoverable) 276 | toggle_discoverable 277 | sleep 0.5 278 | show_menu 279 | ;; 280 | $pairable) 281 | toggle_pairable 282 | sleep 0.5 283 | show_menu 284 | ;; 285 | *) 286 | device=$(bluetoothctl devices | grep "$chosen") 287 | # Open a submenu if a device is selected 288 | if [[ $device ]]; then device_menu "$device"; fi 289 | ;; 290 | esac 291 | } 292 | 293 | # Rofi command to pipe into, can add any options here 294 | rofi_command="rofi -dmenu -no-fixed-num-lines -yoffset -100 -i -p" 295 | 296 | case "$1" in 297 | --status) 298 | print_status 299 | ;; 300 | *) 301 | show_menu 302 | ;; 303 | esac 304 | -------------------------------------------------------------------------------- /bin/rofi-powermenu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # options to be displayed 4 | #option0="􀎠 Lock" 5 | #option1="􀅈 Reboot" 6 | #option2="⏻ Shutdown" 7 | #option3="⎋ Logout" 8 | #option4="􀟙 Suspend" 9 | 10 | option0="" 11 | option1="" 12 | option2="" 13 | option3="" 14 | option4="" 15 | 16 | uptime=$(uptime -p | sed -e 's/up /􀟪 System Uptime /g') 17 | 18 | rofi_command="rofi -theme ~/.config/rofi/powermenu.rasi" 19 | 20 | # options passed into variable 21 | options="$option0\n$option1\n$option2\n$option3\n$option4" 22 | 23 | chosen="$(echo -e "$options" | $rofi_command -p " $uptime " -dmenu -selected-row 2)" 24 | 25 | case $chosen in 26 | $option0) 27 | betterlockscreen --lock blur 28 | ;; 29 | $option1) 30 | systemctl reboot 31 | ;; 32 | $option2) 33 | systemctl poweroff 34 | ;; 35 | $option3) 36 | killall -u $USER 37 | ;; 38 | $option4) 39 | systemctl suspend 40 | ;; 41 | esac 42 | -------------------------------------------------------------------------------- /bin/rofi-wifi-menu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | #This script provides a rofi menu interface for wifi control 3 | #It uses and requires nmcli 4 | 5 | get_match() 6 | { 7 | selection=$(echo -e "$1" | rofi -dmenu -p "$2" -config ~/.config/rofi/config.rasi) 8 | [[ -z "$selection" ]] && exit 1 9 | does_match_=$(echo -e "$1" | grep "$selection") 10 | [[ -n "$1" ]] && [[ -z "$does_match_" ]] && exit 1 11 | echo "$selection" 12 | } 13 | 14 | toggle_entry="WiFi" 15 | create_option="Manual connection" 16 | 17 | 18 | #Checks if wifi is currently enabled 19 | state=$(nmcli -fields WIFI g) 20 | enable_test=$(echo "$state" | grep "enabled") 21 | echo $enable_test 22 | if [[ -z "$enable_test" ]]; then 23 | toggle="$toggle_entry on" 24 | selection=$(get_match "Yes\nNo" "Enable WiFi") 25 | if [ $selection = "Yes" ];then 26 | nmcli radio wifi on 27 | fi 28 | exit 1 29 | else 30 | toggle="$toggle_entry off" 31 | fi 32 | 33 | fields="SSID,BARS,SECURITY" 34 | lines_full=$(nmcli --fields $fields dev wifi list|sed "/\(^--\|$(echo $fields|cut -d',' -f1)\)/d"|sed 's/\s\{2,\}/_:_/g') 35 | lines=$(echo -e "$lines_full"| awk -F "_:_" '{print $1" "$2}') 36 | cons=$(nmcli con show) 37 | current=$(iwgetid -r) 38 | ssid_field=$(echo -e "$fields"| awk 'BEGIN{FS=","}{for(i=1;i<=NF;++i) {if($i ~ "SSID") print i}}') 39 | 40 | 41 | #Takes input from the user using a rofi menu 42 | selection=$(get_match "$toggle\n$lines\n$create_option" "WiFi") 43 | selected_ssid=$(echo $selection|sed 's/\s\{2,\}/|/g'|awk -F "|" "{print \$$ssid_field}" ) 44 | 45 | #Create new connection 46 | if [ "$selected_ssid" = "$create_option" ]; then 47 | manual_ssid=$(echo "Enter the SSID of the network." | rofi -dmenu -p "SSID" -config ~/.config/rofi/config.rasi) 48 | if [ -z "$manual_ssid" ];then 49 | exit 1 50 | fi 51 | #if connection already exists 52 | matches00=$(echo -e "$cons" |sed 's/\s\{2,\}/|/g'|awk -F "|" "/$manual_ssid/{print \$1}") 53 | if [[ -n "$matches00" ]];then #If a match exists to the selected networks 54 | n_matches00=$(echo -e "$matches00" |wc -l) 55 | if [[ "$n_matches00" -eq "1" ]]; then #If only one match, connect 56 | nmcli con up "$manual_ssid" 57 | else #if more matches, prompt selection menu for which one to choose 58 | chosen_cons00 = $(get_match "$matches00" "Which") 59 | nmcli con up "$chosen_cons00" 60 | fi 61 | else 62 | #if no matches 63 | manual_password=$(echo "Enter the Password of the network (or leave blank)." | rofi -dmenu -p "Password" -config ~/.config/rofi/config.rasi) 64 | if [ "$manual_password" = "" ];then 65 | nmcli dev wifi con "$manual_ssid" 66 | else 67 | nmcli dev wifi con "$manual_ssid" password "$manual_password" 68 | fi 69 | fi 70 | #Toggle wifi on 71 | elif [ "$selected_ssid" = "$toggle_entry on" ];then 72 | nmcli radio wifi on 73 | #Toggle wifi off 74 | elif [ "$selected_ssid" = "$toggle_entry off" ];then 75 | nmcli radio wifi off 76 | #An existing connection was selected 77 | elif [[ -n "$selection" ]];then 78 | matches=$(echo -e "$cons" |sed 's/\s\{2,\}/|/g'|awk -F "|" "/$selected_ssid/{print \$1}") 79 | 80 | if [[ -n "$matches" ]];then #If a match exists to the selected networks 81 | n_matches=$(echo -e "$matches" |wc -l) 82 | if [[ "$n_matches" -eq "1" ]]; then #If only one match, connect 83 | nmcli con up "$selected_ssid" 84 | else #if more matches, prompt selection menu for which one to choose 85 | chosen_cons = $(get_match "$matches" "Which") 86 | nmcli con up "$chosen_cons" 87 | fi 88 | 89 | else #if no matches 90 | wlan_=$(nmcli dev|grep wifi|sed 's/ \{2,\}/|/g'|cut -d'|' -f1) 91 | sec0=$(echo -e "$lines_full"|grep "$selected_ssid"| awk '/802\.1X/') 92 | 93 | #if security is 802.1x 94 | if [[ -n "$sec0" ]];then 95 | user_name=$(echo "Enter identity." | rofi -dmenu -p "Identity" -config ~/.config/rofi/config.rasi) 96 | if [[ -z "$user_name" ]];then 97 | exit 1 98 | fi 99 | password0=$(echo "Enter password of your identity (or leave empty)." | rofi -dmenu -p "Password" -config ~/.config/rofi/config.rasi) 100 | n_matches_=$(echo -e "$wlan_"|wc -l) 101 | #if more than one wlan device let user pick 102 | if [[ "$n_matches_" -gt "1" ]];then 103 | wlan_=$(get_match "$wlan_" "ifname") 104 | fi 105 | #add connection 106 | nmcli con add type wifi con-name "$selected_ssid" ifname "$wlan_" ssid "$selected_ssid" -- \ 107 | wifi-sec.key-mgmt wpa-eap 802-1x.eap ttls \ 108 | 802-1x.phase2-auth mschapv2 802-1x.identity "$user_name" 802-1x.password "$password0" 109 | #connect 110 | nmcli con up "$selected_ssid" 111 | #if security is not 802.1x 112 | else 113 | sec=$(echo -e "$lines_full"|grep "$selected_ssid"| awk '/(WPA|WEP)/') 114 | if [[ -n "$sec" ]];then #if network is secured, prompt for password 115 | password_=$(echo "Enter password of the newtork (or leave blank)." | rofi -dmenu -p "Password" -config ~/.config/rofi/config.rasi) 116 | fi 117 | nmcli dev wifi con "$selected_ssid" password "$password_" 118 | fi 119 | fi 120 | fi 121 | -------------------------------------------------------------------------------- /bspwm/bspwmrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # functions 4 | c() { bspc config "$@" & } 5 | R() { bspc rule -a "$@" & } 6 | s() { pkill -x "$1"; { sleep 0.1; "$@" & }; } 7 | 8 | # Desktop 9 | bspc monitor -d 1 2 3 4 5 6 7 8 9 10 | 11 | # fix some Java applications 12 | wmname LG3D 13 | 14 | # Wall 15 | ~/.fehbg & 16 | 17 | # Call col 18 | . /home/mahmoud/.bin/cdefs 19 | 20 | # config 21 | c window_gap 10 22 | c border_width 0 23 | c split_ratio 0.50 24 | 25 | c top_padding 0 26 | c right_padding 0 27 | c bottom_padding 60 28 | c left_padding 0 29 | 30 | # Monocle 31 | c single_monocle true 32 | c gapless_monocle false 33 | c borderless_monocle false 34 | 35 | c pointer_modifier mod4 36 | 37 | c click_to_focus true 38 | c focus_follows_pointer true 39 | 40 | c pointer_action1 move 41 | c pointer_action2 resize_side 42 | c pointer_action3 resize_corner 43 | 44 | # Style 45 | c normal_border_color "#$bg0" 46 | c active_border_color "#$bg2" 47 | c focused_border_color "#$bg1" 48 | 49 | # Rules 50 | R feh state=floating follow=on 51 | R mpv state=floating follow=on 52 | R galculator state=floating follow=on 53 | R firefox desktop='^1' follow=on 54 | R Thunar desktop='^4' follow=on 55 | R obsidian desktop='^6' follow=on 56 | R Mailspring desktop='^7' follow=off 57 | R TelegramDesktop desktop='^8' follow=on 58 | R Spotify desktop='^9' follow=off 59 | 60 | # Necessities 61 | { 62 | xset r rate 200 30 63 | xsetroot -cursor_name left_ptr 64 | light -I 65 | mpd -v 66 | $HOME/.config/conky/Moo/start.sh & 67 | } >/dev/null 2>&1 68 | 69 | # Startups 70 | s pipewire-run 71 | s borders 72 | s picom --experimental-backends -b 73 | s dunst 74 | s sxhkd 75 | s barr 76 | s flameshot 77 | s unclutter -idle 2 78 | -------------------------------------------------------------------------------- /cava/config: -------------------------------------------------------------------------------- 1 | [general] 2 | 3 | bars = 0 4 | bar_width = 2 5 | bar_spacing = 1 6 | lower_cutoff_freq = 50 7 | higher_cutoff_freq = 10000 8 | FFTbufferSize = 12; 9 | 10 | [input] 11 | method = pulse 12 | source = auto 13 | 14 | [color] 15 | background = '#11171D' 16 | foreground = '#11171D' 17 | gradient = 1 18 | gradient_count = 3 19 | gradient_color_1 = '#D7C1ED' 20 | gradient_color_2 = '#F28FAD' 21 | 22 | [smoothing] 23 | 24 | integral = 80 25 | monstercat = 0 26 | waves = 0 27 | gravity = 100 28 | -------------------------------------------------------------------------------- /conky/Moo/Mmo.conf: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /conky/Moo/Moo.conf: -------------------------------------------------------------------------------- 1 | conky.config = { 2 | -- Size and Position settings -- 3 | alignment = 'top_left', 4 | gap_x = 198, 5 | gap_y = 160, 6 | maximum_width = 900, 7 | minimum_height = 800, 8 | minimum_width = 420, 9 | 10 | -- Text settings -- 11 | use_xft = true, 12 | font = 'Iosevkat:size=9', 13 | 14 | -- Color Settings -- 15 | default_color = 'E2E8EE', 16 | default_outline_color = 'E2E8EE', 17 | default_shade_color = 'E2E8EE', 18 | color1 = 'E2E8EE', 19 | color2 = 'afbfd0', 20 | color3 = '6e8caa', 21 | color4 = '425971', 22 | color5 = '2f4050', 23 | 24 | -- Window Settings -- 25 | background = false, 26 | border_width = 1, 27 | draw_borders = false, 28 | draw_graph_borders = false, 29 | draw_outline = false, 30 | draw_shades = false, 31 | own_window = true, 32 | own_window_colour = '000000', 33 | own_window_class = 'Conky', 34 | own_window_argb_visual = false, 35 | own_window_type = 'desktop', 36 | own_window_transparent = true, 37 | own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', 38 | stippled_borders = 0, 39 | 40 | -- Others -- 41 | cpu_avg_samples = 2, 42 | net_avg_samples = 2, 43 | double_buffer = true, 44 | out_to_console = false, 45 | out_to_stderr = false, 46 | extra_newline = false, 47 | update_interval = 1, 48 | uppercase = false, 49 | use_spacer = 'none', 50 | show_graph_scale = false, 51 | show_graph_range = false, 52 | } 53 | 54 | conky.text = [[ 55 | ${execi 600 ~/.config/conky/Auva/scripts/weather.sh}\ 56 | 57 | ${offset 0}${voffset 0}${color1}${font Iosevka:style=Heavy Extended Oblique:size=42}Good${execi 600 ~/.config/conky/Moo/scripts/Greeting.sh} 58 | ${offset 0}${voffset 0}${color2}${font Iosevka:style=Heavy Extended Oblique:size=42}Good${execi 600 ~/.config/conky/Moo/scripts/Greeting.sh} 59 | ${offset 0}${voffset 0}${color3}${font Iosevka:style=Heavy Extended Oblique:size=42}Good${execi 600 ~/.config/conky/Moo/scripts/Greeting.sh} 60 | ${offset 0}${voffset 0}${color4}${font Iosevka:style=Heavy Extended Oblique:size=42}Good${execi 600 ~/.config/conky/Moo/scripts/Greeting.sh} 61 | ${offset 0}${voffset 0}${color5}${font Iosevka:style=Heavy Extended Oblique:size=42}Good${execi 600 ~/.config/conky/Moo/scripts/Greeting.sh} 62 | ${offset 0}${voffset -60}${font Iosevka:style=Heavy Extended Oblique:size=73}${color}${time %H:%M} 63 | ${offset 0}${voffset -70}${font Iosevka:style=Heavy Extended Oblique:size=30}${color}${time %A %B, %d} 64 | ${offset 5}${voffset 20}${color}${font Iosevka:style=Heavy Extended Oblique:size=18}♪ ${execi 1 mpc current} 65 | ${offset 0}${voffset 10}${font Iosevka:style=Heavy Extended Oblique:size=22}☀\ 66 | ${offset 5}${voffset 0}${font Iosevka:style=Heavy Extended Oblique:size=18}${execi 100 cat ~/.cache/weather.json | jq '.main.temp'}°C \ 67 | ${offset 0}${voffset 0}${color2}${font Iosevka:style=Heavy Extended Oblique:size=18}${execi 100 cat ~/.cache/weather.json | jq -r '.weather[0].description'} 68 | ]] 69 | -------------------------------------------------------------------------------- /conky/Moo/scripts/Greeting.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ---------------------------------------------------------------------------------- 3 | # name : Sapaan bahasa inggris 4 | # version : 0.1 5 | # 6 | # TENTANG 7 | # ---------------------------------------------------------------------------------- 8 | # Menampilkan Sapaan dalam bahasa inggris 9 | # 10 | # 11 | 12 | Greeting=$(date +%H) 13 | cat $0 | grep $Greeting | sed 's/# '$Greeting' //' 14 | # 15 | 16 | # terinspirasi dari imsakiyah.sh 17 | # 18 | # -------------------------------------------------------------------------------- 19 | # 00 Midnight 20 | # 01 Morning 21 | # 02 Morning 22 | # 03 Morning 23 | # 04 Morning 24 | # 05 Morning 25 | # 06 Morning 26 | # 07 Morning 27 | # 08 Morning 28 | # 09 Morning 29 | # 10 Morning 30 | # 11 Noon 31 | # 12 Noon 32 | # 13 Afternoon 33 | # 14 Afternoon 34 | # 15 Afternoon 35 | # 16 Afternoon 36 | # 17 Afternoon 37 | # 18 Evening 38 | # 19 Evening 39 | # 20 Evening 40 | # 21 Evening 41 | # 22 Evening 42 | # 23 Evening 43 | -------------------------------------------------------------------------------- /conky/Moo/scripts/weather.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Closebox73 4 | # This script is to get weather data from openweathermap.com in the form of a json file 5 | # so that conky will still display the weather when offline even though it doesn't up to date 6 | 7 | # you can use this or replace with yours 8 | api_key=a89384ad87d37345cca9848d9e0b477f 9 | # get your city id at https://openweathermap.org/find and replace 10 | city_id=361058 11 | 12 | url="api.openweathermap.org/data/2.5/weather?id=${city_id}&appid=${api_key}&cnt=5&units=metric&lang=en" 13 | curl ${url} -s -o ~/.cache/weather.json 14 | -------------------------------------------------------------------------------- /conky/Moo/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | killall conky 4 | sleep 2s 5 | 6 | #conky -c $HOME/.config/conky/Auva/Auva.conf &> /dev/null & 7 | conky -c $HOME/.config/conky/Moo/Moo.conf &> /dev/null & 8 | -------------------------------------------------------------------------------- /dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | follow = mouse 4 | shrink = no 5 | padding = 20 6 | horizontal_padding = 20 7 | 8 | width = 0 9 | height = 500 10 | offset = 10x10 11 | origin = top-right 12 | 13 | frame_width = 10 14 | separator_height = 5 15 | frame_color = "#151D25" 16 | separator_color = "#151D25" 17 | 18 | sort = no 19 | font = Iosevka Curly Slab 9 20 | markup = full 21 | format = "%s\n%b" 22 | alignment = left 23 | show_age_threshold = 60 24 | word_wrap = yes 25 | ignore_newline = no 26 | stack_duplicates = true 27 | hide_duplicate_count = no 28 | show_indicators = yes 29 | 30 | icon_position = left 31 | max_icon_size= 60 32 | sticky_history = no 33 | history_length = 6 34 | title = Dunst 35 | class = Dunst 36 | corner_radius = 0 37 | 38 | mouse_left_click = close_current 39 | mouse_middle_click = do_action 40 | mouse_right_click = close_all 41 | 42 | [urgency_low] 43 | background = "#11171D" 44 | foreground = "#A8A8A8" 45 | timeout = 5 46 | 47 | [urgency_normal] 48 | background = "#11171D" 49 | foreground = "#DCDDDE" 50 | timeout = 10 51 | 52 | [urgency_critical] 53 | background = "#11171D" 54 | foreground = "#F28FAD" 55 | timeout = 20 56 | -------------------------------------------------------------------------------- /firefox/userChrome.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: "Iosevka" !important; 3 | font-size: 12px !important; 4 | 5 | --arrowpanel-background: #11171D !important; 6 | --arrowpanel-border-color: #161D25 !important; 7 | --autocomplete-popup-highlight-background: #d7c1ed !important; 8 | --autocomplete-popup-highlight-color: #DCDDED !important; 9 | --toolbarbutton-active-background: #d7c1ed !important; 10 | --lwt-toolbarbutton-icon-fill-attention: var(--button-primary-bgcolor, #D7C1ED) !important; 11 | --toolbar-field-focus-border-color: #D7C1ED !important; 12 | } 13 | 14 | .toolbar { 15 | background-color: #11171D !important; 16 | } 17 | 18 | window, 19 | #main-window, 20 | #toolbar-menubar, 21 | #TabsToolbar, 22 | #PersonalToolbar, 23 | #navigator-toolbox, 24 | #sidebar-box { 25 | background-color: #161D25 !important; 26 | -moz-appearance: none !important; 27 | background-image: none !important; 28 | border: none !important; 29 | } 30 | 31 | .tab-background[selected="true"] { 32 | background-color: #11171D !important; 33 | -moz-appearance: none !important; 34 | background-image: none !important; 35 | border: none !important; 36 | } 37 | 38 | .tab-background { 39 | background-color: #161D25 !important; 40 | border-radius: 0px !important; 41 | margin-block: 0px !important; 42 | } 43 | 44 | .tabbrowser-tab:hover .tab-background { 45 | background-color: #1D2832 !important; 46 | } 47 | 48 | .tabbrowser-tab[fadein] { 49 | max-width: 100vw !important; 50 | } 51 | 52 | #urlbar { 53 | background-color: #11171D !important; 54 | border-radius: 10px !important; 55 | } 56 | 57 | #nav-bar { 58 | background-color: #161D25 !important; 59 | -moz-appearance: none !important; 60 | background-image: none !important; 61 | border: none !important; 62 | transition: margin 0.5s !important; 63 | } 64 | 65 | #TabsToolbar { 66 | z-index: 1000 !important; 67 | } 68 | 69 | #mainPopupSet menupopup, 70 | menupopup:not(.in-menulist) > menuitem, 71 | menupopup:not(.in-menulist) > menu { 72 | border: 0 !important; 73 | border-radius: 0px !important; 74 | padding: 15px 0px 0px 15px !important; 75 | } 76 | 77 | .tabbrowser-tab { 78 | height: 25px !important; 79 | z-index: 1000 !important; 80 | padding: none !important; 81 | padding-inline: 0px !important; 82 | } 83 | 84 | #navigator-toolbox:not(:focus-within):not(:hover) #nav-bar { 85 | margin-top: -40px !important; 86 | } 87 | 88 | .tab-line { 89 | display: none !important; 90 | } 91 | 92 | .tab-icon-image:not([pinned]){ 93 | display: none !important; 94 | } 95 | 96 | #tab-content { 97 | vertical-align: middle !important; 98 | } 99 | 100 | .tab-text, 101 | .tab-label { 102 | -moz-box-flex: 1 !important; 103 | text-align: center !important; 104 | } 105 | 106 | .tab-secondary-label { 107 | display:none !important; 108 | } 109 | 110 | .tab-label { 111 | padding-top: 5px !important; 112 | overflow: hidden !important; 113 | } 114 | 115 | .tabbrowser-tab .tab-label-container { 116 | margin-inline-end: 7px !important; 117 | } 118 | 119 | .tab-label-container { 120 | -moz-box-pack: center !important; 121 | -moz-box-orient: horizontal !important; 122 | display: grid !important; 123 | justify-content: safe center !important; 124 | } 125 | 126 | #tabbrowser-tabs { 127 | -moz-box-flex: 1 !important; 128 | text-align: center !important; 129 | } 130 | 131 | #tabs-newtab-button{ 132 | display: none !important; 133 | } 134 | 135 | .tabbrowser-tab::before, 136 | .tabbrowser-tab::after{ 137 | display: none !important; 138 | } 139 | 140 | .tab-close-button { 141 | display: none !important; 142 | border-radius: 10px !important; 143 | } 144 | 145 | #identity-box, 146 | #tracking-protection-icon-container { 147 | display: none !important; 148 | } 149 | 150 | #back-button>.toolbarbutton-icon { 151 | transform: scale(.85, .85) !important; 152 | animation: none !important; 153 | border: none !important; 154 | box-shadow: none !important; 155 | } 156 | 157 | #back-button:not(:hover), 158 | #back-button:not(:hover) > .toolbarbutton-icon { 159 | background: none !important; 160 | } 161 | 162 | #back-button:hover, 163 | #back-button:hover > .toolbarbutton-icon { 164 | border-radius: 2px !important; 165 | } 166 | 167 | #back-button { 168 | list-style-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiAxMSNzVLQoGBAAAAb0lEQVQoz43ROQqDUBSF4UMEESKCBBehOODK7ezSWZnGJmuI4xp+66CX9077FXc40k1o+fCSFRoOOgKLa3Z6QosrNt5EFpesDDwtLlgYSSzOmZlILY758SW7ykO+cYzwWNLjTI9HSc5XS86ypP+6Tw/fVEqhFbEZAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTAzLTE5VDE4OjU1OjUzKzAxOjAwq3ccegAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wMy0xOVQxODo1NTo1MyswMTowMNoqpMYAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC') !important; 169 | } 170 | 171 | #forward-button { 172 | list-style-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiAxMSOA3k2CXQAAAAbklEQVQoz5WRMQqDABAEF4UgKEIIPkKJii+3s7NLpY1N3qBR84axsPYOt1sYuNtdSZLEi5FG1yKk5U9tIQ86dioLiejZKC0k5sPK20JSBn4UFvJkYiG3kIwvM8npAt2Vc8J50onpFOVU7Y51PfcBtUFUSir+geUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDMtMTlUMTg6NTY6MTMrMDE6MDDECqmDAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTAzLTE5VDE4OjU2OjEzKzAxOjAwtVcRPwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=') !important; 173 | } 174 | 175 | #whats-new-menu-button, 176 | #pocket-button, 177 | #save-to-pocket-button 178 | #pageActionSeparator, 179 | #pageActionButton, 180 | #reader-mode-button{ 181 | display: none !important; 182 | } 183 | 184 | #star-button { 185 | color: #D7C1ED !important; 186 | } 187 | 188 | #save-to-pocket-button { 189 | visibility: hidden !important; 190 | } 191 | 192 | #PanelUI-button { 193 | border-image-slice: 0 !important; 194 | } 195 | 196 | #urlbar-input { 197 | background-color: #11171D !important; 198 | padding-left: 5px !important; 199 | } 200 | 201 | #urlbar-results { 202 | background-color: #11171D !important; 203 | border-radius: 5px !important; 204 | } 205 | 206 | #urlbar-results .urlbarView-row:hover{ 207 | color: #D7C1Ed !important; 208 | border-radius: 5px !important; 209 | } 210 | 211 | .urlbarView-row[selected] .urlbarView-row-inner { 212 | border-radius: 5px !important; 213 | background-color: #D7C1ED !important; 214 | color: #11171D !important; 215 | } 216 | 217 | .urlbarView-body-inner { 218 | border-top: none !important; 219 | } 220 | 221 | #nav-bar { 222 | border-bottom: 0px !important; 223 | box-shadow: none !important; 224 | } 225 | 226 | #urlbar ::-moz-selection, 227 | .searchbar-textbox ::-moz-selection { 228 | background-color: #dddddd !important; 229 | color: #000 !important; 230 | } 231 | 232 | #tabbrowser-tabpanels { 233 | background-color: #ffffff !important; 234 | } 235 | 236 | urlbar > #urlbar-background { 237 | background-color: #11171D !important; 238 | } 239 | 240 | #urlbar-background { 241 | background-color: #11171D !important; 242 | color: #161D25 !important; 243 | border: 1px solid #D7C1ED !important; 244 | } 245 | 246 | #urlbar-background:not([focused]) { 247 | background-color: #11171D !important; 248 | color: #161D25 !important; 249 | } 250 | 251 | #urlbar-one-offs-header-label{ 252 | display: none 253 | } 254 | .search-one-offs > .search-panel-one-offs-header::before{ 255 | display: block; 256 | content: "Search With:"; 257 | padding-inline: var(--urlbarView-item-inline-padding) 18px; 258 | opacity: 0.6; 259 | } 260 | -------------------------------------------------------------------------------- /firefox/userContent.css: -------------------------------------------------------------------------------- 1 | @namespace url("http://www.w3.org/1999/xhtml"); 2 | :root { 3 | scrollbar-color: #11171D #161D25; 4 | } 5 | 6 | * { 7 | scrollbar-width: thin; 8 | } 9 | 10 | @-moz-document url-prefix("about:") { 11 | :root { 12 | --in-content-page-background: #11171D !important; 13 | --toolbar-field-focus-border-color: #D7C1ED !important; 14 | --toolbarbutton-active-background: #d7c1ed !important; 15 | } 16 | } 17 | 18 | @-moz-document url("about:newtab"), url("about:home") { 19 | * { 20 | font-family: "Iosevka" !important; 21 | } 22 | 23 | body { 24 | background-color: #11171D !important; 25 | } 26 | 27 | .logo-and-wordmark { 28 | display: none !important; 29 | } 30 | 31 | .SnippetBaseContainer { 32 | display: none !important; 33 | } 34 | 35 | .search-handoff-button { 36 | border-radius: 15px !important; 37 | border-width: 4px !important; 38 | border-color: #161D25 !important; 39 | 40 | background-size: 0px !important; 41 | background-color: #11171D !important; 42 | 43 | padding-inline-start: 10px !important; 44 | padding-inline-end: 10px !important; 45 | } 46 | 47 | .icon-settings { 48 | display: none !important; 49 | } 50 | 51 | .fake-textbox { 52 | text-align: center !important; 53 | } 54 | 55 | .search-wrapper input { 56 | background-color: #151a1c !important; 57 | border-radius: 0px !important; 58 | 59 | background-image: none !important; 60 | background-size: none !important; 61 | text-align: center !important; 62 | font-size: 17px !important; 63 | 64 | padding-inline-start: 10px !important; 65 | padding-inline-end: 10px !important; 66 | } 67 | 68 | .search-wrapper input:focus { 69 | text-align: left !important; 70 | } 71 | 72 | .body-wrapper { 73 | display: none !important; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /home/.XCompose: -------------------------------------------------------------------------------- 1 | include "%L" 2 | 3 | : "Ä" Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESTS 4 | : "ä" adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS 5 | : "Ü" Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS 6 | : "ü" udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS 7 | : "Ö" Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS 8 | : "ö" odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS 9 | : "ß" ssharp # LATIN SMALL LETTER SHARP S 10 | : "ẞ" U1e9e # LATIN CAPITAL LETTER SHARP S 11 | -------------------------------------------------------------------------------- /home/.Xmodmap: -------------------------------------------------------------------------------- 1 | keycode 8 = 2 | keycode 9 = Escape NoSymbol Escape 3 | keycode 10 = 1 exclam 1 exclam Arabic_1 4 | keycode 11 = 2 at 2 at Arabic_2 5 | keycode 12 = 3 numbersign 3 numbersign Arabic_3 6 | keycode 13 = 4 dollar 4 dollar Arabic_4 7 | keycode 14 = 5 percent 5 percent Arabic_5 U2030 8 | keycode 15 = 6 asciicircum 6 asciicircum Arabic_6 9 | keycode 16 = 7 ampersand 7 ampersand Arabic_7 10 | keycode 17 = 8 asterisk 8 asterisk Arabic_8 11 | keycode 18 = 9 parenleft 9 parenright Arabic_9 12 | keycode 19 = 0 parenright 0 parenleft Arabic_0 13 | keycode 20 = minus underscore minus underscore endash U2011 14 | keycode 21 = equal plus equal plus notequal approxeq 15 | keycode 22 = BackSpace BackSpace BackSpace BackSpace 16 | keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab 17 | keycode 24 = q Q Arabic_dad Arabic_fatha NoSymbol U2066 18 | keycode 25 = w W Arabic_sad Arabic_fathatan NoSymbol U2067 19 | keycode 26 = e E Arabic_theh Arabic_damma NoSymbol U2068 20 | keycode 27 = r R Arabic_qaf Arabic_dammatan NoSymbol U2069 21 | keycode 28 = t T Arabic_feh UFEF9 Arabic_veh 22 | keycode 29 = y Y Arabic_ghain Arabic_hamzaunderalef NoSymbol U202A 23 | keycode 30 = u U Arabic_ain grave NoSymbol U202B 24 | keycode 31 = i I Arabic_ha division NoSymbol U202C 25 | keycode 32 = o O Arabic_khah multiply 26 | keycode 33 = p P Arabic_hah Arabic_semicolon NoSymbol U200E 27 | keycode 34 = bracketleft braceleft Arabic_jeem less Arabic_tcheh U200F 28 | keycode 35 = bracketright braceright Arabic_dal greater NoSymbol U061C 29 | keycode 36 = Return NoSymbol Return 30 | keycode 37 = Control_L NoSymbol Control_L 31 | keycode 38 = a A Arabic_sheen Arabic_kasra 32 | keycode 39 = s S Arabic_seen Arabic_kasratan 33 | keycode 40 = d D Arabic_yeh bracketright 34 | keycode 41 = f F Arabic_beh bracketleft Arabic_peh 35 | keycode 42 = g G Arabic_lam UFEF7 36 | keycode 43 = h H Arabic_alef Arabic_hamzaonalef U0671 37 | keycode 44 = j J Arabic_teh Arabic_tatweel 38 | keycode 45 = k K Arabic_noon Arabic_comma U066B 39 | keycode 46 = l L Arabic_meem slash 40 | keycode 47 = semicolon colon Arabic_kaf colon Arabic_gaf 41 | keycode 48 = apostrophe quotedbl Arabic_tah quotedbl U27E9 U200D 42 | keycode 49 = grave asciitilde Arabic_thal Arabic_shadda Arabic_percent U0609 43 | keycode 50 = Shift_L ISO_Next_Group Shift_L ISO_Next_Group 44 | keycode 51 = backslash bar backslash ellipsis U27E8 U202F 45 | keycode 52 = z Z Arabic_hamzaonyeh asciitilde guillemotright U203A 46 | keycode 53 = x X Arabic_hamza Arabic_sukun guillemotleft U2039 47 | keycode 54 = c C Arabic_hamzaonwaw braceright 48 | keycode 55 = v V Arabic_ra braceleft 49 | keycode 56 = b B UFEFB UFEF5 50 | keycode 57 = n N Arabic_alefmaksura Arabic_maddaonalef Arabic_superscript_alef 51 | keycode 58 = m M Arabic_tehmarbuta apostrophe 52 | keycode 59 = comma less Arabic_waw comma U066C 53 | keycode 60 = period greater Arabic_zain period Arabic_jeh 54 | keycode 61 = slash question Arabic_zah Arabic_question_mark U066D U200C 55 | keycode 62 = Shift_R ISO_Next_Group Shift_R ISO_Next_Group 56 | keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab KP_Multiply KP_Multiply XF86ClearGrab 57 | keycode 64 = Alt_L ISO_Next_Group Alt_L ISO_Next_Group 58 | keycode 65 = space NoSymbol space 59 | keycode 66 = Caps_Lock NoSymbol Caps_Lock 60 | keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 XF86Switch_VT_1 61 | keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 F2 F2 XF86Switch_VT_2 62 | keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 F3 F3 XF86Switch_VT_3 63 | keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 F4 F4 XF86Switch_VT_4 64 | keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 F5 F5 XF86Switch_VT_5 65 | keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 F6 F6 XF86Switch_VT_6 66 | keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 F7 F7 XF86Switch_VT_7 67 | keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 F8 F8 XF86Switch_VT_8 68 | keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 F9 F9 XF86Switch_VT_9 69 | keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 F10 F10 XF86Switch_VT_10 70 | keycode 77 = Num_Lock NoSymbol Num_Lock 71 | keycode 78 = Scroll_Lock NoSymbol Scroll_Lock 72 | keycode 79 = KP_Home KP_7 KP_Home KP_7 73 | keycode 80 = KP_Up KP_8 KP_Up KP_8 74 | keycode 81 = KP_Prior KP_9 KP_Prior KP_9 75 | keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode KP_Subtract KP_Subtract XF86Prev_VMode 76 | keycode 83 = KP_Left KP_4 KP_Left KP_4 77 | keycode 84 = KP_Begin KP_5 KP_Begin KP_5 78 | keycode 85 = KP_Right KP_6 KP_Right KP_6 79 | keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode KP_Add KP_Add XF86Next_VMode 80 | keycode 87 = KP_End KP_1 KP_End KP_1 81 | keycode 88 = KP_Down KP_2 KP_Down KP_2 82 | keycode 89 = KP_Next KP_3 KP_Next KP_3 83 | keycode 90 = KP_Insert KP_0 KP_Insert KP_0 84 | keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal 85 | keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift 86 | keycode 93 = 87 | keycode 94 = Multi_key less greater bar brokenbar bar brokenbar 88 | keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 XF86Switch_VT_11 89 | keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12 90 | keycode 97 = 91 | keycode 98 = Katakana NoSymbol Katakana 92 | keycode 99 = Hiragana NoSymbol Hiragana 93 | keycode 100 = Henkan_Mode NoSymbol Henkan_Mode 94 | keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana 95 | keycode 102 = Muhenkan NoSymbol Muhenkan 96 | keycode 103 = 97 | keycode 104 = KP_Enter NoSymbol KP_Enter 98 | keycode 105 = Control_R NoSymbol Control_R 99 | keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab KP_Divide KP_Divide XF86Ungrab 100 | keycode 107 = Print Sys_Req Print Sys_Req 101 | keycode 108 = Alt_R Meta_R ISO_Next_Group ISO_Level3_Shift 102 | keycode 109 = Linefeed NoSymbol Linefeed 103 | keycode 110 = Home NoSymbol Home 104 | keycode 111 = Up NoSymbol Up 105 | keycode 112 = Prior NoSymbol Prior 106 | keycode 113 = Left NoSymbol Left 107 | keycode 114 = Right NoSymbol Right 108 | keycode 115 = End NoSymbol End 109 | keycode 116 = Down NoSymbol Down 110 | keycode 117 = Next NoSymbol Next 111 | keycode 118 = Insert NoSymbol Insert 112 | keycode 119 = Delete NoSymbol Delete 113 | keycode 120 = 114 | keycode 121 = XF86AudioMute NoSymbol XF86AudioMute 115 | keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume 116 | keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume 117 | keycode 124 = XF86PowerOff NoSymbol XF86PowerOff 118 | keycode 125 = KP_Equal NoSymbol KP_Equal 119 | keycode 126 = plusminus NoSymbol plusminus 120 | keycode 127 = Pause Break Pause Break 121 | keycode 128 = XF86LaunchA NoSymbol XF86LaunchA 122 | keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal 123 | keycode 130 = Hangul NoSymbol Hangul 124 | keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja 125 | keycode 132 = 126 | keycode 133 = Super_L NoSymbol Super_L 127 | keycode 134 = Super_R NoSymbol Super_R 128 | keycode 135 = Menu NoSymbol Menu 129 | keycode 136 = Cancel NoSymbol Cancel 130 | keycode 137 = Redo NoSymbol Redo 131 | keycode 138 = SunProps NoSymbol SunProps 132 | keycode 139 = Undo NoSymbol Undo 133 | keycode 140 = SunFront NoSymbol SunFront 134 | keycode 141 = XF86Copy NoSymbol XF86Copy 135 | keycode 142 = XF86Open NoSymbol XF86Open 136 | keycode 143 = XF86Paste NoSymbol XF86Paste 137 | keycode 144 = Find NoSymbol Find 138 | keycode 145 = XF86Cut NoSymbol XF86Cut 139 | keycode 146 = Help NoSymbol Help 140 | keycode 147 = XF86MenuKB NoSymbol XF86MenuKB 141 | keycode 148 = XF86Calculator NoSymbol XF86Calculator 142 | keycode 149 = 143 | keycode 150 = XF86Sleep NoSymbol XF86Sleep 144 | keycode 151 = XF86WakeUp NoSymbol XF86WakeUp 145 | keycode 152 = XF86Explorer NoSymbol XF86Explorer 146 | keycode 153 = XF86Send NoSymbol XF86Send 147 | keycode 154 = 148 | keycode 155 = XF86Xfer NoSymbol XF86Xfer 149 | keycode 156 = XF86Launch1 NoSymbol XF86Launch1 150 | keycode 157 = XF86Launch2 NoSymbol XF86Launch2 151 | keycode 158 = XF86WWW NoSymbol XF86WWW 152 | keycode 159 = XF86DOS NoSymbol XF86DOS 153 | keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver 154 | keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows 155 | keycode 162 = XF86TaskPane NoSymbol XF86TaskPane 156 | keycode 163 = XF86Mail NoSymbol XF86Mail 157 | keycode 164 = XF86Favorites NoSymbol XF86Favorites 158 | keycode 165 = XF86MyComputer NoSymbol XF86MyComputer 159 | keycode 166 = XF86Back NoSymbol XF86Back 160 | keycode 167 = XF86Forward NoSymbol XF86Forward 161 | keycode 168 = 162 | keycode 169 = XF86Eject NoSymbol XF86Eject 163 | keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject 164 | keycode 171 = XF86AudioNext NoSymbol XF86AudioNext 165 | keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause 166 | keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev 167 | keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject 168 | keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord 169 | keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind 170 | keycode 177 = XF86Phone NoSymbol XF86Phone 171 | keycode 178 = 172 | keycode 179 = XF86Tools NoSymbol XF86Tools 173 | keycode 180 = XF86HomePage NoSymbol XF86HomePage 174 | keycode 181 = XF86Reload NoSymbol XF86Reload 175 | keycode 182 = XF86Close NoSymbol XF86Close 176 | keycode 183 = 177 | keycode 184 = 178 | keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp 179 | keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown 180 | keycode 187 = parenleft NoSymbol parenleft 181 | keycode 188 = parenright NoSymbol parenright 182 | keycode 189 = XF86New NoSymbol XF86New 183 | keycode 190 = Redo NoSymbol Redo 184 | keycode 191 = XF86Tools NoSymbol XF86Tools 185 | keycode 192 = XF86Launch5 NoSymbol XF86Launch5 186 | keycode 193 = XF86Launch6 NoSymbol XF86Launch6 187 | keycode 194 = XF86Launch7 NoSymbol XF86Launch7 188 | keycode 195 = XF86Launch8 NoSymbol XF86Launch8 189 | keycode 196 = XF86Launch9 NoSymbol XF86Launch9 190 | keycode 197 = 191 | keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute 192 | keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle 193 | keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn 194 | keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff 195 | keycode 202 = 196 | keycode 203 = Mode_switch NoSymbol Mode_switch 197 | keycode 204 = NoSymbol Alt_L NoSymbol Alt_L 198 | keycode 205 = NoSymbol Meta_L NoSymbol Meta_L 199 | keycode 206 = NoSymbol Super_L NoSymbol Super_L 200 | keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L 201 | keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay 202 | keycode 209 = XF86AudioPause NoSymbol XF86AudioPause 203 | keycode 210 = XF86Launch3 NoSymbol XF86Launch3 204 | keycode 211 = XF86Launch4 NoSymbol XF86Launch4 205 | keycode 212 = XF86LaunchB NoSymbol XF86LaunchB 206 | keycode 213 = XF86Suspend NoSymbol XF86Suspend 207 | keycode 214 = XF86Close NoSymbol XF86Close 208 | keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay 209 | keycode 216 = XF86AudioForward NoSymbol XF86AudioForward 210 | keycode 217 = 211 | keycode 218 = Print NoSymbol Print 212 | keycode 219 = 213 | keycode 220 = XF86WebCam NoSymbol XF86WebCam 214 | keycode 221 = XF86AudioPreset NoSymbol XF86AudioPreset 215 | keycode 222 = 216 | keycode 223 = XF86Mail NoSymbol XF86Mail 217 | keycode 224 = XF86Messenger NoSymbol XF86Messenger 218 | keycode 225 = XF86Search NoSymbol XF86Search 219 | keycode 226 = XF86Go NoSymbol XF86Go 220 | keycode 227 = XF86Finance NoSymbol XF86Finance 221 | keycode 228 = XF86Game NoSymbol XF86Game 222 | keycode 229 = XF86Shop NoSymbol XF86Shop 223 | keycode 230 = 224 | keycode 231 = Cancel NoSymbol Cancel 225 | keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown 226 | keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp 227 | keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia 228 | keycode 235 = XF86Display NoSymbol XF86Display 229 | keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff 230 | keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown 231 | keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp 232 | keycode 239 = XF86Send NoSymbol XF86Send 233 | keycode 240 = XF86Reply NoSymbol XF86Reply 234 | keycode 241 = XF86MailForward NoSymbol XF86MailForward 235 | keycode 242 = XF86Save NoSymbol XF86Save 236 | keycode 243 = XF86Documents NoSymbol XF86Documents 237 | keycode 244 = XF86Battery NoSymbol XF86Battery 238 | keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth 239 | keycode 246 = XF86WLAN NoSymbol XF86WLAN 240 | keycode 247 = 241 | keycode 248 = 242 | keycode 249 = 243 | keycode 250 = 244 | keycode 251 = XF86MonBrightnessCycle NoSymbol XF86MonBrightnessCycle 245 | keycode 252 = 246 | keycode 253 = 247 | keycode 254 = XF86WWAN NoSymbol XF86WWAN 248 | keycode 255 = XF86RFKill NoSymbol XF86RFKill 249 | -------------------------------------------------------------------------------- /home/.Xresources: -------------------------------------------------------------------------------- 1 | ! font shit 2 | Xft.autohint: 0 3 | Xft.antialias: 1 4 | Xft.hinting: true 5 | Xft.hintstyle: hintslight 6 | Xft.dpi: 96 7 | Xft.rgba: rgb 8 | Xft.lcdfilter: lcddefault 9 | 10 | ! Color Scheme 11 | #include "/home/mahmoud/var/xre/prufung" 12 | -------------------------------------------------------------------------------- /home/.xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this file is run when calling startx 4 | 5 | # default arch init scripts 6 | if [ -d /etc/X11/xinit/xinitrc.d ]; then 7 | for f in /etc/X11/xinit/xinitrc.d/?*.sh; do 8 | [ -x "$f" ] && . "$f" 9 | done 10 | fi 11 | 12 | # user init scripts and settings 13 | [ -r /etc/X11/xinit/.Xmodmap ] && xmodmap /etc/X11/xinit/.Xmodmap 14 | [ -r ~/.Xmodmap ] && xmodmap ~/.Xmodmap 15 | [ -r ~/.Xresources ] && xrdb -merge ~/.Xresources 16 | [ -r ~/.xprofile ] && . ~/.xprofile 17 | 18 | # dbus 19 | dbus-update-activation-environment --systemd DISPLAY 20 | eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) 21 | export SSH_AUTH_SOCK 22 | 23 | # launch the session, commands below this line will be ignored 24 | bspwm 25 | -------------------------------------------------------------------------------- /home/.xprofile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # set important paths 4 | export XDG_CONFIG_HOME="$HOME/.config" 5 | 6 | [ -d /sbin ] && PATH="$PATH:/sbin" 7 | [ -d /usr/sbin ] && PATH="$PATH:/usr/sbin" 8 | [ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH" 9 | -------------------------------------------------------------------------------- /ncmpcpp/config: -------------------------------------------------------------------------------- 1 | mpd_music_dir = ~/Musik 2 | mpd_crossfade_time = "3" 3 | 4 | /* UI */ 5 | song_list_format = " {$6%a$4 - }{$5%t$1}$R{$2%l} " 6 | song_status_format = "$2%a $1:: $4%t $1:: $3%b$1" 7 | song_columns_list_format = "(8f)[black]{l} (32)[red]{a} (42)[yellow]{t|f} (18)[magenta]{b}" 8 | now_playing_prefix = "‣" 9 | now_playing_suffix = "$/b" 10 | selected_item_prefix = "$3" 11 | selected_item_suffix = "$9" 12 | progressbar_look = "░█ " 13 | alternative_header_first_line_format ="{$b$2%a$9} $1::$9 {$5%t$9}" 14 | alternative_header_second_line_format ="{$6%b$9} $1::$9 {$2(%y)$9}" 15 | 16 | user_interface = "classic" 17 | browser_display_mode = "columns" 18 | header_visibility = "no" 19 | statusbar_visibility = "yes" 20 | titles_visibility = "no" 21 | mouse_support = "no" 22 | cyclic_scrolling = "yes" 23 | autocenter_mode = "yes" 24 | centered_cursor = "yes" 25 | discard_colors_if_item_is_selected = "no" 26 | display_remaining_time = "yes" 27 | display_bitrate = "no" 28 | playlist_disable_highlight_delay = "1" 29 | playlist_display_mode = "classic" 30 | enable_window_title = "no" 31 | clock_display_seconds = "no" 32 | 33 | /* colors */ 34 | colors_enabled = "yes" 35 | statusbar_color = "black" 36 | empty_tag_color = "yellow" 37 | main_window_color = "black" 38 | volume_color = "black" 39 | color1 = "white" 40 | color2 = "blue" 41 | progressbar_color = "black" 42 | window_border_color = "red" 43 | active_window_border = "red" 44 | header_window_color = "black" 45 | alternative_ui_separator_color ="black" 46 | 47 | /* visualizer */ 48 | visualizer_fifo_path = "/tmp/mpd.fifo" 49 | visualizer_output_name = "Visualizer" 50 | visualizer_type = "wave" (spectrum/wave) 51 | visualizer_sync_interval = "30" 52 | visualizer_color = "red" 53 | visualizer_in_stereo = "yes" 54 | 55 | external_editor = nvim 56 | -------------------------------------------------------------------------------- /picom/picom.conf: -------------------------------------------------------------------------------- 1 | ################################ 2 | # Transition # 3 | ################################# 4 | 5 | # When windows get moved or resized it transitions window position 6 | transition = true; 7 | 8 | # How many pixels move window to make the first position in transition (defaults to 20) 9 | transition-offset = 40; 10 | 11 | # Direction of transition (top, right, bottom, left) e.g: "right" direction will make 12 | # all windows come from right to left 13 | 14 | # (smart-x, smart-y) are smart direction that will check if there are 15 | # multiple windows that splits the screen and will change their directions, 16 | # in "smart-x" it changes direction of left window to "right" and direction of 17 | # right window to "left", if screen is not splited and a window is taking 18 | # a lot of screen it will change that window direction to "left". 19 | # "smart-y" is also exactly like "smart-x" but instead of translating directions to 20 | # "right" and "left", it translate to "top" and "bottom" 21 | transition-direction = "smart-x"; 22 | 23 | # Function that calculates new position of window (defaults to "ease-out-cubic") 24 | # see https://easings.net for list of all functions 25 | # naming conventions are different to that site tho, e.g "easeInSine" is listed 26 | # on site but here that translated to "ease-in-sine" 27 | transition-timing-function = "ease-out-cubic"; 28 | 29 | # Time between frames in transition. (0.01 - 1.0, defaults to 0.028) 30 | transition-step = 0.03; 31 | 32 | # Similar to opacity rules but determites transition direction e.g: 33 | # "right: name *= 'Firefox'" will make firefox transition direction to right 34 | # Specify a list of transition rules, in the format `DIRECTION:PATTERN` 35 | 36 | # for disabling transition on specific patterns use "none" keyword as a direction 37 | # e.g: use "none: window_type = 'popup_menu'" for disabling transitions on popup menus 38 | transition-rule = [ 39 | "bottom: class_g = 'Steam' && name != 'Steam'", 40 | "none: window_type != 'normal'" 41 | ]; 42 | 43 | ################################# 44 | # Shadows # 45 | ################################# 46 | 47 | 48 | # Enabled client-side shadows on windows. Note desktop windows 49 | # (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, 50 | # unless explicitly requested using the wintypes option. 51 | # 52 | # shadow = false 53 | shadow = true; 54 | 55 | # The blur radius for shadows, in pixels. (defaults to 12) 56 | # shadow-radius = 12 57 | shadow-radius = 20; 58 | 59 | # The opacity of shadows. (0.0 - 1.0, defaults to 0.75) 60 | # shadow-opacity = .75 61 | 62 | # The left offset for shadows, in pixels. (defaults to -15) 63 | # shadow-offset-x = -15 64 | shadow-offset-x = -20; 65 | 66 | # The top offset for shadows, in pixels. (defaults to -15) 67 | # shadow-offset-y = -15 68 | shadow-offset-y = -20; 69 | 70 | # Red color value of shadow (0.0 - 1.0, defaults to 0). 71 | # shadow-red = 0 72 | 73 | # Green color value of shadow (0.0 - 1.0, defaults to 0). 74 | # shadow-green = 0 75 | 76 | # Blue color value of shadow (0.0 - 1.0, defaults to 0). 77 | # shadow-blue = 0 78 | 79 | # Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) 80 | # shadow-color = "#000000" 81 | 82 | # Specify a list of conditions of windows that should have no shadow. 83 | # 84 | # examples: 85 | # shadow-exclude = "n:e:Notification"; 86 | # 87 | # shadow-exclude = [] 88 | shadow-exclude = [ 89 | "name = 'Notification'", 90 | "class_g = 'Conky'", 91 | "class_g ?= 'Notify-osd'", 92 | "class_g = 'Cairo-clock'", 93 | "class_g = 'dmenu'", 94 | "_GTK_FRAME_EXTENTS@:c" 95 | ]; 96 | 97 | # Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. 98 | # clip-shadow-above = [] 99 | 100 | # Specify a X geometry that describes the region in which shadow should not 101 | # be painted in, such as a dock window region. Use 102 | # shadow-exclude-reg = "x10+0+0" 103 | # for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. 104 | # 105 | # shadow-exclude-reg = "" 106 | 107 | # Crop shadow of a window fully on a particular Xinerama screen to the screen. 108 | # xinerama-shadow-crop = false 109 | 110 | 111 | ################################# 112 | # Fading # 113 | ################################# 114 | 115 | 116 | # Fade windows in/out when opening/closing and when opacity changes, 117 | # unless no-fading-openclose is used. 118 | # fading = false 119 | fading = true; 120 | 121 | # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) 122 | # fade-in-step = 0.028 123 | fade-in-step = 0.056; 124 | 125 | # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) 126 | # fade-out-step = 0.03 127 | fade-out-step = 0.06; 128 | 129 | # The time between steps in fade step, in milliseconds. (> 0, defaults to 10) 130 | # fade-delta = 10 131 | 132 | # Specify a list of conditions of windows that should not be faded. 133 | # fade-exclude = [] 134 | 135 | # Do not fade on window open/close. 136 | # no-fading-openclose = false 137 | 138 | # Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. 139 | # no-fading-destroyed-argb = false 140 | 141 | 142 | ################################# 143 | # Transparency / Opacity # 144 | ################################# 145 | 146 | 147 | # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) 148 | # inactive-opacity = 1 149 | inactive-opacity = 1; 150 | 151 | # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) 152 | # frame-opacity = 1.0 153 | frame-opacity = 1; 154 | 155 | # Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. 156 | # inactive-opacity-override = true 157 | inactive-opacity-override = false; 158 | 159 | # Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) 160 | # active-opacity = 1.0 161 | 162 | # Dim inactive windows. (0.0 - 1.0, defaults to 0.0) 163 | # inactive-dim = 0.0 164 | 165 | # Specify a list of conditions of windows that should never be considered focused. 166 | # focus-exclude = [] 167 | focus-exclude = [ "class_g = 'Cairo-clock'" ]; 168 | 169 | # Use fixed inactive dim value, instead of adjusting according to window opacity. 170 | # inactive-dim-fixed = 1.0 171 | 172 | # Specify a list of opacity rules, in the format `PERCENT:PATTERN`, 173 | # like `50:name *= "Firefox"`. picom-trans is recommended over this. 174 | # Note we don't make any guarantee about possible conflicts with other 175 | # programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. 176 | # example: 177 | # opacity-rule = [ "80:class_g = 'URxvt'" ]; 178 | # 179 | opacity-rule = [ 180 | "90:class_g = 'code-oss'", 181 | "90:class_g = 'Alacritty'", 182 | "90:class_g = 'dwm'", 183 | "90:class_g = 'dmenu'", 184 | "95:class_g = 'Spotify'" 185 | ] 186 | 187 | 188 | ################################# 189 | # Corners # 190 | ################################# 191 | 192 | # Sets the radius of rounded window corners. When > 0, the compositor will 193 | # round the corners of windows. Does not interact well with 194 | # `transparent-clipping`. 195 | corner-radius = 0 196 | 197 | # Exclude conditions for rounded corners. 198 | rounded-corners-exclude = [ 199 | "window_type = 'dock'", 200 | "window_type = 'desktop'" 201 | ]; 202 | 203 | 204 | ################################# 205 | # Background-Blurring # 206 | ################################# 207 | 208 | 209 | # Parameters for background blurring, see the *BLUR* section for more information. 210 | blur-method = "dual_kawase" 211 | blur-size = 12 212 | # 213 | # blur-deviation = false 214 | # 215 | # blur-strength = 5 216 | 217 | # Blur background of semi-transparent / ARGB windows. 218 | # Bad in performance, with driver-dependent behavior. 219 | # The name of the switch may change without prior notifications. 220 | # 221 | # blur-background = false 222 | 223 | # Blur background of windows when the window frame is not opaque. 224 | # Implies: 225 | # blur-background 226 | # Bad in performance, with driver-dependent behavior. The name may change. 227 | # 228 | # blur-background-frame = false 229 | 230 | 231 | # Use fixed blur strength rather than adjusting according to window opacity. 232 | # blur-background-fixed = false 233 | 234 | 235 | # Specify the blur convolution kernel, with the following format: 236 | # example: 237 | # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; 238 | # 239 | # blur-kern = "" 240 | # blur-kern = "3x3box"; 241 | 242 | 243 | # Exclude conditions for background blur. 244 | # blur-background-exclude = [] 245 | blur-background-exclude = [ 246 | "window_type = 'dock'", 247 | "window_type = 'desktop'", 248 | "_GTK_FRAME_EXTENTS@:c" 249 | ]; 250 | 251 | ################################# 252 | # General Settings # 253 | ################################# 254 | 255 | # Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. 256 | # daemon = false 257 | 258 | # Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. 259 | # `xrender` is the default one. 260 | # 261 | # backend = "glx" 262 | backend = "glx"; 263 | 264 | # Enable/disable VSync. 265 | # vsync = false 266 | vsync = true; 267 | 268 | # Enable remote control via D-Bus. See the *D-BUS API* section below for more details. 269 | # dbus = false 270 | 271 | # Try to detect WM windows (a non-override-redirect window with no 272 | # child that has 'WM_STATE') and mark them as active. 273 | # 274 | # mark-wmwin-focused = false 275 | mark-wmwin-focused = true; 276 | 277 | # Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. 278 | # mark-ovredir-focused = false 279 | mark-ovredir-focused = true; 280 | 281 | # Try to detect windows with rounded corners and don't consider them 282 | # shaped windows. The accuracy is not very high, unfortunately. 283 | # 284 | # detect-rounded-corners = false 285 | detect-rounded-corners = true; 286 | 287 | # Detect '_NET_WM_OPACITY' on client windows, useful for window managers 288 | # not passing '_NET_WM_OPACITY' of client windows to frame windows. 289 | # 290 | # detect-client-opacity = false 291 | detect-client-opacity = true; 292 | 293 | # Specify refresh rate of the screen. If not specified or 0, picom will 294 | # try detecting this with X RandR extension. 295 | # 296 | # refresh-rate = 60 297 | refresh-rate = 60; 298 | 299 | # Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, 300 | # rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, 301 | # provided that the WM supports it. 302 | # 303 | # use-ewmh-active-win = false 304 | 305 | # Unredirect all windows if a full-screen opaque window is detected, 306 | # to maximize performance for full-screen windows. Known to cause flickering 307 | # when redirecting/unredirecting windows. 308 | # 309 | unredir-if-possible = true; 310 | 311 | # Delay before unredirecting the window, in milliseconds. Defaults to 0. 312 | # unredir-if-possible-delay = 0 313 | 314 | # Conditions of windows that shouldn't be considered full-screen for unredirecting screen. 315 | unredir-if-possible-exclude = [ 316 | "class_g = 'vlc'" 317 | ] 318 | 319 | # Use 'WM_TRANSIENT_FOR' to group windows, and consider windows 320 | # in the same group focused at the same time. 321 | # 322 | # detect-transient = false 323 | detect-transient = true; 324 | 325 | # Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same 326 | # group focused at the same time. This usually means windows from the same application 327 | # will be considered focused or unfocused at the same time. 328 | # 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. 329 | # 330 | # detect-client-leader = false 331 | 332 | # Resize damaged region by a specific number of pixels. 333 | # A positive value enlarges it while a negative one shrinks it. 334 | # If the value is positive, those additional pixels will not be actually painted 335 | # to screen, only used in blur calculation, and such. (Due to technical limitations, 336 | # with use-damage, those pixels will still be incorrectly painted to screen.) 337 | # Primarily used to fix the line corruption issues of blur, 338 | # in which case you should use the blur radius value here 339 | # (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, 340 | # with a 5x5 one you use `--resize-damage 2`, and so on). 341 | # May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. 342 | # 343 | # resize-damage = 1 344 | 345 | # Specify a list of conditions of windows that should be painted with inverted color. 346 | # Resource-hogging, and is not well tested. 347 | # 348 | # invert-color-include = [] 349 | 350 | # GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. 351 | # Might cause incorrect opacity when rendering transparent content (but never 352 | # practically happened) and may not work with blur-background. 353 | # My tests show a 15% performance boost. Recommended. 354 | # 355 | # glx-no-stencil = false 356 | 357 | # GLX backend: Avoid rebinding pixmap on window damage. 358 | # Probably could improve performance on rapid window content changes, 359 | # but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). 360 | # Recommended if it works. 361 | # 362 | # glx-no-rebind-pixmap = false 363 | 364 | # Disable the use of damage information. 365 | # This cause the whole screen to be redrawn everytime, instead of the part of the screen 366 | # has actually changed. Potentially degrades the performance, but might fix some artifacts. 367 | # The opposing option is use-damage 368 | # 369 | # no-use-damage = false 370 | use-damage = true; 371 | 372 | # Use X Sync fence to sync clients' draw calls, to make sure all draw 373 | # calls are finished before picom starts drawing. Needed on nvidia-drivers 374 | # with GLX backend for some users. 375 | # 376 | # xrender-sync-fence = false 377 | 378 | # GLX backend: Use specified GLSL fragment shader for rendering window contents. 379 | # See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` 380 | # in the source tree for examples. 381 | # 382 | # glx-fshader-win = "" 383 | 384 | # Force all windows to be painted with blending. Useful if you 385 | # have a glx-fshader-win that could turn opaque pixels transparent. 386 | # 387 | # force-win-blend = false 388 | 389 | # Do not use EWMH to detect fullscreen windows. 390 | # Reverts to checking if a window is fullscreen based only on its size and coordinates. 391 | # 392 | # no-ewmh-fullscreen = false 393 | 394 | # Dimming bright windows so their brightness doesn't exceed this set value. 395 | # Brightness of a window is estimated by averaging all pixels in the window, 396 | # so this could comes with a performance hit. 397 | # Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) 398 | # 399 | # max-brightness = 1.0 400 | 401 | # Make transparent windows clip other windows like non-transparent windows do, 402 | # instead of blending on top of them. 403 | # 404 | # transparent-clipping = false 405 | 406 | # Set the log level. Possible values are: 407 | # "trace", "debug", "info", "warn", "error" 408 | # in increasing level of importance. Case doesn't matter. 409 | # If using the "TRACE" log level, it's better to log into a file 410 | # using *--log-file*, since it can generate a huge stream of logs. 411 | # 412 | # log-level = "debug" 413 | log-level = "warn"; 414 | 415 | # Set the log file. 416 | # If *--log-file* is never specified, logs will be written to stderr. 417 | # Otherwise, logs will to written to the given file, though some of the early 418 | # logs might still be written to the stderr. 419 | # When setting this option from the config file, it is recommended to use an absolute path. 420 | # 421 | # log-file = "/path/to/your/log/file" 422 | 423 | # Show all X errors (for debugging) 424 | # show-all-xerrors = false 425 | 426 | # Write process ID to a file. 427 | # write-pid-path = "/path/to/your/log/file" 428 | 429 | # Window type settings 430 | # 431 | # 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: 432 | # "unknown", "desktop", "dock", "toolbar", "menu", "utility", 433 | # "splash", "dialog", "normal", "dropdown_menu", "popup_menu", 434 | # "tooltip", "notification", "combo", and "dnd". 435 | # 436 | # Following per window-type options are available: :: 437 | # 438 | # fade, shadow::: 439 | # Controls window-type-specific shadow and fade settings. 440 | # 441 | # opacity::: 442 | # Controls default opacity of the window type. 443 | # 444 | # focus::: 445 | # Controls whether the window of this type is to be always considered focused. 446 | # (By default, all window types except "normal" and "dialog" has this on.) 447 | # 448 | # full-shadow::: 449 | # Controls whether shadow is drawn under the parts of the window that you 450 | # normally won't be able to see. Useful when the window has parts of it 451 | # transparent, and you want shadows in those areas. 452 | # 453 | # clip-shadow-above::: 454 | # Controls wether shadows that would have been drawn above the window should 455 | # be clipped. Useful for dock windows that should have no shadow painted on top. 456 | # 457 | # redir-ignore::: 458 | # Controls whether this type of windows should cause screen to become 459 | # redirected again after been unredirected. If you have unredir-if-possible 460 | # set, and doesn't want certain window to cause unnecessary screen redirection, 461 | # you can set this to `true`. 462 | # 463 | # wintypes: 464 | # { 465 | # tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; 466 | # dock = { shadow = false; clip-shadow-above = true; } 467 | # dnd = { shadow = false; } 468 | # popup_menu = { opacity = 0.8; } 469 | # dropdown_menu = { opacity = 0.8; } 470 | # }; 471 | -------------------------------------------------------------------------------- /polybar/config: -------------------------------------------------------------------------------- 1 | ;; ==================== COLORS ====================== 2 | [colors] 3 | background = ${xrdb:polybar.background} 4 | foreground = ${xrdb:polybar.foreground} 5 | 6 | black = ${xrdb:polybar.color0} 7 | red = ${xrdb:Polybar.color1} 8 | green = ${xrdb:Polybar.color2} 9 | yellow = ${xrdb:Polybar.color3} 10 | blue = ${xrdb:Polybar.color4} 11 | magenta = ${xrdb:Polybar.color5} 12 | cyan = ${xrdb:Polybar.color6} 13 | white = ${xrdb:Polybar.color7} 14 | dark = ${xrdb:Polybar.color8} 15 | ;; ===================== BARS ======================== 16 | [bar/main] 17 | monitor = eDP-1 18 | bottom = true 19 | height = 40 20 | offset-y = 10 21 | offset-x = 0% 22 | radius-top = 0 23 | radius-bottom = 0 24 | module-margin = 1 25 | 26 | fixed-center = true 27 | wm-restack = bspwm 28 | override-redirect = true 29 | 30 | border-size = 5 31 | border-color = ${colors.black} 32 | 33 | font-0 = Iosevka:style=Semibold:size=10;3 34 | font-1 = Material Design Icons Desktop:size=10;3 35 | 36 | background = ${colors.background} 37 | foreground = ${colors.foreground} 38 | 39 | [bar/ein] 40 | inherit = bar/main 41 | width = 15% 42 | offset-x = 10 43 | 44 | modules-center = bspwm 45 | 46 | [bar/zwei] 47 | inherit = bar/main 48 | width = 15% 49 | offset-x = 1622 50 | 51 | modules-center = pulseaudio backlight bluetooth battery 52 | 53 | [bar/drei] 54 | inherit = bar/main 55 | width = 10% 56 | offset-x = 864 57 | 58 | modules-center = time 59 | 60 | ;; ===================== BSPWM ======================= 61 | [module/bspwm] 62 | type = internal/bspwm 63 | 64 | enable-click = true 65 | enable-scroll = true 66 | 67 | label-focused = ⭕ 68 | label-focused-padding = 1 69 | label-focused-foreground = ${colors.magenta} 70 | 71 | label-occupied = ⭕ 72 | label-occupied-padding = 1 73 | label-occupied-foreground = ${colors.dark} 74 | 75 | label-urgent = ⭕ 76 | label-urgent-padding = 1 77 | label-urgent-foreground = ${colors.red} 78 | 79 | label-empty = ⬤ 80 | label-empty-padding = 1 81 | label-empty-foreground = ${colors.dark} 82 | 83 | ;; =================== BATTERY ===================== 84 | 85 | [module/battery] 86 | type = internal/battery 87 | full-at = 99 88 | battery = BAT0 89 | adapter = ADP0 90 | poll-interval = 5 91 | 92 | format-charging = 󰂄 93 | format-charging-foreground = ${colors.blue} 94 | 95 | format-discharging = 󰁿 96 | format-discharging-foreground = ${colors.blue} 97 | 98 | format-full = 󰁹 99 | format-full-foreground = ${colors.magenta} 100 | 101 | ;; =================== BACKLIGHT ===================== 102 | 103 | [module/backlight] 104 | type = custom/script 105 | format = 󰛨