├── .gitattributes ├── .gitignore ├── Makefile ├── README.md ├── assets ├── .gitattributes ├── 90-usrp.conf ├── UbuntuMono-Nerd-Font.ttf ├── config.conf ├── fosphor-icon.png ├── fosphor.desktop ├── futuresdr-icon.png ├── futuresdr-web.desktop ├── gitconfig ├── gnuradio-web.desktop ├── gqrx-icon.png ├── gqrx.desktop ├── inspectrum-icon.png ├── inspectrum.desktop ├── link-futuresdr-website.desktop ├── link-gnuradio-api.desktop ├── link-gnuradio-website.desktop ├── link-gnuradio-wiki.desktop ├── opencl-silent.cfg ├── spacemacs ├── terminator ├── urh.desktop ├── urhpng.png ├── vimrc ├── wallpaper.png ├── wallpaper.svg ├── zenburn.vim ├── zshenv └── zshrc ├── base.json ├── chroot-iso.sh ├── configure ├── gen-iso.sh ├── grub2 ├── .gitattributes └── grub.cfg ├── meta-data ├── preseed.cfg ├── screen1.png ├── screen2.png ├── screen3.png ├── screen4.png ├── scripts ├── .gitattributes ├── cleanup.sh ├── init-base.sh ├── setup-base.sh └── setup-sdr.sh ├── sdr.json └── user-data /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sh text eol=lf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | packer_cache 2 | vms 3 | assets/l_opencl_p_18.1.0.015.tgz 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean all base sdr 2 | 3 | all: vms/sdr/instant-sdr.ova 4 | 5 | sdr: vms/sdr/instant-sdr.ova 6 | 7 | base: vms/base/instant-sdr-base.ova 8 | 9 | vms/base/instant-sdr-base.ova: base.json scripts/setup-base.sh scripts/init-base.sh 10 | packer build --force base.json 11 | 12 | vms/sdr/instant-sdr.ova: sdr.json assets/l_opencl_p_18.1.0.015.tgz vms/base/instant-sdr-base.ova scripts/setup-sdr.sh 13 | packer build --force sdr.json 14 | 15 | assets/l_opencl_p_18.1.0.015.tgz: 16 | cd assets && wget https://www.fleark.de/l_opencl_p_18.1.0.015.tgz 17 | 18 | clean: 19 | rm -rf vms 20 | rm -rf packer_cache 21 | rm -rf assets/l_opencl_p_18.1.0.015.tgz 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Instant GNU Radio 2 | 3 | A customizable, programmatically generated VM and live environment for GNU Radio. [Download](https://nextcloud.seemoo.tu-darmstadt.de/s/4brQXPgLmL582dn) the VM and get started! 4 | 5 | ![Screenshot](screen2.png) 6 | 7 | ## Requirements 8 | 9 | - Requires **VirtualBox 7.X** to build. 10 | 11 | ## Main Features 12 | 13 | - OVA VM appliance can be imported in all main virtualization solutions or `dd`ed on a USB drive. 14 | - Based on Ubuntu 22.04.1 w/ GNOME 3. 15 | - Two step build process: first create a base image, then extend it with SDR stuff. 16 | - Easy to brand for your own courses/workshops. Just replace the wallpaper in the `assets` folder, for example. 17 | - Software: GNU Radio, GQRX, ... 18 | - Fosphor support! 19 | - Hardware: HackRF, RTL-SDR, BladeRF, Pluto, UHD; properly setup with udev rules and downloaded images. 20 | - Productivity: Git, Meld, VIM, ... 21 | - Favorite applications (in the sidebar) are set to GNU Radio Companion, GQRX, GNU Radio Wiki, ... 22 | - Sane VM defaults (USB, 3D acceleration, audio, shared clipboard, etc.). 23 | - Ready for offline use. 24 | - CPU governors are set to *performance*. 25 | - No annoying crash reports dialogs. 26 | - No screen blanking. 27 | - No `sudo` password. 28 | 29 | ## Credentials 30 | 31 | ``` bash 32 | user: sdr 33 | password: sdr 34 | ``` 35 | 36 | ### SSH Login 37 | 38 | ``` bash 39 | ssh -p2222 sdr@localhost 40 | ``` 41 | 42 | Password is `sdr`. 43 | 44 | You might want to add something like this to your SSH config (`~/.ssh/config`): 45 | 46 | ``` bash 47 | Host vm 48 | Hostname localhost 49 | User sdr 50 | Port 2222 51 | UserKnownHostsFile /dev/null 52 | StrictHostKeyChecking no 53 | ``` 54 | 55 | With this config, you can login with `ssh vm` and your password. 56 | 57 | ## VMWare 58 | 59 | VirtualBox and VMWare use different network interfaces, which results in different names for the Ethernet controller. If the network is not automatically configured use `ip link show` to figure out the device name of the interface and adapt the `ethernets` section of `/etc/netplan/01-netcfg.yaml` accordingly. 60 | 61 | 62 | 63 | 64 | ## Customization 65 | 66 | If you want to rebuild and customize the environment, read on... 67 | 68 | ### Prerequisites 69 | 70 | Instant GNU Radio requires packer and VirtualBox including the Extension Pack. 71 | 72 | On Debian-like systems, the following packets will do the trick: 73 | 74 | ```bash 75 | sudo apt install packer 76 | sudo apt install virtualbox virtualbox-ext-pack 77 | ``` 78 | 79 | On Ubuntu, your user should be in the `vboxusers` group. 80 | 81 | ``` bash 82 | sudo usermod -a -G vboxusers 83 | ``` 84 | 85 | You have to logout and login again for the changes to take effect. 86 | 87 | ### Create Image 88 | 89 | Note: You have to be online to build the image. 90 | 91 | Then, just run: 92 | 93 | ``` bash 94 | configure 95 | ``` 96 | 97 | to check if all dependencies are satisfied. Once `configure` has successfully run, type 98 | 99 | ``` bash 100 | make 101 | ``` 102 | 103 | to build the virtual machine. The output will be in the `vms/` directory. 104 | 105 | Note that there is a `base` file and a `sdr` file. If you make changes to your `sdr.json` you can save time by only rebuilding the latter by running `make sdr`. 106 | 107 | ### Customizing the Virtual Machines 108 | 109 | VM configurations are defined in the packer configuration files `base.json` and `sdr.json`. 110 | 111 | More information on how to customize the virtual machines can be found on the [packer website](https://www.packer.io/). 112 | ## Live Image 113 | 114 | TBD. See the `gen_iso.sh` and `chroot.sh` script. 115 | 116 | ## More Screenshots 117 | ![Screenshot](screen1.png) 118 | ![Screenshot](screen3.png) 119 | ![Screenshot](screen4.png) 120 | -------------------------------------------------------------------------------- /assets/.gitattributes: -------------------------------------------------------------------------------- 1 | *.rules text eol=lf 2 | *.conf text eol=lf 3 | *.desktop text eol=lf 4 | *.cfg text eol=lf 5 | spacemacs text eol=lf 6 | terminator text eol=lf 7 | vimrc text eol=lf 8 | zenburn.vim text eol=lf 9 | zshenv text eol=lf 10 | zshrc text eol=lf -------------------------------------------------------------------------------- /assets/90-usrp.conf: -------------------------------------------------------------------------------- 1 | net.core.wmem_max = 33554432 2 | net.core.rmem_max = 33554432 3 | net.core.wmem_default = 33554432 4 | net.core.rmem_default = 33554432 5 | -------------------------------------------------------------------------------- /assets/UbuntuMono-Nerd-Font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/assets/UbuntuMono-Nerd-Font.ttf -------------------------------------------------------------------------------- /assets/config.conf: -------------------------------------------------------------------------------- 1 | [grc] 2 | xterm_executable = /usr/bin/xterm 3 | 4 | [log] 5 | debug_level = off 6 | log_level = info 7 | -------------------------------------------------------------------------------- /assets/fosphor-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/assets/fosphor-icon.png -------------------------------------------------------------------------------- /assets/fosphor.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Fosphor 4 | Comment=Spectrum Analyzer 5 | Exec=/usr/bin/osmocom_fft -F 6 | Icon=fosphor-icon 7 | -------------------------------------------------------------------------------- /assets/futuresdr-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/assets/futuresdr-icon.png -------------------------------------------------------------------------------- /assets/futuresdr-web.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=FutureSDR Website 4 | Exec=firefox --class futuresdr-web -- 'https://www.futuresdr.org/' 5 | Icon=futuresdr-icon 6 | Categories=Science; 7 | StartupWMClass=futuresdr-web 8 | -------------------------------------------------------------------------------- /assets/gitconfig: -------------------------------------------------------------------------------- 1 | [alias] 2 | lg = log --all --graph --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative 3 | fa = fetch --all --prune --tags 4 | -------------------------------------------------------------------------------- /assets/gnuradio-web.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=GNU Radio documentation online 4 | Exec=firefox --class gnuradio-web -- 'https://wiki.gnuradio.org/index.php/Main_Page' 5 | Icon=help-faq 6 | Categories=Science; 7 | StartupWMClass=gnuradio-web -------------------------------------------------------------------------------- /assets/gqrx-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/assets/gqrx-icon.png -------------------------------------------------------------------------------- /assets/gqrx.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Gqrx 4 | Comment=Software defined radio receiver implemented using GNU Radio and the Qt GUI toolkit 5 | Exec=/usr/bin/gqrx 6 | Icon=gqrx-icon 7 | -------------------------------------------------------------------------------- /assets/inspectrum-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/assets/inspectrum-icon.png -------------------------------------------------------------------------------- /assets/inspectrum.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Inspectrum 4 | Comment=Offline Signal Analyzer 5 | Exec=/usr/bin/inspectrum 6 | Icon=inspectrum-icon 7 | -------------------------------------------------------------------------------- /assets/link-futuresdr-website.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=FutureSDR Website 4 | Type=Link 5 | URL=https://www.futuresdr.org/ 6 | Icon=futuresdr 7 | -------------------------------------------------------------------------------- /assets/link-gnuradio-api.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=GNU Radio API 4 | Type=Link 5 | URL=https://gnuradio.org/doc/doxygen/ 6 | Icon=firefox -------------------------------------------------------------------------------- /assets/link-gnuradio-website.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=GNU Radio Website 4 | Type=Link 5 | URL=https://gnuradio.org/ 6 | Icon=firefox -------------------------------------------------------------------------------- /assets/link-gnuradio-wiki.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=GNU Radio Wiki 4 | Type=Link 5 | URL=https://wiki.gnuradio.org/ 6 | Icon=firefox -------------------------------------------------------------------------------- /assets/opencl-silent.cfg: -------------------------------------------------------------------------------- 1 | # Patterns used to check silent configuration file 2 | # 3 | # anythingpat - any string 4 | # filepat - the file location pattern (/file/location/to/license.lic) 5 | # lspat - the license server address pattern (0123@hostname) 6 | # snpat - the serial number pattern (ABCD-01234567) 7 | # comppat - the component abbreviation (intel-component-0123.4-567__arch), use installer command line option to get it 8 | 9 | # Accept EULA, valid values are: {accept, decline} 10 | ACCEPT_EULA=accept 11 | 12 | # Optional error behavior, valid values are: {yes, no} 13 | CONTINUE_WITH_OPTIONAL_ERROR=yes 14 | 15 | # Install location, valid values are: {/opt/intel, filepat} 16 | PSET_INSTALL_DIR=/opt/intel 17 | 18 | # Continue with overwrite of existing installation directory, valid values are: {yes, no} 19 | CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes 20 | 21 | # List of components to install (use semicolon to separate the components), valid values are: {ALL, DEFAULTS, comppat} 22 | COMPONENTS=DEFAULTS 23 | 24 | # Installation mode, valid values are: {install, repair, uninstall} 25 | PSET_MODE=install 26 | 27 | # Intel(R) Software Improvement Program 28 | # 29 | # To improve our software and customer experience, Intel would like to collect technical 30 | # information about your software installation and runtime status (such as installation metrics, 31 | # license/support types, software SKU/serial, counters, flags, and timestamps) 32 | # and development environment (such as operating system, CPU architecture, 33 | # last 4-digits of the MAC address and other Intel products installed). ("Information"). 34 | # 35 | # Intel may collect this Information directly or optionally through the use of Google Analytics. 36 | # If Google Analytics is used to collect the Information, Google will aggregate the 37 | # Information with that of other users and present the aggregated results to Intel without any personal identifiers. 38 | # Information collected by Google will be retained by Google under its own data collection policies 39 | # (https://www.google.com/policies/privacy/partners/). 40 | # 41 | # The Information collected under this notice directly by Intel through its Intel® Software Improvement Program 42 | # may be retained indefinitely but it will not be shared outside of Intel or its wholly-owned subsidiaries. 43 | # 44 | # The aggregated Information provided to Intel by Google through its Software Improvement Program 45 | # may be retained by Intel indefinitely but it will not be shared outside of Intel or its wholly-owned subsidiaries 46 | # 47 | # You can revoke your consent at any time by removing the "~/intel/isip" file. 48 | # To remove the file, please open a macOS or Linux terminal, go to the folder "~/intel" and delete the "isip" file. 49 | # For more details, please refer to this article: (https://software.intel.com/en-us/articles/software-improvement-program) 50 | # 51 | # Yes - I consent to the collection of my Information 52 | # No - I do NOT consent to the collection of my Information 53 | #, valid values are: {yes, no} 54 | INTEL_SW_IMPROVEMENT_PROGRAM_CONSENT=no 55 | 56 | # Perform validation of digital signatures of RPM files, valid values are: {yes, no} 57 | SIGNING_ENABLED=no 58 | -------------------------------------------------------------------------------- /assets/spacemacs: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp -*- 2 | (defun dotspacemacs/layers () 3 | "Layer configuration: 4 | This function should only modify configuration layer settings." 5 | (setq-default 6 | ;; Base distribution to use. This is a layer contained in the directory 7 | ;; `+distribution'. For now available distributions are `spacemacs-base' 8 | ;; or `spacemacs'. (default 'spacemacs) 9 | dotspacemacs-distribution 'spacemacs 10 | ;; Lazy installation of layers (i.e. layers are installed only when a file 11 | ;; with a supported type is opened). Possible values are `all', `unused' 12 | ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers 13 | ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will 14 | ;; lazy install any layer that support lazy installation even the layers 15 | ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy 16 | ;; installation feature and you have to explicitly list a layer in the 17 | ;; variable `dotspacemacs-configuration-layers' to install it. 18 | ;; (default 'unused) 19 | dotspacemacs-enable-lazy-installation 'unused 20 | ;; If non-nil then Spacemacs will ask for confirmation before installing 21 | ;; a layer lazily. (default t) 22 | dotspacemacs-ask-for-lazy-installation t 23 | ;; If non-nil layers with lazy install support are lazy installed. 24 | ;; List of additional paths where to look for configuration layers. 25 | ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') 26 | dotspacemacs-configuration-layer-path '() 27 | ;; List of configuration layers to load. 28 | dotspacemacs-configuration-layers 29 | '( 30 | ;; ---------------------------------------------------------------- 31 | ;; Example of useful layers you may want to use right away. 32 | ;; Uncomment some layer names and press `SPC f e R' (Vim style) or 33 | ;; `M-m f e R' (Emacs style) to install them. 34 | ;; ---------------------------------------------------------------- 35 | csv 36 | yaml 37 | helm 38 | auto-completion 39 | emacs-lisp 40 | (c-c++ :variables 41 | c-c++-enable-clang-support t 42 | c-c++-default-mode-for-headers 'c++-mode) 43 | cscope 44 | git 45 | markdown 46 | themes-megapack 47 | python 48 | html 49 | lua 50 | org 51 | semantic 52 | vinegar 53 | ipython-notebook 54 | (shell :variables 55 | shell-default-shell 'eshell 56 | shell-default-term-shell "/bin/zsh" 57 | shell-default-height 30 58 | shell-default-position 'bottom) 59 | (spell-checking :variables spell-checking-enable-by-default nil) 60 | (syntax-checking :variables syntax-checking-enable-by-default nil) 61 | (version-control :variables 62 | version-control-diff-tool 'diff-hl 63 | version-control-global-margin t) 64 | ) 65 | ;; List of additional packages that will be installed without being 66 | ;; wrapped in a layer. If you need some configuration for these 67 | ;; packages, then consider creating a layer. You can also put the 68 | ;; configuration in `dotspacemacs/user-config'. 69 | dotspacemacs-additional-packages '() 70 | ;; A list of packages that cannot be updated. 71 | dotspacemacs-frozen-packages '() 72 | ;; A list of packages that will not be installed and loaded. 73 | dotspacemacs-excluded-packages '() 74 | ;; Defines the behaviour of Spacemacs when installing packages. 75 | ;; Possible values are `used-only', `used-but-keep-unused' and `all'. 76 | ;; `used-only' installs only explicitly used packages and deletes any unused 77 | ;; packages as well as their unused dependencies. `used-but-keep-unused' 78 | ;; installs only the used packages but won't delete unused ones. `all' 79 | ;; installs *all* packages supported by Spacemacs and never uninstalls them. 80 | ;; (default is `used-only') 81 | dotspacemacs-install-packages 'used-only)) 82 | 83 | (defun dotspacemacs/init () 84 | "Initialization: 85 | This function is called at the very beginning of Spacemacs startup, 86 | before layer configuration. 87 | It should only modify the values of Spacemacs settings." 88 | ;; This setq-default sexp is an exhaustive list of all the supported 89 | ;; spacemacs settings. 90 | (setq-default 91 | ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's 92 | ;; possible. Set it to nil if you have no way to use HTTPS in your 93 | ;; environment, otherwise it is strongly recommended to let it set to t. 94 | ;; This variable has no effect if Emacs is launched with the parameter 95 | ;; `--insecure' which forces the value of this variable to nil. 96 | ;; (default t) 97 | dotspacemacs-elpa-https t 98 | ;; Maximum allowed time in seconds to contact an ELPA repository. 99 | ;; (default 5) 100 | dotspacemacs-elpa-timeout 5 101 | ;; If non-nil then Spacelpa repository is the primary source to install 102 | ;; a locked version of packages. If nil then Spacemacs will install the lastest 103 | ;; version of packages from MELPA. (default nil) 104 | dotspacemacs-use-spacelpa nil 105 | ;; If non-nil then verify the signature for downloaded Spacelpa archives. 106 | ;; (default nil) 107 | dotspacemacs-verify-spacelpa-archives nil 108 | ;; If non-nil then spacemacs will check for updates at startup 109 | ;; when the current branch is not `develop'. Note that checking for 110 | ;; new versions works via git commands, thus it calls GitHub services 111 | ;; whenever you start Emacs. (default nil) 112 | dotspacemacs-check-for-update nil 113 | ;; If non-nil, a form that evaluates to a package directory. For example, to 114 | ;; use different package directories for different Emacs versions, set this 115 | ;; to `emacs-version'. (default 'emacs-version) 116 | dotspacemacs-elpa-subdirectory 'emacs-version 117 | ;; One of `vim', `emacs' or `hybrid'. 118 | ;; `hybrid' is like `vim' except that `insert state' is replaced by the 119 | ;; `hybrid state' with `emacs' key bindings. The value can also be a list 120 | ;; with `:variables' keyword (similar to layers). Check the editing styles 121 | ;; section of the documentation for details on available variables. 122 | ;; (default 'vim) 123 | dotspacemacs-editing-style 'vim 124 | ;; If non-nil output loading progress in `*Messages*' buffer. (default nil) 125 | dotspacemacs-verbose-loading nil 126 | ;; Specify the startup banner. Default value is `official', it displays 127 | ;; the official spacemacs logo. An integer value is the index of text 128 | ;; banner, `random' chooses a random text banner in `core/banners' 129 | ;; directory. A string value must be a path to an image format supported 130 | ;; by your Emacs build. 131 | ;; If the value is nil then no banner is displayed. (default 'official) 132 | dotspacemacs-startup-banner 'official 133 | ;; List of items to show in startup buffer or an association list of 134 | ;; the form `(list-type . list-size)`. If nil then it is disabled. 135 | ;; Possible values for list-type are: 136 | ;; `recents' `bookmarks' `projects' `agenda' `todos'. 137 | ;; List sizes may be nil, in which case 138 | ;; `spacemacs-buffer-startup-lists-length' takes effect. 139 | dotspacemacs-startup-lists '((recents . 5) 140 | (bookmarks . 10) 141 | (agenda . 20) 142 | (todos . 20) 143 | (projects . 7)) 144 | ;; True if the home buffer should respond to resize events. (default t) 145 | dotspacemacs-startup-buffer-responsive t 146 | ;; Default major mode of the scratch buffer (default `text-mode') 147 | dotspacemacs-scratch-mode 'lisp-interaction-mode 148 | ;; List of themes, the first of the list is loaded when spacemacs starts. 149 | ;; Press `SPC T n' to cycle to the next theme in the list (works great 150 | ;; with 2 themes variants, one dark and one light) 151 | dotspacemacs-themes '(spacemacs-dark 152 | spacemacs-light) 153 | ;; Set the theme for the Spaceline. Supported themes are `spacemacs', 154 | ;; `all-the-icons', `custom', `vim-powerline' and `vanilla'. The first three 155 | ;; are spaceline themes. `vanilla' is default Emacs mode-line. `custom' is a 156 | ;; user defined themes, refer to the DOCUMENTATION.org for more info on how 157 | ;; to create your own spaceline theme.. (default 'spacemacs) 158 | dotspacemacs-mode-line-theme 'spacemacs 159 | ;; If non-nil the cursor color matches the state color in GUI Emacs. 160 | ;; (default t) 161 | dotspacemacs-colorize-cursor-according-to-state t 162 | ;; Default font, or prioritized list of fonts. `powerline-scale' allows to 163 | ;; quickly tweak the mode-line size to make separators look not too crappy. 164 | dotspacemacs-default-font '("UbuntuMono Nerd Font" 165 | :size 16 166 | :weight normal 167 | :width normal 168 | :powerline-scale 1.1) 169 | ;; The leader key (default "SPC") 170 | dotspacemacs-leader-key "SPC" 171 | ;; The key used for Emacs commands `M-x' (after pressing on the leader key). 172 | ;; (default "SPC") 173 | dotspacemacs-emacs-command-key "SPC" 174 | ;; The key used for Vim Ex commands (default ":") 175 | dotspacemacs-ex-command-key ":" 176 | ;; The leader key accessible in `emacs state' and `insert state' 177 | ;; (default "M-m") 178 | dotspacemacs-emacs-leader-key "M-m" 179 | ;; Major mode leader key is a shortcut key which is the equivalent of 180 | ;; pressing ` m`. Set it to `nil` to disable it. (default ",") 181 | dotspacemacs-major-mode-leader-key "," 182 | ;; Major mode leader key accessible in `emacs state' and `insert state'. 183 | ;; (default "C-M-m") 184 | dotspacemacs-major-mode-emacs-leader-key "C-M-m" 185 | ;; These variables control whether separate commands are bound in the GUI to 186 | ;; the key pairs `C-i', `TAB' and `C-m', `RET'. 187 | ;; Setting it to a non-nil value, allows for separate commands under `C-i' 188 | ;; and TAB or `C-m' and `RET'. 189 | ;; In the terminal, these pairs are generally indistinguishable, so this only 190 | ;; works in the GUI. (default nil) 191 | dotspacemacs-distinguish-gui-tab nil 192 | ;; If non-nil `Y' is remapped to `y$' in Evil states. (default nil) 193 | dotspacemacs-remap-Y-to-y$ nil 194 | ;; If non-nil, the shift mappings `<' and `>' retain visual state if used 195 | ;; there. (default t) 196 | dotspacemacs-retain-visual-state-on-shift t 197 | ;; If non-nil, `J' and `K' move lines up and down when in visual mode. 198 | ;; (default nil) 199 | dotspacemacs-visual-line-move-text nil 200 | ;; If non-nil, inverse the meaning of `g' in `:substitute' Evil ex-command. 201 | ;; (default nil) 202 | dotspacemacs-ex-substitute-global nil 203 | ;; Name of the default layout (default "Default") 204 | dotspacemacs-default-layout-name "Default" 205 | ;; If non-nil the default layout name is displayed in the mode-line. 206 | ;; (default nil) 207 | dotspacemacs-display-default-layout nil 208 | ;; If non-nil then the last auto saved layouts are resumed automatically upon 209 | ;; start. (default nil) 210 | dotspacemacs-auto-resume-layouts nil 211 | ;; If non-nil, auto-generate layout name when creating new layouts. Only has 212 | ;; effect when using the "jump to layout by number" commands. (default nil) 213 | dotspacemacs-auto-generate-layout-names nil 214 | ;; Size (in MB) above which spacemacs will prompt to open the large file 215 | ;; literally to avoid performance issues. Opening a file literally means that 216 | ;; no major mode or minor modes are active. (default is 1) 217 | dotspacemacs-large-file-size 1 218 | ;; Location where to auto-save files. Possible values are `original' to 219 | ;; auto-save the file in-place, `cache' to auto-save the file to another 220 | ;; file stored in the cache directory and `nil' to disable auto-saving. 221 | ;; (default 'cache) 222 | dotspacemacs-auto-save-file-location 'cache 223 | ;; Maximum number of rollback slots to keep in the cache. (default 5) 224 | dotspacemacs-max-rollback-slots 5 225 | ;; If non-nil, `helm' will try to minimize the space it uses. (default nil) 226 | dotspacemacs-helm-resize nil 227 | ;; if non-nil, the helm header is hidden when there is only one source. 228 | ;; (default nil) 229 | dotspacemacs-helm-no-header nil 230 | ;; define the position to display `helm', options are `bottom', `top', 231 | ;; `left', or `right'. (default 'bottom) 232 | dotspacemacs-helm-position 'bottom 233 | ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching 234 | ;; in all non-asynchronous sources. If set to `source', preserve individual 235 | ;; source settings. Else, disable fuzzy matching in all sources. 236 | ;; (default 'always) 237 | dotspacemacs-helm-use-fuzzy 'always 238 | ;; If non-nil, the paste transient-state is enabled. While enabled, pressing 239 | ;; `p' several times cycles through the elements in the `kill-ring'. 240 | ;; (default nil) 241 | dotspacemacs-enable-paste-transient-state nil 242 | ;; Which-key delay in seconds. The which-key buffer is the popup listing 243 | ;; the commands bound to the current keystroke sequence. (default 0.4) 244 | dotspacemacs-which-key-delay 0.4 245 | ;; Which-key frame position. Possible values are `right', `bottom' and 246 | ;; `right-then-bottom'. right-then-bottom tries to display the frame to the 247 | ;; right; if there is insufficient space it displays it at the bottom. 248 | ;; (default 'bottom) 249 | dotspacemacs-which-key-position 'bottom 250 | ;; Control where `switch-to-buffer' displays the buffer. If nil, 251 | ;; `switch-to-buffer' displays the buffer in the current window even if 252 | ;; another same-purpose window is available. If non-nil, `switch-to-buffer' 253 | ;; displays the buffer in a same-purpose window even if the buffer can be 254 | ;; displayed in the current window. (default nil) 255 | dotspacemacs-switch-to-buffer-prefers-purpose nil 256 | ;; If non-nil a progress bar is displayed when spacemacs is loading. This 257 | ;; may increase the boot time on some systems and emacs builds, set it to 258 | ;; nil to boost the loading time. (default t) 259 | dotspacemacs-loading-progress-bar t 260 | ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil) 261 | ;; (Emacs 24.4+ only) 262 | dotspacemacs-fullscreen-at-startup nil 263 | ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen. 264 | ;; Use to disable fullscreen animations in OSX. (default nil) 265 | dotspacemacs-fullscreen-use-non-native nil 266 | ;; If non-nil the frame is maximized when Emacs starts up. 267 | ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. 268 | ;; (default nil) (Emacs 24.4+ only) 269 | dotspacemacs-maximized-at-startup nil 270 | ;; A value from the range (0..100), in increasing opacity, which describes 271 | ;; the transparency level of a frame when it's active or selected. 272 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 273 | dotspacemacs-active-transparency 90 274 | ;; A value from the range (0..100), in increasing opacity, which describes 275 | ;; the transparency level of a frame when it's inactive or deselected. 276 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 277 | dotspacemacs-inactive-transparency 90 278 | ;; If non-nil show the titles of transient states. (default t) 279 | dotspacemacs-show-transient-state-title t 280 | ;; If non-nil show the color guide hint for transient state keys. (default t) 281 | dotspacemacs-show-transient-state-color-guide t 282 | ;; If non-nil unicode symbols are displayed in the mode line. (default t) 283 | dotspacemacs-mode-line-unicode-symbols t 284 | ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth 285 | ;; scrolling overrides the default behavior of Emacs which recenters point 286 | ;; when it reaches the top or bottom of the screen. (default t) 287 | dotspacemacs-smooth-scrolling t 288 | ;; Control line numbers activation. 289 | ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and 290 | ;; `text-mode' derivatives. If set to `relative', line numbers are relative. 291 | ;; This variable can also be set to a property list for finer control: 292 | ;; '(:relative nil 293 | ;; :disabled-for-modes dired-mode 294 | ;; doc-view-mode 295 | ;; markdown-mode 296 | ;; org-mode 297 | ;; pdf-view-mode 298 | ;; text-mode 299 | ;; :size-limit-kb 1000) 300 | ;; (default nil) 301 | dotspacemacs-line-numbers t 302 | ;; Code folding method. Possible values are `evil' and `origami'. 303 | ;; (default 'evil) 304 | dotspacemacs-folding-method 'evil 305 | ;; If non-nil `smartparens-strict-mode' will be enabled in programming modes. 306 | ;; (default nil) 307 | dotspacemacs-smartparens-strict-mode nil 308 | ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes 309 | ;; over any automatically added closing parenthesis, bracket, quote, etc… 310 | ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil) 311 | dotspacemacs-smart-closing-parenthesis nil 312 | ;; Select a scope to highlight delimiters. Possible values are `any', 313 | ;; `current', `all' or `nil'. Default is `all' (highlight any scope and 314 | ;; emphasis the current one). (default 'all) 315 | dotspacemacs-highlight-delimiters 'all 316 | ;; If non-nil, advise quit functions to keep server open when quitting. 317 | ;; (default nil) 318 | dotspacemacs-persistent-server nil 319 | ;; List of search tool executable names. Spacemacs uses the first installed 320 | ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'. 321 | ;; (default '("rg" "ag" "pt" "ack" "grep")) 322 | dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep") 323 | ;; The default package repository used if no explicit repository has been 324 | ;; specified with an installed package. 325 | ;; Not used for now. (default nil) 326 | dotspacemacs-default-package-repository nil 327 | ;; Format specification for setting the frame title. 328 | ;; %a - the `abbreviated-file-name', or `buffer-name' 329 | ;; %t - `projectile-project-name' 330 | ;; %I - `invocation-name' 331 | ;; %S - `system-name' 332 | ;; %U - contents of $USER 333 | ;; %b - buffer name 334 | ;; %f - visited file name 335 | ;; %F - frame name 336 | ;; %s - process status 337 | ;; %p - percent of buffer above top of window, or Top, Bot or All 338 | ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All 339 | ;; %m - mode name 340 | ;; %n - Narrow if appropriate 341 | ;; %z - mnemonics of buffer, terminal, and keyboard coding systems 342 | ;; %Z - like %z, but including the end-of-line format 343 | ;; (default "%I@%S") 344 | dotspacemacs-frame-title-format "%I@%S" 345 | ;; Format specification for setting the icon title format 346 | ;; (default nil - same as frame-title-format) 347 | dotspacemacs-icon-title-format nil 348 | ;; Delete whitespace while saving buffer. Possible values are `all' 349 | ;; to aggressively delete empty line and long sequences of whitespace, 350 | ;; `trailing' to delete only the whitespace at end of lines, `changed' to 351 | ;; delete only whitespace for changed lines or `nil' to disable cleanup. 352 | ;; (default nil) 353 | dotspacemacs-whitespace-cleanup nil 354 | ;; Either nil or a number of seconds. If non-nil zone out after the specified 355 | ;; number of seconds. (default nil) 356 | dotspacemacs-zone-out-when-idle nil 357 | ;; Run `spacemacs/prettify-org-buffer' when 358 | ;; visiting README.org files of Spacemacs. 359 | ;; (default nil) 360 | dotspacemacs-pretty-docs nil 361 | )) 362 | 363 | (defun dotspacemacs/user-init () 364 | "Initialization for user code: 365 | This function is called immediately after `dotspacemacs/init', before layer 366 | configuration. 367 | It is mostly for variables that should be set before packages are loaded. 368 | If you are unsure, try setting them in `dotspacemacs/user-config' first." 369 | ) 370 | 371 | (defun dotspacemacs/user-config () 372 | "Configuration for user code: 373 | This function is called at the very end of Spacemacs startup, after layer 374 | configuration. 375 | Put your configuration code here, except for variables that should be set 376 | before packages are loaded." 377 | 378 | (setq evil-move-cursor-back nil) 379 | (setq evil-want-C-i-jump t) 380 | (setq persp-autokill-persp-when-removed-last-buffer nil) 381 | (setq vc-follow-symlinks t) 382 | (setq neo-theme 'nerd) 383 | (setq create-lockfiles nil) 384 | (setq powerline-default-separator 'utf-8) 385 | (setq-default evil-escape-key-sequence "qw") 386 | (setq-default line-spacing 0) 387 | (setq split-width-threshold 140) 388 | (setq helm-org-headings-fontify t) 389 | (setq tramp-default-method "ssh") 390 | 391 | ;; c++ config 392 | (with-eval-after-load "projectile" 393 | (push '("cc" "h") projectile-other-file-alist) 394 | (push '("c" "h") projectile-other-file-alist) 395 | (push '("h" "cc" "c") projectile-other-file-alist) 396 | ) 397 | 398 | (setq-default helm-make-build-dir "build") 399 | (spacemacs/set-leader-keys-for-major-mode 'c-mode 400 | "f" 'clang-format-buffer 401 | "F" 'clang-format-region 402 | (spacemacs/set-leader-keys-for-major-mode 'c++-mode 403 | "f" 'clang-format-buffer 404 | "F" 'clang-format-region)) 405 | 406 | ;; spacemacs toggles 407 | (spacemacs/toggle-auto-fill-mode-off) 408 | (spacemacs/toggle-truncate-lines-on) 409 | (spacemacs/toggle-visual-line-navigation-on) 410 | (spacemacs/toggle-mode-line-minor-modes-off) 411 | (spacemacs/toggle-mode-line-org-clock-on) 412 | (spacemacs/toggle-mode-line-battery-on) 413 | ;; disable smart parens 414 | (remove-hook 'prog-mode-hook #'smartparens-mode) 415 | (spacemacs/toggle-smartparens-globally-off) 416 | 417 | ;; semantics 418 | (with-eval-after-load 'semantic 419 | (global-semantic-stickyfunc-mode -1) 420 | (setq semantic-default-submodes 421 | (remove 'global-semantic-stickyfunc-mode semantic-default-submodes))) 422 | 423 | ;; custom key bindings 424 | (spacemacs/set-leader-keys 425 | "oe" 'multi-term 426 | "oo" 'helm-mini 427 | ) 428 | 429 | ;; fringe color 430 | (set-face-attribute 'fringe nil 431 | :foreground (face-foreground 'default) 432 | :background (face-background 'default)) 433 | ) 434 | -------------------------------------------------------------------------------- /assets/terminator: -------------------------------------------------------------------------------- 1 | [global_config] 2 | borderless = False 3 | enabled_plugins = , 4 | [keybindings] 5 | broadcast_all = None 6 | broadcast_group = None 7 | broadcast_off = None 8 | edit_window_title = None 9 | go_down = None 10 | go_left = None 11 | go_right = None 12 | go_up = None 13 | layout_launcher = None 14 | rotate_cw = None 15 | scaled_zoom = None 16 | search = None 17 | split_horiz = None 18 | split_vert = None 19 | toggle_scrollbar = None 20 | toggle_zoom = None 21 | [layouts] 22 | [[default]] 23 | [[[child1]]] 24 | parent = window0 25 | profile = default 26 | type = Terminal 27 | [[[window0]]] 28 | parent = "" 29 | type = Window 30 | [plugins] 31 | [profiles] 32 | [[default]] 33 | background_color = "#313131" 34 | background_image = None 35 | copy_on_selection = True 36 | cursor_blink = False 37 | cursor_color = "#c3dbea" 38 | font = UbuntuMono Nerd Font 12 39 | foreground_color = "#dcdccc" 40 | palette = "#000000:#bf7276:#86af80:#968a38:#3673b5:#9a70b2:#7abecc:#dbdbdb:#6692af:#e5505f:#87bc87:#e0d95c:#1b85d6:#ad73ba:#338eaa:#f4f4f4" 41 | scrollback_lines = 20000 42 | scrollbar_position = hidden 43 | show_titlebar = False 44 | use_system_font = False 45 | -------------------------------------------------------------------------------- /assets/urh.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Universal Radio Hacker 4 | Comment=Software for investigating unknown wireless protocols 5 | Exec=/snap/bin/urh 6 | Icon=urhpng 7 | -------------------------------------------------------------------------------- /assets/urhpng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/assets/urhpng.png -------------------------------------------------------------------------------- /assets/vimrc: -------------------------------------------------------------------------------- 1 | set encoding=utf-8 2 | scriptencoding utf-8 3 | 4 | set nocompatible 5 | filetype off 6 | 7 | " Vundle packagemanagement 8 | set rtp+=~/.vim/bundle/Vundle.vim 9 | call vundle#begin() 10 | 11 | Plugin 'gmarik/Vundle.vim' 12 | Plugin 'kien/ctrlp.vim' 13 | Plugin 'scrooloose/nerdtree' 14 | Plugin 'tpope/vim-surround' 15 | Plugin 'vim-scripts/Align' 16 | Plugin 'mileszs/ack.vim' 17 | 18 | call vundle#end() 19 | filetype plugin indent on 20 | syntax on 21 | 22 | set tabpagemax=100 23 | set backspace=2 24 | set equalalways 25 | set laststatus=2 26 | set linebreak 27 | set mouse=a 28 | set nojoinspaces 29 | set nostartofline 30 | set nrformats=hex " don't treat leading zero as octal 31 | set number 32 | set scrolloff=3 33 | set showbreak=..... 34 | set showmatch 35 | set splitright 36 | set t_Co=256 37 | set virtualedit+=block 38 | set wildmenu 39 | 40 | " searching 41 | set ignorecase 42 | set smartcase 43 | set incsearch 44 | set hlsearch 45 | 46 | set directory=~/.swp 47 | set backupdir=~/.swp 48 | 49 | " auto commands 50 | autocmd FileType html setlocal indentexpr= 51 | autocmd FileType tex setlocal indentexpr= 52 | autocmd BufNewFile,BufRead *.html set filetype=html 53 | 54 | set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P 55 | 56 | " spelling 57 | setlocal spell spelllang=en 58 | set nospell 59 | 60 | let maplocalleader = "," 61 | 62 | " show hidden characters 63 | set listchars=tab:▸\ ,eol:¬ 64 | set list 65 | highlight NonText ctermfg=4 66 | highlight SpecialKey ctermfg=4 67 | 68 | " switch between windows 69 | nnoremap W 70 | nnoremap w 71 | 72 | " switch between tabs 73 | nnoremap gT 74 | vnoremap gT 75 | 76 | " tags 77 | map :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . 78 | set tags+=./tags 79 | set tags+=./../tags 80 | set tags+=./../../tags 81 | set tags+=./../../../tags 82 | set tags+=./../../../../tags 83 | set tags+=./../../../../../tags 84 | 85 | 86 | " show extra whitespace (whitespace at end of line | tabs in the middle of a line | whitespace after a tab) 87 | :highlight ExtraWhitespace None 88 | :match ExtraWhitespace /\v\s+$|[^\t]\zs\t|\t\zs +/ 89 | autocmd InsertEnter * highlight ExtraWhitespace gui=undercurl guisp=red ctermfg=white ctermbg=red 90 | autocmd InsertLeave * highlight ExtraWhitespace None 91 | 92 | 93 | " use w!! to save current buffer as root 94 | cmap w!! w !sudo tee % >/dev/null 95 | 96 | " copy stuff 97 | nmap ,x "+d 98 | imap ,x 99 | vmap ,x "+d 100 | nmap ,c "+y 101 | imap ,c 102 | vmap ,c "+y 103 | nmap ,v "+p 104 | imap ,v "+p 105 | vmap ,v "+p 106 | 107 | " 108 | " ============== COLOR SCHEME ============= 109 | " 110 | let g:zenburn_high_Contrast=1 111 | colorscheme zenburn 112 | highlight Normal gui=none guifg=#CCCCCC guibg=Black cterm=none ctermfg=LightGrey ctermbg=Black 113 | highlight Folded gui=none guifg=Black guibg=#555599 cterm=none ctermfg=Black ctermbg=Blue 114 | highlight Visual gui=bold guifg=Black guibg=White cterm=reverse 115 | highlight Comment gui=none guifg=#AAEEAA guibg=Black cterm=none ctermfg=LightGreen 116 | highlight Search gui=bold guifg=Black guibg=Yellow cterm=none ctermfg=Black ctermbg=Yellow 117 | highlight DiffDelete gui=bold guibg=LightRed guifg=Black cterm=bold ctermbg=LightRed ctermfg=Black 118 | highlight DiffChange gui=bold guibg=Gray guifg=Black cterm=bold ctermbg=Gray ctermfg=Black 119 | highlight DiffAdd gui=bold guibg=LightGreen guifg=Black cterm=bold ctermbg=LightGreen ctermfg=Black 120 | highlight DiffText gui=bold guibg=Cyan guifg=Black cterm=bold ctermbg=Cyan ctermfg=Black 121 | highlight Cursor gui=bold guifg=Black guibg=Green cterm=bold ctermfg=Black ctermbg=Green 122 | highlight LineNr gui=none guifg=#555599 guibg=Black cterm=none ctermfg=Blue ctermbg=None 123 | highlight TabLineFill ctermbg=None 124 | highlight Normal ctermbg=None 125 | highlight MatchParen cterm=bold ctermfg=228 ctermbg=238 126 | 127 | " 128 | " ============= NERDTREE plugin ============ 129 | " 130 | let NERDTreeMapJumpNextSibling='C-0' 131 | let NERDTreeMapJumpPrevSibling='C-0' 132 | let NERDTreeMapJumpFirstChild='C-0' 133 | let NERDTreeMapJumpLastChild='C-0' 134 | nnoremap :NERDTreeToggle 135 | 136 | " 137 | " ============= CTRL-P plugin ============ 138 | " 139 | let g:ctrlp_map = '' 140 | let g:ctrlp_follow_symlinks=1 141 | let g:ctrlp_clear_cache_on_exit=0 142 | set wildignore+=*/.git/*,*/build/*,*/doc/* 143 | let g:ctrlp_max_depth = 40 144 | 145 | " 146 | " ============= ACK plugin ============ 147 | " 148 | if executable('ack') 149 | let g:ackprg = 'ack -k --ignore-dir=build' 150 | elseif executable('ack-grep') 151 | let g:ackprg = "ack-grep -k --ignore-dir=build" 152 | endif 153 | 154 | -------------------------------------------------------------------------------- /assets/wallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/assets/wallpaper.png -------------------------------------------------------------------------------- /assets/zenburn.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: Jani Nurminen 3 | " Last Change: $Id: zenburn.vim,v 2.21 2011/04/26 12:13:41 slinky Exp slinky $ 4 | " URL: http://slinky.imukuppi.org/zenburnpage/ 5 | " License: GNU GPL 6 | " 7 | " Nothing too fancy, just some alien fruit salad to keep you in the zone. 8 | " This syntax file was designed to be used with dark environments and 9 | " low light situations. Of course, if it works during a daybright office, go 10 | " ahead :) 11 | " 12 | " Owes heavily to other Vim color files! With special mentions 13 | " to "BlackDust", "Camo" and "Desert". 14 | " 15 | " To install, copy to ~/.vim/colors directory. 16 | " 17 | " Alternatively, you can use Vimball installation: 18 | " vim zenburn.vba 19 | " :so % 20 | " :q 21 | " 22 | " For details, see :help vimball 23 | " 24 | " After installation, use it with :colorscheme zenburn. 25 | " See also :help syntax 26 | " 27 | " Credits: 28 | " - Jani Nurminen - original Zenburn, maintainer 29 | " - Steve Hall & Cream posse - higher-contrast Visual selection 30 | " - Kurt Maier - 256 color console coloring, low and high contrast toggle, 31 | " bug fixing 32 | " - Charlie - spotted too bright StatusLine in non-high contrast mode 33 | " - Pablo Castellazzi - CursorLine fix for 256 color mode 34 | " - Tim Smith - force dark background 35 | " - John Gabriele - spotted bad Ignore-group handling 36 | " - Zac Thompson - spotted invisible NonText in low contrast mode 37 | " - Christophe-Marie Duquesne - suggested making a Vimball, 38 | " suggested support for ctags_highlighting.vim 39 | " - Andrew Wagner - noted the CursorColumn bug (guifg was unintentionally set), 40 | " unify CursorColumn colour 41 | " - Martin Langasek - clarify the license, whitespace fixes 42 | " - Marcin Szamotulski - support autocomplete for Zenburn configuration 43 | " parameters 44 | " - Clayton Parker (claytron) - Convinced by Kurt Maier to use Zenburn. Point 45 | " out issues with LineNr, fix directory styles, and their usage in MacVim. 46 | " - Paweł Piekarski - Spotted bad FoldColumn and TabLine. Made better 47 | " FoldColumn colors, fixed TabLine colors. 48 | " 49 | " CONFIGURABLE PARAMETERS: 50 | " 51 | " You can use the default (don't set any parameters), or you can 52 | " set some parameters to tweak the Zenburn colours. 53 | " 54 | " To use them, put them into your .vimrc file before loading the color scheme, 55 | " example: 56 | " let g:zenburn_high_Contrast=1 57 | " colors zenburn 58 | " 59 | " You can also do ":let g:zenburn" then hit Ctrl-d or Tab to scroll through the 60 | " list of configurable parameters. 61 | " 62 | " * You can now set a darker background for bright environments. To activate, use: 63 | " contrast Zenburn, use: 64 | " 65 | " let g:zenburn_high_Contrast = 1 66 | " 67 | " * For example, Vim help files uses the Ignore-group for the pipes in tags 68 | " like "|somelink.txt|". By default, the pipes are not visible, as they 69 | " map to Ignore group. If you wish to enable coloring of the Ignore group, 70 | " set the following parameter to 1. Warning, it might make some syntax files 71 | " look strange. 72 | " 73 | " let g:zenburn_color_also_Ignore = 1 74 | " 75 | " * To get more contrast to the Visual selection, use 76 | " 77 | " let g:zenburn_alternate_Visual = 1 78 | " 79 | " Note: this is enabled only if the old-style Visual 80 | " if used, see g:zenburn_old_Visual 81 | " 82 | " * To use alternate colouring for Error message, use 83 | " 84 | " let g:zenburn_alternate_Error = 1 85 | " 86 | " * The new default for Include is a duller orange. To use the original 87 | " colouring for Include, use 88 | " 89 | " let g:zenburn_alternate_Include = 1 90 | " 91 | " * Work-around to a Vim bug, it seems to misinterpret ctermfg and 234 and 237 92 | " as light values, and sets background to light for some people. If you have 93 | " this problem, use: 94 | " 95 | " let g:zenburn_force_dark_Background = 1 96 | " 97 | " * By default the CursorColumn is of a lighter colour. I find it more readable 98 | " that way, but some people may want to align it with the darker CursorLine 99 | " color, for visual uniformity. To do so, use: 100 | " 101 | " let g:zenburn_unified_CursorColumn = 1 102 | " 103 | " Note: you can ignore this unless you use 104 | " ":set cursorline cursorcolumn", since otherwise the effect won't be 105 | " seen. 106 | " 107 | " * New (dark) Visual coloring has been introduced. 108 | " The dark Visual is more aligned with the rest of the colour scheme, 109 | " especially if you use line numbers. If you wish to use the 110 | " old Visual coloring, use 111 | " 112 | " let g:zenburn_old_Visual = 1 113 | " 114 | " Default is to use the new Visual. 115 | " 116 | " * EXPERIMENTAL FEATURE: Zenburn will automatically detect if you 117 | " have ctags_highlighting.vim (by Al Budden, 118 | " http://www.vim.org/scripts/script.php?script_id=2646) enabled, and 119 | " will set sensible highlight links. Nothing will happen if you do 120 | " not have ctags_highlighting.vim. If you do not want this feature, you can 121 | " override the check with: 122 | " 123 | " let g:zenburn_disable_ctags_highlighting_support = 1 124 | " 125 | " NOTE: 126 | " 127 | " * To turn the parameter(s) back to defaults, use UNLET or set them to 0: 128 | " 129 | " unlet g:zenburn_alternate_Include 130 | " or 131 | " let g:zenburn_alternate_Include = 0 132 | " 133 | " 134 | " That's it, enjoy! 135 | " 136 | " TODO 137 | " - Visual alternate color is broken? Try GVim >= 7.0.66 if you have trouble 138 | " - IME colouring (CursorIM) 139 | 140 | " Set defaults, but keep any parameters already set by the user 141 | if ! exists("g:zenburn_high_Contrast") 142 | let g:zenburn_high_Contrast = 0 143 | endif 144 | 145 | if ! exists("g:zenburn_color_also_Ignore") 146 | let g:zenburn_color_also_Ignore = 0 147 | endif 148 | 149 | if ! exists("g:zenburn_alternate_Error") 150 | let g:zenburn_alternate_Error = 0 151 | endif 152 | 153 | if ! exists("g:zenburn_force_dark_Background") 154 | let g:zenburn_force_dark_Background = 0 155 | endif 156 | 157 | if ! exists("g:zenburn_alternate_Visual") 158 | let g:zenburn_alternate_Visual = 0 159 | endif 160 | 161 | if ! exists("g:zenburn_alternate_Include") 162 | let g:zenburn_alternate_Include = 0 163 | endif 164 | 165 | if ! exists("g:zenburn_unified_CursorColumn") 166 | let g:zenburn_unified_CursorColumn = 0 167 | endif 168 | 169 | if ! exists("g:zenburn_old_Visual") 170 | let g:zenburn_old_Visual = 0 171 | endif 172 | 173 | if ! exists("g:zenburn_disable_ctags_highlighting_support") 174 | " enabled by default 175 | let g:zenburn_disable_ctags_highlighting_support = 0 176 | endif 177 | 178 | " ----------------------------------------------- 179 | 180 | set background=dark 181 | hi clear 182 | if exists("syntax_on") 183 | syntax reset 184 | endif 185 | let g:colors_name="zenburn" 186 | 187 | " check for ctags-highlighting 188 | if exists("g:loaded_ctags_highlighting") && g:loaded_ctags_highlighting && ! g:zenburn_disable_ctags_highlighting_support 189 | " internal 190 | let _zenburn_ctags = 1 191 | endif 192 | 193 | hi Boolean guifg=#dca3a3 194 | hi Character guifg=#dca3a3 gui=bold 195 | hi Comment guifg=#7f9f7f gui=italic 196 | hi Conditional guifg=#f0dfaf gui=bold 197 | hi Constant guifg=#dca3a3 gui=bold 198 | hi Cursor guifg=#000d18 guibg=#8faf9f gui=bold 199 | hi Debug guifg=#bca3a3 gui=bold 200 | hi Define guifg=#ffcfaf gui=bold 201 | hi Delimiter guifg=#8f8f8f 202 | hi DiffAdd guifg=#709080 guibg=#313c36 gui=bold 203 | hi DiffChange guibg=#333333 204 | hi DiffDelete guifg=#333333 guibg=#464646 205 | hi DiffText guifg=#ecbcbc guibg=#41363c gui=bold 206 | hi Directory guifg=#9fafaf gui=bold 207 | hi ErrorMsg guifg=#80d4aa guibg=#2f2f2f gui=bold 208 | hi Exception guifg=#c3bf9f gui=bold 209 | hi Float guifg=#c0bed1 210 | hi FoldColumn guifg=#93b3a3 guibg=#3f4040 211 | hi Folded guifg=#93b3a3 guibg=#3f4040 212 | hi Function guifg=#efef8f 213 | hi Identifier guifg=#efdcbc 214 | hi IncSearch guibg=#f8f893 guifg=#385f38 215 | hi Keyword guifg=#f0dfaf gui=bold 216 | hi Label guifg=#dfcfaf gui=underline 217 | hi Macro guifg=#ffcfaf gui=bold 218 | hi ModeMsg guifg=#ffcfaf gui=none 219 | hi MoreMsg guifg=#ffffff gui=bold 220 | hi Number guifg=#8cd0d3 221 | hi Operator guifg=#f0efd0 222 | hi PreCondit guifg=#dfaf8f gui=bold 223 | hi PreProc guifg=#ffcfaf gui=bold 224 | hi Question guifg=#ffffff gui=bold 225 | hi Repeat guifg=#ffd7a7 gui=bold 226 | hi Search guifg=#ffffe0 guibg=#284f28 227 | hi SpecialChar guifg=#dca3a3 gui=bold 228 | hi SpecialComment guifg=#82a282 gui=bold 229 | hi Special guifg=#cfbfaf 230 | hi SpecialKey guifg=#9ece9e 231 | hi Statement guifg=#e3ceab gui=none 232 | hi StatusLine guifg=#313633 guibg=#ccdc90 233 | hi StatusLineNC guifg=#2e3330 guibg=#88b090 234 | hi StorageClass guifg=#c3bf9f gui=bold 235 | hi String guifg=#cc9393 236 | hi Structure guifg=#efefaf gui=bold 237 | hi Tag guifg=#e89393 gui=bold 238 | hi Title guifg=#efefef gui=bold 239 | hi Todo guifg=#dfdfdf guibg=bg gui=bold 240 | hi Typedef guifg=#dfe4cf gui=bold 241 | hi Type guifg=#dfdfbf gui=bold 242 | hi Underlined guifg=#dcdccc gui=underline 243 | hi VertSplit guifg=#2e3330 guibg=#688060 244 | hi VisualNOS guifg=#333333 guibg=#f18c96 gui=bold,underline 245 | hi WarningMsg guifg=#ffffff guibg=#333333 gui=bold 246 | hi WildMenu guibg=#2c302d guifg=#cbecd0 gui=underline 247 | 248 | hi SpellBad guisp=#bc6c4c guifg=#dc8c6c 249 | hi SpellCap guisp=#6c6c9c guifg=#8c8cbc 250 | hi SpellRare guisp=#bc6c9c guifg=#bc8cbc 251 | hi SpellLocal guisp=#7cac7c guifg=#9ccc9c 252 | 253 | " Entering Kurt zone 254 | if &t_Co > 255 255 | hi Boolean ctermfg=181 256 | hi Character ctermfg=181 cterm=bold 257 | hi Comment ctermfg=108 258 | hi Conditional ctermfg=223 cterm=bold 259 | hi Constant ctermfg=181 cterm=bold 260 | hi Cursor ctermfg=233 ctermbg=109 cterm=bold 261 | hi Debug ctermfg=181 cterm=bold 262 | hi Define ctermfg=223 cterm=bold 263 | hi Delimiter ctermfg=245 264 | hi DiffAdd ctermfg=66 ctermbg=237 cterm=bold 265 | hi DiffChange ctermbg=236 266 | hi DiffDelete ctermfg=236 ctermbg=238 267 | hi DiffText ctermfg=217 ctermbg=237 cterm=bold 268 | hi Directory ctermfg=109 cterm=bold 269 | hi ErrorMsg ctermfg=115 ctermbg=236 cterm=bold 270 | hi Exception ctermfg=249 cterm=bold 271 | hi Float ctermfg=251 272 | hi Function ctermfg=228 273 | hi Identifier ctermfg=223 274 | hi IncSearch ctermbg=228 ctermfg=238 275 | hi Keyword ctermfg=223 cterm=bold 276 | hi Label ctermfg=187 cterm=underline 277 | hi LineNr ctermfg=248 ctermbg=233 278 | hi Macro ctermfg=223 cterm=bold 279 | hi ModeMsg ctermfg=223 cterm=none 280 | hi MoreMsg ctermfg=15 cterm=bold 281 | hi Number ctermfg=116 282 | hi Operator ctermfg=230 283 | hi PreCondit ctermfg=180 cterm=bold 284 | hi PreProc ctermfg=223 cterm=bold 285 | hi Question ctermfg=15 cterm=bold 286 | hi Repeat ctermfg=223 cterm=bold 287 | hi Search ctermfg=230 ctermbg=236 288 | hi SpecialChar ctermfg=181 cterm=bold 289 | hi SpecialComment ctermfg=108 cterm=bold 290 | hi Special ctermfg=181 291 | hi SpecialKey ctermfg=151 292 | hi Statement ctermfg=187 ctermbg=234 cterm=none 293 | hi StatusLine ctermfg=236 ctermbg=186 294 | hi StatusLineNC ctermfg=235 ctermbg=108 295 | hi StorageClass ctermfg=249 cterm=bold 296 | hi String ctermfg=174 297 | hi Structure ctermfg=229 cterm=bold 298 | hi Tag ctermfg=181 cterm=bold 299 | hi Title ctermfg=7 ctermbg=234 cterm=bold 300 | hi Todo ctermfg=108 ctermbg=234 cterm=bold 301 | hi Typedef ctermfg=253 cterm=bold 302 | hi Type ctermfg=187 cterm=bold 303 | hi Underlined ctermfg=188 ctermbg=234 cterm=bold 304 | hi VertSplit ctermfg=236 ctermbg=65 305 | hi VisualNOS ctermfg=236 ctermbg=210 cterm=bold 306 | hi WarningMsg ctermfg=15 ctermbg=236 cterm=bold 307 | hi WildMenu ctermbg=236 ctermfg=194 cterm=bold 308 | 309 | " spellchecking, always "bright" background 310 | hi SpellLocal ctermfg=14 ctermbg=237 311 | hi SpellBad ctermfg=9 ctermbg=237 312 | hi SpellCap ctermfg=12 ctermbg=237 313 | hi SpellRare ctermfg=13 ctermbg=237 314 | 315 | " pmenu 316 | hi PMenu ctermfg=248 ctermbg=0 317 | hi PMenuSel ctermfg=223 ctermbg=235 318 | 319 | if exists("g:zenburn_high_Contrast") && g:zenburn_high_Contrast 320 | hi Normal ctermfg=188 ctermbg=234 321 | hi NonText ctermfg=238 322 | 323 | if exists("g:zenburn_color_also_Ignore") && g:zenburn_color_also_Ignore 324 | hi Ignore ctermfg=238 325 | endif 326 | 327 | " hc mode, darker CursorLine, default 236 328 | hi CursorLine ctermbg=233 cterm=none 329 | 330 | if exists("g:zenburn_unified_CursorColumn") && g:zenburn_unified_CursorColumn 331 | hi CursorColumn ctermbg=233 cterm=none 332 | else 333 | hi CursorColumn ctermbg=235 cterm=none 334 | endif 335 | else 336 | hi Normal ctermfg=188 ctermbg=237 337 | hi Cursor ctermbg=109 338 | hi diffadd ctermbg=237 339 | hi diffdelete ctermbg=238 340 | hi difftext ctermbg=237 341 | hi errormsg ctermbg=237 342 | hi incsearch ctermbg=228 343 | hi linenr ctermbg=235 344 | hi search ctermbg=238 345 | hi statement ctermbg=237 346 | hi statusline ctermbg=144 347 | hi statuslinenc ctermbg=108 348 | hi title ctermbg=237 349 | hi todo ctermbg=237 350 | hi underlined ctermbg=237 351 | hi vertsplit ctermbg=65 352 | hi visualnos ctermbg=210 353 | hi warningmsg ctermbg=236 354 | hi wildmenu ctermbg=236 355 | hi NonText ctermfg=240 356 | 357 | if exists("g:zenburn_color_also_Ignore") && g:zenburn_color_also_Ignore 358 | hi Ignore ctermfg=240 359 | endif 360 | 361 | " normal mode, lighter CursorLine 362 | hi CursorLine ctermbg=238 cterm=none 363 | 364 | if exists("g:zenburn_unified_CursorColumn") && g:zenburn_unified_CursorColumn 365 | hi CursorColumn ctermbg=238 cterm=none 366 | else 367 | hi CursorColumn ctermbg=239 cterm=none 368 | endif 369 | endif 370 | 371 | if exists("g:zenburn_alternate_Error") && g:zenburn_alternate_Error 372 | " use more jumpy Error 373 | hi Error ctermfg=210 ctermbg=52 gui=bold 374 | else 375 | " default is something more zenburn-compatible 376 | hi Error ctermfg=228 ctermbg=95 gui=bold 377 | endif 378 | endif 379 | 380 | if exists("g:zenburn_force_dark_Background") && g:zenburn_force_dark_Background 381 | " Force dark background, because of a bug in VIM: VIM sets background 382 | " automatically during "hi Normal ctermfg=X"; it misinterprets the high 383 | " value (234 or 237 above) as a light color, and wrongly sets background to 384 | " light. See ":help highlight" for details. 385 | set background=dark 386 | endif 387 | 388 | if exists("g:zenburn_high_Contrast") && g:zenburn_high_Contrast 389 | " use new darker background 390 | hi Normal guifg=#dcdccc guibg=#1f1f1f 391 | hi CursorLine guibg=#121212 gui=bold 392 | if exists("g:zenburn_unified_CursorColumn") && g:zenburn_unified_CursorColumn 393 | hi CursorColumn guibg=#121212 gui=bold 394 | else 395 | hi CursorColumn guibg=#2b2b2b 396 | endif 397 | hi Pmenu guibg=#242424 guifg=#ccccbc 398 | hi PMenuSel guibg=#353a37 guifg=#ccdc90 gui=bold 399 | hi PmenuSbar guibg=#2e3330 guifg=#000000 400 | hi PMenuThumb guibg=#a0afa0 guifg=#040404 401 | hi MatchParen guifg=#f0f0c0 guibg=#383838 gui=bold 402 | hi SignColumn guifg=#9fafaf guibg=#181818 gui=bold 403 | hi TabLineFill guifg=#cfcfaf guibg=#181818 gui=bold 404 | hi TabLineSel guifg=#efefef guibg=#1c1c1b gui=bold 405 | hi TabLine guifg=#b6bf98 guibg=#181818 gui=bold 406 | hi NonText guifg=#404040 gui=bold 407 | 408 | hi LineNr guifg=#9fafaf guibg=#161616 409 | else 410 | " Original, lighter background 411 | hi Normal guifg=#dcdccc guibg=#3f3f3f 412 | hi CursorLine guibg=#434443 413 | if exists("g:zenburn_unified_CursorColumn") && g:zenburn_unified_CursorColumn 414 | hi CursorColumn guibg=#434343 415 | else 416 | hi CursorColumn guibg=#4f4f4f 417 | endif 418 | hi Pmenu guibg=#2c2e2e guifg=#9f9f9f 419 | hi PMenuSel guibg=#242424 guifg=#d0d0a0 gui=bold 420 | hi PmenuSbar guibg=#2e3330 guifg=#000000 421 | hi PMenuThumb guibg=#a0afa0 guifg=#040404 422 | hi MatchParen guifg=#b2b2a0 guibg=#2e2e2e gui=bold 423 | hi SignColumn guifg=#9fafaf guibg=#343434 gui=bold 424 | hi TabLineFill guifg=#cfcfaf guibg=#353535 gui=bold 425 | hi TabLineSel guifg=#efefef guibg=#3a3a39 gui=bold 426 | hi TabLine guifg=#b6bf98 guibg=#353535 gui=bold 427 | hi NonText guifg=#5b605e gui=bold 428 | 429 | hi LineNr guifg=#9fafaf guibg=#262626 430 | endif 431 | 432 | if exists("g:zenburn_old_Visual") && g:zenburn_old_Visual 433 | if exists("g:zenburn_alternate_Visual") && g:zenburn_alternate_Visual 434 | " Visual with more contrast, thanks to Steve Hall & Cream posse 435 | " gui=none fixes weird highlight problem in at least GVim 7.0.66, thanks to Kurt Maier 436 | hi Visual guifg=#000000 guibg=#71d3b4 gui=none 437 | hi VisualNOS guifg=#000000 guibg=#71d3b4 gui=none 438 | else 439 | " use default visual 440 | hi Visual guifg=#233323 guibg=#71d3b4 gui=none 441 | hi VisualNOS guifg=#233323 guibg=#71d3b4 gui=none 442 | endif 443 | else 444 | " new Visual style 445 | if exists("g:zenburn_high_Contrast") && g:zenburn_high_Contrast 446 | " high contrast 447 | "hi Visual guibg=#304a3d 448 | "hi VisualNos guibg=#304a3d 449 | "TODO no nice greenish in console, 65 is closest. use full black instead, 450 | "although i like the green..! 451 | hi Visual guibg=#0f0f0f 452 | hi VisualNos guibg=#0f0f0f 453 | if &t_Co > 255 454 | hi Visual ctermbg=0 455 | endif 456 | else 457 | " low contrast 458 | hi Visual guibg=#2f2f2f 459 | hi VisualNOS guibg=#2f2f2f 460 | 461 | if &t_Co > 255 462 | hi Visual ctermbg=235 463 | hi VisualNOS ctermbg=235 464 | endif 465 | endif 466 | endif 467 | 468 | if exists("g:zenburn_alternate_Error") && g:zenburn_alternate_Error 469 | " use more jumpy Error 470 | hi Error guifg=#e37170 guibg=#664040 gui=bold 471 | else 472 | " default is something more zenburn-compatible 473 | hi Error guifg=#e37170 guibg=#3d3535 gui=none 474 | endif 475 | 476 | if exists("g:zenburn_alternate_Include") && g:zenburn_alternate_Include 477 | " original setting 478 | hi Include guifg=#ffcfaf gui=bold 479 | else 480 | " new, less contrasted one 481 | hi Include guifg=#dfaf8f gui=bold 482 | endif 483 | 484 | if exists("g:zenburn_color_also_Ignore") && g:zenburn_color_also_Ignore 485 | " color the Ignore groups 486 | " note: if you get strange coloring for your files, turn this off (unlet) 487 | hi Ignore guifg=#545a4f 488 | endif 489 | 490 | " new tabline and fold column 491 | if exists("g:zenburn_high_Contrast") && g:zenburn_high_Contrast 492 | hi FoldColumn guibg=#161616 493 | hi Folded guibg=#161616 494 | hi TabLine guifg=#88b090 guibg=#313633 gui=none 495 | hi TabLineSel guifg=#ccd990 guibg=#222222 496 | hi TabLineFill guifg=#88b090 guibg=#313633 gui=none 497 | 498 | hi SpecialKey guibg=#242424 499 | 500 | if &t_Co > 255 501 | hi FoldColumn ctermbg=233 ctermfg=109 502 | hi Folded ctermbg=233 ctermfg=109 503 | hi TabLine ctermbg=236 ctermfg=108 cterm=none 504 | hi TabLineSel ctermbg=235 ctermfg=186 cterm=bold 505 | hi TabLineFill ctermbg=236 ctermfg=236 506 | endif 507 | else 508 | hi FoldColumn guibg=#333333 509 | hi Folded guibg=#333333 510 | hi TabLine guifg=#d0d0b8 guibg=#222222 gui=none 511 | hi TabLineSel guifg=#f0f0b0 guibg=#333333 gui=bold 512 | hi TabLineFill guifg=#dccdcc guibg=#101010 gui=none 513 | 514 | hi SpecialKey guibg=#444444 515 | 516 | if &t_Co > 255 517 | hi FoldColumn ctermbg=236 ctermfg=109 518 | hi Folded ctermbg=236 ctermfg=109 519 | hi TabLine ctermbg=235 ctermfg=187 cterm=none 520 | hi TabLineSel ctermbg=236 ctermfg=229 cterm=bold 521 | hi TabLineFill ctermbg=233 ctermfg=233 522 | endif 523 | endif 524 | 525 | " EXPERIMENTAL ctags_highlighting support 526 | " link/set sensible defaults here; 527 | " 528 | " For now I mostly link to subset of Zenburn colors, the linkage is based 529 | " on appearance, not semantics. In later versions I might define more new colours. 530 | " 531 | " HELP NEEDED to make this work properly. 532 | if exists("_zenburn_ctags") && _zenburn_ctags 533 | 534 | " Highlighter seems to think a lot of things are global variables even 535 | " though they're not. Example: python method-local variable is 536 | " coloured as a global variable. They should not be global, since 537 | " they're not visible outside the method. 538 | " If this is some very bright colour group then things look bad. 539 | hi link CTagsGlobalVariable Identifier 540 | 541 | hi CTagsClass guifg=#acd0b3 542 | if &t_Co > 255 543 | hi CTagsClass ctermfg=115 544 | endif 545 | 546 | hi link CTagsImport Statement 547 | hi link CTagsMember Function 548 | 549 | hi link CTagsGlobalConstant Constant 550 | 551 | " These do not yet have support, I can't get them to appear 552 | hi link EnumerationValue Float 553 | hi link EnumerationName Identifier 554 | hi link DefinedName WarningMsg 555 | hi link LocalVariable WarningMsg 556 | hi link Structure WarningMsg 557 | hi link Union WarningMsg 558 | endif 559 | 560 | " TODO check for more obscure syntax groups that they're ok 561 | 562 | -------------------------------------------------------------------------------- /assets/zshenv: -------------------------------------------------------------------------------- 1 | export LC_ALL="en_US.UTF-8" 2 | export LANG="en_US.UTF-8" 3 | -------------------------------------------------------------------------------- /assets/zshrc: -------------------------------------------------------------------------------- 1 | [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return 2 | 3 | DISABLE_UPDATE_PROMPT=true 4 | export ZSH=$HOME/src/oh-my-zsh 5 | 6 | ZSH_THEME="gentoo" 7 | 8 | plugins=(git svn) 9 | 10 | source $ZSH/oh-my-zsh.sh 11 | 12 | PROMPT='%(!.%{$fg[red]%}.%{$fg[green]%}%n@)%m%{$fg_no_bold[yellow]%} $(git_prompt_info)%{$fg_bold[yellow]%}%(!.%1~.%~) %{$reset_color%}>%{$fg_bold[white]%}>%{$reset_color%} ' 13 | ZSH_THEME_GIT_PROMPT_SUFFIX="):" 14 | 15 | export PATH="${HOME}/bin:${HOME}/.local/bin:${PATH}" 16 | 17 | bindkey '^v' edit-command-line 18 | 19 | unalias g 20 | set no_share_history 21 | unsetopt share_history 22 | -------------------------------------------------------------------------------- /base.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "virtualbox-iso", 5 | "guest_os_type": "Ubuntu_64", 6 | "iso_urls": "https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-live-server-amd64.iso", 7 | "iso_checksum": "sha256:a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd", 8 | "output_directory": "vms/base", 9 | "vm_name": "instant-sdr-base", 10 | "disk_size": "50000", 11 | "headless": "true", 12 | "http_directory": ".", 13 | "guest_additions_mode": "upload", 14 | "boot_wait": "5s", 15 | "boot_command": [ 16 | "c", 17 | "linux /casper/vmlinuz --- autoinstall ds=\"nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/\"", 18 | "", 19 | "initrd /casper/initrd", 20 | "", 21 | "boot", 22 | "" 23 | ], 24 | "ssh_username": "sdr", 25 | "ssh_password": "sdr", 26 | "ssh_wait_timeout": "60m", 27 | "shutdown_command": "sudo systemctl poweroff", 28 | "format": "ova", 29 | "vboxmanage": [ 30 | ["modifyvm", "{{.Name}}", "--memory", "4096"], 31 | ["modifyvm", "{{.Name}}", "--vram", "128"], 32 | ["modifyvm", "{{.Name}}", "--cpus", "4"], 33 | ["modifyvm", "{{.Name}}", "--natpf1", "guestssh,tcp,127.0.0.1,2222,,22"], 34 | ["modifyvm", "{{.Name}}", "--accelerate3d", "off"], 35 | ["modifyvm", "{{.Name}}", "--usb", "on"], 36 | ["modifyvm", "{{.Name}}", "--usbxhci", "on"], 37 | ["modifyvm", "{{.Name}}", "--clipboard", "bidirectional"], 38 | ["modifyvm", "{{.Name}}", "--audioout", "on"], 39 | ["modifyvm", "{{.Name}}", "--audioin", "on"], 40 | ["modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga"], 41 | ["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"] 42 | ] 43 | }], 44 | "provisioners": [ 45 | { 46 | "type": "shell", 47 | "scripts": [ 48 | "scripts/init-base.sh" 49 | ] 50 | }, 51 | { 52 | "type": "file", 53 | "source": "assets/wallpaper.png", 54 | "destination": "Pictures/wallpaper.png" 55 | }, 56 | { 57 | "type": "file", 58 | "source": "assets/zshrc", 59 | "destination": ".zshrc" 60 | }, 61 | { 62 | "type": "file", 63 | "source": "assets/zshenv", 64 | "destination": ".zshenv" 65 | }, 66 | { 67 | "type": "file", 68 | "source": "assets/terminator", 69 | "destination": ".config/terminator/config" 70 | }, 71 | { 72 | "type": "file", 73 | "source": "assets/UbuntuMono-Nerd-Font.ttf", 74 | "destination": ".fonts/UbuntuMono-Nerd-Font.ttf" 75 | }, 76 | { 77 | "type": "file", 78 | "source": "assets/vimrc", 79 | "destination": ".vimrc" 80 | }, 81 | { 82 | "type": "file", 83 | "source": "assets/zenburn.vim", 84 | "destination": ".vim/colors/zenburn.vim" 85 | }, 86 | { 87 | "type": "file", 88 | "source": "assets/gitconfig", 89 | "destination": ".gitconfig" 90 | }, 91 | { 92 | "type": "shell", 93 | "scripts": [ 94 | "scripts/setup-base.sh" 95 | ] 96 | }, 97 | { 98 | "type": "shell", 99 | "scripts": [ 100 | "scripts/cleanup.sh" 101 | ], 102 | "execute_command": "sudo -E bash '{{.Path}}'" 103 | } 104 | ] 105 | } 106 | -------------------------------------------------------------------------------- /chroot-iso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eux 4 | 5 | LANG= 6 | apt-get update 7 | apt-get -y install casper lupin-casper 8 | 9 | cat << ABC > /etc/casper.conf 10 | export USERNAME="sdr" 11 | export USERFULLNAME="sdr" 12 | export HOST="ubuntu" 13 | export BUILD_SYSTEM="Ubuntu" 14 | export FLAVOUR="Ubuntu" 15 | ABC 16 | 17 | depmod -a $(uname -r) 18 | update-initramfs -u -k $(uname -r) 19 | 20 | for i in `cat /etc/passwd | awk -F":" '{print $1}'` 21 | do 22 | uid=`cat /etc/passwd | grep "^${i}:" | awk -F":" '{print $3}'` 23 | [ "$uid" -gt "998" -a "$uid" -ne "65534" ] && userdel --force ${i} 2> /dev/null 24 | done 25 | 26 | apt-get clean 27 | 28 | find /var/log -regex '.*?[0-9].*?' -exec rm -v {} \; 29 | 30 | find /var/log -type f | while read file 31 | do 32 | cat /dev/null | tee $file 33 | done 34 | 35 | rm /etc/resolv.conf /etc/hostname 36 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | echo "" 6 | echo "Checking for wget (tested with 1.21)" 7 | command -v wget >/dev/null 2>&1 || ( echo "wget not found."; exit 1 ) 8 | wget --version 9 | 10 | echo "" 11 | echo "Checking for HashiCorp Packer (tested with 1.6.6)" 12 | command -v packer >/dev/null 2>&1 || ( echo "packer not found."; exit 1 ) 13 | packer --version || true 14 | 15 | echo "" 16 | echo "Checking for Oracle VM VirtualBox (tested with 6.1.32_Ubuntur149290)" 17 | command -v VBoxManage >/dev/null 2>&1 || ( echo "VBoxManage not found."; exit 1 ) 18 | VBoxManage --version 19 | 20 | echo "" 21 | echo "Checking for Oracle VM VirtualBox Extension Pack (tested with 6.1.32_Ubuntur149290)" 22 | VBoxManage list extpacks | grep "VirtualBox Extension Pack" || ( echo "VirtualBox Extension Pack not installed."; exit 1 ) 23 | 24 | echo "" 25 | echo "Great! Looks like all dependencies are installed. You can go ahead and type 'make' to build the VM." 26 | -------------------------------------------------------------------------------- /gen-iso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eux 4 | 5 | export WORK=~/work 6 | export CD=~/cd 7 | export FORMAT=squashfs 8 | export FS_DIR=casper 9 | 10 | sudo rm -rf ${WORK} ${CD} 11 | sudo mkdir -p ${CD}/{${FS_DIR},boot/grub} ${WORK}/rootfs 12 | 13 | 14 | sudo apt-get update 15 | sudo apt-get -y install grub2 xorriso squashfs-tools 16 | 17 | 18 | sudo rsync -av --one-file-system --exclude=/proc/* --exclude=/dev/* \ 19 | --exclude=/sys/* --exclude=/tmp/* --exclude=/lost+found \ 20 | --exclude=/boot/grub/* \ 21 | --exclude=/root/* \ 22 | --exclude=/var/backup/* \ 23 | --exclude=/var/cache/* \ 24 | --exclude=/var/crash/* \ 25 | --exclude=/var/lock/* \ 26 | --exclude=/var/log/* \ 27 | --exclude=/var/metrics/* \ 28 | --exclude=/var/run/* \ 29 | --exclude=/var/tmp/* \ 30 | --exclude=/var/mail/* \ 31 | --exclude=/var/spool/* \ 32 | --exclude=/media/* \ 33 | --exclude=/etc/fstab --exclude=/etc/mtab --exclude=/etc/hosts \ 34 | --exclude=/etc/timezone --exclude=/etc/shadow* --exclude=/etc/gshadow* \ 35 | --exclude=/etc/X11/xorg.conf* --exclude=${CD} --exclude=${WORK} \ 36 | --exclude=/home/sdr/instant-sdr.iso \ 37 | --exclude=/home/sdr/chroot-iso.sh \ 38 | --exclude=/home/sdr/gen-iso.sh \ 39 | / ${WORK}/rootfs 40 | 41 | sudo rm -rf ${WORK}/rootfs/etc/skel 42 | sudo mv ${WORK}/rootfs/home/sdr ${WORK}/rootfs/etc/skel 43 | 44 | sudo mount --bind /dev/ ${WORK}/rootfs/dev 45 | sudo mount -t proc proc ${WORK}/rootfs/proc 46 | sudo mount -t sysfs sysfs ${WORK}/rootfs/sys 47 | sudo mount -o bind /run ${WORK}/rootfs/run 48 | 49 | 50 | ########### ENTER CHROOT ################ 51 | 52 | sudo cp ~/chroot-iso.sh ${WORK}/rootfs/ 53 | sudo chroot ${WORK}/rootfs /bin/bash /chroot-iso.sh 54 | 55 | ########### LEAVE CHROOT ############### 56 | 57 | 58 | export kversion=`cd ${WORK}/rootfs/boot && ls -1 vmlinuz-* | tail -1 | sed 's@vmlinuz-@@'` 59 | sudo cp -vp ${WORK}/rootfs/boot/vmlinuz-${kversion} ${CD}/${FS_DIR}/vmlinuz 60 | sudo cp -vp ${WORK}/rootfs/boot/initrd.img-${kversion} ${CD}/${FS_DIR}/initrd.img 61 | sudo cp -vp ${WORK}/rootfs/boot/memtest86+.bin ${CD}/boot 62 | 63 | 64 | sudo umount ${WORK}/rootfs/proc 65 | sudo umount ${WORK}/rootfs/sys 66 | sudo umount ${WORK}/rootfs/dev 67 | sudo umount ${WORK}/rootfs/run 68 | 69 | sudo mksquashfs ${WORK}/rootfs ${CD}/${FS_DIR}/filesystem.${FORMAT} -noappend 70 | 71 | echo -n $(sudo du -s --block-size=1 ${WORK}/rootfs | tail -1 | awk '{print $1}') | sudo tee ${CD}/${FS_DIR}/filesystem.size 72 | 73 | find ${CD} -type f -print0 | sudo xargs -0 md5sum | sed "s@${CD}@.@" | grep -v md5sum.txt | sudo tee ${CD}/md5sum.txt 74 | 75 | cat << EOF | sudo tee ${CD}/boot/grub/grub.cfg 76 | set default="0" 77 | set timeout=10 78 | 79 | menuentry "Instant SDR" { 80 | linux /casper/vmlinuz boot=casper liveimg noprompt noeject -- 81 | initrd /casper/initrd.img 82 | } 83 | 84 | EOF 85 | 86 | sudo grub-mkrescue -o ~/instant-sdr.iso ${CD} 87 | -------------------------------------------------------------------------------- /grub2/.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf -------------------------------------------------------------------------------- /grub2/grub.cfg: -------------------------------------------------------------------------------- 1 | insmod part_msdos 2 | insmod fat 3 | insmod all_video 4 | 5 | font=unicode 6 | 7 | menuentry 'Instant SDR' { 8 | set isofile="/iso/instant-sdr.iso" 9 | loopback loop $isofile 10 | linux (loop)/casper/vmlinuz boot=casper persistent iso-scan/filename=$isofile liveimg net.ifnames=0 noprompt noeject -- 11 | initrd (loop)/casper/initrd.img 12 | } 13 | 14 | menuentry "System shutdown" { 15 | echo "System shutting down..." 16 | halt 17 | } 18 | 19 | menuentry "System restart" { 20 | echo "System rebooting..." 21 | reboot 22 | } 23 | -------------------------------------------------------------------------------- /meta-data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/meta-data -------------------------------------------------------------------------------- /preseed.cfg: -------------------------------------------------------------------------------- 1 | choose-mirror-bin mirror/http/proxy string 2 | d-i debian-installer/language string en 3 | d-i debian-installer/country string US 4 | d-i debian-installer/locale string en_US.UTF-8 5 | 6 | d-i time/zone string UTC 7 | d-i clock-setup/utc boolean true 8 | d-i clock-setup/utc-auto boolean true 9 | 10 | d-i keyboard-configuration/xkb-keymap select us 11 | 12 | d-i partman-basicfilesystems/no_swap boolean false 13 | d-i partman-auto/expert_recipe string myroot :: 1000 50 -1 ext4 \ 14 | $primary{ } $bootable{ } method{ format } \ 15 | format{ } use_filesystem{ } filesystem{ ext4 } \ 16 | mountpoint{ / } \ 17 | . 18 | d-i partman-auto/choose_recipe select myroot 19 | d-i partman-auto/method string regular 20 | d-i partman-partitioning/confirm_write_new_label boolean true 21 | d-i partman/choose_partition select finish 22 | d-i partman/confirm boolean true 23 | d-i partman/confirm_nooverwrite boolean true 24 | d-i partman-swapfile/percentage string 0 25 | d-i partman-swapfile/size string 0 26 | 27 | d-i passwd/root-password-again password sdr 28 | d-i passwd/root-password password sdr 29 | d-i passwd/user-fullname string sdr (password is sdr) 30 | d-i passwd/username string sdr 31 | d-i passwd/user-password password sdr 32 | d-i passwd/user-password-again password sdr 33 | d-i passwd/auto-login boolean false 34 | d-i user-setup/allow-password-weak boolean true 35 | 36 | d-i netcfg/choose_interface select auto 37 | 38 | d-i pkgsel/include string curl openssh-server sudo 39 | d-i pkgsel/install-language-support boolean false 40 | d-i pkgsel/update-policy select none 41 | d-i pkgsel/upgrade select full-upgrade 42 | tasksel tasksel/first multiselect standard, ubuntu-server 43 | 44 | d-i finish-install/reboot_in_progress note 45 | 46 | d-i preseed/late_command string \ 47 | echo 'Defaults:sdr !requiretty' > /target/etc/sudoers.d/sdr; \ 48 | echo 'sdr ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/sdr; \ 49 | chmod 440 /target/etc/sudoers.d/sdr; 50 | -------------------------------------------------------------------------------- /screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/screen1.png -------------------------------------------------------------------------------- /screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/screen2.png -------------------------------------------------------------------------------- /screen3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/screen3.png -------------------------------------------------------------------------------- /screen4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastibl/instant-gnuradio/adc9bf4fc7c5ca9c7a435e70f354e65c5ce4e438/screen4.png -------------------------------------------------------------------------------- /scripts/.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf -------------------------------------------------------------------------------- /scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | echo "==> Cleaning up tmp" 4 | rm -rf /tmp/* 5 | 6 | echo "==> Cleanup apt cache" 7 | apt-get -y autoremove --purge 8 | apt-get -y clean 9 | apt-get -y autoclean 10 | 11 | echo "==> Remove Bash history" 12 | unset HISTFILE 13 | rm -f /root/.bash_history 14 | rm -f /home/*/.bash_history 15 | 16 | echo "==> Clean up log files" 17 | find /var/log -type f | while read f; do echo -ne '' > "${f}"; done; 18 | 19 | echo "==> Clearing last login information" 20 | >/var/log/lastlog 21 | >/var/log/wtmp 22 | >/var/log/btmp 23 | 24 | echo "==> Whiteout root" 25 | count=$(df --sync -kP / | tail -n1 | awk -F ' ' '{print $4}') 26 | let count-- 27 | dd if=/dev/zero of=/tmp/whitespace bs=1024 count=$count 28 | rm /tmp/whitespace 29 | 30 | echo "==> Whiteout boot" 31 | count=$(df --sync -kP /boot | tail -n1 | awk -F ' ' '{print $4}') 32 | let count-- 33 | dd if=/dev/zero of=/boot/whitespace bs=1024 count=$count 34 | rm /boot/whitespace 35 | 36 | echo '==> Clear out swap and disable until reboot' 37 | set +e 38 | swapuuid=$(/sbin/blkid -o value -l -s UUID -t TYPE=swap) 39 | case "$?" in 40 | 2|0) ;; 41 | *) exit 1 ;; 42 | esac 43 | set -e 44 | if [ "x${swapuuid}" != "x" ]; then 45 | swappart=$(readlink -f /dev/disk/by-uuid/$swapuuid) 46 | /sbin/swapoff "${swappart}" 47 | dd if=/dev/zero of="${swappart}" bs=1M || echo "dd exit code $? is suppressed" 48 | /sbin/mkswap -U "${swapuuid}" "${swappart}" 49 | fi 50 | 51 | echo '==> Zero out the free space to save space in the final image' 52 | dd if=/dev/zero of=/EMPTY bs=1M || echo "dd exit code $? is suppressed" 53 | rm -f /EMPTY 54 | 55 | echo '==> Sync' 56 | sync 57 | -------------------------------------------------------------------------------- /scripts/init-base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections 6 | 7 | while (sudo fuser /var/lib/apt/lists/lock) >/dev/null 2>&1 ; do 8 | echo "Another package manager is currently using apt/lists. Waiting..." 9 | sleep 1s 10 | done 11 | while (sudo fuser /var/lib/dpkg/lock) >/dev/null 2>&1 ; do 12 | echo "Another package manager is currently using dpkg. Waiting..." 13 | sleep 1s 14 | done 15 | 16 | # stop unattended upgrades which can unpredictably ruin the automated builds 17 | sudo apt-get -y remove unattended-upgrades 18 | 19 | echo "==> Updating list of repositories" 20 | sudo apt-get -y update 21 | 22 | echo "==> adding apt-smart from pip and updating apt mirror" 23 | sudo apt-get -y install python3-pip 24 | sudo pip3 install apt-smart 25 | sudo apt-smart --auto-change-mirror 26 | 27 | echo "==> Upgrading Packages" 28 | sudo apt-get upgrade --fix-missing -y 29 | 30 | echo "==> Installing ubuntu-gnome-desktop" 31 | sudo apt-get install -y network-manager 32 | sudo systemctl start NetworkManager 33 | sudo apt-get install -y gnome-shell ubuntu-gnome-desktop 34 | 35 | ### NICER GDM SCREEN 36 | sudo update-alternatives --set gdm-theme.gresource /usr/share/gnome-shell/gnome-shell-theme.gresource 37 | 38 | ### NO WAYLAND 39 | sudo sed -i 's/#WaylandEnable=false/WaylandEnable=false/g' /etc/gdm3/custom.conf 40 | 41 | echo "==> Disabling the release upgrader" 42 | sudo sed -i 's/^Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades 43 | 44 | echo "Setting system locale to US" 45 | sudo locale-gen 46 | sudo localectl set-locale LANG="en_US.UTF-8" 47 | 48 | echo "UseDNS no" | sudo tee -a /etc/ssh/sshd_config 49 | 50 | echo "==> Custom Message of the Day" 51 | echo -e "\nWelcome to Instant SDR\n" | sudo tee -a /etc/motd 52 | 53 | echo "==> Stop Creating User Dirs" 54 | sudo sed -i s/enabled=True/enabled=False/g /etc/xdg/user-dirs.conf 55 | 56 | echo "==> Creating User Dirs" 57 | mkdir -p bin 58 | mkdir -p Documents 59 | mkdir -p Downloads 60 | mkdir -p Desktop 61 | mkdir -p Pictures 62 | mkdir -p src 63 | mkdir -p .local/share/applications 64 | mkdir -p .config/autostart 65 | mkdir -p .config/terminator 66 | mkdir -p .fonts 67 | mkdir -p .vim/colors 68 | -------------------------------------------------------------------------------- /scripts/setup-base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections 6 | 7 | while (sudo fuser /var/lib/apt/lists/lock) >/dev/null 2>&1 ; do 8 | echo "Another package manager is currently using apt/lists. Waiting..." 9 | sleep 1s 10 | done 11 | while (sudo fuser /var/lib/dpkg/lock) >/dev/null 2>&1 ; do 12 | echo "Another package manager is currently using dpkg. Waiting..." 13 | sleep 1s 14 | done 15 | 16 | sudo apt-get -y remove update-notifier update-manager 17 | sudo killall update-notifier || echo "update notifier not running" 18 | sleep 5s 19 | sudo apt-get -y remove apport gnome-initial-setup 20 | sudo apt-get update 21 | 22 | sudo apt-get -y install clang cmake cmake-qt-gui curl dconf-editor git git-core git-gui gitk gparted htop libboost-all-dev meld open-vm-tools-desktop pavucontrol screen silversearcher-ag terminator tig tmux tree virtualbox-guest-utils wget xterm xvfb 23 | 24 | ### Drivers 25 | sudo apt-get -y remove virtualbox-guest-x11 26 | sudo apt-get -y install bcmwl-kernel-source 27 | sudo apt-get -y install exfatprogs exfat-fuse 28 | 29 | ### WIRESHARK 30 | echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections 31 | sudo apt-get -y install wireshark 32 | sudo usermod -aG wireshark sdr 33 | sudo usermod -aG plugdev sdr 34 | 35 | ### ZSH 36 | sudo apt-get -y install zsh 37 | mkdir -p src 38 | git clone https://github.com/robbyrussell/oh-my-zsh.git src/oh-my-zsh 39 | sudo chsh -s /bin/zsh sdr 40 | 41 | ### FONTS 42 | fc-cache -fr 43 | 44 | ### VS Code 45 | sudo snap install --classic code 46 | 47 | ### VIM 48 | sudo apt-get -y install vim vim-gtk3 49 | mkdir -p .vim/bundle 50 | mkdir -p .swp 51 | git clone https://github.com/mauricioms/Vundle.vim.git ~/.vim/bundle/Vundle.vim 52 | vim +VundleInstall +qall 53 | 54 | ### WALLPAPER 55 | xvfb-run -a dconf write /org/gnome/desktop/background/picture-uri \"file:///home/sdr/Pictures/wallpaper.png\" 56 | 57 | ### NAUTILUS 58 | xvfb-run -a dconf write /org/gnome/nautilus/preferences/default-folder-viewer \"list-view\" 59 | xvfb-run -a dconf write /org/gnome/nautilus/icon-view/default-zoom-level \"standard\" 60 | 61 | ### Desktop 62 | # xvfb-run -a dconf write /org/gnome/desktop/background/show-desktop-icons true 63 | # xvfb-run -a dconf write /org/gnome/nautilus/desktop/home-icon-visible true 64 | # xvfb-run -a dconf write /org/gnome/nautilus/desktop/network-icon-visible false 65 | # xvfb-run -a dconf write /org/gnome/nautilus/desktop/trash-icon-visible true 66 | # xvfb-run -a dconf write /org/gnome/nautilus/desktop/volumes-visible false 67 | 68 | ### Screen Blanking 69 | xvfb-run -a dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-timeout 'int32 0' 70 | xvfb-run -a dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-battery-timeout 'int32 0' 71 | xvfb-run -a dconf write /org/gnome/desktop/session/idle-delay 'uint32 0' 72 | 73 | ### GNOME Updates 74 | # xvfb-run -a dconf write /org/gnome/software/allow-updates false 75 | # xvfb-run -a dconf write /org/gnome/software/download-updates false 76 | 77 | ### CPU Freq 78 | sudo apt-get -y install cpufrequtils 79 | sudo systemctl stop cpufrequtils 80 | sudo systemctl disable cpufrequtils 81 | echo "GOVERNOR=\"performance\"" | sudo tee -a /etc/default/cpufrequtils 82 | 83 | ### Favorites 84 | xvfb-run -a dconf write /org/gnome/shell/favorite-apps "['terminator.desktop', 'firefox.desktop', 'org.gnome.Nautilus.desktop']" 85 | 86 | echo 'debconf debconf/frontend select Dialog' | sudo debconf-set-selections 87 | -------------------------------------------------------------------------------- /scripts/setup-sdr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eux 4 | 5 | export LANG=en_US.UTF-8 6 | export PATH="$HOME/.local/bin:${PATH}" 7 | 8 | sudo lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv 9 | sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv 10 | 11 | echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections 12 | 13 | cd 14 | sudo mv 90-usrp.conf /etc/sysctl.d/ 15 | 16 | cd 17 | echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib' >> .profile 18 | echo 'export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3/dist-packages' >> .profile 19 | echo 'export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3/site-packages' >> .profile 20 | echo 'export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.10/dist-packages' >> .profile 21 | echo 'export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.10/site-packages' >> .profile 22 | 23 | cd /tmp 24 | sudo mkdir /tmp/isomount 25 | sudo mount -t iso9660 -o loop /home/sdr/VBoxGuestAdditions.iso /tmp/isomount 26 | 27 | # Install the drivers 28 | yes | sudo /tmp/isomount/VBoxLinuxAdditions.run || echo 29 | 30 | # Cleanup 31 | sudo umount isomount 32 | sudo rm -rf isomount /home/sdr/VBoxGuestAdditions.iso 33 | 34 | echo "sdr - rtprio 99" | sudo tee -a /etc/security/limits.conf 35 | sudo apt-get update 36 | sudo apt-get -y upgrade 37 | 38 | sudo apt-get -y install jupyter jupyter-qtconsole jupyter-notebook python3-matplotlib python3-ipython python3-scipy python3-numpy python3-pip python3-requests multimon-ng sox liborc-dev gr-fosphor gr-osmosdr gqrx-sdr inspectrum hackrf soapysdr-tools libsoapysdr-dev soapysdr0.8-module-{bladerf,hackrf,osmosdr,rtlsdr,uhd} gnuradio gnuradio-dev gr-rds gr-satellites rtl-sdr bladerf jq 39 | 40 | sudo snap install urh 41 | 42 | sudo groupadd usrp 43 | sudo usermod -aG usrp sdr 44 | sudo apt-get -y install clinfo mesa-utils 45 | sudo usermod -aG video sdr 46 | sudo usermod -aG dialout sdr 47 | sudo usermod -aG lpadmin sdr 48 | 49 | sudo apt-get -y install intel-opencl-icd lsb-core 50 | 51 | sudo apt-get -y install uhd-host 52 | sudo /usr/bin/uhd_images_downloader 53 | 54 | cd ~/Downloads 55 | tar xvf l_opencl_p_18.1.0.015.tgz 56 | sudo l_opencl_p_18.1.0.015/install.sh -s opencl-silent.cfg 57 | 58 | cd 59 | xdg-icon-resource install --context apps --novendor --size 96 Pictures/fosphor-icon.png 60 | xdg-icon-resource install --context apps --novendor --size 96 Pictures/futuresdr-icon.png 61 | xdg-icon-resource install --context apps --novendor --size 96 Pictures/gqrx-icon.png 62 | xdg-icon-resource install --context apps --novendor --size 96 Pictures/inspectrum-icon.png 63 | xdg-icon-resource install --context apps --novendor --size 96 Pictures/urhpng.png 64 | 65 | rm -rf Downloads/* 66 | 67 | ### FAVORITE APPLICATIONS 68 | update-desktop-database ~/.local/share/applications 69 | xvfb-run dconf write /org/gnome/shell/favorite-apps "['gnuradio-grc.desktop', 'gqrx.desktop', 'fosphor.desktop', 'inspectrum.desktop', 'urh.desktop', 'terminator.desktop', 'code_code.desktop', 'futuresdr-web.desktop', 'firefox_firefox.desktop', 'org.gnome.Nautilus.desktop']" 70 | 71 | ### The German Code 72 | # xvfb-run dconf write /org/gnome/desktop/input-sources/sources "[('xkb', 'de')]" 73 | 74 | curl https://sh.rustup.rs -sSf | sh -s -- -y 75 | source ~/.cargo/env 76 | rustup install nightly 77 | rustup default nightly 78 | rustup component add rust-src 79 | rustup component add rust-analyzer 80 | rustup target add wasm32-unknown-unknown 81 | 82 | sudo apt-get -y install libfontconfig-dev libssl-dev 83 | cargo install alacritty 84 | cargo install bat 85 | cargo install fd-find 86 | cargo install cargo-asm 87 | cargo install cargo-check 88 | cargo install cargo-expand 89 | cargo install cargo-update 90 | cargo install cargo-watch 91 | cargo install exa 92 | cargo install procs 93 | cargo install trunk 94 | cargo install wasm-pack 95 | 96 | git clone https://github.com/FutureSDR/FutureSDR ~/Desktop/futuresdr 97 | 98 | echo 'debconf debconf/frontend select Dialog' | sudo debconf-set-selections 99 | -------------------------------------------------------------------------------- /sdr.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "virtualbox-ovf", 5 | "headless": true, 6 | "source_path": "vms/base/instant-sdr-base.ova", 7 | "ssh_username": "sdr", 8 | "ssh_password": "sdr", 9 | "shutdown_command": "sudo systemctl poweroff", 10 | "guest_additions_mode": "disable", 11 | "vm_name": "instant-sdr", 12 | "export_opts": [ 13 | "--manifest", 14 | "--vsys", "0", 15 | "--description", "Instant SDR", 16 | "--version", "instant-1" 17 | ], 18 | "format": "ova", 19 | "output_directory": "vms/sdr" 20 | } 21 | ], 22 | "provisioners": [ 23 | { 24 | "type": "file", 25 | "source": "assets/gnuradio-web.desktop", 26 | "destination": ".local/share/applications/gnuradio-web.desktop" 27 | }, 28 | { 29 | "type": "file", 30 | "source": "assets/futuresdr-web.desktop", 31 | "destination": ".local/share/applications/futuresdr-web.desktop" 32 | }, 33 | { 34 | "type": "file", 35 | "source": "assets/90-usrp.conf", 36 | "destination": "90-usrp.conf" 37 | }, 38 | { 39 | "type": "file", 40 | "source": "assets/l_opencl_p_18.1.0.015.tgz", 41 | "destination": "Downloads/l_opencl_p_18.1.0.015.tgz" 42 | }, 43 | { 44 | "type": "file", 45 | "source": "assets/opencl-silent.cfg", 46 | "destination": "Downloads/opencl-silent.cfg" 47 | }, 48 | { 49 | "type": "shell", 50 | "inline": ["mkdir ~/.gnuradio"] 51 | }, 52 | { 53 | "type": "file", 54 | "source": "assets/config.conf", 55 | "destination": ".gnuradio/config.conf" 56 | }, 57 | { 58 | "type": "file", 59 | "source": "assets/gqrx.desktop", 60 | "destination": ".local/share/applications/gqrx.desktop" 61 | }, 62 | { 63 | "type": "file", 64 | "source": "assets/fosphor.desktop", 65 | "destination": ".local/share/applications/fosphor.desktop" 66 | }, 67 | { 68 | "type": "file", 69 | "source": "assets/inspectrum.desktop", 70 | "destination": ".local/share/applications/inspectrum.desktop" 71 | }, 72 | { 73 | "type": "file", 74 | "source": "assets/urh.desktop", 75 | "destination": ".local/share/applications/urh.desktop" 76 | }, 77 | { 78 | "type": "file", 79 | "source": "assets/gqrx-icon.png", 80 | "destination": "Pictures/gqrx-icon.png" 81 | }, 82 | { 83 | "type": "file", 84 | "source": "assets/inspectrum-icon.png", 85 | "destination": "Pictures/inspectrum-icon.png" 86 | }, 87 | { 88 | "type": "file", 89 | "source": "assets/fosphor-icon.png", 90 | "destination": "Pictures/fosphor-icon.png" 91 | }, 92 | { 93 | "type": "file", 94 | "source": "assets/futuresdr-icon.png", 95 | "destination": "Pictures/futuresdr-icon.png" 96 | }, 97 | { 98 | "type": "file", 99 | "source": "assets/urhpng.png", 100 | "destination": "Pictures/urhpng.png" 101 | }, 102 | { 103 | "type": "shell", 104 | "scripts": [ 105 | "scripts/setup-sdr.sh" 106 | ] 107 | }, 108 | { 109 | "type": "shell", 110 | "scripts": [ 111 | "scripts/cleanup.sh" 112 | ], 113 | "execute_command": "sudo -E bash '{{.Path}}'" 114 | } 115 | ] 116 | } 117 | -------------------------------------------------------------------------------- /user-data: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | autoinstall: 3 | version: 1 4 | locale: en_US.UTF-8 5 | early-commands: 6 | - systemctl stop ssh 7 | identity: 8 | hostname: flinn 9 | realname: "SDR (password is sdr)" 10 | username: sdr 11 | # echo sdr | mkpasswd -m sha-512 -s 12 | password: "$6$YMIsbr5Xk7sXRjbs$ewJYmUGgAsX.g8eADkiryK55D7m67BACzibgjyXRskDze4a7s/jdRiRJxbbFYMyP.rZxLvqDYPDjQulK3z1LN1" 13 | ssh: 14 | install-server: yes 15 | user-data: 16 | disable_root: false 17 | late-commands: 18 | - echo 'sdr ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/sdr 19 | --------------------------------------------------------------------------------